What is envelope encryption and where do engineers meet it?
You are likely meeting envelope encryption in a vendor document, a KMS configuration screen, or a standard that refers to the pattern by name. In practice it means encrypting plaintext data with a data key, then encrypting that data key under another key, usually called a key encryption key (KEK) or, at the top of the chain, a root key. AWS KMS documentation defines it this way, and Google Cloud KMS documentation uses the same DEK and KEK terminology. RFC 9629 applies the same pattern to key encapsulation mechanisms (KEMs), so the term also appears in protocol specifications.
Engineers meet the term most often in cloud KMS documentation, client-side encryption libraries such as the AWS Encryption SDK, database and storage encryption settings, and API references that expose operations such as GenerateDataKey or ReEncrypt. Security architects meet it in key management policies and in NIST guidance on key wrapping, including SP 800-38F, which specifies the AES Key Wrap modes used to protect keys. Procurement and compliance reviewers see it in questionnaires asking where data keys are generated, where the KEK lives, and whether it ever leaves the hardware module.
For a post-quantum migration, the practical question is which layer changes. The data encryption algorithm may be symmetric and already sufficient, while the wrapping of data keys, or the public key operation used to protect them, may depend on an asymmetric or KEM scheme. Confirm with each vendor which operations accept ML-KEM key specs, which version of the service exposes them, and whether the wrapped data keys already stored under classical keys need re-encryption. The sources listed on this page do not say how a given product will handle that re-encryption, so check the vendor's documentation for your deployment.
What names does envelope encryption go by in vendor and standards documents?
This table lists the names the sources use for the parts of envelope encryption, and which document uses each name. Read across a row to see how one source names a component, then compare the rows to match terms that describe the same role. Key wrapping appears only as a related term from NIST, since its own page covers it.
| Term | Used in | What it refers to |
|---|---|---|
| Envelope encryption | AWS KMS cryptography essentials, Google Cloud KMS envelope encryption | Encrypting data with a data key, then encrypting that data key under another key |
| Data encryption key (DEK) | Google Cloud KMS envelope encryption | The key that encrypts the data itself, generated for each write |
| Key encryption key (KEK) | Google Cloud KMS envelope encryption | The key that encrypts the DEK, and never leaves Cloud KMS |
| Root key | AWS KMS cryptography essentials | The top-level key encryption key that must stay in plaintext to decrypt the other keys |
| encKey and ciphertext pair | AWS KMS cryptography essentials | The envelope itself: an encrypted per-message key paired with the encrypted message |
| KEM-based content key pattern | RFC 9629 | A CMS originator uses a recipient's KEM public key to derive a key-encryption key that protects a random content key |
| Key wrapping (related term) | NIST CSRC Glossary, NIST SP 800-38F | Protecting one key with a symmetric key, giving confidentiality and integrity. Covered on its own page. |
Where does envelope encryption show up in cloud, application and PQ deployments?
Envelope encryption appears in cloud key services, client-side SDKs, standard data formats and application storage. The cards below show where each one puts a data key under a key encryption key, and which source documents describe that behavior, so you can check it against your own deployment.
AWS KMS GenerateDataKey and ReEncrypt
AWS KMS exposes GenerateDataKey, GenerateDataKeyWithoutPlaintext, GenerateDataKeyPair and GenerateDataKeyPairWithoutPlaintext for symmetric KMS keys. These return a data key, and the data key comes back encrypted under the KMS key, so you store the wrapped copy with your data. ReEncrypt rewraps existing data keys under a different KMS key without exposing the plaintext data. Check which operations your application calls, and confirm the key's rotation and access policy in the AWS documentation.
AWS KMS cryptography essentialsAWS Encryption SDK
The AWS Encryption SDK provides client-side envelope encryption libraries, so the data key is generated and used in your application rather than in the service. This matters when you need the plaintext to stay inside your own process boundary. Confirm which key provider, algorithm suite and language version your team uses, because these choices decide how the wrapped keys are stored and how they are later unwrapped.
AWS KMS cryptography essentialsGoogle Cloud KMS DEK and KEK handling
Google Cloud KMS uses the terms DEK (data encryption key) and KEK (key encryption key). The guidance is to generate a new DEK each time data is written, encrypt with 256-bit AES in GCM mode, and store the wrapped DEK beside the encrypted data. One KEK can protect many DEKs, and the KEK never leaves Cloud KMS. Check whether your storage layer follows that per-write DEK pattern or reuses keys across records.
Google Cloud KMS envelope encryptionAWS KMS ML-KEM key specs
AWS KMS supports ML-KEM key specs ML_KEM_512, ML_KEM_768 and ML_KEM_1024 with key usage ENCAPSULATE_DECAPSULATE. Its Encapsulate operation returns a random 32-byte shared secret and its encapsulated form, which a recipient can later decapsulate. This is the KEM counterpart of wrapping a data key. AWS also says it is tracking the IETF draft for post-quantum hybrid public key encryption, so confirm which specs your account and region currently offer before planning around them.
AWS KMS post-quantum keysRFC 9629 CMS
RFC 9629 defines how a CMS originator uses a recipient's KEM public key to encapsulate a shared secret, derive a key encryption key, and use it to encrypt a random content key. This applies the envelope pattern to KEMs inside the Cryptographic Message Syntax. The RFC is a Proposed Standard, so check whether the CMS libraries you use implement it before relying on it in a migration.
RFC 9629 textApplication-level storage
Many applications implement envelope encryption themselves, for example when they encrypt database fields or files with a per-record data key and store the wrapped key next to the ciphertext. NIST SP 800-38F specifies AES Key Wrap and AES Key Wrap With Padding for this wrapping step. Review how your application generates, stores and rotates the data keys, and confirm that the wrapping mode matches the guidance your compliance team uses.
NIST SP 800-38FHow does envelope encryption work in a system without the mathematics?
Envelope encryption splits the job of protecting data between two kinds of keys. A data key encrypts the data itself. A key encryption key (KEK) then wraps, or encrypts, that data key. Google Cloud KMS uses the terms data encryption key (DEK) and key encryption key for the same two roles, and AWS KMS describes the arrangement in the same way: the plaintext data is encrypted under a per-message data key, and that data key is encrypted under a longer-lived key. The wrapped data key is stored alongside the ciphertext, so the two travel together. Decryption reverses the order. The system first unwraps the data key using the key encryption key, then uses the recovered data key to decrypt the data. Nothing in this sequence requires you to understand the underlying mathematics. What you need to know is which key sits at which layer and which component is allowed to use it.
AWS documentation lists three benefits of this design. The first is that the encrypted data key can be stored with the encrypted data, so the data is self-describing and does not need a separate lookup to find its key. The second is that the same data can be protected under multiple keys by re-encrypting only the data keys, so rotating or changing the wrapping key does not require re-encrypting large volumes of data. The third is that symmetric and public key algorithms can be combined, with a fast symmetric algorithm handling the bulk data and a public key algorithm handling the wrapping. Google Cloud KMS adds a practical recommendation: generate a new data key each time data is written, and note that one key encryption key can protect many data keys while never leaving Cloud KMS. For architects, the decision points are which component holds the key encryption key, how often data keys are generated, and where the wrapped keys are stored.
Root keys are the anchor of the whole arrangement. AWS documentation states that root keys stored in AWS KMS never leave its hardware security modules unencrypted, and that you must call AWS KMS to use a KMS key. Confirm the custody model for your own deployment before relying on it, including whether any key encryption key is held outside a managed service and who can call the unwrap operation. The sources listed on this page do not describe how other providers or self-hosted systems protect their root keys, so check the documentation for your platform and your hardware modules.
Is envelope encryption defined in a NIST or IETF standard?
No single standard the sources supply defines envelope encryption as a whole. The cloud key management documentation describes it as a practice: the Google Cloud KMS and AWS KMS guides both explain how a data encryption key protects the data and a key encryption key protects that data key, without citing a standard for the pattern itself. If your audit or vendor questionnaire asks for a standard reference, the honest answer is that the building blocks are standardized separately, and the combination is an implementation choice you should document.
The building blocks are standardized in pieces. NIST SP 800-38F (December 2012, Final) specifies AES Key Wrap, AES Key Wrap With Padding and TKW, which are the wrapping modes used to protect a data key under a key encryption key. NIST SP 800-152 (October 2015, Final) sets requirements for federal cryptographic key management systems, covering design, configuration, operation and use. Both are useful references for the key hierarchy, but neither mandates envelope encryption for your system. Confirm which of these your contracts or assessors expect you to map to.
For post-quantum work, the relevant documents are the KEM standards. FIPS 203 (13 August 2024, Final) defines ML-KEM, and NIST SP 800-227 (final 18 September 2025) gives recommendations for key-encapsulation mechanisms. RFC 9629 (August 2024, Proposed Standard) applies the envelope pattern to CMS, letting a KEM public key protect a random content key. Check with your vendors which of these they implement and in which versions, because the sources do not confirm that a given product supports RFC 9629 or any particular ML-KEM parameter set.
How do the root key, data key and ciphertext relate in a KMS envelope?
The diagram starts with the root key, or key encryption key (KEK), held inside the hardware security module, which never leaves it unencrypted. That key wraps a per-message data key, which encrypts the plaintext into ciphertext. The wrapped data key is stored alongside the ciphertext as one envelope. To decrypt, the reader first unwraps the data key with the root key in the HSM, then uses the unwrapped data key to decrypt the data. Check that the key that wraps the data key is the one your policy controls, and that it stays inside the KMS.
Root key wraps the data key, which encrypts the data, and both are stored together.
What should a migration team check for envelope encryption before moving to post-quantum keys?
This sequence maps every place a wrapped data key sits beside its ciphertext, identifies the key that protects it, and confirms what post-quantum wrapping the provider supports before any re-encryption starts. The output is a verified inventory and a vendor answer on each wrapping step, so the migration plan rests on checked facts.
Inventory every system storing wrapped data keys
Start by listing each application, database, object store and backup job that keeps an encrypted data key next to its ciphertext. Envelope encryption is defined by that pairing: the data key is encrypted under another key and stored with the encrypted data, so any system holding both is in scope. Record the system owner, the data class and the storage location for each entry. The step is complete when every store with a wrapped data key appears in one list that the team has reviewed.
Identify the KEK or root key for each system
For each inventory entry, record which key encryption key (KEK) or root key wraps the data keys. Google Cloud KMS documents that one KEK can protect many data keys and never leaves Cloud KMS, so several systems may share one wrapping key. AWS KMS describes the top-level plaintext key as the root key that remains available to decrypt the others. The step is complete when each system maps to a named key, its provider and its region or account.
Confirm available KMS key specs with the provider
Check which key specifications your provider offers for post-quantum wrapping. AWS KMS documents ML-KEM key specs ML_KEM_512, ML_KEM_768 and ML_KEM_1024 with key usage ENCAPSULATE_DECAPSULATE, and the Encapsulate operation returns a 32-byte shared secret and its encapsulated form. Confirm these specs against the current provider documentation for your account and region, since availability may differ. The step is complete when the team has a written list of supported specs for each key type it plans to use.
Check hybrid HPKE draft support
Ask whether the provider uses the hybrid public key encryption draft draft-ietf-hpke-pq. AWS documentation says AWS KMS is tracking this IETF draft, which combines encapsulation, key derivation and AES-GCM encryption into one operation. Treat the draft as work in progress and confirm the exact version the provider implements, along with any hybrid construction it applies. The step is complete when the team records whether HPKE is in use, is planned, or is not addressed by the provider.
Plan data key re-encryption with ReEncrypt
Plan how wrapped data keys will move to the new KEK without re-encrypting the bulk data. AWS KMS lists ReEncrypt among its operations for symmetric KMS keys, and its documentation notes that protecting the same data under multiple keys requires re-encrypting only the data keys. Decide the order, the rollback path and how each system will confirm that decryption still works after the change. The step is complete when the plan names the operation, the systems covered and the verification test for each.
Request key spec and algorithm for each wrapping step
Send each vendor a written request for the key spec and algorithm behind every wrapping step, covering the KEK, the data key wrap and any transport or backup copy. Ask whether the wrap uses a KEM, a symmetric key wrap such as the mode in NIST SP 800-38F, or a hybrid construction, and ask for the standard or draft each one follows. The step is complete when every vendor reply is filed against the inventory entry it answers, with any gaps marked for follow-up.
What do people confuse with envelope encryption in vendor claims and tenders?
Envelope encryption is a practice that appears in many products under different names, and the same words often describe different components. The cards below cover the distinctions that most often go wrong in vendor claims, tender answers and architecture reviews, and what to check for each.
Data key versus key encryption key
A data key encrypts the content, while a key encryption key (KEK) encrypts the data key. Vendors sometimes use 'master key', 'root key' or 'CMK' for the KEK, and sometimes apply 'data key' loosely to the top-level key. Google Cloud KMS notes that one KEK can protect many DEKs and never leaves Cloud KMS. When a tender asks where the key is held, confirm which of the two keys is meant.
Google Cloud KMS docsA practice, not a standard
Envelope encryption describes how a system structures its keys, and it is not a named algorithm or standard with its own conformance tests. Two products can both claim envelope encryption and still differ in key generation, wrapping mode, and where the KEK lives. Ask which wrapping algorithm and mode is used, and which standard, if any, governs it. For key wrapping itself, NIST SP 800-38F defines the AES Key Wrap modes.
NIST SP 800-38FOne KMS ML-KEM key is not the whole wrap step
AWS KMS supports ML-KEM key specs with the ENCAPSULATE_DECAPSULATE usage, which covers establishing a shared secret. That does not mean every envelope in a system moves to ML-KEM. The data key wrap, the KEK, the storage format and the client libraries each need their own review. Treat a KMS ML-KEM key as one component of the migration, and confirm which operations and clients support it in your deployment.
AWS KMS PQ keys docsAES-GCM key size is not an ML-KEM parameter set
AWS KMS documents its symmetric encryption with AES in Galois Counter Mode using 256-bit keys. ML-KEM is a different kind of algorithm, and its parameter sets are named ML-KEM-512, ML-KEM-768 and ML-KEM-1024 under FIPS 203. A tender that asks for 'AES-256 and ML-KEM-768' is asking about two separate components. Check each one against its own standard rather than comparing the numbers.
NIST FIPS 203AWS tracks a draft for HPKE
AWS documentation says AWS KMS is tracking the IETF draft draft-ietf-hpke-pq for post-quantum hybrid public key encryption. Tracking a draft means the design is not yet a settled standard, and the sources do not say that AWS has shipped it as a feature. Read any vendor statement on HPKE as a plan unless the vendor documents a shipped capability, and ask for the date and scope.
AWS KMS PQ keys docsA cloud KMS key is not always outside provider control
AWS documentation says root keys stored in AWS KMS never leave its hardware security modules unencrypted, and callers must invoke KMS to use them. That protects the key material, but it does not mean the customer controls the key lifecycle, access or location. Whether a key is provider-managed, customer-managed or customer-supplied (BYOK) changes who can revoke it and who operates it. Ask for the custody model in writing before accepting a 'never leaves' claim.
AWS KMS cryptography docsFrequently asked questions about envelope encryption
What does envelope encryption stand for?
Envelope encryption is the practice of encrypting plaintext data with a data key, then encrypting that data key under another key. The name comes from the layering: the data is sealed inside a key, and that key is sealed inside a second key, like a letter in an envelope. AWS KMS documentation describes the result as a pair in which the message is encrypted under a per-message key, and that key is encrypted under a long-term static key. Google Cloud KMS uses the terms data encryption key (DEK) for the inner key and key encryption key (KEK) for the outer key. The outer key must eventually exist in plaintext to decrypt the layers beneath it. AWS KMS calls this top-level key the root key. Confirm the exact key naming your provider uses before you write it into a design document.
Is envelope encryption the same as key wrapping?
The two terms overlap closely but are not identical. Key wrapping, as NIST's glossary defines it, is a method of cryptographically protecting keys using a symmetric key, and it provides both confidentiality and integrity protection. Envelope encryption is the broader pattern: it uses a data key, and it protects that data key by wrapping it under another key. In practice, the wrapping step in envelope encryption is a key wrapping operation, so the two are often used interchangeably in cloud documentation. Keep them distinct in a design review: key wrapping describes the protection of one key, while envelope encryption describes the full layered arrangement that includes the data it protects.
Is envelope encryption a published standard?
Envelope encryption is a practice, not a single standard with its own document. The nearest formal references are NIST SP 800-38F, which specifies key wrapping modes including AES Key Wrap and AES Key Wrap With Padding, and NIST SP 800-152, which sets requirements for federal cryptographic key management systems. For envelope encryption applied to key encapsulation mechanisms, RFC 9629 describes how a CMS originator can use a recipient's KEM public key to derive a key-encryption key and use it to encrypt a random content key. Read these documents for the exact requirements. Vendor documentation describes how each provider implements the pattern, and those descriptions are the place to check the specific algorithms and key sizes in use.
Do AWS KMS and Google Cloud KMS use envelope encryption?
Both services document envelope encryption as their model for encrypting data at scale. AWS KMS documentation explains that the encrypted data key can be stored alongside the encrypted data, that one set of data can be protected under multiple keys by re-encrypting only the data keys, and that the root keys never leave AWS KMS hardware security modules unencrypted. Google Cloud KMS documentation recommends generating a new DEK each time data is written, using AES in GCM mode, storing the wrapped DEK alongside the encrypted data, and notes that a KEK never leaves Cloud KMS. The AWS Encryption SDK provides client-side libraries for the same pattern. Confirm which operations and key types your account uses, since the available options differ by service and region.
What does envelope encryption change for a post-quantum migration?
Envelope encryption separates the bulk data encryption from the key protection, so a migration can focus on the outer layer. The sources show AWS KMS supporting ML-KEM key specs (ML_KEM_512, ML_KEM_768 and ML_KEM_1024) with the ENCAPSULATE_DECAPSULATE key usage, and AWS documentation says the service is tracking the IETF draft draft-ietf-hpke-pq for post-quantum hybrid public key encryption. NIST FIPS 203 defines ML-KEM, published 13 August 2024 with final status. Because the data encryption key is wrapped under the outer key, replacing or adding a post-quantum key-encapsulation step at that layer changes how keys are protected without re-encrypting the bulk data. Plan the migration by inventorying where each wrapped key is stored, which key type protects it, and whether the provider can rotate to a post-quantum option. Confirm the current status with the provider before you commit to a timeline.
What should I ask a vendor about envelope encryption?
Ask the vendor to describe the full chain of keys, from the data key to the root key, and where each layer is stored and protected. Ask which algorithms and key sizes each layer uses, and whether the vendor's documentation names the standard it follows. Ask how the data key is generated, how often it changes, and whether a new key is created on each write. Ask whether the root key is held in a hardware security module, whether it can leave that module in plaintext, and who can call the operations that use it. For post-quantum planning, ask which key encapsulation or hybrid options are available, which are in preview or general availability, and how the vendor will notify customers of changes. Request written answers that cite the vendor's own documentation.
How DeployOpen works on this
DeployOpen plans envelope encryption changes as a scoped engagement, starting with how your applications and cloud services create data keys, wrap them and store the wrapped copies. The work covers the key hierarchy, where root keys live and who can call the key management service, with each step documented so your security and compliance teams can review it.
How we scope
- We map each place data is encrypted with a data key and identify the key encryption key that protects it.
- We record which key management services, hardware security modules and client-side libraries are in use.
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
How we build
- We configure key encryption keys and data key generation to match your cloud provider's documented envelope pattern.
- We test that wrapped data keys are stored alongside the encrypted data and that decryption requires the root key.
- We check that key access, rotation and re-encryption of data keys work as your policies require.
How we hand over
- We document the key hierarchy, key ownership, access roles and the steps used to re-wrap data keys.
- We deliver test results and a retest record showing the configuration behaves as documented.
- We walk your engineering and compliance teams through the evidence they need for their own reviews.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer for changes after handover.
- We help review new key specs and provider updates as your envelope encryption setup changes over time.
- Ask any provider or standards body for their current documentation to confirm the details for your versions.

