From a858e5b440902ec25dbb97c555eef35e12fbf69c Mon Sep 17 00:00:00 2001 From: Marcel Keller Date: Thu, 21 Apr 2022 18:29:27 +0200 Subject: [PATCH] Security bug in homomorphic encryption parameter generation. --- FHE/NoiseBounds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FHE/NoiseBounds.cpp b/FHE/NoiseBounds.cpp index a1fe3e033..e2df9583f 100644 --- a/FHE/NoiseBounds.cpp +++ b/FHE/NoiseBounds.cpp @@ -105,7 +105,7 @@ void SemiHomomorphicNoiseBounds::produce_epsilon_constants() { tp *= t; double lgtp = log(tp) / log(2.0); - if (C[i] < 0 && lgtp < FHE_epsilon) + if (C[i] < 0 && lgtp < -FHE_epsilon) { C[i] = pow(x, i); }