code wiki / (root) / nx_tls12_keys_test.nx

nx_tls12_keys_test.nx

buildroot/runtime/nx_tls12_keys_test.nx

3821 B77 linesdepth 8pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic tls12
docsdependenciesstructsconstsfunctions

about

nx_tls12_keys_test.nx -- KAT for the TLS 1.2 key schedule (rung 3, no network). Proves the wiring matches RFC 5246 by deriving each value via the rung-3 functions AND via a direct nx_tls12_prf_sha256 call with the spec's label + seed order, then asserting equality. The PRF itself is already RFC-KAT'd (nx_tls12_prf_test), so matching it == correct. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_tls12_keys.nx nx_tls12_keys_test.nx

imports: nx_syscalls.nxnx_tls12_keys.nx

imported by: nobody (leaf or entry point)

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

main tk_p sys_write tk_slen sys_mmap tls12_derive_master_secret sys_mmap ↻ nx_tls12_prf_sha256 sys_mmap ↻ hmac_sha256 sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_final blk_set_byte ↻ sha256_compress ↻ sha256_init ↻ sha256_update ↻ sha256_final ↻ nx_tls12_prf_sha256 ↻ tk_eq tk_row tk_p ↻ tls12_derive_key_block sys_mmap ↻ nx_tls12_prf_sha256 ↻ tls12_split_keys_aes128gcm tls12_finished_verify_data nx_tls12_prf_sha256 ↻ sys_write ↻

structs

none

consts

none

functions

8func tk_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: tk_p
9func tk_p(s: *u8) -> i64 { sys_write(1, s, tk_slen(s)); return 0 }
called by 2: tk_rowmain calls 2: sys_writetk_slen
10func tk_row(name: *u8, pass: i64) -> i64
called by 1: main calls 1: tk_p
15func tk_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
17func main() -> i64