lowRISC / lowRISC/opentitan

[rom, rom_ext] Run known-answer tests for used cryptographic algorithms before signature verification

Open
#22,801 3 comments 0 reactions 1 assignee View on GitHub

@cfrantz is already working on this.

Since Apr 24, 2026.

FIPS prodc-integration SW:cryptolib SW:ROM SW:ROM_EXT
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

### Description

To make it easier include ROM, ROM_EXT into certification scope if would be required, it is useful to run known-answer tests for cryptographic algorithms used for signature verification (including those used for cached result). While running something like sha256(const) and checking that result is expected is pretty fast and have minimal impact on code size, tests for signature verification itself can be lengthy and data for known-answer tests will require plenty of room (especially SPHINCS+). But at least for P256/P384 it is feasible as extra code size is a signature size + few extra calls.

To reduce latency known-answer test checking that valid signature validates, and invalid (e.g. bit flipped) is not can run on OTBN in parallel with computing image hashes using SHA256/KMAC/etc.

@moidx , @timothytrippel

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.