mheyman / Isopoh.Cryptography.Argon2

Fully managed .Net Core implementation of Argon2
Other
196 stars 9 forks source link

Support for argon2id #12

Closed rangercej closed 5 years ago

rangercej commented 6 years ago

I'm slightly confused whether the Argon2id variation of the algorithm is supported. I note that there is an option to switch between v1.3 and v1.2.1 in Argon2Version.cs, however Argon2Type.cs does not list Argon2id as an option.

Can you confirm which variations are supported?

mheyman commented 6 years ago

Argon2id currently isn't supported, only Argon2i (Argon2Type.DataIndependentAddressing) and Argon2d (Argon2Type.DataDependentAddressing) are currently supported. As far as I'm aware, the hybrid mode wasn't a thing when I first wrote the code. I agree that it must be supported but I cannot give you a time frame for when it will be (vacation and other life priorities for the next few weeks). Pull requests welcome :-)

ghost commented 5 years ago

Any further thoughts on when this may be made available?

mheyman commented 5 years ago

Playing with it now. Hopefully a week or two depending on how much time I get...

mheyman commented 5 years ago

Well, dang, if I had known it was mostly a 1-line change, I would have squeezed in a few hours of development time a long time ago. I figured at least 10 or 15 hours of dev/test but it was two.

Because the "Argon2id variant" is now the recommended mode, I have changed the defaults to be Argon2Type.HybridAddressing (which is that variant) - if you wish to verify results you were storing as binary values and were using the default Argon2Type in verify, you will have to explicitly set the type to Argon2Type.DataIndependentAddressing (the previous recommended value). If you are just encoding to the Argon2 string, you don't have to make any changes because the string encodes the type.

You should be able to see https://www.nuget.org/packages/Isopoh.Cryptography.Argon2/1.1.1 shortly.