code wiki / _hdl_build / nx_hkdf384_gate.nx

nx_hkdf384_gate.nx

buildroot/runtime/_hdl_build/nx_hkdf384_gate.nx

7659 B142 linesdepth 7pulls 10 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_hkdf384_gate.nx -- the SHA-384 half of HKDF, proven without inventing a vector. WHY THIS EXISTS. Our sovereign TLS client offers 0x1302 (AES-256-GCM-SHA384) and then cannot derive its keys: the whole 1.3 key schedule runs on SHA-384 for that suite, while nx_hkdf.nx was SHA-256 by construction. Servers that PREFER 0x1302 were unreachable and the failure surfaced as a bare handshake verdict=5 three layers from the cause. Every primitive already existed (hmac_sha384, sha384_digest, nx_aes256_gcm_seal/open) -- the gap was wiring, the banked adoption-gap class. This gate covers the hash-parameterized hkdf_extract_h/expand_h. ★THE HONEST PROBLEM THIS GATE SOLVES: RFC 5869 publishes vectors for SHA-256 and SHA-1 ONLY. There is NO published HKDF-SHA-384 test vector. Writing down whatever our code prints and calling it a KAT is fabrication wearing a citation -- the exact "invented golden" class already banked in this estate. So SHA-384 is proven by DEFINITIONAL IDENTITY instead: RFC 5869 defines Extract as HMAC(salt, IKM) and Expand's T(1) as HMAC(PRK, info || 0x01), and this gate recomputes both sides independently with hmac_sha384 and demands bit equality. A definition is re-derivable by anyone; a screenshot of our output is not. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_hkdf.nx nx_hkdf384_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_hkdf.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap gv_head gv_puts sys_write sys_mmap ↻ hkdf_extract 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_compress_ni blk_word sha256_final blk_set_byte ↻ sha256_compress ↻ sha256_init ↻ sha256_update ↻ sha256_final ↻ hg_a1_prk_byte gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_check gv_puts ↻ hkdf_extract_h sys_mmap ↻ hmac_sha384 sys_mmap ↻

structs

none

consts

22const HG_H256: i64 = 32
23const HG_H384: i64 = 48

functions

25func hg_eq(a: *u8, b: *u8, n: i64) -> i64
called by 1: main
35func hg_a1_prk_byte(i: i64) -> i64
called by 1: main
46func main(argc: i64, argv: *i64) -> i64