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/1dd89f021224
branches:  trunk
changeset: 1024367:1dd89f021224
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 1eebd6776039 -r 1dd89f021224 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