code wiki / _hdl_build / nx_hkdf384_gate.nx
nx_hkdf384_gate.nx
buildroot/runtime/_hdl_build/nx_hkdf384_gate.nx
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
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
structs
| none |
consts
| 22 | const HG_H256: i64 = 32 |
| 23 | const HG_H384: i64 = 48 |
functions
| 25 | func hg_eq(a: *u8, b: *u8, n: i64) -> i64 called by 1: main |
| 35 | func hg_a1_prk_byte(i: i64) -> i64 called by 1: main |
| 46 | func main(argc: i64, argv: *i64) -> i64 |