Implementationspackage layout, build & KAT, review notes
Package layout (official Thunder.zip, extracted under harness/hash-33/Thunder/)
Thunder/Implementations and Test_vector/
├── Thunder-X86/Implementations/ # <- built and timed by ngcc.dev ("X86" capital X)
│ ├── Reference_Implementation/ # six instances: Thunder-512/768/1024, Thunder-XOF-256/384/512
│ ├── Additional_Implementation/{Thunder-512, Thunder-768, Thunder-1024}
│ └── Optimized_Implementation/{Thunder-512, Thunder-768, Thunder-1024}
└── Thunder-ARM/Implementations/ # same shape as Thunder-X86
Each instance directory holds CryptHash_AlgorithmInstance.{c,h} and the KAT driver.
The three fixed-output instances share a byte-identical .c; the three XOF instances share a second
.c differing only by the multi-block squeeze loop. Source comments are GB-encoded Chinese.
Build and KAT
Prerequisites: GCC (≥ 9) and CMake. From the harness/ directory of this repository:
cd harness
make -C hash-33 # build the six instance libraries (reference)
make -C hash-33 test # run the KAT harness; summary in results/
Expected output: all six instances KAT-PASS against the submitted test vectors
(manifest kat.sha256, 24 files),
checked before every timing campaign (x86_1, 2026-09-25 → 09-28).
Review notes (ngcc.dev source review)
No parameter or constant mismatch was found between spec and implementation.
The whole permutation was checked (not a sample): RC[12], the 25 lane rotations τ(x,y),
θ’s offsets (t = 41/50/6/10/27, u = 26, r = 1, s = 36), the π lane permutation, the degree-3 ψ, the round
order ι → ρ → θ → π → ψ, capacities/rates for all six instances, IV loading (stored in reverse order,
loaded so lane j receives spec IV_j — verified for all six), the feed-forward, message layout,
padding and the final-block constant. Details in
pseudocode.md.
- Cosmetic: the header comment “
IV[0]is the least significant lane” is wrong — the array is in descending spec-index order; the net placement is correct. - The XOF instances have no specified digest length; the NGCC wrapper pins
DIGEST_BIT_LENGTHto one squeeze block (1280/1152/1024 bits), which is why the metadata reports 160/144/128 bytes.
Files
- Reference source tree:
harness/hash-33/Thunder/in this repository. - Official archive
Thunder.zip(146,828,807 bytes): fetch-archives.sh · SHA-256db6970d54250084ea73cc1a47bd56c868e5e478cdfa3746ff7b69d30c690b0c8 - NICCS submission page · forum thread