literate_crypto/
lib.rs

1//! - [Cipher]
2//!     - [One Time Pad](OneTimePad)
3//!     - [Block Cipher](BlockCipher)
4//!         - [Padding]
5//!         - [Block Mode](BlockMode)
6//!             - [ECB](Ecb)
7//!             - [CBC](Cbc)
8//!             - [CTR](Ctr)
9//! - [Hashing](Hash)
10//!     - [SHA-2](sha2)
11//!     - [SHA-3](sha3)
12//! - [CSPRNG](Csprng)
13//!     - [Fortuna]
14//! - [MAC](Mac)
15//!     - [HMAC](Hmac)
16//! - [Signature Scheme (Public Key Cryptography)](SignatureScheme), [Multisig
17//!   Scheme](MultisigScheme)
18//!     - [Elliptic Curve Math](ecc::Curve)
19//!         - [ECDSA](Ecdsa)
20//!         - [Schnorr Signature](Schnorr)
21//!         - [Schnorr Multisig](MultiSchnorr)
22
23// TODO For threshold Schnorr signatures:
24// FROST: Flexible Round-Optimized Schnorr Threshold Signatures (https://eprint.iacr.org/2020/852.pdf)
25// I think this is the state of the art
26// Also worth reading for introduction is
27// Fully Adaptive Schnorr Threshold Signatures (https://eprint.iacr.org/2023/445.pdf) - in
28// particular the chapter on Sparkle+ should be somewhat enlightening
29
30#![forbid(unsafe_code)]
31#![feature(return_position_impl_trait_in_trait)]
32#![feature(array_chunks)]
33#![feature(associated_type_bounds)]
34#![feature(custom_inner_attributes)]
35#![feature(impl_trait_in_assoc_type)]
36
37#[cfg(test)]
38mod test;
39
40#[cfg(doc)]
41pub mod doc;
42
43mod cipher;
44mod hash;
45mod mac;
46mod pubkey;
47mod random;
48mod util;
49
50pub use {
51    cipher::{
52        aes,
53        Aes128,
54        Aes192,
55        Aes256,
56        BlockCipher,
57        BlockDecrypt,
58        BlockEncrypt,
59        BlockMode,
60        BlockSizeTooSmall,
61        Cbc,
62        Cipher,
63        CipherDecrypt,
64        CipherEncrypt,
65        Ctr,
66        Ecb,
67        OneTimePad,
68        Padding,
69        Pkcs7,
70    },
71    hash::{
72        sha2,
73        sha3,
74        CompressionFn,
75        DaviesMeyer,
76        DaviesMeyerStep,
77        Hash,
78        MerkleDamgard,
79        MerkleDamgardPad,
80        Sha1,
81        Sha224,
82        Sha256,
83        Sha3_224,
84        Sha3_256,
85        Sha3_384,
86        Sha3_512,
87    },
88    mac::{Hmac, Mac},
89    pubkey::{
90        ecc,
91        Ecdsa,
92        EcdsaSignature,
93        InvalidPrivateKey,
94        InvalidSignature,
95        MultiSchnorr,
96        MultisigScheme,
97        RingScheme,
98        Schnorr,
99        SchnorrRandomness,
100        SchnorrSag,
101        SchnorrSagSignature,
102        SchnorrSignature,
103        Secp256k1,
104        SignatureScheme,
105    },
106    random::{shuffle, uniform_random, Csprng, Entropy, Fortuna},
107};