code wiki / (root) / nx_hmac_sha512.nx

nx_hmac_sha512.nx

buildroot/runtime/nx_hmac_sha512.nx

2647 B84 linesdepth 5pulls 5 transitivereach 1 importersview sourcekind tooltopic hmac
docsdependenciesstructsconstsfunctions

about

hmac_sha512.nx -- HMAC-SHA-512 (RFC 2104 / FIPS 198-1). license_tier: INDEPENDENT_REDERIVE genealogy_id: international-research-sources/nist/fips_198_1 Completes the HMAC family: SHA-256, SHA-384, SHA-512. Used where TLS cipher suites or key-derivation ladders want the full 512-bit MAC width (relatively rare, but present in some SSH / OpenPGP / JWT profiles). Differences from hmac.nx: - Block size B = 128 bytes (SHA-512 block), not 64. - Hash output = 64 bytes (SHA-512), not 32. - Uses sha512_init instead of sha256_init.

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_sha512.nx nx_hmac_sha512.nx nx_hkdf_sha512.nx

imports: nx_syscalls.nxnx_sha512.nx

imported by: nx_hkdf_sha512.nx

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

main sys_mmap hmac_sha512 sys_mmap ↻ sha512_digest sys_mmap ↻ sha512_init sha512_update sha512_blk_set_byte blk_get_i64 blk_set_i64 sha512_compress sys_mmap ↻ blk_get_i64 ↻ sha512_gamma0 rotr64_v shr64_v sha512_gamma1 rotr64_v ↻ shr64_v ↻ sha512_sigma1 rotr64_v ↻ sha512_ch sha512_k sha512_sigma0 rotr64_v ↻ sha512_maj sha512_final sha512_blk_set_byte ↻ sha512_compress ↻ sha512_init ↻ sha512_update ↻ sha512_final ↻

structs

none

consts

25const HMAC512_BLOCK: i64 = 128
26const HMAC512_HASH: i64 = 64
27const IPAD_512: i64 = 0x36
28const OPAD_512: i64 = 0x5C

functions

30func hmac_sha512(key: *u8, key_len: i64, msg: *u8, msg_len: i64,
76func main() -> i64