Open DonaldTsang opened 5 years ago
Other ways of comparing notes would be to have the ciphers, hashes and modes of https://en.wikipedia.org/wiki/Comparison_of_cryptography_libraries
Nimcrypto covers a lot of these: https://github.com/cheatfate/nimcrypto
@zah that only scratches the surface when compared to the the list, which has ~100 items
Please be mindful of the security risks of implementing cryptographic functions. I'm wrapping libsodium for this reason: https://github.com/FedericoCeratto/nim-libsodium
@FedericoCeratto for the common cryptographic functions, sure. But for the other less used and "experimental" ones? I wouldn't mind weaker implementations.
This feels more like a bucket-list, i.e. exhaustive, than needed. I’ve been using crypto for a long time and never needed more than a small number of algorithms like SHA, MD5, AES, RSA, xx25519, Blake2b, ChaCha.
The trend in modern crypto libraries is curation and higher-level operations, not a huge set of primitives. No one but a crypto researcher needs access to 50 different symmetric stream ciphers. (And if you do, the C APIs for crypto functions are ridiculously simple, so they’re very easy to Nim-wrap yourself.)
the other less used and "experimental" ones? I wouldn't mind weaker implementations.
A weak implementation of a crypto primitive is actively dangerous, unless you’re just using it for research. Doesn’t seem like something that should be in a library, where someone could find it without being aware of the danger.
Agree with @snej I'd rather have a couple of primitives that are widely used, well implemented, well optimized and audited than a collection that gathers dust.
For example the only SHA3 candidates that actually see widespread use are SHA3, Keccak and BLAKE2.
Now regarding cryptography support, do not that we are in the middle of a security audit at Status and the following primitives are went under review:
Also as a side project I'm implementing a comprehensive library for pairing-based cryptography and zero-knowledge proofs: https://github.com/mratsim/constantine
This is an exhaustive list, not everything is needed