Commit b48e3be
Allow specifying the tag after AAD in CCM mode
This change allows to pass the authentication tag after specifying
the AAD in CCM mode. This is already true for the other two supported
AEAD modes (GCM and OCB) and it seems appropriate to match the
behavior.
GCM and OCB also support to set the tag at any point before the call
to `EVP_*Final`, but this won't work for CCM due to a restriction
imposed by section 2.6 of RFC3610: The tag must be set before
actually decrypting data.
This commit also adds a test case for setting the tag after supplying
plaintext length and AAD.
Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Matt Caswell <[email protected]>
(Merged from #7243)
(cherry picked from commit 67c81ec)1 parent 8f50627 commit b48e3be
File tree
4 files changed
+39
-12
lines changed- crypto/evp
- doc/man3
- test
- recipes/30-test_evp_data
4 files changed
+39
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3643 | 3643 | | |
3644 | 3644 | | |
3645 | 3645 | | |
3646 | | - | |
3647 | | - | |
3648 | 3646 | | |
3649 | 3647 | | |
3650 | 3648 | | |
| |||
3659 | 3657 | | |
3660 | 3658 | | |
3661 | 3659 | | |
| 3660 | + | |
| 3661 | + | |
| 3662 | + | |
| 3663 | + | |
| 3664 | + | |
3662 | 3665 | | |
3663 | 3666 | | |
3664 | 3667 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
416 | 418 | | |
417 | 419 | | |
418 | 420 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| 465 | + | |
465 | 466 | | |
466 | 467 | | |
467 | 468 | | |
| |||
525 | 526 | | |
526 | 527 | | |
527 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
528 | 538 | | |
529 | 539 | | |
530 | 540 | | |
| |||
610 | 620 | | |
611 | 621 | | |
612 | 622 | | |
613 | | - | |
| 623 | + | |
614 | 624 | | |
615 | 625 | | |
616 | 626 | | |
| |||
633 | 643 | | |
634 | 644 | | |
635 | 645 | | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | 646 | | |
645 | 647 | | |
646 | 648 | | |
| |||
675 | 677 | | |
676 | 678 | | |
677 | 679 | | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
678 | 689 | | |
679 | 690 | | |
680 | 691 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
736 | 747 | | |
737 | 748 | | |
738 | 749 | | |
| |||
0 commit comments