Commit 5c28f69
Improve the RSA PSS code.
- sign_pss and verify_pss need to digest the data before calling into their
respective wolfCrypt functions. Those wolfCrypt functions expect digests, not
plaintext.
- RsaPrivate make_key should take an optional hash_type parameter for the case
where the key will be used to create PSS signatures.
- test_rsa_pss_sign_verify appears to have been deliberately coded to have the
input plaintext length line up with the digest size, which masked the problem
where we weren't digesting the plaintext. I modified the plaintext so that this
is no longer the case.1 parent bf0a4c2 commit 5c28f69
3 files changed
+41
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
| 453 | + | |
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
597 | 598 | | |
598 | 599 | | |
599 | 600 | | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
600 | 609 | | |
601 | 610 | | |
602 | 611 | | |
| |||
610 | 619 | | |
611 | 620 | | |
612 | 621 | | |
613 | | - | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
614 | 625 | | |
615 | 626 | | |
616 | 627 | | |
| |||
620 | 631 | | |
621 | 632 | | |
622 | 633 | | |
623 | | - | |
| 634 | + | |
624 | 635 | | |
625 | 636 | | |
626 | 637 | | |
627 | | - | |
| 638 | + | |
628 | 639 | | |
629 | 640 | | |
630 | 641 | | |
| |||
776 | 787 | | |
777 | 788 | | |
778 | 789 | | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
779 | 798 | | |
| 799 | + | |
| 800 | + | |
780 | 801 | | |
781 | 802 | | |
782 | 803 | | |
783 | | - | |
| 804 | + | |
| 805 | + | |
784 | 806 | | |
785 | 807 | | |
786 | 808 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
0 commit comments