antelle / argon2-browser

Argon2 library compiled for browser runtime
https://antelle.net/argon2-browser
MIT License
363 stars 78 forks source link

Memory limit #55

Closed hcksw closed 3 years ago

hcksw commented 3 years ago

I’ve noticed that the maximum memory has been reduced to 256MB. Above this results in a error (memory allocation error -22). Previously I could run this up to 1GB. I’m guessing something has been changed in a recent code update. Is it possible to return to a higher memory potential? Argon2 is frequently used at 512MB or higher as it results in a 1 second calculation time on a native implementation.

antelle commented 3 years ago

Hi! I just tested it, memory up to ≈2GB works for me in Chrome, Safari, and Firefox. Also added a test for it and I see that it's passing on CI: https://github.com/antelle/argon2-browser/runs/1545181588 How do you see that memory is limited to 256MB?

hcksw commented 3 years ago

Hi. You are correct. I just tried it on Safari and Firefox and works fine. I previously tried it only on the DuckDuckGo browser on iOS, which worked fine before but not in the past few days. There was a recent update to that browser so I suspect that is causing the problem.

antelle commented 3 years ago

Does it work on https://antelle.net/argon2-browser/ in that browser?

antelle commented 3 years ago

Just tried it, it works in this browser: screenshot.