liveBook · Manning

Key encryption key

As explained in Real-World Cryptography

A key encryption key is a cryptographic key used to encrypt and protect other cryptographic keys.

Reusing one secret across devices creates a broad compromise: break one device, and every device may be exposed. A key encryption key (KEK) helps protect a device-specific data encryption key (DEK) instead. section 13.2.4

The relationship is simple:

  • The DEK encrypts protected device data. section 13.2.4
  • The KEK encrypts the DEK rather than encrypting the data directly. section 13.2.4
  • A device can combine its hardware UID and the user PIN through password-based key derivation to obtain the KEK-related protection. section 13.2.4
  • Because the DEK is protected by the KEK, users can change their PIN quickly without directly rederiving the DEK. section 13.2.4

Device unlock example

An Apple Secure Enclave has a device-specific UID. The UID and user PIN participate in deriving protection for a KEK, while the KEK encrypts the DEK used for the device’s data. section 13.2.4

Figure 13.3 A chip implementing the TPM 2.0 standard, plugged into a motherboard. This chip can be called by the system’s motherboard components as well as user applications running on the computer’s OS. Photo from Wikipedia (http://mng.bz/Q2je).

A TPM 2.0 chip provides the hardware setting in which device-specific cryptographic keys and protected operations can be anchored. section 13.2.4

How Real-World Cryptography covers it

How deep it goes
Defines KEK through its relationship to a DEK, but stops short of describing KEK generation, storage, or implementation.
Examples
Uses Apple Secure Enclave PIN changes as the concrete example, with TPMs and integrated secure chips as the hardware setting.
What it assumes
Introduces KEKs alongside DEKs while relying on prior familiarity with password-based key derivation.
What you can do after
Understand how encrypting a DEK with a KEK supports quick PIN changes in protected device storage.
How it connects
Connects key encryption keys with data-encryption keys, PINs, password-based key derivation, and secure elements.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Real-World Cryptography. The section links point to the parts of the book it draws on.