Cryptographic Protocol Design and Analysis Questions
Designing and reasoning about cryptographic protocols and secure channels. Covers authentication and key-exchange protocol design, message-flow security, formal and informal protocol verification, protocol vulnerability analysis, TLS internals, and end-to-end encryption system design. The protocol-construction discipline, where composition of primitives determines whether the whole system is secure.
Consider a protocol that uses a KDF without proper domain separation: K_enc = H(shared_secret) and K_mac = H(shared_secret || 0). Demonstrate a practical attack scenario where this KDF usage leads to key reuse or forgery (assume H is SHA-256 and outputs are truncated). Explain the exact steps the attacker takes and the assumptions required.
Assume the central message relay server is fully compromised (attacker can read persistent storage and intercept traffic) but clients remain uncompromised. What confidential properties of your E2EE design remain preserved? Identify remaining risks, and list three mitigations (client and server-side) to reduce attacker impact in this scenario.
Design a lightweight detection script (describe in pseudocode or outline in Python) that scans a pcap for reused IVs/nonces in captured AES-GCM sessions. Your design should handle many sessions efficiently and produce a report of suspicious streams with reuse counts and sample packet indices.
Explain the components and state machine of the Double Ratchet algorithm (DH ratchet, symmetric-key ratchet, message keys, skipped-message keys). Describe how the algorithm copes with out-of-order and lost messages and quantify the storage and computational costs for a client maintaining n active sessions.
Explain what 'key confirmation' means in a key-exchange protocol. Provide an example attack that becomes possible if parties do not confirm derived keys, and describe at least two protocol-level mechanisms that provide explicit confirmation.
Unlock Full Question Bank
Get access to all Cryptographic Protocol Design and Analysis interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.