Cryptography and Data Protection
Cryptography and Data Protection tests whether you can select the right primitive for a stated goal and explain what it does and does not guarantee. The exam favours correct usage over algorithm history.
Core rules
- Symmetric (AES-256-GCM, ChaCha20-Poly1305) is fast and used for bulk data. GCM and Poly1305 provide authenticated encryption, so tampering is detected.
- Asymmetric (RSA-2048+, ECC P-256+) solves key distribution and enables signatures. Encrypt with the recipient's public key; sign with the sender's private key.
- Hashing (SHA-256, SHA-3) gives integrity and fingerprinting, not confidentiality. MD5 and SHA-1 are broken for collision resistance.
- HMAC combines a hash with a shared secret for message authentication between parties who share a key.
- A digital signature provides integrity, authentication, and non-repudiation; a MAC does not provide non-repudiation because both parties hold the key.
- TLS 1.3 requires forward secrecy via ephemeral ECDHE, removes static RSA key exchange and legacy ciphers, and cuts the handshake to one round trip.
- Never reuse a nonce or IV with the same key in GCM; that failure destroys confidentiality and authenticity at once.
Worked example
Storing card numbers: encrypt the field with AES-256-GCM, keep the data key in a KMS or HSM with envelope encryption and rotate it on schedule, and restrict decrypt permission to the payment service identity only. In transit, TLS 1.3 with ECDHE gives forward secrecy, so a later key compromise cannot decrypt recorded sessions. For a nightly batch file, add an HMAC-SHA-256 tag so the receiver detects modification. If a dispute requires proving who sent the file, only an asymmetric digital signature satisfies non-repudiation.
Traps that cost marks
- Saying encryption provides integrity without authentication (CBC without a MAC does not).
- Using a hash to protect passwords without a salt and a slow KDF such as Argon2id or bcrypt.
- Reversing the key roles in a signature scheme.
- Treating TLS as protection for data at rest.
- Believing key length alone fixes a broken protocol or a leaked key.