Migrate Wycheproof test vectors for HMAC, HKDF, AEAD, and AES#2998
Draft
Migrate Wycheproof test vectors for HMAC, HKDF, AEAD, and AES#2998
Conversation
The update_sources() function was validating new files but never copying them to the upstream directory. This meant --new would succeed but the file wouldn't be added, causing subsequent operations to fail. Added the missing shutil.copy2() call after validation to copy new files from the cloned source repo to third_party/vectors/upstream/. Tested with: ./sync.py --clone-dir .tmpdir --new wycheproof/testvectors_v1/hmac_sha1_test.json
Migrates all 11 HMAC test vectors from third_party/wycheproof_testvectors/ to the new third_party/vectors/ system with duvet traceability. Changes: - Added 11 HMAC vectors (SHA1, SHA224, SHA256, SHA384, SHA512, SHA512-224, SHA512-256, SHA3-224, SHA3-256, SHA3-384, SHA3-512) via sync.py - Updated paths in crypto/hmac_extra/hmac_test.cc to point to new location - Added duvet annotations to all 11 HMAC tests for traceability - Updated sources.cmake to embed new test vector files - Updated duvet snapshot and vectors_spec.md All tests pass locally.
Deletes the 22 old HMAC test vector files (11 JSON + 11 TXT) from third_party/wycheproof_testvectors/ now that they've been migrated to the new third_party/vectors/ system.
Migrates all 4 HKDF test vectors from third_party/wycheproof_testvectors/ to the new third_party/vectors/ system with duvet traceability. Changes: - Added 4 HKDF vectors (SHA1, SHA256, SHA384, SHA512) via sync.py - Updated paths in crypto/fipsmodule/hkdf/hkdf_test.cc to point to new location - Added duvet annotations to all 4 HKDF tests for traceability - Updated sources.cmake to embed new test vector files - Updated duvet snapshot and vectors_spec.md - Removed old HKDF vectors from wycheproof_testvectors All tests pass locally.
…hird_party/vectors/
Signed-off-by: sanketh <sgmenda@amazon.com>
Contributor
Author
|
imma leave this as a draft till #2997 lands |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2998 +/- ##
==========================================
+ Coverage 78.30% 78.31% +0.01%
==========================================
Files 689 689
Lines 120975 120985 +10
Branches 16965 16971 +6
==========================================
+ Hits 94727 94752 +25
+ Misses 25351 25336 -15
Partials 897 897 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues:
Migrating more Wycheproof test vectors to the new
third_party/vectors/system (#2811, #2839), enabling systematic tracking and traceability.Description of changes:
Migrates 23 test vector files to the new vector system:
Each migration adds upstream JSON vectors and converted txt files to
third_party/vectors/, updates test files with new paths and duvet annotations for traceability, and removes old files fromthird_party/wycheproof_testvectors/.Call-outs:
kw_test.jsonis renamed toaes_wrap_test.jsonto match upstreamkwp_test.jsonis renamed toaes_kwp_test.jsonto match upstreamTesting:
All migrated tests pass and duvet verification succeeds:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.