I'm hashing passwords with argon2 using Python's passlib library and am wondering how many rounds I should use to future proof security. The default uses 2 rounds but I'm wondering if it'd be sensible to increase this. The documentation doesn't make any specific recommendations.
1 Answer
TL;DR: Yes, you probably should increase this, even though not by that much.
First, we need to identify the Argon2 variant in-use which is Argon2i for Passlib.
Now if we take a look at section 5.7 of the Argon2 specification, we will learn that there are some special attacks if only 1 or 2 rounds are used which is why you want the round value to be larger than that. Some might recommend to use something like 10 rounds.
In practice, I'd recommend following the same methodology as I laid out for Argon2d: Find out how much memory you can use, pick a lower bound for the round count (eg something like 5?) and then maximize memory usage within your time limit and perhaps tweak the time with the round number.