nx_sha384_kat_test.nx
buildroot/runtime/nx_sha384_kat_test.nx
about
nx_sha384_kat_test.nx -- NIST FIPS 180-4 SHA-384 + SHA-512/256
external-reference KATs.
Catches the bug class previously named in
[[feedback-canonical-constants-kat-against-reference-not-hand-
converted]]: standards constants stored as hand-converted
negative-decimal i64 with `// 0x...` trailing-comment can be
silently wrong. Without an external NIST vector KAT, the
substrate's SHA-384 + SHA-512/256 had silent output corruption
(4 of 4 sha512_256_init constants wrong; 3 of 4 sha384_init
constants wrong) for an unknown duration.
This file establishes the EXTERNAL-REFERENCE KATs that were
missing. It pins both SHA-384 + SHA-512/256 outputs against
published NIST FIPS 180-4 test vectors.
expect_exit: 0
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_sha512.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 23 | func bytes_eq_n(a: *u8, b: *u8, n: i64) -> i64 called by 1: main |
| 32 | func main() -> i64 |