Introducing crypto-hashes: modular rework of rust-crypto's cryptographic hash functions


Not so long ago I’ve started a small experiment on splitting rust-crypto into a set of small crates. In addition to splitting and refactoring I’ve also reworked tests and made most of the crates no_std capable. After some time results started to look quite promising and I’ve published some crates to the For now only cryptographic hash functions more or less ready, work on other algorithms is ongoing.

Thus I would like to present crypto-hashes crate which is a meta-crate for other crates derived from rust-crypto’s codebase. (in future I plan to add some functionality to it but for now it simply contains reexports) All crates use the same trait for exposing digest functionality. Source code is available here. You can view its dependency graph here.

In addition to porting hash functions presented in rust-crypto I’ve also added MD4 (using bacher09’s code), Streebog and GOST94. In my opinion crypto-hashes should contain not only widespread algorithms, but also “regional” ones and even old algorithms considered insecure nowadays, especially if they are used somewhere in practice.

Unfortunately md5 and sha1 crates currently not published, since their owners Armin Ronacher (mitsuhiko) and Ivan Ukhov prefer to stay on their respective codebases, without collaborating as part of the larger project. Hope they’ll change their mind, but if not, I’ll publish those crates under a different names. (it will break a naming scheme, but I guess nothing can be done about it)

I hope this initiative will revive rust-crypto project, which in my opinion is a very important for Rust in the long term. This is why I would like to invite someone from core rust team to join this organization as an additional owner, so it would be a community project not dependent on one person. (of course DaGenix too is invited to be another owner)

So if you want to contribute you are extremely welcome! And I will be happy to hear your comments and ideas about future of the project.

P.S.: By a chance does someone know owner of rust-crypto GitHub organization? If possible I would like to rename RustCrypto, to be more in sync with rust-lang and other rust related organizations.