Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/lib/libcrypt



Module Name:    src
Committed By:   nia
Date:           Wed Oct 20 13:03:29 UTC 2021

Modified Files:
        src/lib/libcrypt: crypt-argon2.c pw_gensalt.c

Log Message:
crypt(3): Adapt default Argon2 parameters to system performance

If the parameters are unspecified:

- Set the default memory consumption based on the amount of memory
available to userspace.

The algorithm actually slows down incredibly quickly as the "memory"
parameter is increased. We want to avoid running out of memory on low
memory systems, but increase the difficulty of bruteforcing passwords
from systems with a lot of memory. At the same time, we want to avoid
problems when concurrent logins are happening.

- Run a hashing loop for one second with steadily increasing "time"
until we settle on a value for "time". We want to use as much CPU time
as reasonable for computing the password hash without making logins
inconvenient.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libcrypt/crypt-argon2.c
cvs rdiff -u -r1.12 -r1.13 src/lib/libcrypt/pw_gensalt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index