Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is Envelope Encryption?

Envelope encryption encrypts data with a local data key, then encrypts that data key with a master key held in a key management service. It is how every major cloud platform encrypts at scale.

Illustration for the cybersecurity term Envelope Encryption
Home / Blog / Cybersecurity Terms / What Is Envelope Encryption?
17 November 2026

What Is Envelope Encryption?

What Is Envelope Encryption?

Suppose every file your application stores must be encrypted with a key held in a hardware-backed key management service. Sending each file to that service is impossible: the request size is capped at a few kilobytes, the latency is milliseconds per call, and the throughput quota will stop you long before your users do. Envelope encryption solves the problem by encrypting the data locally and sending only the key to be protected.

The pattern is two layers. A data encryption key (DEK), generated per object, per record, or per tenant, encrypts the actual data with AES-GCM. A key encryption key (KEK), which never leaves the key management service or hardware security module, encrypts the DEK. The encrypted DEK travels with the ciphertext, which is where the envelope metaphor comes from.

The Write and Read Paths

  1. The application calls the KMS to generate a data key. The service returns the key twice: once in plaintext for immediate use, once wrapped under the KEK.
  2. The application encrypts the object with the plaintext DEK, then erases that copy from memory.
  3. It stores the ciphertext alongside the wrapped DEK, with a header recording the KEK identifier, algorithm, and version.
  4. To read, it sends the wrapped DEK to the KMS, receives the plaintext DEK back if its identity is authorised, decrypts the object, and discards the key again.

Only the second step touches the data, and only small values cross the network. AWS KMS, Azure Key Vault, Google Cloud KMS, HashiCorp Vault, and Kubernetes secret encryption with a KMS provider all implement this shape, as do S3 server-side encryption, EBS volume encryption, and BigQuery column encryption beneath the surface.

Why It Is Worth the Complexity

Rotation Needs a Definition

Teams frequently claim annual key rotation when what rotates is the KEK alone. Re-wrapping a DEK under a new master key changes nothing about the key that actually protects the data, and an attacker who captured a DEK still holds it. Both layers need a policy:

LayerTypical rotationEffect
KEKAnnually, or automatically by the serviceLimits exposure of the wrapping key; cheap
DEKPer object, or on re-encryptionLimits what any single key protects; requires rewriting data

Generating a fresh DEK for every object makes the second row free, because no key is ever reused. That is the configuration to aim for, and it is also what keeps AES-GCM nonce limits comfortably out of reach.

Where Implementations Go Wrong

The cryptography is handled by the platform; the failures are architectural.

That last point has a positive use. Destroying a tenant’s KEK renders every object encrypted under it unrecoverable, which is a defensible way to satisfy a deletion request across backups and replicas without hunting down every copy. We review key hierarchies, policies, and rotation claims as part of our cloud security services, where the gap between the documented design and the deployed key policy is usually the finding.

FAQ – Frequently Asked Questions

Why Not Just Encrypt Everything Directly with the KMS?

Key management services cap request payloads at around 4 KB and charge per call, so encrypting objects directly is impossible for files and ruinously slow for high volumes. Envelope encryption keeps the bulk work local and asks the service only to protect a 32-byte key, which is what it is designed to do well.

Is Envelope Encryption the Same as BYOK?

No, they answer different questions. Envelope encryption describes the two-layer key structure. Bring your own key describes who generates and controls the master key: you import it rather than letting the provider create it. The two are usually combined, with an imported or customer-managed KEK sitting at the top of the envelope hierarchy.

How Many Objects Should Share One Data Key?

As few as practical. Generating a DEK per object gives the smallest blast radius and avoids nonce reuse concerns entirely. Where that is too costly, scope keys per tenant, per table, or per time window, and record the key identifier in the ciphertext header so you can re-encrypt selectively later.

What Happens If the Key Management Service Is Unavailable?

Reads fail, because the wrapped data key cannot be unwrapped. Treat the key service as a tier-one dependency: use multi-region or replicated keys, understand the provider’s availability commitments, cache unwrapped keys for a short, defined period where the risk allows, and test the failure mode before a regional incident tests it for you.

Related Terms

You May Be Interested In These

What Is KNX Building Automation Security?

Cybersecurity Terms

17 November 2026

What Is KNX Building Automation Security?

Read More
What Is IEC 62443-4-1?

Cybersecurity Terms

17 November 2026

What Is IEC 62443-4-1?

Read More
What Is Ransomware as a Service?

Cybersecurity Terms

17 November 2026

What Is Ransomware as a Service?

Read More