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
Intro
Database Encryption and Key Management
Database encryption transforms readable data into ciphertext and restores it only for an authorized decryption path. Key management governs the keys that make that transformation possible. The two concerns form one system: strong encryption with exposed, lost, or misused keys does not protect the database.
Encryption addresses confidentiality. It does not replace authentication, authorization, auditing, integrity controls, secure queries, or backups. Start with a threat model: name the data, the attacker, the access path, and the system boundary that must remain trusted.
The protection layers
Encryption can operate at several layers. Each layer sees a different threat and leaves a different trusted boundary.
Storage or volume encryption protects blocks below the database engine. It is useful when disks, snapshots, or physical media leave their intended environment. The mounted system decrypts blocks for the database, so a database process or administrator with normal access still sees plaintext.
Transparent data encryption (TDE) encrypts database pages or tablespaces before the engine writes them. The engine decrypts those pages when it reads them into memory. TDE commonly extends to data files and transaction logs, and encrypted backups remain dependent on the TDE key hierarchy. Its main boundary is stolen media or copied database files. An authorized query and a compromised database process can still receive plaintext.
Column or field encryption protects selected values. Database functions can perform the cryptographic operation, or a proxy can encrypt fields before the database receives them. This narrows exposure but can restrict indexes, sorting, ranges, joins, and other operations because ciphertext no longer behaves like the original value.
Client-side or application-layer encryption encrypts data before it reaches the database server. The application or a cryptographic service holds the decryption authority. This can keep plaintext from database administrators, but it moves key access and query-design responsibilities into the application path.
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
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
