Commit c5931d5
nvme-auth: use hkdf_expand_label()
When generating keying material during an authentication transaction
(secure channel concatenation), the HKDF-Expand-Label function is part
of the specified key derivation process.
The current open-coded implementation misses the length prefix
requirements on the HkdfLabel label and context variable-length vectors
(RFC 8446 Section 3.4).
Instead, use the hkdf_expand_label() function.
Signed-off-by: Chris Leech <cleech@redhat.com>
Signed-off-by: Hannes Reinecke <hare@kernel.org>
Signed-off-by: Keith Busch <kbusch@kernel.org>1 parent 1cab50d commit c5931d5
1 file changed
Lines changed: 13 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
| 771 | + | |
772 | 772 | | |
773 | | - | |
774 | | - | |
| 773 | + | |
| 774 | + | |
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
| |||
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
| 814 | + | |
| 815 | + | |
822 | 816 | | |
823 | 817 | | |
824 | 818 | | |
825 | 819 | | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | 820 | | |
831 | 821 | | |
832 | 822 | | |
833 | | - | |
| 823 | + | |
834 | 824 | | |
835 | | - | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
836 | 829 | | |
837 | 830 | | |
838 | | - | |
| 831 | + | |
839 | 832 | | |
840 | 833 | | |
841 | 834 | | |
842 | | - | |
843 | | - | |
| 835 | + | |
| 836 | + | |
844 | 837 | | |
845 | 838 | | |
846 | 839 | | |
| |||
0 commit comments