forked from usnistgov/ACVP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathacvp_sub_drbg.txt
1848 lines (1480 loc) · 79.8 KB
/
acvp_sub_drbg.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
TBD A. Vassilev, Ed.
Internet-Draft National Institute of Standards and Technology
Intended status: Informational November 1, 2018
Expires: May 5, 2019
ACVP Deterministic Random Bit Generator (DRBG) Algorithm JSON
Specification
draft-ietf-acvp-subdrbg-1.0
Abstract
This document defines the JSON schema for testing DRBG
implementations from SP 800-90A with the ACVP specification.
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 5, 2019.
Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Vassilev Expires May 5, 2019 [Page 1]
Internet-Draft DRBG Alg JSON November 2018
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 2
1.2. Default values . . . . . . . . . . . . . . . . . . . . . 3
2. Test Types and Test Coverage . . . . . . . . . . . . . . . . 3
2.1. Test Coverage . . . . . . . . . . . . . . . . . . . . . . 3
2.1.1. Requirements Covered . . . . . . . . . . . . . . . . 3
2.1.2. Requirements Not Covered . . . . . . . . . . . . . . 4
3. Capabilities Registration . . . . . . . . . . . . . . . . . . 5
3.1. Supported DRBG Algorithms . . . . . . . . . . . . . . . . 5
3.1.1. Supported values per DRBG option . . . . . . . . . . 6
3.2. Required Prerequisite Algorithms for DRBG Validations . . 7
3.3. Supported DRBG Algorithm Capabilities . . . . . . . . . . 8
4. Test Vectors . . . . . . . . . . . . . . . . . . . . . . . . 12
4.1. Test Groups JSON Schema . . . . . . . . . . . . . . . . . 13
4.2. Test Case JSON Schema . . . . . . . . . . . . . . . . . . 15
5. Test Vector Responses . . . . . . . . . . . . . . . . . . . . 17
6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 18
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18
8. Security Considerations . . . . . . . . . . . . . . . . . . . 18
9. Normative References . . . . . . . . . . . . . . . . . . . . 18
Appendix A. Example DRBG Capabilities JSON Object . . . . . . . 19
Appendix B. Example Test Vectors JSON Object . . . . . . . . . . 25
Appendix C. Example Test Results JSON Object . . . . . . . . . . 31
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 33
1. Introduction
The Automated Crypto Validation Protocol (ACVP) defines a mechanism
to automatically verify the cryptographic implementation of a
software or hardware crypto module. The ACVP specification defines
how a crypto module communicates with an ACVP server, including
crypto capabilities negotiation, session management, authentication,
vector processing and more. The ACVP specification does not define
algorithm specific JSON constructs for performing the crypto
validation. A series of ACVP sub-specifications define the
constructs for testing individual crypto algorithms. Each sub-
specification addresses a specific class of crypto algorithms. This
sub-specification defines the JSON constructs for testing NIST-
approved DRBG algorithms from SP 800-90A [SP800-90A] using ACVP.
1.1. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted in RFC 2119 [RFC2119].
Vassilev Expires May 5, 2019 [Page 2]
Internet-Draft DRBG Alg JSON November 2018
1.2. Default values
ACVP has default values for many of the input parameters for testing
the DRBG algorithms.For example, the Entropy Input, Nonce,
Personalization String, and Addtional Input parameters have default
values. The specific details and restrictions on each of these input
lengths is specified in Section 3 , Table 5 and the notes following
it. To indicate a preference for using a default value for any of
these parameters, the value zero (0) should be set. If the
implementation does not support one of these defaults, the
corresponding supported bit length values shall be set explicitly.
2. Test Types and Test Coverage
The ACVP server performs a set of tests on the IUT's DRBG in order to
assess the correctness and robustness of the implementation. A
typical ACVP validation session would require multiple tests to be
performed for every supported permutation of DRBG capabilities. This
section describes the design of the tests used to validate
implementations of the DRBG algorithms. There is a single test type
for DRBG testing:
"AFT" - Algorithm Function Test. In the AFT test mode, the IUT
MUST be capable of injecting the values provided by the ACVP
server, into their IUT's implementation. The IUT is REQUIRED to
run the DRBG function calls, depending on registration options, as
defined in Table 8
2.1. Test Coverage
The tests described in this document have the intention of ensuring
an implementation is conformant to [SP800-90A].
2.1.1. Requirements Covered
SP 800-90A - 7.1 Entropy Input. The IUT is REQUIRED to inject the
ACVP server's provided entropy for testing.
SP 800-90A - 7.2 Other Inputs. The IUT is REQUIRED to inject the
ACVP server's provided other input information for testing.
SP 800-90A - 7.3 Internal State. Indirect testing of the IUT's
DRBG internal state SHALL be inferred through multiple calls to
the DRBG "generate" function. Multiple calls SHALL ensure the
internal state is successfully mutated for each "generate"
invocation.
Vassilev Expires May 5, 2019 [Page 3]
Internet-Draft DRBG Alg JSON November 2018
SP 800-90A - 7.4 The DRBG Mechanism Functions. "Instantiate",
"Generate", and "Reseed" DRBG functions SHALL be tested within the
ACVP server's provided tests.
SP 800-90A - 8 DRBG Mechanism Concepts and General Requirements.
The ACVP server SHALL validate "Instantiate", "Generate", and
"Reseed" are properly implemented. Reseeding is partially tested
through ACVP test vectors through an explicit reseed operation.
SP 800-90A - 9 DRBG Mechanism Functions. "Instantiate",
"Generate", and "Reseed" SHALL be evaluated as a part of ACVP
generated tests.
SP 800-90A - 10 DRBG Algorithm Specifications. "Instantiate",
"Generate", and "Reseed" DRBG functions in scope SHALL be tested
as per the specifications in this section.
2.1.2. Requirements Not Covered
SP 800-90A - 7.1 Entropy Input. The ACVP Server SHALL provide all
instances of randomness to utilize from the IUT's perspective,
Implementation of the IUT's RBG SHALL NOT be in scope of testing.
SP 800-90A - 7.2 Other Inputs. The ACVP server SHALL provide all
instances of randomness throughout the IUT's testing of the DRBG.
SP 800-90A - 7.3 Internal State. Though direct testing of the
IUT's internal state SHALL NOT be not performed, the act of
testing multiple "generate" outputs from the IUT DRBG helps to
ensure a successful IUT implementation.
SP 800-90A - 7.4 The DRBG Mechanism Functions. "Uninstantiate",
"Health Test" SHALL NOT be in scope of testing.
SP 800-90A - 8 DRBG Mechanism Concepts and General Requirements.
The ACVP server SHALL NOT directly validate internal DRBG state.
Additionally, DRBG boundaries are out of scope of ACVP testing.
Seed construction is performed by the ACVP server, the IUT is
REQUIRED to utilize the ACVP provided seed (via entropy, inputs,
etc) to perform validation testing. Reseeds operations that are
performed automatically due to a large number of generate
operations, SHALL NOT be in scope of ACVP testing.
SP 800-90A - 9 DRBG Mechanism Functions. Error conditions
(CATASTROPHIC_ERROR_FLAG or otherwise), reseeding due to end of
seed life, uninstantiation, and health checks are out of scope of
ACVP tests.
Vassilev Expires May 5, 2019 [Page 4]
Internet-Draft DRBG Alg JSON November 2018
SP 800-90A - 10 DRBG Algorithm Specifications. All previously
mentioned DRBG functions that are not in scope - Uninstantiate,
Health check, automatic reseed, error conditions - SHALL NOT be
tested as part of testing.
SP 800-90A - 11 Assurances. Health check and error handling
testing SHALL NOT be performed within the scope of ACVP testing.
3. Capabilities Registration
ACVP requires crypto modules to register their capabilities. This
allows the crypto module to advertise support for specific
algorithms, notifying the ACVP server which algorithms need test
vectors generated for the validation process. This section describes
the constructs for advertising support of DRBG algorithms to the ACVP
server.
3.1. Supported DRBG Algorithms
The following DRBG algorithms and modes may be advertised by the ACVP
compliant crypto module:
+----------------------+-----------------+
| JSON algorithm value | JSON mode value |
+----------------------+-----------------+
| "hashDRBG" | "SHA-1" |
| | "SHA2-224" |
| | "SHA2-256" |
| | "SHA2-384" |
| | "SHA2-512" |
| | "SHA2-512/224" |
| | "SHA2-512/256" |
| | |
| "hmacDRBG" | "SHA-1" |
| | "SHA2-224" |
| | "SHA2-256" |
| | "SHA2-384" |
| | "SHA2-512" |
| | "SHA2-512/224" |
| | "SHA2-512/256" |
| | |
| "ctrDRBG" | "TDES" |
| | "AES-128" |
| | "AES-192" |
| | "AES-256" |
+----------------------+-----------------+
Table 1: Supported DRBG Algorithm and Modes JSON Values
Vassilev Expires May 5, 2019 [Page 5]
Internet-Draft DRBG Alg JSON November 2018
Note 1: The ctrDRBG algorithm in TDES mode shall only be used with
the three-key option of the Triple-DES algorithm.
3.1.1. Supported values per DRBG option
DRBG minimum/maximum values for several options such as minimum
entropy and nonce, vary depending on the DRBG capabilities
registered. The following table depicts those values
+------+--------+-------+-------+------+------+--------+------+-----+
| DRBG | Mode | Deriv | Secur | Min | Max | Max Pe | Max | Min |
| Algo | | ation | ity S | Entr | Entr | rsoStr | Addl | Non |
| rith | | Funct | treng | opy | opy | ing | Stri | ce |
| m | | ion | th | | | | ng | |
+------+--------+-------+-------+------+------+--------+------+-----+
| Coun | AES128 | TRUE | 128 | 128 | 2^35 | 2^35 | 2^35 | 64 |
| ter | | | | | | | | |
| Coun | AES192 | TRUE | 192 | 192 | 2^35 | 2^35 | 2^35 | 96 |
| ter | | | | | | | | |
| Coun | AES256 | TRUE | 256 | 256 | 2^35 | 2^35 | 2^35 | 128 |
| ter | | | | | | | | |
| Coun | TDES | TRUE | 112 | 112 | 2^35 | 2^35 | 2^35 | 56 |
| ter | | | | | | | | |
| Coun | AES128 | FALSE | 128 | 256 | 256 | 256 | 256 | 0 |
| ter | | | | | | | | |
| Coun | AES192 | FALSE | 192 | 320 | 320 | 320 | 320 | 0 |
| ter | | | | | | | | |
| Coun | AES256 | FALSE | 256 | 384 | 384 | 384 | 384 | 0 |
| ter | | | | | | | | |
| Coun | TDES | FALSE | 112 | 232 | 232 | 232 | 232 | 0 |
| ter | | | | | | | | |
| Hash | SHA1 | N/A | 80 | 80 | 2^35 | 2^35 | 2^35 | 40 |
| Hash | SHA2-2 | N/A | 112 | 112 | 2^35 | 2^35 | 2^35 | 56 |
| | 24 | | | | | | | |
| Hash | SHA2-2 | N/A | 128 | 128 | 2^35 | 2^35 | 2^35 | 64 |
| | 56 | | | | | | | |
| Hash | SHA2-3 | N/A | 192 | 192 | 2^35 | 2^35 | 2^35 | 96 |
| | 84 | | | | | | | |
| Hash | SHA2-5 | N/A | 256 | 256 | 2^35 | 2^35 | 2^35 | 128 |
| | 12 | | | | | | | |
| Hash | SHA2-5 | N/A | 112 | 112 | 2^35 | 2^35 | 2^35 | 56 |
| | 12/224 | | | | | | | |
| Hash | SHA2-5 | N/A | 128 | 128 | 2^35 | 2^35 | 2^35 | 64 |
| | 12/256 | | | | | | | |
| Hmac | SHA1 | N/A | 128 | 128 | 2^35 | 2^35 | 2^35 | 64 |
| Hmac | SHA2-2 | N/A | 192 | 192 | 2^35 | 2^35 | 2^35 | 96 |
| | 24 | | | | | | | |
| Hmac | SHA2-2 | N/A | 256 | 256 | 2^35 | 2^35 | 2^35 | 128 |
Vassilev Expires May 5, 2019 [Page 6]
Internet-Draft DRBG Alg JSON November 2018
| | 56 | | | | | | | |
| Hmac | SHA2-3 | N/A | 256 | 256 | 2^35 | 2^35 | 2^35 | 128 |
| | 84 | | | | | | | |
| Hmac | SHA2-5 | N/A | 256 | 256 | 2^35 | 2^35 | 2^35 | 128 |
| | 12 | | | | | | | |
| Hmac | SHA2-5 | N/A | 192 | 192 | 2^35 | 2^35 | 2^35 | 96 |
| | 12/224 | | | | | | | |
| Hmac | SHA2-5 | N/A | 256 | 256 | 2^35 | 2^35 | 2^35 | 128 |
| | 12/256 | | | | | | | |
+------+--------+-------+-------+------+------+--------+------+-----+
Table 2: Supported values per DRBG option table
3.2. Required Prerequisite Algorithms for DRBG Validations
Each DRBG implementation relies on other cryptographic primitives
(algorithms) - see [SP800-90A] . For example, a hashDRBG uses an
underlying hash algorithm. Each of these underlying algorithm
primitives must be validated, either separately or as part of the
same submission. ACVP provides a mechanism for specifying the
required prerequisites:
+--------------+--------------+--------------+-----------+----------+
| JSON Value | Description | JSON type | Valid | Optional |
| | | | Values | |
+--------------+--------------+--------------+-----------+----------+
| algorithm | a | value | "SHA", | No |
| | prerequisite | | "HMAC", | |
| | algorithm | | "AES", | |
| | | | "TDES" | |
| | | | | |
| valValue | algorithm | value | actual | No |
| | validation | | number, | |
| | number | | e.g. | |
| | | | "123456", | |
| | | | or "same" | |
| | | | | |
| prereqAlgVal | prerequistie | object with | see above | No |
| | algorithm | algorithm | | |
| | validation | and valValue | | |
| | | properties | | |
| | | | | |
| prereqVals | prerequistie | array of | see above | No |
| | algorithm | prereqAlgVal | | |
| | validations | objects | | |
+--------------+--------------+--------------+-----------+----------+
Table 3: Required DRBG Prerequisite Algorithms JSON Values
Vassilev Expires May 5, 2019 [Page 7]
Internet-Draft DRBG Alg JSON November 2018
3.3. Supported DRBG Algorithm Capabilities
The algorithm capabilities are advertised as JSON objects within the
'algorithms' value of the ACVP registration message. The
'algorithms' value is an array, where each array element is an
individual JSON object defined in this section. The 'algorithms'
value is part of the 'capability_exchange' element of the ACVP JSON
registration message. See the ACVP specification for details on the
registration message. Each DRBG mode capability advertised is a
self-contained JSON object. The following JSON values are used for
DRBG mode capabilities:
+----------------+-----------+--------+-----------------+-----------+
| JSON Value | Descripti | JSON | Valid Values | Optional |
| | on | type | | |
+----------------+-----------+--------+-----------------+-----------+
| mode | The | value | See | No |
| | algorithm | | Table 1 | |
| | mode to | | | |
| | be | | | |
| | validated | | | |
| | | | | |
| revision | The | value | 1.0 | No |
| | algorithm | | | |
| | testing | | | |
| | revision | | | |
| | to use. | | | |
| | | | | |
| derFuncEnabled | derivatio | boolea | true/false | Yes, appl |
| | n | n | | icable to |
| | function | | | ctrDRBG |
| | option, | | | only |
| | see the | | | |
| | notes | | | |
| | below | | | |
| | Table 5 | | | |
| | for more | | | |
| | informati | | | |
| | on. | | | |
| | | | | |
| entropyInputLe | the | Domain | min - at least | No |
| n | supported | | the maximum | |
| | bit | | security | |
| | lengths | | strength | |
| | of the | | supported by | |
| | entropy | | the mechanism/o | |
| | input. | | ption, max - | |
| | See | | larger values | |
Vassilev Expires May 5, 2019 [Page 8]
Internet-Draft DRBG Alg JSON November 2018
| | Table 5 | | are optional, | |
| | notes | | step - | |
| | below. | | increment. | |
| | | | | |
| nonceLen | See | Domain | min - at least | No |
| | Table 5 | | one half of the | |
| | notes | | maximum | |
| | below. | | security | |
| | | | strength | |
| | | | supported by | |
| | | | the mechanism/o | |
| | | | ption; max: - | |
| | | | longer nonces | |
| | | | are permitted, | |
| | | | step - | |
| | | | increment. Set | |
| | | | to zero (0) if | |
| | | | not supported. | |
| | | | | |
| persoStringLen | See | Domain | min - the | No |
| | Table 5 | | maximum | |
| | notes | | security | |
| | below. | | strength | |
| | | | supported by | |
| | | | the mechanism/o | |
| | | | ption; max - | |
| | | | largest | |
| | | | supported | |
| | | | length, step - | |
| | | | increment to | |
| | | | calculate all | |
| | | | supported | |
| | | | lengths. Set | |
| | | | all to zero (0) | |
| | | | if not | |
| | | | supported. | |
| | | | | |
| additionalInpu | See | Domain | min - the | No |
| tLen | Table 5 | | maximum | |
| | notes | | security | |
| | below. | | strength | |
| | | | supported by | |
| | | | the mechanism/o | |
| | | | ption; max - | |
| | | | largest | |
| | | | supported | |
| | | | length, step - | |
| | | | increment to | |
Vassilev Expires May 5, 2019 [Page 9]
Internet-Draft DRBG Alg JSON November 2018
| | | | calculate all | |
| | | | supported | |
| | | | lengths; set | |
| | | | all to zero (0) | |
| | | | if not | |
| | | | supported. | |
| | | | | |
| returnedBitsLe | See | value | | No |
| n | Table 5 | | | |
| | notes | | | |
| | below. | | | |
+----------------+-----------+--------+-----------------+-----------+
Table 4: DRBG Mode Capabilities JSON Values
Each DRBG algorithm capability advertised is a self-contained JSON
object. The following JSON values are used for DRBG algorithm
capabilities:
+------------------+-------------+------------+-----------+---------+
| JSON Value | Description | JSON type | Valid | Optiona |
| | | | Values | l |
+------------------+-------------+------------+-----------+---------+
| algorithm | The DRBG | value | See | No |
| | algorithm | | Table 1 | |
| | to be | | | |
| | validated. | | | |
| | | | | |
| prereqVals | The prerequ | array of p | array | No |
| | isite | rereqAlgVa | | |
| | algorithm | l objects | | |
| | validations | - see | | |
| | | Section 3. | | |
| | | 2 | | |
| | | | | |
| predResistanceEn | an implemen | array of | [true], | No |
| abled | tation that | boolean | [true, | |
| | can be used | containing | false], | |
| | with | one or two | or | |
| | prediction | distinct | [false] | |
| | resistance. | values | | |
| | See | | | |
| | Table 5 | | | |
| | notes | | | |
| | below. | | | |
| | | | | |
| reseedImplemente | Reseeding | boolean | true/fals | No |
| d | of the DRBG | | e | |
Vassilev Expires May 5, 2019 [Page 10]
Internet-Draft DRBG Alg JSON November 2018
| | shall be | | | |
| | performed | | | |
| | in | | | |
| | accordance | | | |
| | with the sp | | | |
| | ecification | | | |
| | for the | | | |
| | given DRBG | | | |
| | mechanism. | | | |
| | See | | | |
| | Table 5 | | | |
| | notes | | | |
| | below. | | | |
| | | | | |
| capabilities | An array of | array | | No |
| | objects | | | |
| | describing | | | |
| | the capabil | | | |
| | ities of a | | | |
| | mode of the | | | |
| | algorithm. | | | |
| | See | | | |
| | Table 4 for | | | |
| | more inform | | | |
| | ation. | | | |
+------------------+-------------+------------+-----------+---------+
Table 5: DRBG Algorithm Capabilities JSON Values
Note 2: If an implementation utilizes a nonce in the construction of
a seed during instantiation, the length of the nonce shall be at
least half the maximum security strength supported. See Tables 2 and
3 in [SP800-90A] for help on choosing appropriate parameter values
for the tested DRBG implementation.
Note 3: If an implementation can only be used without prediction
resistance, the array predResistanceEnabled shall only contain a
single 'false' element.
Note 4: Implementations that either have prediction resistance always
ON or always OFF, the array predResistanceEnabled shall contain two
distinct elements, 'true' and 'false'.
Note 5: Implementations containing multiple equal array elements for
predResistanceEnabled will be rejected.
Note 6: For ctrDRBG implementations, the derFuncEnabled property must
be included.
Vassilev Expires May 5, 2019 [Page 11]
Internet-Draft DRBG Alg JSON November 2018
Note 7: All DRBGs are tested at their maximum supported security
strength so this is the minimum bit length of the entropy input that
ACVP will accept. The maximum supported security strength is also
the default value for this input. Longer entropy inputs are
permitted, with the following exception: for ctrDRBG with
derFuncEnabled set to false, the bit length must equal the seed
length. See Tables 2 and 3 in [SP800-90A] for help on choosing
appropriate parameter values for the DRBG being tested.
Note 8: ctrDRBG with derFuncEnabled set to false does not use a
nonce; the nonce values, if supplied, will be ignored for this case.
The default nonce bit length is one-half the maximum security
strength supported by the mechanism/option. See Tables 2 and 3 in
[SP800-90A] for help on choosing appropriate parameter values for the
tested DRBG implementation.
Note 9: ACVP allows bit length values for persoString ranging from
the maximum supported security strength except in the case of
derFuncEnabled set to false, where the second personalization string
length must be less than or equal to the seed length. If the
implementation only supports one personalization string length, then
set only that value as the range min and max and set the step to zero
(0). If the implementation does not use at all a persoString, set
all range parameters (min, max, step) to 0 (zero). If the
implementation can work with and without persoString, set the min to
zero (0), set the max to at least the maximum supported strength and
set the step equal to at least the maximum supported strength to
avoid testing lengths less than that. See Tables 2 and 3 in
[SP800-90A] for help on choosing appropriate parameter values for the
tested DRBG implementation.
Note 10: The addtionalInput configuration and restrictions are the
same as those for the persoString.
4. Test Vectors
The ACVP server provides test vectors to the ACVP client, which are
then processed and returned to the ACVP server for validation. A
typical ACVP validation session would require multiple test vector
sets to be downloaded and processed by the ACVP client. Each test
vector set represents an individual algorithm, such as Hash_DRBG,
etc. This section describes the JSON schema for a test vector set
used with DRBG algorithms.
The test vector set JSON schema is a multi-level hierarchy that
contains meta data for the entire vector set as well as individual
test vectors to be processed by the ACVP client. The following table
describes the JSON elements at the top level of the hierarchy.
Vassilev Expires May 5, 2019 [Page 12]
Internet-Draft DRBG Alg JSON November 2018
+-------------+---------------------------------------------+-------+
| JSON Value | Description | JSON |
| | | type |
+-------------+---------------------------------------------+-------+
| version | Protocol version identifier | value |
| | | |
| vectorSetId | Unique numeric identifier for the vector | value |
| | set | |
| | | |
| algorithm | The DRBG algorithm used for the test | value |
| | vectors. See Section 3.1 for | |
| | possible values. | |
| | | |
| mode | The DRBG algorithm mode used for the test | value |
| | vectors. See Section 3.1 for | |
| | possible values. | |
| | | |
| revision | The algorithm testing revision to use. | value |
| | | |
| testGroups | Array of test group JSON objects, which are | array |
| | defined in Section 4.1 | |
+-------------+---------------------------------------------+-------+
Table 6: Vector Set JSON Object
4.1. Test Groups JSON Schema
The test_groups element at the top level in the test vector JSON
object is an array of test groups. Test vectors are grouped into
similar test cases to reduce the amount of data transmitted in the
vector set. For instance, all test vectors that use the same key
size would be grouped together. The Test Group JSON object contains
meta data that applies to all test vectors within the group. The
following table describes the DRBG JSON elements of the Test Group
JSON object.
ACVP allows default bit lengths for the inputs to specific
algorithms, typically communicated as numerical value zero (0). If
an implementation does not support one of the defaults, the bit
lengths the supported values shall be specified explicitly.
+-------------------+-----------------------+------------+----------+
| JSON Value | Description | JSON type | Optional |
+-------------------+-----------------------+------------+----------+
| tgId | Numeric identifier | value | No |
| | for the test group, | | |
| | unique across the | | |
| | entire vector set. | | |
Vassilev Expires May 5, 2019 [Page 13]
Internet-Draft DRBG Alg JSON November 2018
| | | | |
| mode | the mode of the DRBG, | value | No |
| | see | | |
| | Section 3.1 | | |
| | | | |
| derFunc | use derivation | boolean, | Yes |
| | function or not | true/false | |
| | | | |
| predResistance | use prediction | boolean | No |
| | resistance | true/false | |
| | | | |
| reSeed | use reseeding | boolean | No |
| | | true/flase | |
| | | | |
| entropyInputLen | entropy length | value | No |
| | | | |
| nonceLen | nonce length; set to | value | No |
| | 0 (zero) if not | | |
| | used/supported. See | | |
| | also notes after | | |
| | Table 5 above. | | |
| | | | |
| persoStringLen | personalization | value | No |
| | string length; set to | | |
| | 0 (zero) if not | | |
| | used/supported. See | | |
| | also notes after | | |
| | Table 5 above. | | |
| | | | |
| additonalInputLen | additional input | value | No |
| | length; set to 0 | | |
| | (zero) if not | | |
| | used/supported. See | | |
| | also notes after | | |
| | Table 5 above. | | |
| | | | |
| returnedBitsLen | returned bits length | value | No |
| | | | |
| tests | Array of individual | array | No |
| | test vector JSON | | |
| | objects, which are | | |
| | defined in | | |
| | Section 4.2 | | |
+-------------------+-----------------------+------------+----------+
Table 7: Test Group JSON Object
Vassilev Expires May 5, 2019 [Page 14]
Internet-Draft DRBG Alg JSON November 2018
Note 11: According to SP 800-90A [SP800-90A] , a DRBG implementation
has two separate controls for determining the correct test procedure
for handling addtional entropy and other data in providing prediction
resistance assurances. Depending on the capabilities advertised by
the predResistanceEnabled and reseedImplemented flags ACVP generates
test data according to the following test scenarios:
+---------------------------------------+---------------------------+
| Prediction Resistance Assurance | Test Procedure |
| Options | |
+---------------------------------------+---------------------------+
| "predResistanceEnabled" : true; | |
| "reseedImplemented": true | |
| | Instantiate DRBG |
| | Generate but don't output |
| | Generate output |
| | Uninstantiate |
| | |
| "predResistanceEnabled" : false; | |
| "reseedImplemented" : true | |
| | Instantiate DRBG |
| | Reseed |
| | Generate but don't output |
| | Generate output |
| | Uninstantiate |
| | |
| "predResistanceEnabled" : true/false; | |
| "reseedImplemented": false | |
| | Instantiate DRBG |
| | Generate but don't output |
| | Generate output |
| | Uninstantiate |
+---------------------------------------+---------------------------+
Table 8: Test Procedures for Supported Prediction Resistance Options
4.2. Test Case JSON Schema
Each test group contains an array of one or more test cases. Each
test case is a JSON object that represents a single vector to be
processed by the ACVP client. The following table describes the JSON
elements for each test case.
Vassilev Expires May 5, 2019 [Page 15]
Internet-Draft DRBG Alg JSON November 2018
+--------------+---------------------------------+-------+----------+
| JSON Value | Description | JSON | Optional |
| | | type | |
+--------------+---------------------------------+-------+----------+
| tcId | Numeric identifier for the test | value | No |
| | case, unique across the entire | | |
| | vector set. | | |
| | | | |
| entropyInput | entropy value | value | No |
| | | | |
| nonce | Value of the nonce | value | No |
| | | | |
| persoString | value of the personlization | value | No |
| | string | | |
| | | | |
| otherInput | array of additonal | array | No |
| | input/entropy input value pairs | | |
| | for testing. See | | |
| | Table 10 | | |
+--------------+---------------------------------+-------+----------+
Table 9: DRBG Test Case JSON Object
Each test group contains an array of one or more tests. Each test
object contains an otherInput object, which is an array of objects,
each with the intendedUse property indicating if the particular test
data is to be used for reSeed or generate - see Table 8 . Each test
vector is a JSON object that represents a single test case to be
processed by the ACVP client. The following table describes the JSON
elements for each DRBG predcition resistance test vector.
+-----------------+------------------------------+-------+----------+
| JSON Value | Description | JSON | Optional |
| | | type | |
+-----------------+------------------------------+-------+----------+
| additionalInput | value of the additional | value | No |
| | input string to use in | | |
| | predition resistance tests | | |
| | | | |
| entropyInput | value of the entropy input | value | No |
| | to use in prediction | | |
| | resistance tests | | |
| | | | |
| intendedUse | "reSeed", "generate" | value | No |
+-----------------+------------------------------+-------+----------+
Table 10: Prediction Resistance Test Case JSON Object
Vassilev Expires May 5, 2019 [Page 16]
Internet-Draft DRBG Alg JSON November 2018
5. Test Vector Responses
After the ACVP client downloads and processes a vector set, it must
send the response vectors back to the ACVP server. The following
table describes the JSON object that represents a vector set
response.
+-------------+---------------------------------------------+-------+
| JSON Value | Description | JSON |
| | | type |
+-------------+---------------------------------------------+-------+
| version | Protocol version identifier | value |
| | | |
| vectorSetId | Unique numeric identifier for the vector | value |
| | set | |
| | | |
| testGroups | Array of JSON objects that represent each | array |
| | test vector group. See Table 12 | |
+-------------+---------------------------------------------+-------+
Table 11: Vector Set Response JSON Object
The testGroups section is used to organize the ACVP client response
in a similar manner to how it receives vectors. Several algorithms
SHALL require the client to send back group level properties in their
response. This structure helps accommodate that.
+-----------+--------------------------------------------+----------+
| JSON | Description | JSON |
| Value | | type |
+-----------+--------------------------------------------+----------+
| tgId | The test group Id | value |
| | | |
| tests | The tests associated to the group | value |
| | specified in tgId | |
| | | |
+-----------+--------------------------------------------+----------+
Table 12: Vector Set Group Response JSON Object
Each test group contains an array of one or more test cases. Each
test case is a JSON object that represents a single test vector to be
processed by the ACVP client. The following table describes the JSON
elements for each DRBG test vector.
Vassilev Expires May 5, 2019 [Page 17]
Internet-Draft DRBG Alg JSON November 2018
+--------------+---------------------------------+-------+----------+
| JSON Value | Description | JSON | Optional |
| | | type | |
+--------------+---------------------------------+-------+----------+
| tcId | Numeric identifier for the test | value | No |
| | case, unique across the entire | | |
| | vector set. | | |
| | | | |
| returnedBits | value of the computed DRBG | value | No |
| | output | | |
+--------------+---------------------------------+-------+----------+
Table 13: DRBG Test Case Results JSON Object
6. Acknowledgements
TBD...
7. IANA Considerations
This memo includes no request to IANA.
8. Security Considerations
Security considerations are addressed by the ACVP specification.
9. Normative References
[ACVP] authSurName, authInitials., "ACVP Specification", 2016.
[DRBGVS] Keller, S. and T. Hall, "The NIST SP 800-90A Deterministic
Random Bit Generator Validation System (DRBGVS)", October
2015, <https://csrc.nist.gov/csrc/media/projects/
cryptographic-algorithm-validation-program/documents/drbg/
drbgvs.pdf>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[SP800-90A]
Barker, E. and J. Kelsey, "Recommendation for Random
Number Generation Using Deterministic Random Bit