Skip to content

Commit

Permalink
Add GLWE_5_256_128 security test (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanorendorff authored Mar 12, 2024
1 parent fa0717d commit 2d53ef4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sunscreen_tfhe/src/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ mod tests {
println!("LWE 512 128: {}", actual_lwe_std);
LWE_512_128.assert_security_level(128);

let actual_glwe_std = lwe_security_level_to_std(5 * 256, 128.0).unwrap();
println!("GLWE 5 256 128: {}", actual_glwe_std);
GLWE_5_256_128.assert_security_level(129);

let actual_glwe_std = lwe_security_level_to_std(1024, 128.0).unwrap();
println!("GLWE 1 1024 128: {}", actual_glwe_std);
GLWE_1_1024_128.assert_security_level(128);
Expand All @@ -296,7 +300,7 @@ mod tests {
println!("LWE 512 80: {}", actual_lwe_std);
LWE_512_80.assert_security_level(80);

let actual_glwe_std = lwe_security_level_to_std(256 * 5, 80.0).unwrap();
let actual_glwe_std = lwe_security_level_to_std(5 * 256, 80.0).unwrap();
println!("GLWE 5 256 80: {}", actual_glwe_std);
GLWE_5_256_80.assert_security_level(80);

Expand Down

0 comments on commit 2d53ef4

Please sign in to comment.