]> git.lizzy.rs Git - PAKEs.git/blob - srp/src/groups.rs
Fix a typo (#2)
[PAKEs.git] / srp / src / groups.rs
1 //! Groups from [RFC 5054](https://tools.ietf.org/html/rfc5054)
2 //! 
3 //! It is strongly recommended to use them instead of custom generated
4 //! groups. Additionally it is not recommended to use `G_1024` and `G_1536`,
5 //! they are provided only for compatibility with the legacy software.
6 use types::SrpGroup;
7 use num::BigUint;
8
9 lazy_static! {
10     pub static ref G_1024: SrpGroup = SrpGroup {
11         n: BigUint::from_bytes_be(include_bytes!("groups/1024.bin")),
12         g: BigUint::from_bytes_be(&[2]),
13     };
14 }
15
16 lazy_static! {
17     pub static ref G_1536: SrpGroup = SrpGroup {
18         n: BigUint::from_bytes_be(include_bytes!("groups/1536.bin")),
19         g: BigUint::from_bytes_be(&[2]),
20     };
21 }
22
23 lazy_static! {
24     pub static ref G_2048: SrpGroup = SrpGroup {
25         n: BigUint::from_bytes_be(include_bytes!("groups/2048.bin")),
26         g: BigUint::from_bytes_be(&[2]),
27     };
28 }
29
30 lazy_static! {
31     pub static ref G_3072: SrpGroup = SrpGroup {
32         n: BigUint::from_bytes_be(include_bytes!("groups/3072.bin")),
33         g: BigUint::from_bytes_be(&[5]),
34     };
35 }
36
37 lazy_static! {
38     pub static ref G_4096: SrpGroup = SrpGroup {
39         n: BigUint::from_bytes_be(include_bytes!("groups/4096.bin")),
40         g: BigUint::from_bytes_be(&[5]),
41     };
42 }
43
44 lazy_static! {
45     pub static ref G_6144: SrpGroup = SrpGroup {
46         n: BigUint::from_bytes_be(include_bytes!("groups/6144.bin")),
47         g: BigUint::from_bytes_be(&[5]),
48     };
49 }
50
51 lazy_static! {
52     pub static ref G_8192: SrpGroup = SrpGroup {
53         n: BigUint::from_bytes_be(include_bytes!("groups/8192.bin")),
54         g: BigUint::from_bytes_be(&[19]),
55     };
56 }