Argon2: A Modern Password Hashing Function
Argon2 is a password-hashing function that won the Password Hashing Competition (PHC) in 2015, making it the recommended choice for secure password hashing in many applications. Here's an in-depth look at Argon2:
Overview
Argon2 is designed to be resistant to various attack scenarios, including side-channel attacks and GPU-based attacks. It provides a configurable balance between computational overhead, memory usage, and parallelism to thwart attacks involving custom hardware like ASICs or FPGAs. There are three variants of Argon2:
- Argon2d - optimized for settings where side-channel attacks (e.g., cache timing attacks) are a concern.
- Argon2i - designed to resist side-channel attacks by using data-independent memory access.
- Argon2id - a hybrid of Argon2i and Argon2d, providing a compromise between security and resistance to side-channel attacks.
History
Argon2 was developed by Alex Biryukov, Daniel Dinu, and Dmitry Khovratovich from the University of Luxembourg. It was submitted to the PHC, which was organized to find a successor to bcrypt and scrypt due to their vulnerabilities to advancements in hardware and attack techniques. Argon2 was selected as the winner due to its robust security features and flexibility in configuration. Password Hashing Competition.
Design Features
- Memory Hardness: Argon2 uses a significant amount of memory, making it resistant to time-memory tradeoff attacks.
- Parallelism: It can be tuned to use multiple threads, allowing for efficient computation on modern multi-core systems.
- Configurability: Users can adjust the time cost, memory cost, and degree of parallelism, tailoring the function to different security requirements and hardware capabilities.
- Side-Channel Resistance: Argon2i and Argon2id provide resistance against cache-timing attacks by ensuring that memory access patterns do not depend on the password.
Applications
Argon2 has been adopted in various systems and applications where secure password hashing is crucial:
- Operating Systems: It is integrated into Linux systems for password hashing in shadow file management.
- Programming Languages: Libraries for Python, PHP, and other languages support Argon2.
- Frameworks and Libraries: Many secure coding practices and frameworks recommend or use Argon2 for password storage.
Security Considerations
While Argon2 is considered secure, its effectiveness relies on proper configuration:
- Memory usage should be high enough to prevent efficient GPU attacks.
- Time cost must be set to ensure the hash function takes a significant amount of time to compute, slowing down brute-force attacks.
- Parallelism should be adjusted based on the expected hardware capabilities of attackers.
References
For more detailed information:
Here are some related topics for further exploration: