dsa/
size.rs

1/// DSA key size
2pub struct KeySize {
3    /// Bit size of p
4    pub(crate) l: u32,
5
6    /// Bit size of q
7    pub(crate) n: u32,
8}
9
10impl KeySize {
11    /// DSA parameter size constant: L = 1024, N = 160
12    #[deprecated(
13        note = "This size constant has a security strength of under 112 bits per SP 800-57 Part 1 Rev. 5"
14    )]
15    pub const DSA_1024_160: Self = Self { l: 1024, n: 160 };
16
17    /// DSA parameter size constant: L = 2048, N = 224
18    pub const DSA_2048_224: Self = Self { l: 2048, n: 224 };
19
20    /// DSA parameter size constant: L = 2048, N = 256
21    pub const DSA_2048_256: Self = Self { l: 2048, n: 256 };
22
23    /// DSA parameter size constant: L = 3072, N = 256
24    pub const DSA_3072_256: Self = Self { l: 3072, n: 256 };
25}