Key Wrap constructions are a class of symmetric encryption algorithms designed to encapsulatecryptographic key material. The Key Wrap algorithms are intended for applications such as protecting keys while in untrusted storage or transmitting keys over untrusted communications networks. The constructions are typically built from standard primitives such as block ciphers and cryptographic hash functions. Key Wrap may be considered as a form of key encapsulation algorithm, although it should not be confused with the more commonly known asymmetric key encapsulation algorithms. Key Wrap algorithms can be used in a similar application: to securely transport a session key by encrypting it under a long-term encryption key.
Background
In the late 1990s, the National Institute of Standards and Technology posed the "Key Wrap" problem: to develop secure and efficient cipher-based key encryption algorithms. The resulting algorithms would be formally evaluated by NIST, and eventually approved for use in NIST-certified cryptographic modules. NIST did not precisely define the security goals of the resulting algorithm, and left further refinement to the algorithm developers. Based on the resulting algorithms, the design requirements appear to be confidentiality, integrity protection, efficiency, use of standard underlying primitives such as the Advanced Encryption Standard and the Secure Hash Algorithm, and consideration of additional circumstances. Goals and are particularly important, given that many widely deployed authenticated encryption algorithms are already sufficient to accomplish the remaining goals. Several constructions have been proposed. These include:
* Implemented by the WebCrypto subtle API.
, which defines four algorithms:
* AESKW
* TDKW.
* AKW1
* AKW2
Each of the proposed algorithms can be considered as a form of authenticated encryption algorithm providing confidentiality for highly entropic messages such as cryptographic keys. The AES Key Wrap Specification, AESKW, TDKW, and AKW1 are intended to maintain confidentiality under adaptive chosen ciphertext attacks, while the AKW2 algorithm is designed to be secure only under known-plaintext attacks. AESKW, TDKW and AKW2 also provide the ability to authenticate cleartext "header", an associated block of data that is not encrypted. Rogaway and Shrimpton evaluated the design of the ANSX9.102 algorithms with respect to the stated security goals. Among their general findings, they noted the lack of clearly stated design goals for the algorithms, and the absence of security proofs for all constructions. In their paper, Rogaway and Shrimpton proposed a provable key-wrapping algorithm that authenticates and encrypts an arbitrary string and authenticates, but does not encrypt, additional data which can be bound into the wrapped key. This has been standardized as a new AES mode in.