#crypto #aes #keywrap #aes-kw

no-std aes-keywrap

AES Key Wrap construction (AES-KW, RFC 3394 / RFC 5649)

6 releases

0.2.4 Feb 11, 2022
0.2.3 May 27, 2021
0.2.2 Apr 30, 2021
0.2.1 Mar 14, 2021
0.1.0 Oct 13, 2020

#1040 in Cryptography

Download history 66/week @ 2022-10-07 12/week @ 2022-10-14 35/week @ 2022-10-21 22/week @ 2022-10-28 56/week @ 2022-11-04 28/week @ 2022-11-11 18/week @ 2022-11-18 47/week @ 2022-11-25 61/week @ 2022-12-02 104/week @ 2022-12-09 34/week @ 2022-12-16 2/week @ 2022-12-23 9/week @ 2022-12-30 35/week @ 2023-01-06 131/week @ 2023-01-13 65/week @ 2023-01-20

240 downloads per month

ISC license

13KB
280 lines

AES Key Wrap for Rust

AES Key Wrap is a construction to encrypt secret keys using a master key.

This is an AES-KWP (NIST SP800-38F) implementation for Rust.

It is essentially a 5 round Feistel network using AES as the core function. One half of each AES block is used to encrypt the key, and the second half of the last permutation is used to compute a 64-bit MAC.

It doesn't require nonces, but still allows key reuse.

This is a NIST-blessed construction. Other than that, AES Key Wrap is inefficient and is generally not very useful.

Dependencies

~650KB
~15K SLoC