DaGenix / rust-crypto

A (mostly) pure-Rust implementation of various cryptographic algorithms.
Apache License 2.0
1.39k stars 295 forks source link

Argon2 #347

Open bryant opened 8 years ago

bryant commented 8 years ago

Adds both variants of Argon2 to rust-crypto. Golden tests require the kats/ subdirectory in https://github.com/p-h-c/phc-winner-argon2 .

bryant commented 8 years ago

Note that because of #348, we currently rely upon an external implementation of Blake2b in order to calculate the variable length hash function H' (fn h_prime)

DaGenix commented 8 years ago

Thanks for the PR and sorry for taking so long to get to it.

Hmm - I'd rather not pull in a dependency on another Blake2b implementation if ours is broken - I'd rather just fix ours. I think I've tracked down the issue and will try to get a PR to fix in tomorrow.

DaGenix commented 8 years ago

I think the Blake2b issue is fixed by #353. Does that remove the need to pull in an external blake2b dependency?

DaGenix commented 8 years ago

The other things I'm concerned about is adding in the shell scripts and the large test files - I like the strategy, but I'd like it to apply to other functions.

I'm working on moving the test vectors into standalone file with common functions for loading and executing those test vectors. Do you think it would make sense to merge these test vector files into a common mechanism like that (yes - the question is a bit open ended - I'll try to get a real PR in the next day or two to make it a bit more concrete).

bryant commented 8 years ago

The KAT tests pass, so it should be fine modulo any undiscovered bugs that the test cases fail to cover. I've rebased my feature fork on the latest HEAD and removed the commits that referenced blake2_rfc. Should be a simple fast-forward merge now.

vks commented 8 years ago

What is the status of this?

zonyitoo commented 7 years ago

What's the the status?? It is 2017 now!

bryant commented 7 years ago

What's the the status?? It is 2017 now!

Not sure what DaGenix has in mind, but https://github.com/bryant/argon2rs exists.