code wiki / _hdl_build / nx_md5_kat.nx

nx_md5_kat.nx

buildroot/runtime/_hdl_build/nx_md5_kat.nx

2518 B35 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tooltopic md5
docsdependenciesstructsconstsfunctions

about

nx_md5_kat.nx -- SOVEREIGN known-answer test for nx_md5_canonical, using the RFC 1321 Appendix A.5 suite (no oracle: the RFC vectors ARE the known answers). Explicit byte-lengths (so the empty case is a true n=0, not a strlen of the "" literal), and 62- and 80-byte inputs so the MULTI-BLOCK path is exercised (the old compile-only smoke only ever hashed <=3-byte single-block inputs). GREEN iff every vector matches. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_md5_canonical.nx nx_hex_codec.nx nx_md5_kat.nx

imports: nx_syscalls.nxnx_md5_canonical.nxnx_hex_codec.nx

imported by: nobody (leaf or entry point)

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

main k_puts sys_write k_check sys_mmap md5 sys_mmap ↻ md5_process_block sys_mmap ↻ md5_g md5_k md5_rotl md5_s hex_encode k_puts ↻ k_eq sys_mmap ↻ sys_write ↻ sys_exit

structs

none

consts

none

functions

10func k_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: k_checkmain calls 1: sys_write
11func k_eq(a: *u8, b: *u8) -> i64 { var i: i64=0; while b[i]!=(0 as u8){ if a[i]!=b[i]{return 0} i=i+1 } return 1 }
called by 1: k_check
12func k_check(label: *u8, data: *u8, n: i64, exp: *u8) -> i64
21func main() -> i64