Skip to content

Commit

Permalink
[cryptotest] add build rule to run SPHINCS+ tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Torok <[email protected]>
  • Loading branch information
RyanTorok authored and Ryan Torok committed Mar 15, 2024
1 parent 6790fa0 commit 5e58ff8
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions sw/device/tests/crypto/cryptotest/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,31 @@ opentitan_test(
"//hw/top_earlgrey:fpga_cw310_test_rom": None,
},
)

SPHINCSPLUS_TESTVECTOR_TARGETS = [
"//sw/host/cryptotest/testvectors/data:{}".format(target)
for target in [
"rsp_sphincsplus_shake256_128s_simple_json",
]
]

SPHINCSPLUS_TESTVECTOR_ARGS = " ".join([
"--sphincsplus-json=\"$(rootpath {})\"".format(target)
for target in SPHINCSPLUS_TESTVECTOR_TARGETS
])

opentitan_test(
name = "sphincsplus_kat",
cw310 = cw310_params(
timeout = "long",
binaries = {"//sw/device/tests/crypto/cryptotest/firmware:firmware": "firmware"},
data = SPHINCSPLUS_TESTVECTOR_TARGETS,
test_cmd = """
--bootstrap={firmware}
""" + SPHINCSPLUS_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/sphincsplus_kat:harness",
),
exec_env = {
"//hw/top_earlgrey:fpga_cw310_test_rom": None,
},
)

0 comments on commit 5e58ff8

Please sign in to comment.