antelle / argon2-browser

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

Support for Argon2id #14

Closed poursal closed 5 years ago

poursal commented 5 years ago

In the source I can see that there is support for d and i versions:

var ArgonType = { Argon2d: 0, Argon2i: 1 };

Am I missing something or there is not option to use the hybrid version Argon2id?

Thank you in advance for your great work.

antelle commented 5 years ago

Hi! You're right, it's not supported for now

Nantris commented 5 years ago

@antelle are there plans to support it? It's the recommended version to use just about everywhere now. I'd really like to use your Argon2 implementation, but I need to support Argon2id. I'm far from being a cryptography expert, but is there anything I or others can do to help?

This commit on a fork claims support for Argon2id, but is it really as simple as just adding an option Argon2id: 2 ? That seems too good to be true.

https://github.com/Fang-/argon2-browser/commit/c2e59fc99c489b824ec1927b7358e5e67f5e1aa3#diff-05a4ce3afd270c14e4b6c6de9cab65a0

@Fang- can you possibly comment? How's this working for you? How did you test the output?

antelle commented 5 years ago

@Slapbox it's not supported in the library we use if I'm not mistaken. You can research it though, maybe it's already there and we can recompile it (I don't have time for this now).

Nantris commented 5 years ago

Thanks for the speedy and honest response and for the hard work you put into this. It looks like @Fang- actually did a lot more in a commit just prior to that one.

antelle commented 5 years ago

@Slapbox yeah it looks like it's supported there now, nice.

Fang- commented 5 years ago

Also, #12 is still open, which merges in the latest reference implementation which does support Argon2id.

How's this working for you? How did you test the output?

It's working great for us, though bundling was a bit of a nightmare. We tested against outputs from the reference implementation.
For the most up-to-date version the fork that was linked, please see urbit/argon2-wasm.

Nantris commented 5 years ago

@Fang- That looks great! Thank you! Also, Urbit looks pretty great. I love the roadmap.

@antelle thanks again for your great work!

antelle commented 5 years ago

Updated it, now Argon2id is supported. @Fang-, sorry I haven't used the proposed PR because it was just easier to copy&recompile rather than compare changes to argon2.

Fang- commented 5 years ago

Ah, so now this works without any asm-js/wasm-specific C changes? Neat! I might have to try and pull those out of our fork too, then.

Thanks for finally supporting Argon2id here. (:

antelle commented 5 years ago

It seems to be working now yeah. At least it doesn't throw, as it was before.