Password_Hashing_Best_Practices_Detailed
Password_Hashing_Best_Practices_Detailed
• Brute-force Resistance:
• - ✅ Highly resistant due to slow hashing speed.
scrypt Overview
• - Designed to be both CPU and memory
intensive.
• - Ideal for making brute-force attacks
expensive and slow, especially on parallel
systems like GPUs.
• - Parameters (N, r, p) can be tuned for desired
security level.
• Brute-force Resistance:
• - ✅ Very high due to memory hardness and
PBKDF2 Overview
• - A well-established key derivation function
defined in PKCS #5.
• - Widely supported in libraries and systems.
• - Customizable iteration count allows scaling
computation time.
• Brute-force Resistance:
• - ⚠️Moderate — depends on high iteration
counts.
Comparison Table
• Feature | bcrypt | scrypt |
PBKDF2
• ----------------------|---------------|------------------|--
------------
• Year Introduced | 1999 | 2009
| 2000
• Salt Support | Yes | Yes | Yes
• Memory-Hard | No | Yes |
No
• Adjustable Cost | Yes (2^n) | Yes (CPU,
Recommendation
• - Use scrypt for maximum protection in
modern systems.
• - bcrypt is a good default for web apps with
strong CPU-based protection.
• - PBKDF2 can be used where legacy support is
required but needs high iteration counts to be
secure.
Conclusion
• - Password hashing is critical for user data
protection.
• - The choice of algorithm should consider
resistance to brute-force and available system
resources.
• - Regular updates to parameters
(cost/iterations) ensure long-term security.
Questions
• Feel free to ask questions or request
clarification on any hashing algorithm.