5 exercises — choose the best-structured answer to common cryptography interview questions. Focus on encryption primitives, key lifecycle, TLS, and engineering best practices.
Structure for cryptography interview answers
Name the primitive and why: AES-256-GCM vs RSA-OAEP — explain the security property
Quantify the risk: bits of security, algorithm agility, deprecation timeline
Separate protocol from primitive: TLS 1.3 uses ECDHE for key exchange, AES for bulk encryption
0 / 15 completed
1 / 15
The interviewer asks: "Explain the difference between symmetric and asymmetric encryption, and tell me when you would use each in a real system." Which answer best demonstrates practical cryptography knowledge?
Option B is strongest: it gives concrete algorithms with bit-security levels, a performance comparison (~1,000× difference), specific use cases for each, explains why key distribution is the core problem asymmetric solves, and shows hybrid cryptography in action via TLS 1.3 (ECDHE + AES-256-GCM). The rule-of-thumb closing is memorable and shows architectural thinking. Option C's "at rest vs. in transit" framing is a common oversimplification — symmetric encryption is used heavily in TLS (in transit) for bulk data. Symmetric vs. asymmetric: algorithms + security levels → performance dimension → use cases for each → key distribution problem → hybrid in practice (TLS example) → rule of thumb.
2 / 15
The interviewer asks: "Walk me through the TLS 1.3 handshake — what happens before the first byte of application data is sent?" Choose the most accurate technical description.
Option C is strongest overall, covering the 1-RTT achievement, key_share pre-population (the mechanism that eliminates a round trip), encrypted server certificate and Finished in one flight, HKDF for key derivation, and the important fact that RSA key exchange was removed (it lacked forward secrecy — a common interview follow-up). Option B is more technically detailed but slightly less accurate on the exact flight structure. Option D is conceptually correct but too abstract — doesn't name the specific algorithms (ECDHE, HKDF). TLS 1.3 handshake: 1-RTT via key_share pre-population → encrypted server certificate in same flight → HKDF for key derivation → RSA key exchange removed (forward secrecy) → 0-RTT session resumption mention.
3 / 15
The interviewer asks: "How should encryption keys be managed in a production cloud system — covering generation, storage, rotation, and revocation?" Which answer demonstrates complete key lifecycle management?
Option A is strongest: it covers all four lifecycle stages (generation, storage, rotation, revocation) with implementation specifics — CSPRNG in HSM for generation, envelope encryption hierarchy (master key → DEK → data), rotation semantics (re-encrypt + retain old keys until migration complete), revocation semantics (re-encryption required for symmetric keys), audit logging with alerting on anomalies, and separation of duties. Option C describes envelope encryption correctly but misses revocation, separation of duties, and audit alerting. Option D focuses on API keys and temporary credentials — valid advice but incomplete as a key lifecycle framework. Key lifecycle: CSPRNG generation in HSM → envelope encryption hierarchy → rotation semantics → revocation and re-encryption requirement → audit trail with anomaly alerting → separation of duties.
4 / 15
The interviewer asks: "What is cryptographic agility and why does it matter for a system built today?" Choose the answer that best demonstrates strategic cryptography thinking.
Option D is strongest: it explains why agility matters specifically today (NIST post-quantum standards finalised, "harvest now, decrypt later" threat), grounds it in algorithm deprecation history (MD5, SHA-1 breakage timeline), gives the implementation pattern (abstract interface + algorithm identifier stored alongside ciphertext + versioned key IDs), and names the practical minimum for a migration path without flag-day cutover. Options A and C describe the concept correctly but don't explain the urgency (post-quantum) or the implementation pattern completely. Cryptographic agility: post-quantum urgency → deprecation history → abstract interface implementation → self-describing ciphertexts + algorithm identifiers → versioned keys → incremental migration without flag day.
5 / 15
The interviewer asks: "How would you design a secrets management system for a microservices platform running on Kubernetes?" Which answer covers the key design requirements?
Option B is strongest: it explains why native Kubernetes Secrets are insufficient (base64 ≠ encryption, etcd visibility), provides the Vault integration mechanism (sidecar injection, Kubernetes Auth), introduces dynamic secrets (short-lived credentials per service — no long-lived shared passwords), covers rotation with graceful handling, encryption at rest, audit logging with alerting, and least-privilege policy design. Options C and D describe valid approaches (External Secrets Operator and Sealed Secrets are both production-grade) but don't address dynamic secrets or audit logging. K8s secrets management: native Secrets limitation → dedicated secrets store (Vault) → Kubernetes Auth Method → dynamic short-lived credentials → rotation handling → encryption at rest → audit logging → least-privilege policies.
6 / 15
Code Review Comment: During a code review of the user authentication service, Alice points out that the team is using AES-256 for encrypting password hashes. Bob replies, 'We're fine; it's standard.' Which of the following statements best reflects Alice's concern and demonstrates a more nuanced understanding of cryptography?
Alice's response isn't necessarily wrong, but it demonstrates a lack of critical thinking. Simply stating 'it's standard' doesn't evaluate security. AES-256 is generally secure, but modern password hashing requires adaptive algorithms like Argon2 or scrypt that are designed to be computationally expensive and resistant to various attacks. Focusing solely on 'standard' ignores the evolving threat landscape.
7 / 15
Slack Message: Liam (Security Engineer) sends a message to the team channel: 'Just deployed new server certificates. Please ensure your applications are updated to use the latest TLS versions and properly validate certificate chains.' What is the primary reason for this message?
The message focuses on *TLS configuration*, specifically certificate validation. Proper TLS implementation is crucial for secure communication and preventing vulnerabilities like man-in-the-middle attacks. While server certificate deployment is part of the process, the core concern highlighted is the application's responsibility to correctly handle TLS certificates.
8 / 15
PR Description: A developer submits a pull request to integrate a new API endpoint for handling sensitive user data. The description reads: 'This PR adds a new endpoint that encrypts all requests and responses using HTTPS.' Which of the following is the *most* important additional step this developer should take to ensure secure communication?
While HTTPS encryption is necessary, it's insufficient on its own. A secure API requires robust authentication to verify user identity and authorization to control access to resources. OAuth 2.0 provides a standard framework for this, adding an essential layer of security beyond just encrypting data in transit.
9 / 15
Standup Update: During the daily standup meeting, David (Cryptography Engineer) says, 'I'm working on implementing a key rotation strategy for our database encryption keys. We need to rotate them every 90 days.' What is the primary goal of this key rotation strategy?
Key rotation is a fundamental security practice aimed at mitigating risks associated with compromised keys. Even if a key is initially secure, vulnerabilities can be discovered in the future or an attacker may gain access to it. Regularly rotating keys limits the window of opportunity for exploitation and reduces the potential damage from a compromise.
10 / 15
Code Review Comment: Sarah (Lead Engineer) asks, 'Can you explain your rationale for choosing RSA-2048 over ECC for this cryptographic operation? Considering the smaller key size of RSA, does that not introduce a higher risk profile?' Which aspect is Sarah primarily questioning?
Sarah is raising a valid concern regarding the security implications of using RSA-2048. While RSA offers simplicity, its larger key size makes it potentially more vulnerable to certain attacks (like factoring) than ECC (Elliptic Curve Cryptography), which provides comparable security with smaller keys and improved performance.
11 / 15
Code Review Comment: During a code review of the user authentication service, Alice points out that the team is using AES-256 for encrypting password hashes. Bob replies, 'We're fine; it's standard.' Which of the following statements best reflects Alice's concern and demonstrates a more nuanced understanding of cryptography?
Alice's response isn't necessarily wrong, but it demonstrates a lack of critical thinking. Simply stating 'it's standard' doesn't evaluate security. AES-256 is generally secure, but modern password hashing requires adaptive algorithms like Argon2 or scrypt that are designed to be computationally expensive and resistant to various attacks. Focusing solely on 'standard' ignores the evolving threat landscape.
12 / 15
Slack Message: Liam (Security Engineer) sends a message to the team channel: 'Just deployed new server certificates. Please ensure your applications are updated to use the latest TLS versions and properly validate certificate chains.' What is the primary reason for this message?
The message focuses on *TLS configuration*, specifically certificate validation. Proper TLS implementation is crucial for secure communication and preventing vulnerabilities like man-in-the-middle attacks. While server certificate deployment is part of the process, the core concern highlighted is the application's responsibility to correctly handle TLS certificates.
13 / 15
PR Description: A developer submits a pull request to integrate a new API endpoint for handling sensitive user data. The description reads: 'This PR adds a new endpoint that encrypts all requests and responses using HTTPS.' Which of the following is the *most* important additional step this developer should take to ensure secure communication?
While HTTPS encryption is necessary, it's insufficient on its own. A secure API requires robust authentication to verify user identity and authorization to control access to resources. OAuth 2.0 provides a standard framework for this, adding an essential layer of security beyond just encrypting data in transit.
14 / 15
Standup Update: During the daily standup meeting, David (Cryptography Engineer) says, 'I'm working on implementing a key rotation strategy for our database encryption keys. We need to rotate them every 90 days.' What is the primary goal of this key rotation strategy?
Key rotation is a fundamental security practice aimed at mitigating risks associated with compromised keys. Even if a key is initially secure, vulnerabilities can be discovered in the future or an attacker may gain access to it. Regularly rotating keys limits the window of opportunity for exploitation and reduces the potential damage from a compromise.
15 / 15
Code Review Comment: Sarah (Lead Engineer) asks, 'Can you explain your rationale for choosing RSA-2048 over ECC for this cryptographic operation? Considering the smaller key size of RSA, does that not introduce a higher risk profile?' Which aspect is Sarah primarily questioning?
Sarah is raising a valid concern regarding the security implications of using RSA-2048. While RSA offers simplicity, its larger key size makes it potentially more vulnerable to certain attacks (like factoring) than ECC (Elliptic Curve Cryptography), which provides comparable security with smaller keys and improved performance.
What does "Cryptography Engineer — Interview Questions — Best-Answer Practice" cover?
Practice answering Cryptography Engineer interview questions in professional English. 5 exercises on symmetric vs asymmetric cryptography, TLS 1.3 handshake, key management, cryptographic agility, and post-quantum cryptography.
How many questions are in this interview set?
This set has 15 exercises, each with a full explanation.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account, sign-up, or paywall.
Do these exercises include model answers?
Yes. Each interview question gives you several possible responses and asks you to pick the one that communicates most clearly and completely — the explanation then breaks down exactly why that answer works, including the specific vocabulary a strong candidate would use.
What if I choose an answer that isn't the strongest one?
You'll see which option was correct and read a full explanation of why it's stronger than the alternatives, plus the key vocabulary and phrasing worth reusing in a real interview.
Can I retry the questions?
Yes — use the "Try again" button on the results screen to reset and go through the set again.
Is this the same as a real technical or behavioural interview?
No — it's focused practice for the language side of interviewing: recognising which phrasing sounds precise and confident versus vague, and knowing the vocabulary interviewers expect for this role. It won't replace mock interviews, but it builds the vocabulary you'll need in one.
Where can I find interview prep for other roles?
Browse the full Interview exercises hub for 170+ modules covering behavioural, technical, and system design rounds across dozens of IT roles, or check the "Next up" link below to continue.
Do I need an account, and is my progress saved?
No account is needed. Progress is tracked only for your current visit — reloading or leaving the page resets the counter.
Who writes these interview questions?
Every question is written by the CoderSlingo team based on real technical interview patterns for this role, then reviewed for accuracy and clarity.