Add ChaCha to self tests (GH #732)

This commit is contained in:
Jeffrey Walton 2018-11-08 22:08:59 -05:00
parent e6112e35df
commit af9fb9d21e
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
4 changed files with 31 additions and 21 deletions

View File

@ -881,27 +881,28 @@ bool Validate(int alg, bool thorough, const char *seedInput)
case 66: result = ValidateCamellia(); break;
case 67: result = ValidateWhirlpool(); break;
case 68: result = ValidateTTMAC(); break;
case 69: result = ValidateSalsa(); break;
case 70: result = ValidateSosemanuk(); break;
case 71: result = ValidateRabbit(); break;
case 72: result = ValidateHC128(); break;
case 73: result = ValidateHC256(); break;
case 74: result = ValidateVMAC(); break;
case 75: result = ValidateCCM(); break;
case 76: result = ValidateGCM(); break;
case 77: result = ValidateCMAC(); break;
case 78: result = ValidateSM3(); break;
case 79: result = ValidateBLAKE2s(); break;
case 80: result = ValidateBLAKE2b(); break;
case 81: result = ValidatePoly1305(); break;
case 82: result = ValidateSipHash(); break;
case 83: result = ValidateHashDRBG(); break;
case 84: result = ValidateHmacDRBG(); break;
case 85: result = ValidateNaCl(); break;
case 86: result = ValidateCHAM(); break;
case 87: result = ValidateSIMECK(); break;
case 88: result = ValidateSIMON(); break;
case 89: result = ValidateSPECK(); break;
case 70: result = ValidateSalsa(); break;
case 71: result = ValidateChaCha(); break;
case 72: result = ValidateSosemanuk(); break;
case 73: result = ValidateRabbit(); break;
case 74: result = ValidateHC128(); break;
case 75: result = ValidateHC256(); break;
case 80: result = ValidateVMAC(); break;
case 81: result = ValidateCCM(); break;
case 82: result = ValidateGCM(); break;
case 83: result = ValidateCMAC(); break;
case 84: result = ValidateSM3(); break;
case 85: result = ValidateBLAKE2s(); break;
case 86: result = ValidateBLAKE2b(); break;
case 87: result = ValidatePoly1305(); break;
case 88: result = ValidateSipHash(); break;
case 89: result = ValidateHashDRBG(); break;
case 90: result = ValidateHmacDRBG(); break;
case 91: result = ValidateNaCl(); break;
case 100: result = ValidateCHAM(); break;
case 101: result = ValidateSIMECK(); break;
case 102: result = ValidateSIMON(); break;
case 103: result = ValidateSPECK(); break;
#if defined(CRYPTOPP_EXTENDED_VALIDATION)
// http://github.com/weidai11/cryptopp/issues/92

View File

@ -149,6 +149,7 @@ bool ValidateAll(bool thorough)
pass=ValidateSPECK() && pass;
pass=ValidateCamellia() && pass;
pass=ValidateSalsa() && pass;
pass=ValidateChaCha() && pass;
pass=ValidateSosemanuk() && pass;
pass=ValidateRabbit() && pass;
pass=ValidateHC128() && pass;

View File

@ -1736,6 +1736,13 @@ bool ValidateSalsa()
return RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/salsa.txt");
}
bool ValidateChaCha()
{
std::cout << "\nChaCha validation suite running...\n";
return RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/chacha.txt");
}
bool ValidateSosemanuk()
{
std::cout << "\nSosemanuk validation suite running...\n";

View File

@ -96,6 +96,7 @@ bool ValidateHC128();
bool ValidateHC256();
bool ValidateRabbit();
bool ValidateSalsa();
bool ValidateChaCha();
bool ValidateSosemanuk();
bool ValidateVMAC();