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] Switch cryptotests over to the SPI console #25544

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

milesdai
Copy link
Contributor

@milesdai milesdai commented Dec 9, 2024

Switch the cryptotest KAT tests to use the SPI console for increased communication performance. This leads to 5-10x speedups across the cryptotests and makes them feasible to run in CI.

Based on some local testing, re-enabling these tests in CI should add about an extra 20 minutes to the nightly CI. The remaining KAT tests each take about 500-700s each.

//sw/device/tests/crypto/cryptotest:aes_kat_fpga_cw310_sival_rom_ext     PASSED in 536.2s
//sw/device/tests/crypto/cryptotest:cshake_kat_fpga_cw310_sival_rom_ext  PASSED in 3.7s
//sw/device/tests/crypto/cryptotest:drbg_kat_fpga_cw310_sival_rom_ext    PASSED in 36.6s
//sw/device/tests/crypto/cryptotest:ecdh_kat_fpga_cw310_sival_rom_ext    PASSED in 35.8s
//sw/device/tests/crypto/cryptotest:ecdsa_kat_fpga_cw310_sival_rom_ext   PASSED in 139.7s
//sw/device/tests/crypto/cryptotest:hmac_sha256_kat_fpga_cw310_sival_rom_ext PASSED in 28.2s
//sw/device/tests/crypto/cryptotest:hmac_sha384_kat_fpga_cw310_sival_rom_ext PASSED in 34.3s
//sw/device/tests/crypto/cryptotest:hmac_sha512_kat_fpga_cw310_sival_rom_ext PASSED in 40.5s
//sw/device/tests/crypto/cryptotest:kmac_kat_fpga_cw310_sival_rom_ext    PASSED in 27.1s
//sw/device/tests/crypto/cryptotest:sha256_kat_fpga_cw310_sival_rom_ext  PASSED in 65.8s
//sw/device/tests/crypto/cryptotest:sha384_kat_fpga_cw310_sival_rom_ext  PASSED in 152.9s
//sw/device/tests/crypto/cryptotest:sha3_224_kat_fpga_cw310_sival_rom_ext PASSED in 142.6s
//sw/device/tests/crypto/cryptotest:sha3_256_kat_fpga_cw310_sival_rom_ext PASSED in 137.0s
//sw/device/tests/crypto/cryptotest:sha3_384_kat_fpga_cw310_sival_rom_ext PASSED in 114.5s
//sw/device/tests/crypto/cryptotest:sha3_512_kat_fpga_cw310_sival_rom_ext PASSED in 92.4s
//sw/device/tests/crypto/cryptotest:sha512_kat_fpga_cw310_sival_rom_ext  PASSED in 152.9s
//sw/device/tests/crypto/cryptotest:shake128_kat_fpga_cw310_sival_rom_ext PASSED in 677.7s
//sw/device/tests/crypto/cryptotest:shake256_kat_fpga_cw310_sival_rom_ext PASSED in 690.9s
//sw/device/tests/crypto/cryptotest:sphincsplus_kat_fpga_cw310_sival_rom_ext PASSED in 61.6s

@milesdai milesdai added the CherryPick:master This PR should be cherry-picked to master label Dec 9, 2024
@milesdai milesdai force-pushed the cryptotest-spi-console branch from 28c7657 to b5b5bef Compare December 9, 2024 06:13
@milesdai milesdai requested review from luismarques and moidx December 9, 2024 06:19
@milesdai milesdai marked this pull request as ready for review December 9, 2024 06:21
@milesdai milesdai requested review from a team as code owners December 9, 2024 06:22
@milesdai milesdai requested review from timothytrippel and removed request for a team December 9, 2024 06:22
This provides about a 5-7x speedup in the overall runtime.

Signed-off-by: Miles Dai <[email protected]>
With the speedup from the SPI console, most tests now run in under 3
minutes and can be added to nightly CI.

Signed-off-by: Miles Dai <[email protected]>
@milesdai milesdai force-pushed the cryptotest-spi-console branch from b5b5bef to f7d99a1 Compare December 9, 2024 07:37
Copy link
Contributor

@jwnrt jwnrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice work

@jwnrt jwnrt merged commit 547335f into lowRISC:earlgrey_1.0.0 Dec 9, 2024
31 checks passed
Copy link

github-actions bot commented Dec 9, 2024

Successfully created backport PR for master:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPick:master This PR should be cherry-picked to master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants