-
Notifications
You must be signed in to change notification settings - Fork 143
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_pwhash returns incorrect output on its first execution with Argon2id on mobile when using more than 8 MB of memory #311
Comments
More info: It happens more than once sometimes. It's deterministic in a certain way: The first incorrect output is always the same, and the second incorrect output is always the same, but the second incorrect output is different than the first incorrect output. |
Is that when using WebAssembly, or JavaScript? |
Do you have a minimal code snippet that reproduces this? Can it be reproduced with |
It only happens on the mobile app built through Capacitor.
I won't be able to put together a minimal reproduction in the near future. |
I think you are actually not using WebAssembly, and this is a duplicate of #310 |
For some reason crypto_pwhash returns a random output on its first execution on mobile when using more than 8 MB of memory on Argon2id. My goal is to use 32 MB of memory on all platforms. I'm using Capacitor to build mobile from Javascript. On Desktop it executes without a problem.
I tested with the library argon2-browser and it works correctly, but I'm using other Sodium features and was hoping to not need other cryptography libraries.
I would expect an error or something similar, but the function just decides to return a random value. What could it be? Is there a workaround for this without wasting the first execution? Thank you.
The text was updated successfully, but these errors were encountered: