Skip to content

Envelope encryption

Envelope encryption separates the data key from the key protecting it. The encrypted file and wrapped data key need to be managed together.

IT security

Protect data and its key separately

Envelope encryption encrypts data with a data encryption key, or DEK. Another key, the key encryption key or KEK, encrypts that DEK. This second operation is also called wrapping. The encrypted DEK can be stored alongside the encrypted data; the KEK is protected separately.

A fictional document portal encrypts file document-42 with a DEK generated for it. It has that DEK wrapped by a KEK in its key management service. Alongside the document, it stores the encrypted file, wrapped DEK and required key reference. It does not persist the unencrypted DEK there.

Account for both layers when reading

To open the file, the application needs access to the encrypted file and wrapped DEK. With appropriate permission at the key management service, it can unwrap the DEK and use it to decrypt the file. Key-use permissions and handling of the DEK available in memory therefore remain security concerns.

A stolen data copy with its wrapped DEK is not the same as access to the protective KEK. However, if an attacker also gains sufficient unwrapping permissions, this separation can lose its protective effect. The construction therefore does not replace access control. A later KEK rotation must also establish which wrapped keys and older versions are still needed.

Sources