Argon2
also: Argon2i, Argon2d, Argon2id
Argon2 is a modern password hashing algorithm designed to be resistant to GPU and ASIC attacks by consuming significant memory and CPU resources during computation.
Argon2 won the Password Hashing Competition in 2015 and is now the recommended algorithm for securely storing passwords. Unlike older algorithms like bcrypt, Argon2 is intentionally slow and memory-intensive, making it extremely costly for attackers to perform brute-force attacks even with specialized hardware.
The algorithm has two main variants: Argon2i (optimized against side-channel attacks) and Argon2d (faster but more vulnerable to GPU attacks). It requires tuning three parameters—memory cost, time cost, and parallelism—to balance security with performance on your system.
Example: Linux distributions and applications like sudo, systemd, and password managers increasingly use Argon2 for hashing user passwords. You can hash a password using tools like argon2 from the command line:
echo -n 'mypassword' | argon2 somesalt -t 3 -m 16 -p 2