Sync with cryptolib upstream for week ending 2025-10-31#179
Draft
Sync with cryptolib upstream for week ending 2025-10-31#179
Conversation
The fpga_cw340_rom_ext targets include an RMA lifecycle test target for the CW340 FPGA which allows for GDB testing. Signed-off-by: siemen11 <sdhooghe@google.com>
This commit adds AES-GCM to the cryptotest framework. The test vectors are the nist_cavp_aes_gcm with 128, 192, 256 encrypt and decrypt. As the cryptolib only supports tag sizes of 4,8,12,16 and iv sizes of 12, 16 bytes, other test vectors are filtered. Also, for performance reasons, only AAD, CTX, PTX sizes of 64 bytes and less are tested. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
Check if we executed the expected case. This is a FI mitigation. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
Use hardened_check_*() to protect securit-critical if conditions against faults. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
Check if the loop counter matches the expectation. This is a FI countermeasure. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
This commit extends the Know-Answer-Test for the CSRNG with a NIST test vector that contains additional_data for the generate command. Signed-off-by: Florian Glaser <glaserf@lowrisc.org>
RSA-OAEP and RSA-PSS work on byte-reversed secret and non-secret data. A reversal involves a series of memory accesses that can be hardened by randomizing the access pattern (similarly to `hardened_memcpy)`. Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
This commit changes the expected values for the tests that have an expected result of 0. This makes sure we don't run into issues where the tests are not executing properly and we still get a correct result due to the expected value of 0. Furthermore, this commit moves the tests to the hjson framework. The input and output values don't change from before this change. This commit merely skips the unnecessary calculations. Signed-off-by: Hakim Filali <hfilali@lowrisc.org>
|
Welcome! Before accepting your contribution, the expo project requires you to sign the Contributor License Agreement. To indicate your agreement, please post a comment on this Pull Request with the message below. I certify that I have read and agree that my contributions will be bound by the expo CLA. 0 out of 5 committers have signed the CLA. |
Contributor
Author
|
Needs additional work, and waiting on merge of previous syncs; do not merge. |
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.
This is a companion PR to #108 for merging in upstream cryptolib commits.