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 committed Jul 1, 2024
1 parent 677e063 commit 4710c16
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions sw/device/tests/crypto/cryptotest/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,25 @@ cryptotest(
test_vectors = KMAC_TESTVECTOR_TARGETS,
)

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

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

cryptotest(
name = "sphincsplus_kat",
test_args = SPHINCSPLUS_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/sphincsplus_kat:harness",
test_vectors = SPHINCSPLUS_TESTVECTOR_TARGETS,
)

# Use the following command to run the entire test suite in a given target:
# $ export OT_EXEC_ENV=silicon_owner_sival_rom_ext
# $ bazel test --//signing:token=//signing/tokens:cloud_kms \
Expand Down Expand Up @@ -392,5 +411,6 @@ test_suite(
":sha512_kat",
":shake128_kat",
":shake256_kat",
":sphincsplus_kat",
],
)

0 comments on commit 4710c16

Please sign in to comment.