code wiki / (root) / hkdf_sha384.nx

hkdf_sha384.nx

buildroot/runtime/hkdf_sha384.nx

2919 B92 linesdepth 6pulls 6 transitivereach 0 importersview sourcekind tooltopic hkdf
docsdependenciesstructsconstsfunctions

about

hkdf_sha384.nx -- HKDF-SHA-384 (RFC 5869). Parallel to hkdf.nx but keyed on HMAC-SHA-384. Required for TLS 1.3 cipher suites that use SHA-384 throughout the key schedule (e.g. TLS_AES_256_GCM_SHA384 per RFC 8446 §B.4). Two-stage design (identical shape to hkdf.nx): Extract(salt, IKM) -> PRK = HMAC-SHA-384(salt, IKM) [48-byte PRK] Expand(PRK, info, L) -> OKM via counter-mode HMAC chain Output capacity: 255 * 48 = 12240 bytes. TLS 1.3 never needs more than a few hundred, so this is ample.

dependencies 2 imports · 0 importers

syscalls.nx hmac_sha384.nx hkdf_sha384.nx

imports: syscalls.nxhmac_sha384.nx

imported by: nobody (leaf or entry point)

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

main hkdf384_extract hmac_sha384 sha384_digest sha384_init sha512_update blk_set_byte blk_get_i64 blk_set_i64 sha512_compress blk_get_i64 ↻ sha512_gamma0 sha512_gamma1 sha512_sigma1 sha512_ch sha512_k sha512_sigma0 sha512_maj sha512_final blk_set_byte ↻ sha512_compress ↻ sha384_init ↻ sha512_update ↻ sha512_final ↻ hkdf384_expand hmac_sha384 ↻

structs

none

consts

17const HKDF384_HASH: i64 = 48
18const HKDF384_MAX_L: i64 = 12240

functions

20func hkdf384_extract(salt: *u8, salt_len: i64,
called by 1: main calls 1: hmac_sha384
34func hkdf384_expand(prk: *u8,
called by 1: main calls 1: hmac_sha384
76func main() -> i64 {