2
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ Use as much as you can. You should use as much as is possible in your environment. Thats why there is no minimum defined - if you want minimum overhead then don't use argon2. $\endgroup$
    – axapaxa
    Apr 2, 2017 at 13:16

1 Answer 1

1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.