nx_hmac_sha384.nx
buildroot/runtime/nx_hmac_sha384.nx
about
hmac_sha384.nx -- HMAC-SHA-384 (RFC 2104 / FIPS 198-1).
license_tier: INDEPENDENT_REDERIVE
genealogy_id: international-research-sources/nist/fips_198_1
Parallel to hmac.nx but keyed on SHA-384 instead of SHA-256.
Required for TLS 1.3 cipher suites that negotiate SHA-384 in
the key schedule (e.g. TLS_AES_256_GCM_SHA384).
Differences from hmac.nx:
- Block size B = 128 bytes (SHA-384 / SHA-512 block), not 64.
- Hash output = 48 bytes (SHA-384), not 32.
- Key-pre-hash uses sha384_digest for oversized keys.
Key processing (RFC 2104) remains identical in structure:
K' = H(K) if len(K) > B
K' = K || zeros if len(K) < B
K' = K if len(K) == B
ipad / opad bytes XOR'd against K' block.
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_sha512.nx
imported by: nx_hkdf.nxnx_hkdf_sha384.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 30 | const HMAC384_BLOCK: i64 = 128 |
| 31 | const HMAC384_HASH: i64 = 48 |
| 32 | const IPAD_384: i64 = 0x36 |
| 33 | const OPAD_384: i64 = 0x5C |
functions
| 35 | func hmac_sha384(key: *u8, key_len: i64, msg: *u8, msg_len: i64, |
| 86 | func main() -> i64 |