lowRISC / lowRISC/opentitan

[entropy_src,csrng,edn] Features for next version / future releases of entropy complex

Open
#22,850 1 comment 0 reactions 1 assignee View on GitHub

@vogelpi is already working on this.

Since Apr 26, 2024.

Component:RTL Subsystem:Entropy Type:FutureRelease
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

### Description

When working towards Earlgrey-PROD and during the SiVal work, we had many constructive discussions regarding how the entropy complex works and what additional features are currently missing / could be relevant in the future / would be nice to have. The idea of this issue is to keep track of such potential future features and link to the corresponding discussions in one shared place for later reference.

ENTROPY_SRC:
- [ ] ~Consider adding support for testing the hardware health tests on the chip, e.g., with a hardware interface that allows feeding known values into the health tests. See #22289.~
- [ ] Consider adding an option to not clear the esfinal FIFO upon disabling and keep serving previously produced seeds to CSRNG when disabled. This could help to save power as the ENTROPY_SRC (and RNG) can remain disabled for a longer period. See #22223.
- [ ] Consider replacing the ES_ROUTE switch by a CSR triggering only the next seed becoming software readable while other seeds continue propagating to the hardware interface. See #23947.

CSRNG:
- [ ] ~Add support for greater seed lengths, e.g., by using derivation functions. See #22157 and #21936.~
- [ ] Based on real measurements, decide whether it would make sense to implement something to prevent reseed operations blocking other instances. See #14505.
- [ ] Return a status error for Generate commands with a generate length = 0, see #23846.
- [x] Reduce amount of buffering to reduce area.

EDN:
- [ ] ~Add support for tracking the frequency of requests produced by individual end points. This would simplify debugging power issues. See #22819.~
- [ ] Change the Uninstantiate command to consume any remaining entropy of an ongoing Generate command. This would allow uninstantiating/disabling the EDNs individually without having to disable/enable CSRNG (which is costly).
- [ ] Pull clen bits in BOOT_INS/GEN_CMD CSRs to 0 as the boot commands don't actually support additional data.
- [ ] Pull clen values greater than 12 back to 12 or signal an error.

ALL:
- [ ] Consider harmonizing behavior of fatal alert sources (e.g. internal and write FIFO errors) / or properly document current behavior (See Register 6. ERR_CODE in #26781)
- [ ] Consider making ERR_CODE_TEST write only (See See Register 7. ERR_CODE_TEST in #26781)

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.