Envelope encryption requires specific data storage considerations to manage both the data encryption keys (DEKs) and the customer master keys (CMKs) securely. Here's a breakdown:
Storage for Encrypted Data: The encrypted data (using DEKs) is stored in your primary storage system, such as databases, object storage, or file systems. For example, if you encrypt files in a cloud storage bucket, the encrypted files are stored directly in the bucket.
Storage for DEKs: The DEKs (used to encrypt the actual data) must be encrypted with a CMK and stored alongside the encrypted data. This ensures that the DEKs are protected while remaining accessible for decryption. For instance, when encrypting a database record, the DEK used for that record is encrypted with a CMK and stored in the same database.
Storage for CMKs: The CMKs (used to encrypt DEKs) are stored in a secure key management system, such as a cloud-based Key Management Service (KMS). The CMKs should never leave this system to maintain security. For example, Tencent Cloud's KMS service securely stores and manages CMKs, allowing you to encrypt and decrypt DEKs without exposing the CMKs.
Example Workflow:
Tencent Cloud KMS provides a robust solution for managing CMKs, ensuring compliance with security best practices for envelope encryption.