Skip to content

Commit e0d3422

Browse files
committed
[entropy_src] Align spelling of health tests
The Repetition Count Test and the Adaptive Proportion Test are both defined by the NIST SP 800-90B spec and to emphasize this, this commit aligns the spelling of thesee two test names across the documentation and RTL comments. In contrast, the bucket and Markov tests are custom tests. Signed-off-by: Pirmin Vogel <[email protected]>
1 parent 0bd415b commit e0d3422

12 files changed

+55
-55
lines changed

hw/ip/entropy_src/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ These tests include:
5252
The Repetition Count and Adaptive Proportion test are specifically recommended by SP 800-90B, and are implemented in accordance with those recommendations.
5353
In FIPS/CC compliant mode, all checks except the Repetition Count test are performed on a fixed window of data of configurable size, by default consisting of 2048 bits each.
5454
Per the definition in SP 800-90B, the Repetition Count test does not operate on a fixed window.
55-
The repetition count test fails if any sequence of bits continuously asserts the same value for too many samples, as determined by the programmable threshold, regardless of whether that sequence crosses any window boundaries.
55+
The Repetition Count Test fails if any sequence of bits continuously asserts the same value for too many samples, as determined by the programmable threshold, regardless of whether that sequence crosses any window boundaries.
5656
The thresholds for these tests should be chosen to achieve a low false-positive rate (&alpha;) given a conservative estimate of the manufacturing tolerances of the PTRNG noise source.
5757
The combined choice of threshold and window size then determine the false-negative rate (&beta;), or the probability of missing statistical defects at any particular magnitude.
5858

hw/ip/entropy_src/data/entropy_src.hjson

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@
581581
Note that the number of tested bits taken by the conditioner to produce a seed is equal to the window size x symbol size, where the symbol size is 1 in single-channel mode.
582582
The only exception is the startup seed which is produced using the bits of two subsequent windows, i.e., 2 x window size x symbol tested bits.
583583

