-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crypto.scrypt fails with N > 16384 (logN > 14) #21524
Comments
It's in the docs, see the
|
Shouldn’t it be |
The "(approximately)" is because openssl uses a slightly different formula than the standard one: I decided to leave it alone because the difference is a few kilobytes unless |
I misread the docs! thank you. (docs are slightly misformatted at the moment). |
Sorry to necro-comment, but a silly question: why is For now I'm automating that parameter based on the equation given above:
So that developers can set the others and get the intended result. Maybe the goal of explicit The settings recommended by OWASP do work out to a rather high maxmem: "If Argon2id is not available, use scrypt with a minimum CPU/memory cost parameter of (2^17), a minimum block size of 8 (1024 bytes), and a parallelization parameter of 1" That works out to |
With N = 16384 (logN = 14), crypto.scrypt works correctly:
With N = 32768 (logN = 15) and above, crypto.scrypt throws a 'memory limit exceeded' error:
I have confirmed Colin Percival's implementation will go to N = 4194304 (logN = 22).
The text was updated successfully, but these errors were encountered: