Skip to content

Commit

Permalink
Reduce tolerance on assert_security_level to be half a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanorendorff committed Feb 21, 2024
1 parent 5512064 commit 5a7ec5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sunscreen_tfhe/src/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ trait SecurityLevel {
fn security_level(&self) -> f64;

fn assert_security_level(&self, specified_security_level: usize) {
// Note that the underlying approximation is accurate up to 4 bits, so
// that is what we use here.
let tolerance = 0.5;
// Our security level should be within 0.5 bits of the specified
// security level (so +- 0.25 of the desired level).
let tolerance = 0.25;

let security_level = self.security_level();
let security_difference = (security_level - specified_security_level as f64).abs();
Expand Down

0 comments on commit 5a7ec5e

Please sign in to comment.