Database Encryption and Key Management
Database encryption turns stored database data into ciphertext so stolen files or backups are not readable without the correct keys. Key management controls who can use those keys and how they are generated, stored, rotated, recovered, and retired.
itDatabases and data storage | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic: Database Encryption and Key Management
Database encryption turns readable data into ciphertext. Key management controls who can reverse that transformation. Treat them as one system. Strong encryption with exposed, lost, or overpowered keys is like locking the vault and taping the combination to the forklift.
Start with the threat and the boundary. Storage encryption protects a lost disk or copied volume. Transparent data encryption protects database files and covered logs or backups while the running engine still sees plaintext. Field, proxy, and client-side encryption can protect selected values from more of the database path, but they may also break normal query behavior.
The central pattern is envelope encryption. A data-encryption key protects the data. A key-encryption key wraps that data key. The wrapped data key can live near the ciphertext, while the wrapping key stays in a key manager, vault, or hardware security module. Metadata ties ciphertext to the correct key version, purpose, owner, and protection method.
Rotation has several jobs. Rewrapping changes the key that protects a data key without rewriting the bulk data. Re-encryption changes the data key association and touches ciphertext. Old key versions remain necessary until every database, log, replica, snapshot, export, and backup has migrated or expired.
Recovery is the test people skip when optimism is cheaper. An encrypted backup may need certificates, wallets, key-manager access, network paths, permissions, and audit controls. A backup job proves bytes moved. A restore proves the organization can still read them.
Use the Practice Reference to record threats, plaintext boundaries, key hierarchy, rotation, and restore evidence. Do the Exercise to design protection for customer data. The Cheatsheet keeps layers, authorization, query effects, and failure modes visible. The strongest design is the one whose key path matches the threat model and whose recovery path has actually worked.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://csrc.nist.gov/pubs/sp/800/111/final
Supports
- Storage encryption definition, threat-based selection, and disk, volume, and file or folder boundaries
- November 2007 publication milestone
- https://csrc.nist.gov/pubs/sp/800/57/pt1/r5/final
Supports
- Key types, metadata, lifecycle, cryptoperiods, states, backup, compromise, recovery, and destruction
- Separation of key use and administration and dependency-aware retirement
- https://csrc.nist.gov/pubs/sp/800/57/pt1/final
Supports
- August 2005 first final SP 800-57 Part 1 milestone
- https://csrc.nist.gov/pubs/fips/197/final
Supports
- AES standard, publication date, block size, and supported key sizes
- https://csrc.nist.gov/nist-cyber-history/cryptography/chapter
Supports
- November 1977 DES milestone and transition from DES to AES
- https://cheatsheetseries.owasp.org/cheatsheets/Cryptographic_Storage_Cheat_Sheet.html
Supports
- Threat modeling, encryption layers, algorithm selection, DEK and KEK separation, key rotation, and key storage
- Passwords should use password hashing instead of reversible encryption
- https://cheatsheetseries.owasp.org/cheatsheets/Key_Management_Cheat_Sheet.html
Supports
- Generation, distribution, storage, backup, audit, compromise, recovery, and lifecycle practices
- https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html
Supports
- Password hashing as the appropriate storage mechanism for authentication verifiers
- https://learn.microsoft.com/en-us/sql/relational-databases/security/encryption/transparent-data-encryption
Supports
- SQL Server page-level TDE, DEK hierarchy, certificates and EKM, scan state, logs, backups, restore requirements, and limitations
- https://learn.microsoft.com/en-us/sql/relational-databases/security/encryption/sql-server-encryption
Supports
- Distinction among TDE, Always Encrypted, connection encryption, and database key features
- https://www.microsoft.com/en-us/sql-server/blog/2008/08/06/microsoft-releases-sql-server-2008/
Supports
- August 2008 SQL Server 2008 release milestone
- https://docs.oracle.com/en/database/oracle/oracle-database/26/dbtde/
Supports
- Oracle TDE architecture, tablespace and column encryption, keystores, keys, backup, and recovery
- https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlrf/ADMINISTER-KEY-MANAGEMENT.html
Supports
- Unified TDE keystore and encryption-key administration interface
- https://asktom.oracle.com/Misc/oramag/transparent-data-encryption-v2.html
Supports
- September 2005 Oracle Database 10g Release 2 TDE introduction and table-key to master-key hierarchy
- https://docs.oracle.com/cd/B28359_01/network.111/b28530/asotrans.htm
Supports
- TDE first introduced in Oracle Database 10g Release 2
- https://dev.mysql.com/doc/refman/8.0/en/innodb-data-encryption.html
Supports
- InnoDB tablespace, redo, undo, and log encryption coverage, keyring dependencies, rotation, limitations, and data-loss risks
- https://dev.mysql.com/doc/refman/8.0/en/keyring.html
Supports
- Keyring use by InnoDB encryption and external key-manager backends
- https://www.mongodb.com/docs/manual/core/security-encryption-at-rest/
Supports
- Encrypted WiredTiger architecture, database-key and master-key hierarchy, KMIP, replication limits, logs, and MongoDB 3.2 introduction
- https://www.mongodb.com/company/newsroom/press-releases/mongodb-moves-deeper-within-the-enterprise
Supports
- November 2015 MongoDB 3.2 milestone and encryption-at-rest capability
- https://www.postgresql.org/docs/current/encryption-options.html
Supports
- Storage, field, transport, and client-side encryption boundaries and database-server trust
- https://www.ibm.com/docs/en/db2/12.1.x?topic=encryption-overview
Supports
- Db2 DEKs, master keys, database files, transaction logs, backups, local keystores, KMIP, and HSM integrations
- https://www.oasis-open.org/standard/kmip/
Supports
- October 2010 KMIP Version 1.0 standard date and interoperability purpose
- https://docs.oasis-open.org/kmip/spec/v1.0/os/kmip-spec-1.0-os.html
Supports
- KMIP client-server managed-object and operation model
- https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html
Supports
- Envelope encryption, data keys, root keys, re-encryption, and HSM boundary
- https://docs.aws.amazon.com/kms/latest/developerguide/data-keys.html
Supports
- Plaintext and encrypted data-key flow, storage of wrapped data keys, and memory handling
- https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
Supports
- Key policies as the primary KMS authorization control
- https://aws.amazon.com/about-aws/whats-new/2014/11/12/introducing-aws-key-management-service/
Supports
- November 2014 AWS KMS launch, database and storage integrations, HSM protection, and audit integration
- https://docs.cloud.google.com/kms/docs/envelope-encryption
Supports
- DEK and KEK envelope-encryption flow, wrapped DEK storage, and KEK service boundary
- https://learn.microsoft.com/en-us/azure/key-vault/keys/how-to-configure-key-rotation
Supports
- Versioned KEK rotation, DEK rewrapping, and need to retain old versions during migration
- https://github.com/sindresorhus/awesome
Supports
- Required Awesome-list discovery starting point and routes to Database Tools and Security lists
- https://github.com/mgramin/awesome-db-tools
Supports
- Discovery of Acra and Databunker in the database security section
- https://github.com/sbilly/awesome-security
Supports
- Discovery of Acra, Databunker, and Vault in the datastore security section
- https://docs.cossacklabs.com/acra/security-controls/encryption/
Supports
- Application-level and proxy field encryption before data reaches the database and resulting trust boundary
- https://docs.databunker.org/oss/get-started/overview
Supports
- Encrypted personal-record vault, token references, protected indexes, and API access model
- https://developer.hashicorp.com/vault/docs/secrets/transit
Supports
- Cryptographic operations as a service, database ciphertext use, data-key generation, named versions, rotation, and rewrap
- https://developer.hashicorp.com/vault/docs/secrets/kmip
Supports
- Vault Enterprise as a KMIP server and managed-object lifecycle provider for database TDE clients
- https://www.oracle.com/database/
Supports
- Oracle Database Landscape identity and product destination
- https://www.microsoft.com/en-us/sql-server/
Supports
- Microsoft SQL Server Landscape identity and product destination
- https://www.mysql.com/products/enterprise/
Supports
- MySQL Enterprise Landscape identity and product destination
- https://www.mongodb.com/products/self-managed/enterprise-advanced
Supports
- MongoDB Enterprise Advanced Landscape identity and product destination
- https://www.ibm.com/products/db2
Supports
- IBM Db2 Landscape identity and product destination
- https://aws.amazon.com/kms/
Supports
- AWS KMS Landscape placement for managed KEKs, policy, audit, and service integrations
- https://azure.microsoft.com/en-us/products/key-vault
Supports
- Azure Key Vault Landscape placement for cloud KEKs and Managed HSM choices
- https://learn.microsoft.com/en-us/azure/key-vault/managed-hsm/overview
Supports
- Single-tenant managed HSM boundary for application cryptographic keys
- https://cloud.google.com/security/products/security-key-management
Supports
- Google Cloud KMS Landscape placement for CMEK, HSM, and external-key choices
- https://www.hashicorp.com/en/products/vault
Supports
- HashiCorp Vault Landscape identity and product destination
- https://cpl.thalesgroup.com/encryption/ciphertrust-manager
Supports
- CipherTrust lifecycle, KMIP, HSM, multi-database integration, policy, and audit placement
- https://www.fortanix.com/platform/data-security-manager
Supports
- Fortanix DSM HSM-backed key management and database TDE integrations across hybrid environments
