Skip to content

Commit

Permalink
chore(wop): fix test for bivariate CRT
Browse files Browse the repository at this point in the history
- insane degrees generated randomly required insane amounts of memory to
supposedly run the test, now just pretend we did an addition to have higher
degree and keep the spirit of the test
  • Loading branch information
IceTDrinker committed Oct 24, 2024
1 parent 780882e commit 9387ada
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tfhe/src/integer/wopbs/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,9 @@ pub fn wopbs_bivariate_crt(params: (ClassicPBSParameters, WopbsParameters)) {
let mut ct2 = cks.encrypt_crt(clear2, basis.clone());
//artificially modify the degree
for (ct_1, ct_2) in ct1.blocks.iter_mut().zip(ct2.blocks.iter_mut()) {
let degree = params.0.message_modulus.0
* ((rng.gen::<usize>() % (params.0.carry_modulus.0 - 1)) + 1);
ct_1.degree = Degree::new(degree);
let degree = params.0.message_modulus.0
* ((rng.gen::<usize>() % (params.0.carry_modulus.0 - 1)) + 1);
ct_2.degree = Degree::new(degree);
// Do not go too far otherwise we explode the RAM for larger parameters
ct_1.degree = Degree::new(ct_1.degree.get() * 2);
ct_1.degree = Degree::new(ct_2.degree.get() * 2);
}

let ct1 = wopbs_key.keyswitch_to_wopbs_params(&sks, &ct1);
Expand Down

0 comments on commit 9387ada

Please sign in to comment.