Cryptography Fundamentals Questions
Core concepts and vocabulary of cryptography: confidentiality, integrity, authentication, and non-repudiation; the difference between symmetric and asymmetric primitives; and how standard algorithms, libraries, and protocols fit together. Covers threat models, common standards, and applying primitives and cryptographic libraries correctly to real-world security problems. The entry point for the cryptography track.
You are the cryptography team lead and must recommend whether to adopt a new post-quantum KEM that is computationally fast but produces much larger ciphertexts and lacks complete formal proofs. Draft a concise recommendation memo that weighs security (proof maturity), operational impacts (latency, MTU, storage), interoperability, and standardization timelines, and propose a safe staged rollout and rollback plan if adoption is recommended.
Implement RSA decryption/signing using CRT optimization and RSA blinding to mitigate timing attacks. Given CRT parameters (p, q, dP, dQ, qInv) and public exponent e, create a function that takes ciphertext c and returns plaintext m using blinding before CRT exponentiation and proper unblinding. Explain blinding mechanics, why it helps, and what additional checks you would add to detect or mitigate fault-injection attacks.
Implement the AES S-box computation algebraically (multiplicative inverse in GF(2^8) followed by the affine transform) without lookup tables in C or Python. Your implementation must avoid secret-dependent memory accesses (no table lookups). Provide code and discuss performance and side-channel trade-offs versus table-driven S-boxes and hardware AES acceleration.
You find a bespoke protocol that computes HMAC-SHA256 over plaintext, then encrypts the plaintext under AES-CTR, and sends ciphertext and the MAC. Identify and explain the security issues present in this MAC-then-encrypt design, enumerate possible attacks (e.g., tampering not detected, chosen-ciphertext attacks), and propose concrete fixes or safer constructions (AEAD modes or encrypt-then-MAC) explaining why they are better.
Implement the RFC6979 deterministic nonce generator for ECDSA using HMAC-SHA256 in Python. Provide function rfc6979_generate_k(priv_key_bytes, hash_bytes, q) that returns an integer k in [1, q-1]. Explain how the algorithm avoids biased nonces and outline how you would validate your implementation against known RFC6979 vectors.
Unlock Full Question Bank
Get access to all Cryptography Fundamentals interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.