Skip to content

Commit

Permalink
chore(bench): fix CRS size for integer ZK bench
Browse files Browse the repository at this point in the history
  • Loading branch information
IceTDrinker committed Aug 27, 2024
1 parent 358bcc9 commit c719ca9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tfhe/benches/integer/zk_pke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ fn pke_zk_proof(c: &mut Criterion) {

for bits in [640usize, 1280, 4096] {
assert_eq!(bits % 64, 0);
let num_block = 64usize.div_ceil(param_pke.message_modulus.0.ilog2() as usize);
// Packing, so we take the message and modulus to comute our block count
let num_block = 64usize.div_ceil(
(param_pke.message_modulus.0 * param_pke.carry_modulus.0).ilog2() as usize,
);

use rand::Rng;
let mut rng = rand::thread_rng();
Expand Down Expand Up @@ -128,7 +131,10 @@ fn pke_zk_verify(c: &mut Criterion, results_file: &Path) {

for bits in [640usize, 1280, 4096] {
assert_eq!(bits % 64, 0);
let num_block = 64usize.div_ceil(param_pke.message_modulus.0.ilog2() as usize);
// Packing, so we take the message and modulus to comute our block count
let num_block = 64usize.div_ceil(
(param_pke.message_modulus.0 * param_pke.carry_modulus.0).ilog2() as usize,
);

use rand::Rng;
let mut rng = rand::thread_rng();
Expand Down

0 comments on commit c719ca9

Please sign in to comment.