InterviewStack.io LogoInterviewStack.io

Cryptographic Hash Functions Questions

Covers the fundamentals and practical uses of cryptographic hash functions. Topics include what a hash function does, determinism, fixed output size, and one way transformation properties. Key security properties to understand are preimage resistance, second preimage resistance, collision resistance, and the avalanche effect. Candidates should know common algorithms and the evolution of the SHA family including why older algorithms such as MD5 and SHA 1 are considered broken. Practical applications include data integrity verification, file and message checksums, commitment schemes, and the role of hashing in password storage and key derivation. Candidates should also be able to distinguish between general purpose hashing and cryptographic hashing, understand when to use slow key derivation functions or password hashing primitives rather than raw hashes, and recognize common attacks and mitigation strategies.

MediumTechnical
80 practiced
Implement in Python a safe constant-time comparison function for verifying hash digests. Explain why naive byte-by-byte early-return comparisons are dangerous, show your implementation, and state its limitations on different Python runtimes and hardware.
MediumTechnical
71 practiced
Explain how hash functions are used inside proof-of-work systems such as Bitcoin. Describe the desirable hash properties for a PoW algorithm, how difficulty adjustment relates to hash output distribution, and how collision resistance vs preimage resistance matters in this context.
MediumTechnical
80 practiced
Design a salt scheme for password storage given the threat model where an attacker obtains a full database dump but not server-side secrets. Discuss salt length, uniqueness, storage format, and how salts protect against rainbow tables and cross-user hash reuse.
MediumTechnical
67 practiced
Compare PBKDF2, bcrypt, scrypt, and Argon2. For each algorithm discuss memory-hardness, GPU/ASIC resistance, speed tuning parameters, and recommended use-cases and parameter choices for a modern web service.
MediumTechnical
71 practiced
Compare Merkle–Damgård and sponge constructions in terms of resistance to length-extension, support for extendable-output functions, internal state handling, and performance trade-offs for software and hardware implementations.

Unlock Full Question Bank

Get access to hundreds of Cryptographic Hash Functions interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.