Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Bug 1604596 - Update Wycheproof vectors and add support for CBC, P256…
…-ECDH, and CMAC tests r=franziskus This patch updates to the latest Wycheproof vectors and adds Wycheproof support for CBC, CMAC, and P256-ECDH: ChaCha20: +141 tests Curve25519: +431 tests GCM: +39 tests CBC (new): +183 tests CMAC (new): +308 tests P256 ECDH (new): +460 tests Differential Revision: https://phabricator.services.mozilla.com/D57477 --HG-- extra : moz-landing-system : lando
- Loading branch information
Kevin Jacobs
committed
Jan 16, 2020
1 parent
80595a9
commit fdde600
Showing
27 changed files
with
50,396 additions
and
4,965 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
6,768 changes: 5,049 additions & 1,719 deletions
6,768
gtests/common/testvectors/chachapoly-vectors.h
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
11,642 changes: 10,621 additions & 1,021 deletions
11,642
gtests/common/testvectors/curve25519-vectors.h
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* vim: set ts=2 et sw=2 tw=80: */ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
/* This file is generated from sources in nss/gtests/common/wycheproof | ||
* automatically and should not be touched manually. | ||
* Generation is trigged by calling ./mach wycheproof */ | ||
|
||
#ifndef test_structs_h__ | ||
#define test_structs_h__ | ||
|
||
#include <string> | ||
#include <vector> | ||
|
||
typedef struct AesCbcTestVectorStr { | ||
uint32_t id; | ||
std::string key; | ||
std::string msg; | ||
std::string iv; | ||
std::string ciphertext; | ||
bool valid; | ||
} AesCbcTestVector; | ||
|
||
typedef struct AesCmacTestVectorStr { | ||
uint32_t id; | ||
std::string comment; | ||
std::string key; | ||
std::string msg; | ||
std::string tag; | ||
bool invalid; | ||
} AesCmacTestVector; | ||
|
||
typedef struct AesGcmKatValueStr { | ||
uint32_t id; | ||
std::string key; | ||
std::string plaintext; | ||
std::string additional_data; | ||
std::string iv; | ||
std::string hash_key; | ||
std::string ghash; | ||
std::string result; | ||
bool invalid_ct; | ||
bool invalid_iv; | ||
} AesGcmKatValue; | ||
|
||
typedef struct ChaChaTestVectorStr { | ||
uint32_t id; | ||
std::vector<uint8_t> plaintext; | ||
std::vector<uint8_t> aad; | ||
std::vector<uint8_t> key; | ||
std::vector<uint8_t> iv; | ||
std::vector<uint8_t> ciphertext; | ||
bool invalid_tag; | ||
bool invalid_iv; | ||
} ChaChaTestVector; | ||
|
||
typedef struct EcdhTestVectorStr { | ||
uint32_t id; | ||
std::vector<uint8_t> private_key; | ||
std::vector<uint8_t> public_key; | ||
std::vector<uint8_t> secret; | ||
bool invalid_asn; | ||
bool valid; | ||
} EcdhTestVector; | ||
|
||
#endif // test_structs_h__ |
Oops, something went wrong.