Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cryptotest] Split Hash and HMAC tests into different bazel rules for each configuration #23518

Merged
merged 3 commits into from
Jun 6, 2024

Conversation

RyanTorok
Copy link
Contributor

@RyanTorok RyanTorok commented Jun 5, 2024

The tests for SHA2/SHA3/SHAKE and HMAC were each bundled into a single bazel rule for all configurations, which was causing timeout issues and making it difficult to debug specific failures. This PR splits the tests for these algorithms into separate bazel rules for each configuration. This provides better reliability w.r.t. timeouts at the expense of additional rounds of loading the test firmware to the test platform (FPGA or silicon).

Making this work required refactoring the manual tests for SHA3/SHAKE to only include one algorithm per file, and the HMAC NIST test vector parser to produce separate JSON files for each HMAC hash mode.

@RyanTorok RyanTorok requested review from a team as code owners June 5, 2024 20:43
@RyanTorok RyanTorok requested review from cfrantz, jon-flatley, moidx and jadephilipoom and removed request for a team June 5, 2024 20:43
RyanTorok added 3 commits June 5, 2024 20:51
Commenting these out was done accidentally in an previous commit.

Signed-off-by: Ryan Torok <[email protected]>
The hash tests were previously in a single cryptotest() job, which was
causing timeouts due to the large number of test vectors. This commit
splits the tests into separate rules for SHA-2, SHA-3, and SHAKE, in
order to reduce timeout issues and make troubleshooting faster.

Signed-off-by: Ryan Torok <[email protected]>
Splits the HMAC tests into separate bazel rules to test HMAC-SHA256,
HMAC-SHA384, HMAC-SHA512.

Signed-off-by: Ryan Torok <[email protected]>
@RyanTorok RyanTorok force-pushed the cryptotest-split-hash-hmac branch from f5e5ad8 to 316592b Compare June 5, 2024 20:51
@jadephilipoom jadephilipoom merged commit dbcf6cb into lowRISC:master Jun 6, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants