code wiki / (root) / nx_sha256_sha384_coexist_kat_test.nx

nx_sha256_sha384_coexist_kat_test.nx

buildroot/runtime/nx_sha256_sha384_coexist_kat_test.nx

2150 B63 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic sha256
docsdependenciesstructsconstsfunctions

about

nx_sha256_sha384_coexist_kat_test.nx -- regression KAT for the top-level `func blk_set_byte(...)` collision that silently corrupted SHA-256 whenever nx_sha384/nx_sha512 was also imported (2026-05-20, root cause of cert chain verify failures). Imports BOTH nx_sha256.nx and nx_sha512.nx (where sha384 lives), computes a SHA-256 over a known input, and asserts the digest matches the FIPS 180-4 KAT for SHA-256("abc"). expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_sha256.nx nx_sha512.nx nx_sha256_sha384_coexist_kat_t

imports: nx_syscalls.nxnx_sha256.nxnx_sha512.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 nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_seed_allocated 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 ↻ sha256_destroy sys_munmap sys_munmap ↻ sha384_digest sys_mmap ↻ sha384_init sha512_update sha512_blk_set_byte

structs

none

consts

none

functions

17func main() -> i64