Interview Prep/DevSecOps/Secrets Management and Identity

What is envelope encryption and why does KMS use it?

IntermediateConceptSecrets Management and Identity
Answer

Data is encrypted with a data key (DEK); the DEK is encrypted by a master key (KEK) held in KMS/HSM. Only small DEKs travel to KMS, so large data is encrypted locally and fast, and the master key never leaves the HSM. Rotation of the KEK only needs re-wrapping DEKs.

aws kms generate-data-key --key-id alias/app --key-spec AES_256

Returns a plaintext key for immediate use and an encrypted copy to store beside the data.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Secrets Management and Identity