unit-testingshasha-3keccak

Have Keccak (SHA-3) example hashes (test vectors) been made available?


I'm interested in implementing Keccak (SHA-3) and would like a set of input/expected output pairs to test against. Have any official test vectors been released? I recall having some for the other SHA routines and they were very helpful.


Solution

  • Yes. See the "Known-answer and Monte Carlo test results" bullet on the downloads page, or go straight to the file. There are whole-message test vectors as well as files describing inputs and outputs for the individual intermediate stages.

    And of course, you can always run the reference implementation and compare outputs.