mheyman / Isopoh.Cryptography.Argon2

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

Release 1.1.11 breaks Verify method. #48

Closed MBcdailey closed 1 year ago

MBcdailey commented 1 year ago

When upgrading to 1.1.11+ from 1.1.10 my Verify method is now broken .. is this expected? I don't see information regarding breaking changes for this release.

mheyman commented 1 year ago

Sorry about a breaking change. I was unaware I had done it and I cannot find it in the diffs. There were a bunch of changes related to warning messages that appeared due to a newer C# but none seem like they would have caused a change in the hash.

Having said that, I cannot fix the breaking change because all the versions prior to 2.0 have a bug in the hash when it is longer than 64 bytes and not a multiple of 64 bytes. So, I suggest upgrading to that. I made an error (that I should know better than to have made) where I used the published test vectors and tested this code against itself instead of producing many test vectors from the reference code. This build now includes a build of the reference command line tool and a C# generator to use that to create, I think, 579 test vectors trying to hit all the edge cases I could think of.