Module Name: src
Committed By: nia
Date: Wed Oct 20 20:21:44 UTC 2021
Modified Files:
src/lib/libcrypt: crypt-argon2.c
Log Message:
Be a little bit more eager to let Argon2 use memory.
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libcrypt/crypt-argon2.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libcrypt/crypt-argon2.c
diff -u src/lib/libcrypt/crypt-argon2.c:1.13 src/lib/libcrypt/crypt-argon2.c:1.14
--- src/lib/libcrypt/crypt-argon2.c:1.13 Wed Oct 20 16:46:33 2021
+++ src/lib/libcrypt/crypt-argon2.c Wed Oct 20 20:21:44 2021
@@ -179,9 +179,15 @@ estimate_argon2_params(argon2_type atype
*/
max_mem /= 1000000;
if (max_mem > 30000) {
- memory = 8192;
+ memory = 32768;
+ } else if (max_mem > 15000) {
+ memory = 16384;
} else if (max_mem > 7000) {
+ memory = 8192;
+ } else if (max_mem > 3000) {
memory = 4096;
+ } else if (max_mem > 900) {
+ memory = 1024;
} else if (max_mem > 24) {
memory = 256;
} else {