antelle / argon2-browser

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

Use latest Argon2 reference implementation #12

Closed Fang- closed 5 years ago

Fang- commented 6 years ago

This PR copies in the currently latest version of the Argon2 reference implementation. This includes a bunch of changes, fixes, improvements that have been made to that implementation over the years.

This also includes the addition of the Argon2id type, which was originally requested in #4, and seems to be the recommended Argon2 variant in most cases. I have updated the JS library file and docs html page to support it.

The wasm-compatibility changes that had been made (to src/blake2/blake2-impl.h, src/core.c and src/encoding.c) have been updated as applicable.

I have only been able to test the WebAssembly version (and not the asm.js one) due to issues discussed in #11, but I trust that if the one functions, the other does too.

That said, I didn't seek out any specific test cases, rather just tried a couple combinations of parameters (on the demo page) to see if they produced correct results. Anything specific you'd like me to verify?

For completeness, I have also included added/updated documentation and testing files, so that the /argon2 folder matches the original repository as closely as possible.

Let me know if this looks good. Happy to clarify or make corrections as requested!

antelle commented 5 years ago

see the explanation in #14, argon2di is now supported :)