Encryption, Tokenization, and Key Management
Key points
- Personal data requires protection at rest (AES 256, column level encryption), in transit (TLS 1.2+, mTLS), and in use (TEEs, confidential computing)
- Column level encryption provides the most granular control, enabling field level access management for sensitive attributes
- Tokenization replaces data with non reversible tokens using a vault; preferred when systems should not see actual values while preserving referential integrity
- Key management requires HSMs or KMS for storage, scheduled rotation, separation of duties for access, and secure destruction
- Cryptographic erasure (destroying encryption keys) is preferred for cloud and SSD environments where physical deletion is impractical
- Application layer encryption provides stronger privacy than infrastructure encryption because database administrators cannot access plaintext
- Post quantum cryptography migration is needed because current RSA and ECC algorithms are vulnerable to quantum computing attacks
Encryption, Tokenization, and Key Management
Encryption and tokenization are fundamental privacy engineering controls. This lesson covers the technical details needed for the CDPSE exam.
Encryption at Three Data States
Personal data exists in three states, each requiring protection:
At Rest: Data stored in databases, files, and backups. Methods include full disk encryption (transparent to applications), database level encryption, column level encryption (encrypting specific sensitive fields with distinct keys), and file level encryption. Column level encryption provides the most granular control, enabling access management at the field level.
In Transit: Data moving across networks. TLS 1.2+ is the standard for transport encryption. Mutual TLS (mTLS) adds bidirectional authentication where both client and server verify certificates. For internal service communication in microservices, mTLS through a service mesh ensures all inter service traffic is encrypted.
In Use: Data being processed in memory. Trusted Execution Environments (covered in the PETs lesson) protect data during computation. Confidential computing combines TEEs with encrypted memory to ensure data remains protected even during processing.
Encryption Algorithm Selection
AES 256 is the standard symmetric encryption algorithm for personal data at rest. RSA and ECC are common asymmetric algorithms for key exchange and digital signatures. The CDPSE exam may test awareness of post quantum cryptography: current asymmetric algorithms (RSA, ECC) are vulnerable to quantum computing attacks. NIST has standardized post quantum algorithms (CRYSTALS Kyber for key encapsulation, CRYSTALS Dilithium for signatures) for future migration.
Tokenization
Tokenization replaces sensitive data with non sensitive surrogate values (tokens) that have no exploitable mathematical relationship to the original data. A secure token vault maintains the mapping. Unlike encryption, tokens cannot be mathematically reversed without vault access. Tokenization is preferred when data needs to traverse systems that should not see actual values (payment processing, analytics pipelines) while preserving referential integrity.
Key Management
Encryption is only as strong as its key management. Key management encompasses: key generation using cryptographically secure random number generators, key storage in hardware security modules (HSMs) or cloud key management services (KMS) that protect keys in tamper resistant hardware, key rotation on a defined schedule to limit exposure from key compromise, key access controls ensuring separation of duties (no single role can access both keys and encrypted data), and key destruction through secure, verified deletion when keys are no longer needed.
For the exam, understand that cryptographic erasure (destroying the encryption key to render encrypted data irrecoverable) is an increasingly important disposal method, especially for cloud and SSD environments.
Application Layer vs Infrastructure Encryption
Application layer encryption encrypts data within the application logic before it reaches the database. Infrastructure encryption (full disk, transparent data encryption) protects data at the storage layer. Application layer encryption provides stronger privacy because database administrators and storage providers cannot access plaintext. The tradeoff is increased complexity and potential performance impact.
Certificate Management
TLS certificate management (issuing, deploying, monitoring, rotating) is a privacy concern because expired or misconfigured certificates create gaps in transport encryption. Certificate pinning restricts which certificates are accepted, preventing man in the middle attacks using fraudulently issued certificates.
Practical Example
A banking application implements layered encryption: column-level encryption on account numbers and SSNs using AES-256 with keys stored in an HSM, TLS 1.3 for all API communication, and client-side encryption for the mobile app so that even if the server is compromised, transaction details remain encrypted. Key rotation occurs every 90 days, with old keys retained in a read-only state for decrypting historical records until their retention period expires, at which point both the keys and the data are destroyed (cryptographic erasure).