code wiki / (root) / nx_drbg_hmac_test.nx

nx_drbg_hmac_test.nx

buildroot/runtime/nx_drbg_hmac_test.nx

2935 B83 linesdepth 7pulls 7 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_drbg_hmac_test.nx -- self-consistency smoke for HMAC-DRBG. Tests: 1. Same seed -> same output (determinism) 2. Different seed -> different output (sensitivity) 3. Successive Generate calls advance state (no repetition) 4. Non-block-multiple length works (e.g. 17 bytes) 5. Reseed counter advances on Generate expect_exit: 0 license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_sha256.nx nx_hmac.nx nx_drbg_hmac.nx nx_drbg_hmac_test.nx

imports: nx_syscalls.nxnx_sha256.nxnx_hmac.nxnx_drbg_hmac.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 drbg_hmac_init _drbg_k _drbg_v _drbg_fill drbg_hmac_update _drbg_k ↻ _drbg_v ↻ sys_mmap ↻ _drbg_copy hmac_sha256 sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_final blk_set_byte ↻ sha256_compress ↻ sha256_init ↻ sha256_update ↻ sha256_final ↻ drbg_hmac_generate _drbg_k ↻ _drbg_v ↻ sys_mmap ↻ hmac_sha256 ↻ _drbg_copy ↻ drbg_hmac_update ↻ _bytes_equal drbg_hmac_reseed_counter

structs

none

consts

none

functions

19func _bytes_equal(a: *u8, b: *u8, n: i64) -> i64
called by 1: main
28func main() -> i64