ArticleslgStudy

computer science

Key wrap

Key wrap is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Key wrap rather than just read about it. In short: In cryptography, key wrap constructions are a class of symmetric encryption algorithms designed to encapsulate (encrypt) cryptographic 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.

Key wrap — main illustration
Key wrap — illustration

Key takeaways

  • Key wrap belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Key wrap to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Key wrap from memory before moving on to harder problems.

Reference excerpt

In cryptography, key wrap constructions are a class of symmetric encryption algorithms designed to encapsulate (encrypt) cryptographic 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 (public-key) key encapsulation algorithms (e.g., PSEC-KEM). 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 (NIST) 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 (1) confidentiality, (2) integrity protection (authentication), (3) efficiency, (4) use of standard (approved) underlying primitives such as the Advanced Encryption Standard (AES) and the Secure Hash Algorithm (SHA-1), and (5) consideration of additional circumstances (e.g., resilience to operator error, low-quality random number generators). Goals (3) and (5) are particularly important, given that many widely deployed authenticated encryption algorithms (e.g., AES-CCM) are already sufficient to accomplish the remaining goals.

Several constructions have been proposed. These include:

AES Key Wrap Specification (November 2001, RFC 3394) Implemented by the WebCrypto subtle API. American Standards Committee ANSX9.102, which defines four algorithms: AESKW (a variant of the AES Key Wrap Specification) TDKW (similar to AESKW, built from Triple DES rather than AES). AKW1 (TDES, two rounds of CBC) AKW2 (TDES, CBC then CBC-MAC) 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 (or weaker) attacks. (The stated goal of AKW2 is for use in legacy systems and computationally limited devices where use of the other algorithms would be impractical.) 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 (SIV—the Synthetic Initialization Vector mode) that authenticates and encrypts an arbitrary string and authenticates, but does not encrypt, associated data which can be bound into the wrapped key. This has been specified as a new AES mode in RFC 5297.

See also Authenticated encryption Deterministic encryption Key management Offline private key protocol

Further reading P. Rogaway, T. Shrimpton. A Provable-Security Treatment of the Key-Wrap Problem. NIST, AES Key Wrap Specification (November 2001) NIST Special Publication 800-38F, Recommendation for Block Cipher Modes of Operation: Methods for Key Wrapping (December 2012) American Standards Committee, Request for Review of Key Wrap Algorithms Dan Harkins (October 2008). "RFC 5297: Synthetic Initialization Vector (SIV) Authenticated Encryption Using the Advanced Encryption Standard (AES)". IETF. Krohn, Max; Coyne, Chris. "TripleSec". Keybase. Archived from the original on 12 November 2020. Retrieved 2 Jan 2021.

References

Worked examples

Example 1 — a first encounter with Key wrap

Start with the simplest possible case. Write down what Key wrap claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Key wrap before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Key wrap ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Key wrap

In research
Key wrap appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Key wrap in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Key wrap is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cryptographic algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Key wrap outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Key wrap in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Key wrap means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Key wrap out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Key wrap in simple terms?

In cryptography, key wrap constructions are a class of symmetric encryption algorithms designed to encapsulate (encrypt) cryptographic key material. The Key Wrap algorithms are intended for applications such as protecting keys while in untrusted storage or transmitting keys over untrusted communica…

Why does Key wrap matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Key wrap?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Key wrap.

Tags

  • Cryptographic algorithms

Keep exploring