Cryptographic Implementation Security Questions

Security of cryptography as actually implemented in code, where a correct algorithm still fails through misuse, side-channel leakage, or faulty error handling. Covers cryptographic API misuse patterns (nonce and IV reuse, ECB mode, hardcoded secrets, unauthenticated ciphertext, algorithm confusion), timing and cache side-channels, constant-time coding techniques (masking, blinding, formal constant-time verification), physical side-channel and fault-injection attacks and their countermeasures (power analysis, electromagnetic leakage, voltage and laser glitching), padding-oracle and other implementation-level cryptanalytic attacks (Bleichenbacher, CBC padding oracles, nonce-reuse key recovery), cryptographic failure-mode handling, and implementation auditing (code review checklists, static and dynamic misuse detectors, fuzzing). Assumes the algorithm, key, and RNG have already been selected: distinct from choosing and provisioning primitives, key derivation, and random number generation (applied cryptography and key management) and from encryption-at-rest and in-transit architecture (data protection and encryption).

HardTechnical
53 practiced

In a codebase implementing RSA with the Chinese Remainder Theorem (CRT) optimization, describe specific runtime checks and defenses you would add to detect and mitigate fault-injection attacks (e.g., random hardware faults, transient bitflips). Give code-level checks (reconstruction verification, redundant computations), blinding strategies, and recommended responses on detection.

EasyTechnical
67 practiced

Compare physical side channels such as power, electromagnetic and acoustic leakage with microarchitectural channels such as caches and branch predictors. Discuss attacker proximity requirements, instrumentation complexity, typical leakage signals, and typical mitigations for each class.

MediumTechnical
56 practiced

Given a symmetric cipher using a single-byte lookup like uint8_t out = sbox[secret_byte]; explain why this is vulnerable to cache-timing attacks. Provide two feasible alternatives for making the lookup resistant to cache-based leakage for portable C code: a table-less approach and a cache-safe table approach. For each alternative discuss trade-offs and give high-level pseudocode.

HardTechnical
65 practiced

Implement a constant-time modular exponentiation routine or describe in detail a constant-time algorithm for modular exponentiation (e.g., for RSA or Diffie-Hellman) that avoids secret-dependent branches and memory accesses. Explain how to choose a sliding-window or fixed-window approach that preserves constant-time properties, and how to test for timing leaks.

MediumTechnical
101 practiced

Explain why AES implementations based on T-tables are susceptible to cache-timing attacks. Propose practical mitigations for a widely used crypto library that must support many CPU types, including low-end devices lacking AES-specific instructions. Discuss performance impact and compatibility trade-offs.

Unlock Full Question Bank

Get access to all 18 Cryptographic Implementation Security interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.