Commit bdad2c5
Document signing secret-key validity precondition
Signing APIs assume a valid, bit-packed secret key and do not
perform full serialized-key validation (t0, tr, s1, s2). Callers
importing serialized keys can validate them via pk_from_sk before
signing.
* Add @warning notices to all sign* / signature* / pre_hash sign
entry points in mldsa_native.h and mldsa/src/sign.h, and reword
the sk parameter descriptions to "assumed to be valid".
* Expand the Wycheproof client comment for the InvalidPrivateKey
skip: FIPS 204 does not require signing to validate serialized
private keys, full validation covers t0 and tr and is exposed
through pk_from_sk, and those vectors are still tested via
pkFromSk.
Signed-off-by: Fredrik Dahlgren <fredrik.dahlgren@trailofbits.com>
[hbecker: rebase+squash, adjust commit message]
Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>1 parent b67d7f1 commit bdad2c5
3 files changed
Lines changed: 54 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
249 | 253 | | |
250 | 254 | | |
251 | 255 | | |
| |||
258 | 262 | | |
259 | 263 | | |
260 | 264 | | |
261 | | - | |
| 265 | + | |
262 | 266 | | |
263 | 267 | | |
264 | 268 | | |
| |||
298 | 302 | | |
299 | 303 | | |
300 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
301 | 309 | | |
302 | 310 | | |
303 | 311 | | |
304 | 312 | | |
305 | 313 | | |
306 | 314 | | |
307 | | - | |
| 315 | + | |
308 | 316 | | |
309 | 317 | | |
310 | 318 | | |
| |||
340 | 348 | | |
341 | 349 | | |
342 | 350 | | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
343 | 355 | | |
344 | 356 | | |
345 | 357 | | |
346 | | - | |
| 358 | + | |
347 | 359 | | |
348 | 360 | | |
349 | 361 | | |
| |||
516 | 528 | | |
517 | 529 | | |
518 | 530 | | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
519 | 535 | | |
520 | 536 | | |
521 | 537 | | |
522 | 538 | | |
523 | 539 | | |
524 | 540 | | |
525 | 541 | | |
526 | | - | |
| 542 | + | |
527 | 543 | | |
528 | 544 | | |
529 | 545 | | |
| |||
607 | 623 | | |
608 | 624 | | |
609 | 625 | | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
610 | 630 | | |
611 | 631 | | |
612 | 632 | | |
613 | 633 | | |
614 | 634 | | |
615 | 635 | | |
616 | 636 | | |
617 | | - | |
| 637 | + | |
618 | 638 | | |
619 | 639 | | |
620 | 640 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
183 | 187 | | |
184 | 188 | | |
185 | 189 | | |
| |||
192 | 196 | | |
193 | 197 | | |
194 | 198 | | |
195 | | - | |
| 199 | + | |
196 | 200 | | |
197 | 201 | | |
198 | 202 | | |
| |||
246 | 250 | | |
247 | 251 | | |
248 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
249 | 257 | | |
250 | 258 | | |
251 | 259 | | |
252 | 260 | | |
253 | 261 | | |
254 | 262 | | |
255 | | - | |
| 263 | + | |
256 | 264 | | |
257 | 265 | | |
258 | 266 | | |
| |||
298 | 306 | | |
299 | 307 | | |
300 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
301 | 313 | | |
302 | 314 | | |
303 | 315 | | |
304 | | - | |
| 316 | + | |
305 | 317 | | |
306 | 318 | | |
307 | 319 | | |
| |||
479 | 491 | | |
480 | 492 | | |
481 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
482 | 498 | | |
483 | 499 | | |
484 | 500 | | |
485 | 501 | | |
486 | 502 | | |
487 | 503 | | |
488 | 504 | | |
489 | | - | |
| 505 | + | |
490 | 506 | | |
491 | 507 | | |
492 | 508 | | |
| |||
584 | 600 | | |
585 | 601 | | |
586 | 602 | | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
587 | 607 | | |
588 | 608 | | |
589 | 609 | | |
590 | 610 | | |
591 | 611 | | |
592 | 612 | | |
593 | 613 | | |
594 | | - | |
| 614 | + | |
595 | 615 | | |
596 | 616 | | |
597 | 617 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
| |||
0 commit comments