Source-Changes-HG archive

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

[src/trunk]: src/lib/libcrypt Be a little bit more eager to let Argon2 use me...



details:   https://anonhg.NetBSD.org/src/rev/4d488f262b44
branches:  trunk
changeset: 989933:4d488f262b44
user:      nia <nia%NetBSD.org@localhost>
date:      Wed Oct 20 20:21:44 2021 +0000

description:
Be a little bit more eager to let Argon2 use memory.

diffstat:

 lib/libcrypt/crypt-argon2.c |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r ef06836705ca -r 4d488f262b44 lib/libcrypt/crypt-argon2.c
--- a/lib/libcrypt/crypt-argon2.c       Wed Oct 20 17:52:44 2021 +0000
+++ b/lib/libcrypt/crypt-argon2.c       Wed Oct 20 20:21:44 2021 +0000
@@ -179,9 +179,15 @@
                 */
                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 {



Home | Main Index | Thread Index | Old Index