rbnacl icon indicating copy to clipboard operation
rbnacl copied to clipboard

Use libsodium constants for scrypt params

Open jshawl opened this issue 1 year ago • 0 comments

This pull request adds two libsodium constants OPSLIMIT_SENSITIVE and MEMLIMIT_SENSITIVE as default values for the opslimit and memlimit parameters to RbNaCl::PasswordHash.scrypt.

Here is an example of these values being used in the wild: https://github.com/jedisct1/minisign/blob/573988d2355172b6e050fa3fdc974abd3e476988/src/minisign.c#L357-L358

Also for the test case, I updated the expected digest so that there wouldn't be two scrypt_digests.

jshawl avatar Feb 10 '24 01:02 jshawl