poulpy/poulpy-schemes/src/tfhe/bdd_arithmetic/tests/test_suite/mod.rs
poulpy-schemes/src/tfhe/bdd_arithmetic/tests/test_suite/mod.rsRaw
1mod add;
2mod and;
3mod glwe_blind_rotation;
4mod or;
5mod prepare;
6mod sll;
7mod slt;
8mod sltu;
9mod sra;
10mod srl;
11mod sub;
12mod xor;
13
14pub use add::*;
15pub use and::*;
16pub use glwe_blind_rotation::*;
17pub use or::*;
18pub use prepare::*;
19pub use sll::*;
20pub use slt::*;
21pub use sltu::*;
22pub use sra::*;
23pub use srl::*;
24pub use sub::*;
25pub use xor::*;
26
27use poulpy_core::layouts::{
28 Base2K, Degree, Dnum, Dsize, GGSWLayout, GLWEAutomorphismKeyLayout, GLWELayout, GLWETensorKeyLayout, GLWEToLWEKeyLayout,
29 Rank, TorusPrecision,
30};
31
32use crate::tfhe::{
33 bdd_arithmetic::BDDKeyLayout, blind_rotation::BlindRotationKeyLayout, circuit_bootstrapping::CircuitBootstrappingKeyLayout,
34};
35
36pub(crate) const TEST_N_GLWE: u32 = 512;
37pub(crate) const TEST_N_LWE: u32 = 77;
38pub(crate) const TEST_BASE2K: u32 = 13;
39pub(crate) const TEST_K_GLWE: u32 = 26;
40pub(crate) const TEST_K_GGSW: u32 = 39;
41pub(crate) const TEST_BLOCK_SIZE: u32 = 7;
42pub(crate) const TEST_RANK: u32 = 2;
43
44pub(crate) static TEST_GLWE_INFOS: GLWELayout = GLWELayout {
45 n: Degree(TEST_N_GLWE),
46 base2k: Base2K(TEST_BASE2K),
47 k: TorusPrecision(TEST_K_GLWE),
48 rank: Rank(TEST_RANK),
49};
50
51pub(crate) static TEST_GGSW_INFOS: GGSWLayout = GGSWLayout {
52 n: Degree(TEST_N_GLWE),
53 base2k: Base2K(TEST_BASE2K),
54 k: TorusPrecision(TEST_K_GGSW),
55 rank: Rank(TEST_RANK),
56 dnum: Dnum(2),
57 dsize: Dsize(1),
58};
59
60pub(crate) static TEST_BDD_KEY_LAYOUT: BDDKeyLayout = BDDKeyLayout {
61 cbt: CircuitBootstrappingKeyLayout {
62 layout_brk: BlindRotationKeyLayout {
63 n_glwe: Degree(TEST_N_GLWE),
64 n_lwe: Degree(TEST_N_LWE),
65 base2k: Base2K(TEST_BASE2K),
66 k: TorusPrecision(52),
67 dnum: Dnum(3),
68 rank: Rank(TEST_RANK),
69 },
70 layout_atk: GLWEAutomorphismKeyLayout {
71 n: Degree(TEST_N_GLWE),
72 base2k: Base2K(TEST_BASE2K),
73 k: TorusPrecision(52),
74 rank: Rank(TEST_RANK),
75 dnum: Dnum(3),
76 dsize: Dsize(1),
77 },
78 layout_tsk: GLWETensorKeyLayout {
79 n: Degree(TEST_N_GLWE),
80 base2k: Base2K(TEST_BASE2K),
81 k: TorusPrecision(52),
82 rank: Rank(TEST_RANK),
83 dnum: Dnum(3),
84 dsize: Dsize(1),
85 },
86 },
87 ks: GLWEToLWEKeyLayout {
88 n: Degree(TEST_N_GLWE),
89 base2k: Base2K(TEST_BASE2K),
90 k: TorusPrecision(39),
91 rank_in: Rank(TEST_RANK),
92 dnum: Dnum(2),
93 },
94};