Cloud concept · Updated

Envelope Encryption - Envelope encryption protects data with a data encryption key and protects that key with a separate key-encryption key.

In short

Envelope encryption separates bulk data encryption from the protection and management of encryption keys. It combines efficient local encryption with centralized key controls, allowing cloud systems to protect large datasets without sending every byte through a key management service.

Cloud Concepts Hub →

6 key aspects of Envelope Encryption

Envelope encryption combines efficient data encryption with separately governed key protection, while requiring careful handling of metadata, permissions, rotation, and plaintext-key lifetime.

01
Separate data keys and key-encryption keys

Use DEKs for bulk data encryption and a separately protected KEK to wrap those keys. This keeps the long-lived protection key out of ordinary storage and application data paths.

02
Efficient bulk encryption

Encrypt large payloads locally or within the storage service rather than sending them to a key management API. Key-service requests handle small key material, although request latency, quotas, and costs still affect system design.

03
Portable encrypted key metadata

Store the wrapped DEK with the ciphertext and the metadata needed to interpret it. Protect metadata integrity and never persist the plaintext DEK alongside the encrypted data.

04
Independent choice of encryption location

Apply the same key hierarchy in client-side or server-side encryption. Select the location based on which components may see plaintext, not on the assumption that envelope encryption implies client-side protection.

05
Distinct rotation and re-encryption operations

Distinguish KEK rotation, DEK rewrapping, and bulk data re-encryption. Rewrapping may simplify migration between KEKs, but it does not remediate exposure of the plaintext DEK.

06
Authorization and key-lifecycle dependencies

Control who can unwrap data keys and plan for key availability, recovery, and deletion. Cached plaintext keys and already decrypted data remain usable even after future key-service access is revoked.

Cloud services for Envelope Encryption

AWS KMS supplies centrally governed key protection, while Amazon S3 and Amazon EBS perform bulk encryption within their storage workflows. Applications needing encryption before upload can instead encrypt locally and store ciphertext plus wrapped data keys in S3. AWS CloudHSM supports designs requiring direct control over HSM-backed key operations, with greater integration and operational responsibility. Across these approaches, storage permissions and key-use permissions must be designed together, and recovery plans must preserve access to the keys needed for both current data and retained backups.

Amazon S3Amazon S3

Amazon S3 applies envelope encryption for server-side encryption, including SSE-KMS, where AWS KMS protects the key hierarchy used for object encryption. S3 Bucket Keys can reduce KMS request traffic, so SSE-KMS does not necessarily imply a separate KMS request for every object operation.

AWS CloudHSMAWS CloudHSM

AWS CloudHSM supplies customer-controlled HSM resources that applications can use to protect KEKs and wrap or unwrap DEKs. Applications must implement a compatible workflow and manage HSM availability and administration; CloudHSM is not a drop-in replacement for every KMS integration.

Envelope Encryption exam questions

Real practice exam questions on Envelope Encryption, with the correct answer and its explanation. Answer them with every option in the exam simulator.

SOA-C03

An application stores client-side encrypted backup files in Amazon S3. Each file is encrypted with a unique data key. A separate metadata object contains the data key encrypted under a symmetric customer managed AWS KMS key. The file format supports replacing the encrypted data key without modifying the encrypted file.

A CloudOps engineer must migrate all existing backups to a different customer managed KMS key so that the original KMS key can be deleted. The migration must not download or rewrite the backup files, and plaintext data keys must not leave AWS KMS during the migration. Both KMS keys are enabled, and the engineer has the required permissions.

Which procedure meets these requirements?

Show answerCORRECT ANSWER

Call AWS KMS ReEncrypt for each encrypted data key, specifying the original key as the source and the new key as the destination. Save the returned encrypted data keys in the metadata objects, verify migration completion, and then schedule deletion of the original key.

ReEncrypt decrypts and re-encrypts the data key entirely within AWS KMS. The returned data key ciphertext is protected by the new KMS key, while the underlying data key and encrypted backup file remain unchanged. After all metadata is successfully migrated and verified, the backups no longer depend on the original key.

SAP-C03

A genomics company produces 200-GB research exports and stores them in Amazon S3. Each export must be encrypted by the producing application before upload. Storage administrators can read and copy all stored object bytes but must not be able to recover the research data. A separate analysis role is authorized to decrypt exports through AWS KMS.

Exports must remain recoverable after the producing application's local state and databases are deleted. Each export must therefore contain all export-specific information needed for recovery, without containing any plaintext encryption keys. The company will use a symmetric customer managed KMS key with AWS-generated key material and automatic annual rotation. Existing exports must remain readable without being rewritten after rotation.

Which implementation meets these requirements?

Show answerCORRECT ANSWER

