nx_aes128_gcm.nx
buildroot/runtime/nx_aes128_gcm.nx
about
nx_aes128_gcm.nx -- canonical AES-128-GCM (AEAD) per NIST SP 800-38D
+ RFC 5288 (TLS). 96-bit IV form only (the only form TLS 1.3 uses).
COMPOSED, not re-implemented:
- AES-128 block encrypt + key expansion -> nx_aes.nx (canonical
S-box, MixColumns, ShiftRows, AddRoundKey)
- GF(2^128) multiplication / GHASH -> nx_ghash.nx
Per the bit-level no-tool-proliferation cardinal, this file MUST
NOT re-implement either AES or GHASH inline. Future hardware-
accelerated variants (AES-NI on x86, AES instructions on aarch64)
ship as alternative backends behind the same API surface.
Public API (TLS 1.3 record-layer compatible):
nx_aes128_gcm_seal(key16, iv12, aad, aad_len, pt, pt_len,
ct_out, tag16_out) -> 0
nx_aes128_gcm_open(key16, iv12, aad, aad_len, ct, ct_len, tag16,
pt_out) -> 0 | -1 (tag fail)
Per Cardinals 9 (single-responsibility), 22 (composition).
license_tier: INDEPENDENT_REDERIVE
genealogy_id: international-research-sources/nist/sp_800_38d + ietf/rfc_5288
lineage_id: nishi_aes128_gcm_q10
dependencies 3 imports · 13 importers
diagram shows first 10 each side; +0 more imports, +3 more importers in the complete lists below.
imports: nx_syscalls.nxnx_aes.nxnx_ghash.nx
imported by: _aes128_gcm_throughput_bench.nxnx_aes128_gcm_kat_test.nxnx_aesctr_ni_bench.nxnx_aesgcm_bench.nxnx_aesni_kat.nxnx_quic_aead.nxnx_tls12_client.nxnx_tls12_mutant.nxnx_tls12_record.nxnx_tls12_record_gcm_gate.nxnx_tls12_req.nxnx_tls13_record.nxnx_vault_transit.nx
structs
| none |
consts
| none |
functions
| 39 | func nx_aes128_gcm_inc32(ctr: *u8) -> i64 |
| 55 | func nx_aes128_gcm_tag_eq(a: *u8, b: *u8) -> i64 called by 1: nx_aes128_gcm_open |
| 69 | func gcm_ctr_store(ctr: *u8, sched: *u8, pt: *u8, ct_out: *u8, pos: i64, ks: *u8) -> i64 |
| 93 | func nx_aes128_gcm_seal(key16: *u8, iv12: *u8, |
| 215 | func nx_aes128_gcm_open(key16: *u8, iv12: *u8, |
| 279 | func main() -> i64 |