[entropy_src] Statistical Arguments on entropy_src health check definitions
I'm approving #1943, pending a more detailed review of the statistical arguments around how to define health checks when merging several (assumedly) independent data streams. Any one with strong opinions on statistics should weigh in on this mathematically motivated point. This discussion should at least include: @zi-v, @martin-lueker, @felixmiller, @cyrilguyot. Everyone should feel free to weigh in.
This deliverables should be at least.
- a detailed definition of the test definition
- A formula relating the RCT and APT thresholds, queue depths, and the nominal miniumu entropy/bit to the rate of false positives in the entropy/bit of an given source.
- Guidelines for setting the thresholds
- An outline of the assumptions: Notably: "How weak a correlation can we tolerate between analog channels?"
- Limits of the entropy/bit for the interleaved entropy stream, given our assumptions about the individual entropy streams.
- A second review of the RTL, confirming that the implementation matches the more clearly defined test.
@martin-lueker, @mwbranstad - is this part of Entropy D2 backlog or already merged?
Hi Faisal, This is largely a documentation task, and is more relevant to the security review, than the silicon readiness review. I don't think there are any gating factors here for Silicon.
Update: Need to add Symbol RepCnt
@msfschaffner - we are looking at remaining efforts in V2 review checklist. This item is tagged as both M3 and V2. The Milestone change seems to be the most recent activity. Shall we change the tag to V2S or does part of this work need to be resolved before V2 checklist can be closed out? Please comment tag @andreaskurth once decided as he's actively working on trying to close out remaining V2 items.
This appears to be mostly a documentation exercise that we can take care of when signing off to D3. As such, it does not have to go into V2S / M2. Let me relabel that accordingly.
CC @moidx @tjaychen @johannheyszl let me know if you think otherwise.
since others are helping with some of the directed M2 tasks of entropy_src, it would be nice if @martin-lueker could help out with the documentation side things just in case it has any impact on V2S/
Hi All, This issue is really intended as a guideline for firmware and software developers defining the health test thresholds and window sizes. The real impacts will come in defining the thresholds:
- Boot thresholds to be written to OTP
- "FIPS-mode" thresholds written as part of RomExt or even later.
Any changes to the DUT as a result of these documentation would be an optimization, so I agree it can be deferred to D3/M3.
My understanding is that this issue is not critical for TO. But it's relevant afterwards when threshold values need to be written to OTP and RomExt. I am thus putting this to backlog rather than M2.5.
@cfrantz @timothytrippel @moidx is this relevant for the current ROM_EXT development?
@johannheyszl and I just discussed this, this needs to be addressed by someone having insight into AST and ROM_EXT development. @cfrantz WDYT?
entropy src health tests need threshold values which are written to OTP during provisioning or set by RomExt. Relabeling this issue for those stages.
We assume current HW health checks will be fit to process threshold parameters that are later derived for FIPS certification. We also have the SW fallback in the unlikely case this would be not true (see #20952).
Changed the milestone to PROD ROM_ext.
I'm currently trying to get first measurements. @vogelpi , when I'm unpacking samples from ENTROPY_SRC_FW_OV_RD_DATA - where does first bits go - in low bits or in high bits? Practically I need to recover a sequence of 1-bit (or 4-bit) samples in time for the test.
Entropy source uses the hw/ip/prim/rtl/prim_packer_fifo.sv primitive for the 1-to-4 packing (in single-channel mode) and the 4-to-32 packing in front of the observe FIFO. This primitive packs the earlier bits into the lower positions. For example, if in 4-channel mode, you received 0 1 2 3 4 5 6 7 8 in this order, you should read the following from the observe FIFO:
MSB - 7 6 5 4 3 2 1 0 - LSB
@vogelpi thank you! and in 4-channel mode each channel will always be in the same position, right? Would this be affected by health checks if one of the health checks reports issue? I run with very relaxed health checks so they shouldn't be impact output, but it is more as curiosity.