Cryptography and Data Protection
Cryptography and Data Protection
This domain tests cryptographic primitives, protocol use, key management, and data protection across states. Expect questions on symmetric and asymmetric encryption, hashing, digital signatures, PKI, TLS, encryption at rest and in transit, tokenization, masking, and DLP.
Core rules
- Symmetric encryption (AES) is fast and used for bulk data; asymmetric encryption (RSA, ECC) solves key distribution and enables signatures. Most protocols combine them.
- Hashing provides integrity, not confidentiality. HMAC adds a shared secret for authenticity. Digital signatures provide integrity, authenticity, and non-repudiation.
- AEAD modes such as AES-GCM provide confidentiality and integrity together; avoid unauthenticated modes where tampering matters.
- PKI binds identities to public keys through certificates. Validate chain of trust, expiration, revocation, and name matching.
- TLS 1.3 simplifies cipher suites, requires forward secrecy, and removes legacy algorithms. Disable TLS 1.0/1.1 and weak ciphers.
- Key management is the hard part: use KMS/HSM, rotate keys, separate duties, and never embed secrets in code.
- Data states: at rest (disk/database encryption), in transit (TLS/IPsec), in use (confidential computing, access controls).
Worked example
A team encrypts customer records with AES-GCM but stores the key in the application repository. The encryption algorithm is strong, yet the design fails because anyone with repository access can decrypt the data. The reasoning: cryptography shifts trust to key management. Fix by using a managed KMS with envelope encryption, restricting decrypt permissions, rotating keys, and auditing key use.
Traps
- Saying hashing encrypts data; hashes are one-way and cannot be reversed.
- Assuming encryption alone prevents tampering; without integrity protection, ciphertext can be altered.
- Forgetting certificate validation and revocation in TLS scenarios.