code wiki / (root) / sha256_test.nx

sha256_test.nx

buildroot/runtime/sha256_test.nx

3289 B83 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic sha256
docsdependenciesstructsconstsfunctions

about

sha256_test.nx -- verify against known FIPS 180-4 test vectors. Vector 1: SHA-256("abc") = ba7816bf 8f01cfea 414140de 5dae2223 b00361a3 96177a9c b410ff61 f20015ad Vector 2: SHA-256("") = e3b0c442 98fc1c14 9afbf4c8 996fb924 27ae41e4 649b934c a495991b 7852b855 license_tier: INDEPENDENT_REDERIVE genealogy_id: international-research-sources/nist/fips_180_4 license_tier: INDEPENDENT_REDERIVE genealogy_id: international-research-sources/nist/fips_180_4

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_sha256.nx sha256_test.nx

imports: nx_syscalls.nxnx_sha256.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 sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word blk_byte sha256_final blk_set_byte ↻ sha256_compress ↻ load_expected_abc set_byte digest_eq load_expected_empty set_byte ↻

structs

none

consts

none

functions

24func digest_eq(out: *u8, expected: *u8) -> i64
called by 1: main
33func set_byte(buf: *u8, i: i64, v: i64) -> i64
39func load_expected_abc(e: *u8) -> i64
called by 1: main calls 1: set_byte
52func load_expected_empty(e: *u8) -> i64
called by 1: main calls 1: set_byte
64func main() -> i64