code wiki / (root) / nx_shani_block_probe.nx

nx_shani_block_probe.nx

buildroot/runtime/nx_shani_block_probe.nx

4423 B122 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind probe
docsdependenciesstructsconstsfunctions

about

nx_shani_block_probe.nx -- BLOCK-LEVEL oracle probe for the SHA-NI intrinsic. Validates __sha256_ni_block (hardware SHA extension) against the software sha256_compress on the SAME single 64-byte block, for several blocks. This is the bit-exact correctness gate that must pass BEFORE the mainline sha256_compress is routed through the intrinsic. Software path is the ORACLE. exit 0 = every block's NI result matches the software result word-for-word. nonzero = first mismatch (encodes which block / which word). expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_sha256.nx nx_shani_block_probe.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 build_k32 sha256_k check_block sys_mmap ↻ sw_block sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k ↻ sha256_compress sha256_compress_ni blk_word blk_byte ni_block sys_mmap ↻

structs

none

consts

16const K_MAGIC_1103515245: i64 = 1103515245
17const K_MAGIC_12345: i64 = 12345

functions

24func sw_block(block: *u8, out8: *i64) -> i64
38func build_k32(k32: *i32) -> i64
called by 1: main calls 1: sha256_k
45func ni_block(block: *u8, k32: *i32, out8: *i64) -> i64
called by 1: check_block calls 1: sys_mmap
60func check_block(block: *u8, k32: *i32, tag: i64) -> i64
called by 1: main calls 3: sys_mmapsw_blockni_block
75func main() -> i64