RustCrypto / hashes

Collection of cryptographic hash functions written in pure Rust
1.82k stars 247 forks source link

NIST Test vectors FIPS 202 output mismatch #423

Closed PrisionMike closed 1 year ago

PrisionMike commented 1 year ago

I was trying to use the SHA3_224() function. In the testing program, the output for SHA3-224 for message 0x69bc should be 0x94bd25c4cf6ca889126df37ddd9c36e6a9b28a4fe15cc3da6debcdd7. But I just couldn't get it. I got the output with Python pycryptodomme and a bunch of other online SHA3 hashers.

I tried even reading the source code but it seems to use another library and doesn't specify the c,r values anywhere in the code per se. instead I see U28 and U144. I would love if someone could explain what these are, and maybe add a word about this somewhere in the relevant docs

PrisionMike commented 1 year ago

I realize 28 translates as the output size and 144 as the r values. Thus everything seems to be as expected. Other than the final value.

PrisionMike commented 1 year ago

Typo in input string.