584-
Note that NIST SP 800-90B (Table 2) requires the adaptive proportion test to be run on 1024 or 512 samples in single-channel or multi-channel mode, respectively (see !!ENTROPY_SRC.RNG_BIT_ENABLE).
584+
Note that NIST SP 800-90B (Table 2) requires the Adaptive Proportion Test to be run on 1024 or 512 samples in single-channel or multi-channel mode, respectively (see !!ENTROPY_SRC.RNG_BIT_ENABLE).
585585
The startup tests must be run on at least 1024 consecutive samples (see Section 4.3 Requirements for Health Tests of NIST SP 800-90B) and this block always uses two subsequent windows for startup health testing.
586586
The use of window sizes below 512 samples is thus not recommended as this may not comply with NIST SP 800-90B.
587587
'''
@@ -602,7 +602,7 @@
602602
]
603603
},
604604
{ name: "REPCNT_THRESHOLDS",
605-
desc: "Repetition count test thresholds register",
605+
desc: "Repetition Count Test thresholds register",
606606
swaccess: "rw",
607607
hwaccess: "hrw",
608608
hwext: "true",
@@ -613,7 +613,7 @@
613613
fields: [
614614
{ bits: "15:0",
615615
name: "FIPS_THRESH",
616-
desc: '''This is the threshold size for the repetition count health test.
616+
desc: '''This is the threshold for the Repetition Count Test.
617617
This value is used in FIPS mode.
618618
This register must be written before the module is enabled.
619619
Writing to this register will only update the register if the
@@ -624,7 +624,7 @@
624624
}
625625
{ bits: "31:16",
626626
name: "BYPASS_THRESH",
627-
desc: '''This is the threshold size for the repetition count health test
627+
desc: '''This is the threshold for the Repetition Count Test
628628
running in bypass mode. This mode is active after reset for the
629629
first and only test run, or when this mode is programmed by firmware.
630630
This register must be written before the module is enabled.
@@ -637,7 +637,7 @@
637637
]
638638
},
639639
{ name: "REPCNTS_THRESHOLDS",
640-
desc: "Repetition count symbol test thresholds register",
640+
desc: "Repetition Count Symbol Test thresholds register",
641641
swaccess: "rw",
642642
hwaccess: "hrw",
643643
hwext: "true",
@@ -648,7 +648,7 @@
648648
fields: [
649649
{ bits: "15:0",
650650
name: "FIPS_THRESH",
651-
desc: '''This is the threshold size for the repetition count symbol health test.
651+
desc: '''This is the threshold for the Repetition Count Symbol Test.
652652
This value is used in FIPS mode.
653653
This register must be written before the module is enabled.
654654
Writing to this register will only update the register if the
@@ -659,7 +659,7 @@
659659
}
660660
{ bits: "31:16",
661661
name: "BYPASS_THRESH",
662-
desc: '''This is the threshold size for the repetition count symbol health test
662+
desc: '''This is the threshold for the Repetition Count Symbol Test
663663
running in bypass mode. This mode is active after reset for the
664664
first and only test run, or when this mode is programmed by firmware.
665665
This register must be written before the module is enabled.
@@ -683,7 +683,7 @@
683683
fields: [
684684
{ bits: "15:0",
685685
name: "FIPS_THRESH",
686-
desc: '''This is the threshold size for the adaptive proportion health test.
686+
desc: '''This is the threshold for the Adaptive Proportion Test.
687687
This value is used in FIPS mode.
688688
This register must be written before the module is enabled.
689689
Writing to this register will only update the register if the
@@ -694,7 +694,7 @@
694694
}
695695
{ bits: "31:16",
696696
name: "BYPASS_THRESH",
697-
desc: '''This is the threshold size for the adaptive proportion health test
697+
desc: '''This is the threshold for the Adaptive Proportion Test
698698
running in bypass mode. This mode is active after reset for the
699699
first and only test run, or when this mode is programmed by firmware.
700700
This register must be written before the module is enabled.
@@ -718,7 +718,7 @@
718718
fields: [
719719
{ bits: "15:0",
720720
name: "FIPS_THRESH",
721-
desc: '''This is the threshold size for the adaptive proportion health test.
721+
desc: '''This is the threshold for the Adaptive Proportion Test.
722722
This value is used in FIPS mode.
723723
This register must be written before the module is enabled.
724724
Writing to this register will only update the register if the
@@ -729,7 +729,7 @@
729729
}
730730
{ bits: "31:16",
731731
name: "BYPASS_THRESH",
732-
desc: '''This is the threshold size for the adaptive proportion health test
732+
desc: '''This is the threshold for the Adaptive Proportion Test
733733
running in bypass mode. This mode is active after reset for the
734734
first and only test run, or when this mode is programmed by firmware.
735735
This register must be written before the module is enabled.
@@ -939,13 +939,13 @@
939939
{ value: "0",
940940
name: "REPCNT_HI",
941941
desc: '''
942-
Repetition count test high watermark.
942+
Repetition Count Test high watermark.
943943
'''
944944
},
945945
{ value: "1",
946946
name: "REPCNTS_HI",
947947
desc: '''
948-
Repetition count symbol test high watermark.
948+
Repetition Count Symbol Test high watermark.
949949
'''
950950
},
951951
{ value: "2",
@@ -1014,7 +1014,7 @@
10141014
]
10151015
},
10161016
{ name: "REPCNT_TOTAL_FAILS",
1017-
desc: "Repetition count test failure counter register",
1017+
desc: "Repetition Count Test failure counter register",
10181018
swaccess: "ro",
10191019
hwaccess: "hwo",
10201020
hwext: "true",
@@ -1028,7 +1028,7 @@
10281028
]
10291029
},
10301030
{ name: "REPCNTS_TOTAL_FAILS",
1031-
desc: "Repetition count symbol test failure counter register",
1031+
desc: "Repetition Count Symbol Test failure counter register",
10321032
swaccess: "ro",
10331033
hwaccess: "hwo",
10341034
hwext: "true",
@@ -1144,7 +1144,7 @@
11441144
Alert threshold register
11451145

11461146
This register determines during how many subsequent health test windows one or more health test failures can occur before a recoverable alert is raised and the ENTROPY_SRC block stops operating.
1147-
Note that continuous health tests such as the repetition count test or the repetition count symbol test can trigger multiple test failures within a single window.
1147+
Note that continuous health tests such as the Repetition Count Test or the Repetition Count Symbol Test can trigger multiple test failures within a single window.
11481148
Each symbol for which at least one continuous health test fails counts separately towards the threshold.
11491149
In case the configured threshold is reached, firmware needs to disable/re-enable the block to restart operation including the startup health testing.
11501150

@@ -1180,7 +1180,7 @@
11801180

11811181
This register holds the total number of subsequent health test windows during which one or more health test failures occurred.
11821182
For information on which health tests failed specifically, refer to !!ALERT_FAIL_COUNTS and !!EXTHT_FAIL_COUNTS.
1183-
Note that continuous health tests such as the repetition count test or the repetition count symbol test can trigger multiple test failures within a single window.
1183+
Note that continuous health tests such as the Repetition Count Test or the Repetition Count Symbol Test can trigger multiple test failures within a single window.
11841184
Each symbol for which at least one continuous health test fails is counted separately.
11851185

11861186
If the value of this register reaches the value configured in the !!ALERT_THRESHOLD register, a recoverable alert is raised and the ENTROPY_SRC block stops operating.

hw/ip/entropy_src/data/entropy_src_testplan.hjson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
name: cont_ht_cg
351351
desc: '''
352352
Covers a range of thresholds and configurations for the continuous health tests: REPCNT
353-
(the repetition count test), and REPCNTS (the symbol based repetition count test).
353+
(the Repetition Count Test), and REPCNTS (the Repetition Count Symbol Test).
354354
The primary cover points are the test_type (REPCNT vs. REPCNTS), the pass or fail value
355355
of the test, and the "score". The score is a generalization of the numerical value of
356356
the test output, which accounts for the fact it is far more likely to see high values

hw/ip/entropy_src/doc/programmers_guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ To select which specific bit should be used, the `RNG_BIT_SEL` field in the [`CO
9999

100100
When ENTROPY_SRC is configured in RNG bit mode, only a subset of the health tests are applicable and the health test thresholds need to be set to account for this.
101101
For this reason, the thresholds for both the bypass and the FIPS values must be set accordingly.
102-
The repetition count test, Markov test and adaptive proportion test can all still be performed on a single lane.
102+
The Repetition Count Test, Markov test and Adaptive Proportion Test can all still be performed on a single lane.
103103
However, to get the same number of entropy bits, we now must collect four times as many individual symbols from the PTRNG.
104104
This should be considered when choosing the health test thresholds, whereas the health test window size is adjusted internally.
105-
In contrast, the symbol repetition count test and the bucket test are not applicable to a single lane.
105+
In contrast, the Repetition Count Symbol Test and the bucket test are not applicable to a single lane.
106106
They need to be disabled by setting the corresponding thresholds to the maximum value.
107107
The `THRESHOLD_SCOPE` field in the [`CONF`](registers.md#conf) register is also not applicable to the single lane mode and must be set to `kMultiBitBool4False`.
108108

0 commit comments

Comments
 (0)