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

Incomplete ITRNG health test documentation #1688

Open
akash-singh-NV opened this issue Aug 6, 2024 · 5 comments
Open

Incomplete ITRNG health test documentation #1688

akash-singh-NV opened this issue Aug 6, 2024 · 5 comments

Comments

@akash-singh-NV
Copy link

Current spec does not document which ITRNG health tests are enabled by Caliptra ROM in version and how are relevant thresholds calculated and passed from SOC integrator. It is important to document these because any inconsistencies would make Caliptra unusable due to ROM dependencies.

@varuns-nvidia varuns-nvidia transferred this issue from chipsalliance/Caliptra Sep 24, 2024
@varuns-nvidia
Copy link

@mhatrevi @jhand2 could you help with documenting the TRNG health tests in the ROM spec?

@jhand2
Copy link
Collaborator

jhand2 commented Sep 24, 2024

Health test thresholds are set here but I don't know how they were chosen. @korran do you know?

The health tests are are done by the IP are briefly described here.

It looks like we support 2 health checks (the two that are supported by the OpenTitan IP we use):

  • Repetition Count Test
  • Adaptive Proportion Test

The documentation for that IP lists two other checks ("Bucket and Markov tests"), but I don't see anything in ROM that configures them. Is anyone else on the thread able to confirm that these are not enabled?

@jhand2
Copy link
Collaborator

jhand2 commented Sep 24, 2024

It looks like Kor has also created this PR with some guidance chipsalliance/caliptra-rtl#569. Does this cover what you're looking for?

@akash-singh-NV
Copy link
Author

Kor's PR covers this to an extent. We also need to specify -

  1. How ITRNG interprets 4 bit raw noise data - binary symbols vs 4-bit symbols ?
  2. RCT implementation in Caliptra 1.x ITRNG + ROM combination is slightly different from expected. Ideally a programmed threshold of N should result in failure when ITRNG sees N identical bits (assuming binary noise source) or N identical 4 bit symbols (assuming non binary 4 bit noise source). However, Caliptra 1.x implementation will flag a failure if ITRNG sees N repetitions on any of the 4 bit lines.

@varuns-nvidia
Copy link

@howardtr for the above questions

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

No branches or pull requests

3 participants