code wiki / (root) / nx_hmac_md5.nx

nx_hmac_md5.nx

buildroot/runtime/nx_hmac_md5.nx

2945 B101 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic hmac
docsdependenciesstructsconstsfunctions

about

hmac_md5.nx -- HMAC with MD5 (RFC 2104). license_tier: INDEPENDENT_REDERIVE genealogy_id: international-research-sources/ietf/rfc_2104 Like HMAC-SHA1: even though plain MD5 is broken for signatures, HMAC-MD5 remains safe for authentication because HMAC relies on pseudo-randomness of the keyed mix, not collision resistance. Still on the wire in: - RADIUS Access-Request Message-Authenticator (RFC 3579) - CRAM-MD5 SASL auth (IMAP, POP3, SMTP legacy) - Microsoft MS-CHAP-v2 password challenge - NTLMv1 / NTLMv2 (the real world's Windows auth) Composes md5.nx with standard ipad/opad construction. Invariants: HM1 Output = 16 bytes (MD5 tag length). HM2 Matches RFC 2104 Appendix test vectors.

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_md5_canonical.nx nx_hmac_md5.nx

imports: nx_syscalls.nxnx_md5_canonical.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap hmac_md5 sys_mmap ↻ md5 sys_mmap ↻ md5_process_block sys_mmap ↻ md5_g md5_k md5_rotl md5_s

structs

none

consts

30const HMAC_MD5_BLOCK: i64 = 64
31const HMAC_MD5_OUT: i64 = 16

functions

33func hmac_md5(key: *u8, key_len: i64,
called by 1: main calls 2: sys_mmapmd5
84func main() -> i64