Add SHA3/FIPS 202 test vectors. Add note to config.h on uncommenting sha3_fips_202.txt when defining CRYPTOPP_USE_FIPS_202_SHA3
parent
df1c94a38a
commit
01d137155c
|
|
@ -21,6 +21,7 @@ Test: TestVectors/rw.txt
|
|||
Test: TestVectors/seal.txt
|
||||
Test: TestVectors/sha.txt
|
||||
Test: TestVectors/sha3.txt
|
||||
#Test: TestVectors/sha3_fips_202.txt
|
||||
Test: TestVectors/panama.txt
|
||||
Test: TestVectors/aes.txt
|
||||
Test: TestVectors/salsa.txt
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,6 @@
|
|||
AlgorithmType: FileList
|
||||
Name: SHA3 FIPS 202 collection
|
||||
Test: TestVectors/sha3_224_fips_202.txt
|
||||
Test: TestVectors/sha3_256_fips_202.txt
|
||||
Test: TestVectors/sha3_384_fips_202.txt
|
||||
Test: TestVectors/sha3_512_fips_202.txt
|
||||
1
config.h
1
config.h
|
|
@ -45,6 +45,7 @@
|
|||
|
||||
// Define this to choose the FIPS 202 version of SHA3, and not the original version of SHA3. NIST selected Keccak as SHA3
|
||||
// in January 2013. SHA3 was finalized in FIPS 202 in August 2015, and it was a modified version of the original selection.
|
||||
// Note well: you must open TestVectors/all.txt, comment sha3.txt and uncomment sha3_fips_202.txt.
|
||||
// #define CRYPTOPP_USE_FIPS_202_SHA3
|
||||
|
||||
// ***************** Less Important Settings ***************
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
|
||||
// Define this to choose the FIPS 202 version of SHA3, and not the original version of SHA3. NIST selected Keccak as SHA3
|
||||
// in January 2013. SHA3 was finalized in FIPS 202 in August 2015, and it was a modified version of the original selection.
|
||||
// Note well: you must open TestVectors/all.txt, comment sha3.txt and uncomment sha3_fips_202.txt.
|
||||
#define CRYPTOPP_USE_FIPS_202_SHA3
|
||||
|
||||
// ***************** Less Important Settings ***************
|
||||
|
|
|
|||
|
|
@ -85,7 +85,13 @@ bool ValidateAll(bool thorough)
|
|||
pass=ValidateMD2() && pass;
|
||||
pass=ValidateMD5() && pass;
|
||||
pass=ValidateSHA() && pass;
|
||||
|
||||
#if defined(CRYPTOPP_USE_FIPS_202_SHA3)
|
||||
pass=RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/sha3_fips_202.txt") && pass;
|
||||
#else
|
||||
pass=RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/sha3.txt") && pass;
|
||||
#endif
|
||||
|
||||
pass=ValidateTiger() && pass;
|
||||
pass=ValidateRIPEMD() && pass;
|
||||
pass=ValidatePanama() && pass;
|
||||
|
|
|
|||
Loading…
Reference in New Issue