This project already includes several RustCrypto crates via the dalek crates. As far as I can see from it you only use AES-GCM, SHA-256, HMAC, and HKDF. I think such migration will allow to simplify code and build process, as well as make the crate more portable. Of course the linked crates have several disadvantages compared to ring:
Lack of runtime CPUID-based detection in the aes-gcm crate.
A bit slower software implementation of SHA-256.
The latter issue can be compensated a bit by enabling the asm feature (though performance still will not be quite on par with ring). Also if CPU has SHA-extension, the crate will detect it during runtime and will use efficient intrinsic-based code.
If you have any questions regarding RustCrypto crates, I will be glad to answer them.
Thanks for the information! We don't currently have any engineers working on molasses, but we'd be happy to review any PRs that simplify both the code and the build.
This project already includes several RustCrypto crates via the dalek crates. As far as I can see from it you only use AES-GCM, SHA-256, HMAC, and HKDF. I think such migration will allow to simplify code and build process, as well as make the crate more portable. Of course the linked crates have several disadvantages compared to
ring
:aes-gcm
crate.The latter issue can be compensated a bit by enabling the
asm
feature (though performance still will not be quite on par withring
). Also if CPU has SHA-extension, the crate will detect it during runtime and will use efficient intrinsic-based code.If you have any questions regarding RustCrypto crates, I will be glad to answer them.