Add a relatively simple mostly-const-fn bigint math implementation
[dnssec-prover] / src / crypto / mod.rs
1 //! Implementations of cryptographic verification
2 //!
3 //! Sadly, the choices for cryptographic verification in Rust are somewhat limited. For us (RSA and
4 //! secp256r1/secp384r1) there's really only `ring` and `RustCrypto`.
5 //!
6 //! While `ring` is great, it struggles with platform support and has a fairly involved dependency
7 //! tree due to its reliance on C backends.
8 //!
9 //! `RustCrypto`, on the other hand, tries to stick to Rust, which is great, but in doing so takes
10 //! on more (unnecessary) dependencies and has a particularly unusable MSRV policy. Thus, its
11 //! somewhat difficult to take on as a dependency.
12 //!
13 //! Instead, we go our own way here, and luckily actually implementing the required algorithms
14 //! isn't all that difficult, at least if we're okay with performance being marginally sub-par.
15 //! Because we don't ever do any signing, we don't need to worry about constant-time-ness, further
16 //! reducing complexity.
17 //!
18 //! While we could similarly go our own way on hashing, too, rust-bitcoin's `bitcoin_hashes` crate
19 //! does what we need without any unnecessary dependencies and with a very conservative MSRV
20 //! policy. Thus we go ahead and use that for our hashing needs.
21
22 pub mod bigint;
23 pub mod hash;