Commit 116a59c
committed
ACVP: Support FIPS203-tr1 encapDecap (v1.1.0.43)
The FIPS203-tr1 encapDecap revision adds keyFormat 'seed'/'expanded'
groups: the decapsulation key may be supplied as a seed (d||z) to
expand rather than as the expanded dk.
Add a decode_dk() entry point to the ACVP harness accepting either
dk=HEX or seed=HEX (expanding the seed via crypto_kem_keypair_derand),
and route the decapsulation function through it. keyFormat is inspected
per group, so the client copes whether or not a given file carries it.
decode_dk is MLK_NOINLINE so its keyGen scratch stays out of main's
stack frame, which under -fsanitize=undefined would otherwise overflow
AVR RAM. Download and run the ML-KEM-encapDecap-FIPS203-tr1 vectors
when the version ships them (v1.1.0.43+); keep the base FIPS203 dataset.
Two quirks in the v1.1.0.43 sample vectors are worth recording:
- decapsulationKeyCheck cases carry only a tcId with no dk, yet their
expected results are a non-trivial mix of pass and fail, so they
cannot be reproduced offline. The client drops decapsulationKeyCheck
cases that lack a key, from prompt and expected alike; they run
normally again once a key is present. This is a known upstream sample
bug (usnistgov/ACVP-Server#459), where the maintainers confirm
keyFormat there should be 'expanded' with the dk provided.
- The base ML-KEM-encapDecap-FIPS203 file also gained keyFormat at
v1.1.0.43, whereas for ML-DSA only the -tr1 revision carries it. This
looks like an unintended regeneration of the base file; the per-group
handling above keeps the client correct whether or not it is fixed.
Bump the default ACVP version to v1.1.0.43 and roll the CI matrix
forward to the three latest revisions.
Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>1 parent 61c8313 commit 116a59c
4 files changed
Lines changed: 110 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1353 | 1353 | | |
1354 | 1354 | | |
1355 | 1355 | | |
1356 | | - | |
1357 | | - | |
| 1356 | + | |
| 1357 | + | |
1358 | 1358 | | |
1359 | 1359 | | |
1360 | 1360 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
23 | 33 | | |
24 | 34 | | |
25 | 35 | | |
| |||
32 | 42 | | |
33 | 43 | | |
34 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
35 | 52 | | |
36 | 53 | | |
37 | 54 | | |
| |||
63 | 80 | | |
64 | 81 | | |
65 | 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 | + | |
66 | 115 | | |
67 | 116 | | |
68 | 117 | | |
| |||
86 | 135 | | |
87 | 136 | | |
88 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
89 | 149 | | |
90 | 150 | | |
91 | 151 | | |
| |||
139 | 199 | | |
140 | 200 | | |
141 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
142 | 208 | | |
143 | 209 | | |
144 | 210 | | |
145 | 211 | | |
146 | 212 | | |
147 | | - | |
| 213 | + | |
148 | 214 | | |
149 | 215 | | |
150 | 216 | | |
| |||
319 | 385 | | |
320 | 386 | | |
321 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
322 | 392 | | |
323 | 393 | | |
324 | 394 | | |
| |||
338 | 408 | | |
339 | 409 | | |
340 | 410 | | |
341 | | - | |
342 | | - | |
| 411 | + | |
| 412 | + | |
343 | 413 | | |
344 | 414 | | |
345 | 415 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 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 | + | |
122 | 154 | | |
123 | 155 | | |
124 | 156 | | |
| |||
321 | 353 | | |
322 | 354 | | |
323 | 355 | | |
324 | | - | |
325 | | - | |
| 356 | + | |
| 357 | + | |
326 | 358 | | |
327 | 359 | | |
328 | 360 | | |
| |||
0 commit comments