code wiki / (root) / nx_tls12_record_test.nx

nx_tls12_record_test.nx

buildroot/runtime/nx_tls12_record_test.nx

2716 B52 linesdepth 6pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic tls12
docsdependenciesstructsconstsfunctions

about

nx_tls12_record_test.nx -- KAT for the TLS 1.2 AES-128-GCM record layer (rung 4, no network). Round-trips a 32-byte application_data record (seal -> open -> recovered == original) and proves the AEAD tag rejects tampering (flip one ciphertext byte -> open fails). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_tls12_record.nx nx_tls12_record_test.nx

imports: nx_syscalls.nxnx_tls12_record.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main rt_p sys_write rt_slen sys_mmap tls12_record_seal sys_mmap ↻ _r12_nonce _r12_aad nx_aes128_gcm_seal sys_mmap ↻ aes128_expand_key _aes_sbox _aes_rcon aes128_encrypt_block nx_ghash_reflect16 gh_byterev_bits gh_revtab sys_mmap ↻ gh_revbyte nx_ghash_mul_rev gh_clmul_core gh_scratch sys_mmap ↻ gh_clmul_mul256_acc gh_scratch ↻ gh_clmul_reduce256 gh_lshr nx_ghash_upd_rev gh_rev_scratch sys_mmap ↻ gh_byterev_bits ↻ gh_clmul_core ↻ nx_aes128_gcm_inc32 gcm_ctr_store nx_aes128_gcm_inc32 ↻ nx_ghash_upd_rev4 gh_agg_scratch sys_mmap ↻ gh_byterev_bits ↻

structs

none

consts

none

functions

7func rt_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: rt_p
8func rt_p(s: *u8) -> i64 { sys_write(1, s, rt_slen(s)); return 0 }
called by 2: rt_rowmain calls 2: sys_writert_slen
9func rt_row(name: *u8, pass: i64) -> i64
called by 1: main calls 1: rt_p
14func rt_eq(a: *u8, b: *u8, n: i64) -> i64 { var i: i64 = 0; while i < n { if a[i] != b[i] { return 0 } i = i + 1 } return 1 }
called by 1: main
16func main() -> i64