code wiki / (root) / nx_tls12_prf.nx

nx_tls12_prf.nx

buildroot/runtime/nx_tls12_prf.nx

2450 B67 linesdepth 6pulls 6 transitivereach 358 importersview sourcekind tooltopic tls12
docsdependenciesstructsconstsfunctions

about

nx_tls12_prf.nx -- TLS 1.2 PRF (RFC 5246 ยง5), the key-derivation core of the sovereign TLS 1.2 client lane (B2-TLS12-001). TLS 1.2 (unlike 1.3, which uses HKDF) derives the master secret + key block via: PRF(secret, label, seed) = P_SHA256(secret, label || seed) P_hash(secret, seed) = HMAC(secret, A(1)||seed) || HMAC(secret, A(2)||seed) || ... A(0) = seed ; A(i) = HMAC(secret, A(i-1)) For the modern cipher suites we target (ECDHE-RSA-AES128-GCM-SHA256, as on httpbin.org / AWS-ELB-class TLS-1.2-only servers) the PRF hash is SHA-256. Composes the shipped hmac_sha256 -- no new primitive. license_tier: INDEPENDENT_REDERIVE genealogy_id: international-research-sources/ietf/rfc_5246 lineage_id: nishi_tls12_prf_q1

dependencies 2 imports · 3 importers

nx_syscalls.nx nx_hmac.nx nx_tls12_prf.nx nx_tls12_keys.nx nx_tls12_prf_gate.nx nx_tls12_prf_test.nx

imports: nx_syscalls.nxnx_hmac.nx

imported by: nx_tls12_keys.nxnx_tls12_prf_gate.nxnx_tls12_prf_test.nx

structs

none

consts

none

functions

22func nx_tls12_prf_sha256(secret: *u8, secret_len: i64,
65func main() -> i64