-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: update benchmarks * chore: add further benches * chore: update git workflow * chore: very minor fix
- Loading branch information
1 parent
cd966ac
commit 948c6d9
Showing
24 changed files
with
285 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
bfv @ git+https://github.com/enricobottazzi/bfv-py.git@b32a20dede78b70359634a1f528d93ef3ed8fee2 | ||
galois==0.3.8 | ||
bfv @ git+https://github.com/enricobottazzi/bfv-py.git@e8239e946cab58c5c9fc974ff726010b71d92dbf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
pub mod sk_enc_constants_1024_15x60_65537; | ||
pub mod sk_enc_constants_2048_15x60_65537; | ||
pub mod sk_enc_constants_4096_15x60_65537; | ||
pub mod sk_enc_constants_8192_15x60_65537; | ||
pub mod sk_enc_constants_1024_1x27_65537; | ||
pub mod sk_enc_constants_16384_8x54_65537; | ||
pub mod sk_enc_constants_2048_1x53_65537; | ||
pub mod sk_enc_constants_32768_15x59_65537; | ||
pub mod sk_enc_constants_4096_2x55_65537; | ||
pub mod sk_enc_constants_8192_4x55_65537; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/// `N` is the degree of the cyclotomic polynomial defining the ring `Rq = Zq[X]/(X^N + 1)`. | ||
pub const N: usize = 1024; | ||
/// The coefficients of the polynomial `e` should exist in the interval `[-E_BOUND, E_BOUND]` where `E_BOUND` is the upper bound of the gaussian distribution with 𝜎 = 3.2 | ||
pub const E_BOUND: u64 = 19; | ||
/// The coefficients of the polynomial `s` should exist in the interval `[-S_BOUND, S_BOUND]`. | ||
pub const S_BOUND: u64 = 1; | ||
/// The coefficients of the polynomials `r1is` should exist in the interval `[-R1_BOUND[i], R1_BOUND[i]]` where `R1_BOUND[i]` is equal to `(qi-1)/2` | ||
pub const R1_BOUNDS: [u64; 1] = [1246]; | ||
/// The coefficients of the polynomials `r2is` should exist in the interval `[-R2_BOUND[i], R2_BOUND[i]]` where `R2_BOUND[i]` is equal to $\frac{(N+2) \cdot \frac{q_i - 1}{2} + B + \frac{t - 1}{2} \cdot |K_{0,i}|}{q_i}$ | ||
pub const R2_BOUNDS: [u64; 1] = [41319090]; | ||
/// The coefficients of `k1` should exist in the interval `[-K1_BOUND, K1_BOUND]` where `K1_BOUND` is equal to `(t-1)/2` | ||
pub const K1_BOUND: u64 = 32768; | ||
/// List of scalars `qis` such that `qis[i]` is the modulus of the i-th CRT basis of `q` (ciphertext space modulus) | ||
pub const QIS: [&str; 1] = ["82638181"]; | ||
/// List of scalars `k0is` such that `k0i[i]` is equal to the negative of the multiplicative inverses of t mod qi. | ||
pub const K0IS: [&str; 1] = ["1849798"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/// `N` is the degree of the cyclotomic polynomial defining the ring `Rq = Zq[X]/(X^N + 1)`. | ||
pub const N: usize = 16384; | ||
/// The coefficients of the polynomial `e` should exist in the interval `[-E_BOUND, E_BOUND]` where `E_BOUND` is the upper bound of the gaussian distribution with 𝜎 = 3.2 | ||
pub const E_BOUND: u64 = 19; | ||
/// The coefficients of the polynomial `s` should exist in the interval `[-S_BOUND, S_BOUND]`. | ||
pub const S_BOUND: u64 = 1; | ||
/// The coefficients of the polynomials `r1is` should exist in the interval `[-R1_BOUND[i], R1_BOUND[i]]` where `R1_BOUND[i]` is equal to `(qi-1)/2` | ||
pub const R1_BOUNDS: [u64; 8] = [16113, 24818, 37593, 34517, 12912, 32948, 38917, 29910]; | ||
/// The coefficients of the polynomials `r2is` should exist in the interval `[-R2_BOUND[i], R2_BOUND[i]]` where `R2_BOUND[i]` is equal to $\frac{(N+2) \cdot \frac{q_i - 1}{2} + B + \frac{t - 1}{2} \cdot |K_{0,i}|}{q_i}$ | ||
pub const R2_BOUNDS: [u64; 8] = [6452516132120967, 6452516132120968, 6452516132120969, 6452516132120970, 6452516132120973, 6452516132120975, 6452516132120976, 6452516132120978]; | ||
/// The coefficients of `k1` should exist in the interval `[-K1_BOUND, K1_BOUND]` where `K1_BOUND` is equal to `(t-1)/2` | ||
pub const K1_BOUND: u64 = 32768; | ||
/// List of scalars `qis` such that `qis[i]` is the modulus of the i-th CRT basis of `q` (ciphertext space modulus) | ||
pub const QIS: [&str; 8] = ["12905032264241935", "12905032264241937", "12905032264241939", "12905032264241941", "12905032264241947", "12905032264241951", "12905032264241953", "12905032264241957"]; | ||
/// List of scalars `k0is` such that `k0i[i]` is equal to the negative of the multiplicative inverses of t mod qi. | ||
pub const K0IS: [&str; 8] = ["3119285534855982", "6547723161734179", "11578631950954274", "10367425251572977", "1858653883183236", "9749317979689080", "12100252264181577", "8552879692347062"]; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/// `N` is the degree of the cyclotomic polynomial defining the ring `Rq = Zq[X]/(X^N + 1)`. | ||
pub const N: usize = 2048; | ||
/// The coefficients of the polynomial `e` should exist in the interval `[-E_BOUND, E_BOUND]` where `E_BOUND` is the upper bound of the gaussian distribution with 𝜎 = 3.2 | ||
pub const E_BOUND: u64 = 19; | ||
/// The coefficients of the polynomial `s` should exist in the interval `[-S_BOUND, S_BOUND]`. | ||
pub const S_BOUND: u64 = 1; | ||
/// The coefficients of the polynomials `r1is` should exist in the interval `[-R1_BOUND[i], R1_BOUND[i]]` where `R1_BOUND[i]` is equal to `(qi-1)/2` | ||
pub const R1_BOUNDS: [u64; 1] = [20368]; | ||
/// The coefficients of the polynomials `r2is` should exist in the interval `[-R2_BOUND[i], R2_BOUND[i]]` where `R2_BOUND[i]` is equal to $\frac{(N+2) \cdot \frac{q_i - 1}{2} + B + \frac{t - 1}{2} \cdot |K_{0,i}|}{q_i}$ | ||
pub const R2_BOUNDS: [u64; 1] = [3471589854547519]; | ||
/// The coefficients of `k1` should exist in the interval `[-K1_BOUND, K1_BOUND]` where `K1_BOUND` is equal to `(t-1)/2` | ||
pub const K1_BOUND: u64 = 32768; | ||
/// List of scalars `qis` such that `qis[i]` is the modulus of the i-th CRT basis of `q` (ciphertext space modulus) | ||
pub const QIS: [&str; 1] = ["6943179709095039"]; | ||
/// List of scalars `k0is` such that `k0i[i]` is equal to the negative of the multiplicative inverses of t mod qi. | ||
pub const K0IS: [&str; 1] = ["4098612896619616"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/// `N` is the degree of the cyclotomic polynomial defining the ring `Rq = Zq[X]/(X^N + 1)`. | ||
pub const N: usize = 32768; | ||
/// The coefficients of the polynomial `e` should exist in the interval `[-E_BOUND, E_BOUND]` where `E_BOUND` is the upper bound of the gaussian distribution with 𝜎 = 3.2 | ||
pub const E_BOUND: u64 = 19; | ||
/// The coefficients of the polynomial `s` should exist in the interval `[-S_BOUND, S_BOUND]`. | ||
pub const S_BOUND: u64 = 1; | ||
/// The coefficients of the polynomials `r1is` should exist in the interval `[-R1_BOUND[i], R1_BOUND[i]]` where `R1_BOUND[i]` is equal to `(qi-1)/2` | ||
pub const R1_BOUNDS: [u64; 15] = [17449, 44739, 23337, 23971, 38527, 41231, 47178, 25438, 29323, 21130, 36215, 41226, 47080, 20341, 18613]; | ||
/// The coefficients of the polynomials `r2is` should exist in the interval `[-R2_BOUND[i], R2_BOUND[i]]` where `R2_BOUND[i]` is equal to $\frac{(N+2) \cdot \frac{q_i - 1}{2} + B + \frac{t - 1}{2} \cdot |K_{0,i}|}{q_i}$ | ||
pub const R2_BOUNDS: [u64; 15] = [238750987231488128, 238750987231488128, 238750987231488128, 238750987231488128, 238750987231488128, 238750987231488128, 238750987231488128, 238750987231488128, 238750987231488160, 238750987231488160, 238750987231488160, 238750987231488160, 238750987231488160, 238750987231488160, 238750987231488160]; | ||
/// The coefficients of `k1` should exist in the interval `[-K1_BOUND, K1_BOUND]` where `K1_BOUND` is equal to `(t-1)/2` | ||
pub const K1_BOUND: u64 = 32768; | ||
/// List of scalars `qis` such that `qis[i]` is the modulus of the i-th CRT basis of `q` (ciphertext space modulus) | ||
pub const QIS: [&str; 15] = ["477501974462976263", "477501974462976265", "477501974462976267", "477501974462976269", "477501974462976271", "477501974462976277", "477501974462976283", "477501974462976289", "477501974462976293", "477501974462976299", "477501974462976301", "477501974462976307", "477501974462976311", "477501974462976313", "477501974462976317"]; | ||
/// List of scalars `k0is` such that `k0i[i]` is equal to the negative of the multiplicative inverses of t mod qi. | ||
pub const K0IS: [&str; 15] = ["15519160254606397", "413181248299753132", "101318987089463173", "110550337344198528", "322660099471945682", "362070023329770101", "448729597070750619", "131927434145614106", "188539582116643080", "69158624007851611", "288969678337063080", "361989877431741640", "447294256896967800", "57654044645399264", "32480946673725505"]; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/// `N` is the degree of the cyclotomic polynomial defining the ring `Rq = Zq[X]/(X^N + 1)`. | ||
pub const N: usize = 4096; | ||
/// The coefficients of the polynomial `e` should exist in the interval `[-E_BOUND, E_BOUND]` where `E_BOUND` is the upper bound of the gaussian distribution with 𝜎 = 3.2 | ||
pub const E_BOUND: u64 = 19; | ||
/// The coefficients of the polynomial `s` should exist in the interval `[-S_BOUND, S_BOUND]`. | ||
pub const S_BOUND: u64 = 1; | ||
/// The coefficients of the polynomials `r1is` should exist in the interval `[-R1_BOUND[i], R1_BOUND[i]]` where `R1_BOUND[i]` is equal to `(qi-1)/2` | ||
pub const R1_BOUNDS: [u64; 2] = [25966, 19503]; | ||
/// The coefficients of the polynomials `r2is` should exist in the interval `[-R2_BOUND[i], R2_BOUND[i]]` where `R2_BOUND[i]` is equal to $\frac{(N+2) \cdot \frac{q_i - 1}{2} + B + \frac{t - 1}{2} \cdot |K_{0,i}|}{q_i}$ | ||
pub const R2_BOUNDS: [u64; 2] = [13712101976447600, 13712101976447600]; | ||
/// The coefficients of `k1` should exist in the interval `[-K1_BOUND, K1_BOUND]` where `K1_BOUND` is equal to `(t-1)/2` | ||
pub const K1_BOUND: u64 = 32768; | ||
/// List of scalars `qis` such that `qis[i]` is the modulus of the i-th CRT basis of `q` (ciphertext space modulus) | ||
pub const QIS: [&str; 2] = ["27424203952895201", "27424203952895203"]; | ||
/// List of scalars `k0is` such that `k0i[i]` is equal to the negative of the multiplicative inverses of t mod qi. | ||
pub const K0IS: [&str; 2] = ["20017153978526555", "14608220699689817"]; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.