Call GenerateDataKey for each export. Use the plaintext data key with an established authenticated-encryption library to encrypt the export locally, and then discard the plaintext key. Store the encrypted data key and required cryptographic metadata with the ciphertext. Have the analysis role call KMS Decrypt on the encrypted data key and use the recovered key to decrypt the export locally.

This design uses envelope encryption. The encrypted data key can safely accompany the encrypted export because recovering the plaintext data key requires KMS authorization. The export remains self-contained without exposing a plaintext key. Automatic KMS key rotation retains the older key material needed to decrypt previously encrypted data keys, so existing exports do not require rewriting.

DEA-C01

A data engineering team uploads daily 20-GB extract files to Amazon S3. Security policy requires the application to encrypt each file before uploading it and prohibits persisting plaintext encryption keys. The team wants to use AWS KMS to control access to decryption while minimizing the amount of data sent to KMS. Which solution meets these requirements?

Show answerCORRECT ANSWER

Call KMS GenerateDataKey with a symmetric customer managed KMS key. Encrypt the file locally with the plaintext data key, store the encrypted data key with the encrypted file, and remove the plaintext key from memory. For restoration, call KMS Decrypt on the encrypted data key and decrypt the file locally.

This is envelope encryption. GenerateDataKey returns a plaintext data key for local encryption and an encrypted copy that can safely be stored with the ciphertext. Only the data key, not the 20-GB file, needs to be processed by KMS. Removing the plaintext key after use avoids persisting it, and KMS permissions control recovery of the data key.

Practice Envelope Encryption in a full exam

Questions on Envelope Encryption in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is Envelope Encryption

3 min read

Envelope encryption uses a hierarchy of keys rather than a single key for every operation. A data encryption key, or DEK, encrypts the actual data, typically using a symmetric authenticated-encryption algorithm such as AES-GCM. A separate key-encryption key, or KEK, encrypts or wraps the DEK. The encrypted data, wrapped DEK, and required cryptographic metadata form a package that can be stored together. The KEK is protected separately, usually by a key management system or hardware security module.

A typical encryption workflow starts by generating a cryptographically random DEK. The application or storage service uses its plaintext form to encrypt the data, obtains an encrypted copy of the DEK under the KEK, and removes the plaintext DEK from memory as soon as practical. To decrypt, an authorized component submits the wrapped DEK to the key management system, obtains the plaintext DEK, and decrypts the data locally. Storing the wrapped DEK beside the ciphertext is normal; storing the plaintext DEK there would defeat the separation.

In AWS, an application can call AWS KMS GenerateDataKey to receive both a plaintext data key and an encrypted copy. It encrypts its payload locally and retains only the encrypted key with the payload. Later, AWS KMS Decrypt can recover the data key for an authorized caller. This avoids the small payload limit of direct KMS encryption and avoids sending a large file through KMS. Production implementations should use established encryption libraries and authenticated formats rather than assembling cryptographic protocols themselves.

Envelope encryption does not determine whether encryption is client-side or server-side. With client-side encryption, the application encrypts data before uploading it, so the storage service receives ciphertext. With server-side encryption, a storage service performs the encryption after receiving the data. Amazon S3 with SSE-KMS is an example of server-side encryption using envelope encryption. Choose the encryption location according to the trust boundary: requirements to encrypt before upload call for client-side encryption, while requirements for managed at-rest protection may be satisfied by server-side encryption. Transport encryption remains necessary in either case.

The key service choice depends on operational and control requirements. AWS KMS provides managed key protection, authorization, auditing, and integrations with storage services. AWS CloudHSM provides customer-controlled HSM resources for applications requiring more direct control over keys and cryptographic operations, but brings additional responsibility for integration, availability, and administration. CloudHSM is not automatically interchangeable with a KMS key in every service integration. Envelope encryption itself does not require asymmetric cryptography; the KEK can also be symmetric.

Key rotation is frequently misunderstood. Rotating the backing key material for a logical KMS key does not automatically re-encrypt existing data or replace its wrapped DEKs. Where the encryption format and service support it, a DEK can be rewrapped under another KEK without decrypting and re-encrypting the bulk data. However, changing the encryption key for existing managed storage may require a service-specific copy or migration operation. If a plaintext DEK was compromised, merely rewrapping it does not restore confidentiality; the affected data needs a new DEK and re-encryption.

Operational controls remain essential. Restrict both data access and key-use permissions, separate key administration from decryption privileges, and audit key operations. Use authenticated metadata to bind ciphertext to its intended context; AWS KMS encryption context is nonsecret additional authenticated data and must match when decrypting. Data-key caching can reduce latency and request costs, but increases plaintext-key lifetime and can delay the effect of access revocation. Disabling a KEK blocks future unwrap operations, not use of keys already held in memory. Permanent loss of all usable KEK material can make the protected data unrecoverable, including backups.

Learn Envelope Encryption in lessons

6 short lessons on Envelope Encryption in 6 certification courses.

Open the lessons