phxql / argon2-jvm

Argon2 Binding for the JVM
GNU Lesser General Public License v3.0
330 stars 32 forks source link

hash verify takes much time to validate the given password. #68

Closed kabilan-ideas2it closed 4 years ago

kabilan-ideas2it commented 4 years ago

Hash verify method takes 6 seconds to validate the below data. Does can be optimize the performance of this scenario? Method used: Argon2Library.INSTANCE.argon2i_verify(encoded, pwd, new Size_t(pwd.length)); Parameters: encoded = $argon2i$v=19$m=128000,t=40,p=4$vQkUFJlLI8si5Id0YiiOUw$uTD6ge1AtvF6aseWlfdSWUft0k8Rq7l0XfE0zaPVjx0 pwd = test1234

phxql commented 4 years ago

Argon2 is specifically designed to be resource intensive. If you want the hash validation to be faster, lower the parameters (iterations and parallelism).