|
1 | | -//! ⚠️ Low-level "hazmat" FrodoKEM and eFrodoKEM functions. |
| 1 | +//! ⚠️ Low-level "hazmat" `FrodoKEM` and eFrodoKEM functions. |
2 | 2 | //! |
3 | 3 | //! # ☢️️ WARNING: HAZARDOUS API ☢️ |
4 | 4 | //! |
5 | | -//! This module contains the low-level API for the FrodoKEM algorithm. |
| 5 | +//! This module contains the low-level API for the `FrodoKEM` algorithm. |
6 | 6 | //! Only use if you know what you're doing. |
7 | 7 | //! |
8 | | -//! This layer provides several traits for mixing and matching FrodoKEM components: |
| 8 | +//! This layer provides several traits for mixing and matching `FrodoKEM` components: |
9 | 9 | //! |
10 | | -//! [`Params`] for specifying the constant parameters of the FrodoKEM algorithm. |
| 10 | +//! [`Params`] for specifying the constant parameters of the `FrodoKEM` algorithm. |
11 | 11 | //! [`Expanded`] for specifying the expand seed A method. |
12 | 12 | //! [`Sample`] for specifying the noise sampling method. |
13 | | -//! [`Kem`] encompasses the entire FrodoKEM algorithm and each function can be overridden. |
| 13 | +//! [`Kem`] encompasses the entire `FrodoKEM` algorithm and each function can be overridden. |
14 | 14 | //! |
15 | | -//! There are default implementations for each of these traits that can be used to create a FrodoKEM instance. |
| 15 | +//! There are default implementations for each of these traits that can be used to create a `FrodoKEM` instance. |
16 | 16 | //! |
17 | 17 | //! There are: |
18 | | -//! [`Frodo640`], [`Frodo976`], and [`Frodo1344`] for the FrodoKEM parameter sets. |
| 18 | +//! [`Frodo640`], [`Frodo976`], and [`Frodo1344`] for the `FrodoKEM` parameter sets. |
19 | 19 | //! [`FrodoAes`] and [`FrodoShake`] for the expand seed A methods. |
20 | 20 | //! [`FrodoCdfSample`] for the noise sampling method. |
21 | 21 | //! |
22 | | -//! [`FrodoKem`] is the default implementation of the FrodoKEM algorithm that combines |
| 22 | +//! [`FrodoKem`] is the default implementation of the `FrodoKEM` algorithm that combines |
23 | 23 | //! all of the above traits using generics. |
24 | 24 | //! |
25 | | -//! There are also type aliases for each standardized FrodoKEM algorithm: |
| 25 | +//! There are also type aliases for each standardized `FrodoKEM` algorithm: |
26 | 26 | //! |
27 | 27 | //! [`FrodoKem640Aes`], [`FrodoKem976Aes`], and [`FrodoKem1344Aes`] for the FrodoKEM-AES algorithms. |
28 | 28 | //! [`FrodoKem640Shake`], [`FrodoKem976Shake`], and [`FrodoKem1344Shake`] for the FrodoKEM-SHAKE algorithms. |
|
32 | 32 | mod models; |
33 | 33 | mod traits; |
34 | 34 |
|
35 | | -pub use models::*; |
36 | | -pub use traits::*; |
| 35 | +pub(crate) use models::*; |
| 36 | +pub(crate) use traits::*; |
37 | 37 |
|
38 | 38 | #[cfg(feature = "frodo640aes")] |
39 | 39 | /// The FrodoKEM-640-AES algorithm |
40 | | -pub type FrodoKem640Aes = FrodoKem<Frodo640, FrodoAes<Frodo640>, FrodoCdfSample<Frodo640>>; |
| 40 | +pub(crate) type FrodoKem640Aes = FrodoKem<Frodo640, FrodoAes<Frodo640>, FrodoCdfSample<Frodo640>>; |
41 | 41 |
|
42 | 42 | #[cfg(feature = "frodo976aes")] |
43 | 43 | /// The FrodoKEM-976-AES algorithm |
44 | | -pub type FrodoKem976Aes = FrodoKem<Frodo976, FrodoAes<Frodo976>, FrodoCdfSample<Frodo976>>; |
| 44 | +pub(crate) type FrodoKem976Aes = FrodoKem<Frodo976, FrodoAes<Frodo976>, FrodoCdfSample<Frodo976>>; |
45 | 45 |
|
46 | 46 | #[cfg(feature = "frodo1344aes")] |
47 | 47 | /// The FrodoKEM-1344-AES algorithm |
48 | | -pub type FrodoKem1344Aes = FrodoKem<Frodo1344, FrodoAes<Frodo1344>, FrodoCdfSample<Frodo1344>>; |
| 48 | +pub(crate) type FrodoKem1344Aes = |
| 49 | + FrodoKem<Frodo1344, FrodoAes<Frodo1344>, FrodoCdfSample<Frodo1344>>; |
49 | 50 |
|
50 | 51 | #[cfg(feature = "frodo640shake")] |
51 | 52 | /// The FrodoKEM-640-SHAKE algorithm |
52 | | -pub type FrodoKem640Shake = FrodoKem<Frodo640, FrodoShake<Frodo640>, FrodoCdfSample<Frodo640>>; |
| 53 | +pub(crate) type FrodoKem640Shake = |
| 54 | + FrodoKem<Frodo640, FrodoShake<Frodo640>, FrodoCdfSample<Frodo640>>; |
53 | 55 |
|
54 | 56 | #[cfg(feature = "frodo976shake")] |
55 | 57 | /// The FrodoKEM-976-SHAKE algorithm |
56 | | -pub type FrodoKem976Shake = FrodoKem<Frodo976, FrodoShake<Frodo976>, FrodoCdfSample<Frodo976>>; |
| 58 | +pub(crate) type FrodoKem976Shake = |
| 59 | + FrodoKem<Frodo976, FrodoShake<Frodo976>, FrodoCdfSample<Frodo976>>; |
57 | 60 |
|
58 | 61 | #[cfg(feature = "frodo1344shake")] |
59 | 62 | /// The FrodoKEM-1344-SHAKE algorithm |
60 | | -pub type FrodoKem1344Shake = FrodoKem<Frodo1344, FrodoShake<Frodo1344>, FrodoCdfSample<Frodo1344>>; |
| 63 | +pub(crate) type FrodoKem1344Shake = |
| 64 | + FrodoKem<Frodo1344, FrodoShake<Frodo1344>, FrodoCdfSample<Frodo1344>>; |
61 | 65 |
|
62 | 66 | #[cfg(feature = "efrodo640aes")] |
63 | 67 | /// The eFrodoKEM-640-AES algorithm |
64 | | -pub type EphemeralFrodoKem640Aes = EphemeralFrodoKem< |
| 68 | +pub(crate) type EphemeralFrodoKem640Aes = EphemeralFrodoKem< |
65 | 69 | EphemeralFrodo640, |
66 | 70 | FrodoAes<EphemeralFrodo640>, |
67 | 71 | FrodoCdfSample<EphemeralFrodo640>, |
68 | 72 | >; |
69 | 73 |
|
70 | 74 | #[cfg(feature = "efrodo976aes")] |
71 | 75 | /// The eFrodoKEM-976-AES algorithm |
72 | | -pub type EphemeralFrodoKem976Aes = EphemeralFrodoKem< |
| 76 | +pub(crate) type EphemeralFrodoKem976Aes = EphemeralFrodoKem< |
73 | 77 | EphemeralFrodo976, |
74 | 78 | FrodoAes<EphemeralFrodo976>, |
75 | 79 | FrodoCdfSample<EphemeralFrodo976>, |
76 | 80 | >; |
77 | 81 |
|
78 | 82 | #[cfg(feature = "efrodo1344aes")] |
79 | 83 | /// The eFrodoKEM-1344-AES algorithm |
80 | | -pub type EphemeralFrodoKem1344Aes = EphemeralFrodoKem< |
| 84 | +pub(crate) type EphemeralFrodoKem1344Aes = EphemeralFrodoKem< |
81 | 85 | EphemeralFrodo1344, |
82 | 86 | FrodoAes<EphemeralFrodo1344>, |
83 | 87 | FrodoCdfSample<EphemeralFrodo1344>, |
84 | 88 | >; |
85 | 89 |
|
86 | 90 | #[cfg(feature = "efrodo640shake")] |
87 | 91 | /// The eFrodoKEM-640-SHAKE algorithm |
88 | | -pub type EphemeralFrodoKem640Shake = EphemeralFrodoKem< |
| 92 | +pub(crate) type EphemeralFrodoKem640Shake = EphemeralFrodoKem< |
89 | 93 | EphemeralFrodo640, |
90 | 94 | FrodoShake<EphemeralFrodo640>, |
91 | 95 | FrodoCdfSample<EphemeralFrodo640>, |
92 | 96 | >; |
93 | 97 |
|
94 | 98 | #[cfg(feature = "efrodo976shake")] |
95 | 99 | /// The eFrodoKEM-976-SHAKE algorithm |
96 | | -pub type EphemeralFrodoKem976Shake = EphemeralFrodoKem< |
| 100 | +pub(crate) type EphemeralFrodoKem976Shake = EphemeralFrodoKem< |
97 | 101 | EphemeralFrodo976, |
98 | 102 | FrodoShake<EphemeralFrodo976>, |
99 | 103 | FrodoCdfSample<EphemeralFrodo976>, |
100 | 104 | >; |
101 | 105 |
|
102 | 106 | #[cfg(feature = "efrodo1344shake")] |
103 | 107 | /// The eFrodoKEM-1344-SHAKE algorithm |
104 | | -pub type EphemeralFrodoKem1344Shake = EphemeralFrodoKem< |
| 108 | +pub(crate) type EphemeralFrodoKem1344Shake = EphemeralFrodoKem< |
105 | 109 | EphemeralFrodo1344, |
106 | 110 | FrodoShake<EphemeralFrodo1344>, |
107 | 111 | FrodoCdfSample<EphemeralFrodo1344>, |
|
0 commit comments