From b8ca3e0fb68635fba5fe0784487375027ffefbf3 Mon Sep 17 00:00:00 2001 From: Ben <16917183+bencrts@users.noreply.github.com> Date: Wed, 8 May 2024 15:46:18 +0100 Subject: [PATCH 1/2] another RR() issue --- estimator/reduction.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/estimator/reduction.py b/estimator/reduction.py index 583122b..c1fb58c 100644 --- a/estimator/reduction.py +++ b/estimator/reduction.py @@ -903,7 +903,7 @@ def short_vectors(self, beta, d, N=None, preprocess=True, B=None, C=5.46, sieve_ N = floor(2 ** (0.2075 * sieve_dim)) # pick something c0 = RR(N) - c1 = RR(2 ** (0.2075 * sieve_dim)) + c1 = RR(2 ** RR(0.2075 * sieve_dim)) c = c0 / floor(c1) sieve_cost = C * 2 ** RR((self.NN_AGPS[self.nn]["a"] * sieve_dim + self.NN_AGPS[self.nn]["b"])) @@ -920,7 +920,7 @@ def short_vectors(self, beta, d, N=None, preprocess=True, B=None, C=5.46, sieve_ return ( rho, ceil(c) * (self(beta, d) + sieve_cost), - ceil(c) * floor(2 ** (0.2075 * sieve_dim)), + ceil(c) * floor(c1), sieve_dim, ) From b7c27da3ab302652cb65eac27171b55b50710d68 Mon Sep 17 00:00:00 2001 From: Ben <16917183+bencrts@users.noreply.github.com> Date: Wed, 8 May 2024 15:49:48 +0100 Subject: [PATCH 2/2] add another doctest to catch large `n` issues --- docs/schemes/hes.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/schemes/hes.rst b/docs/schemes/hes.rst index 415925b..82ecae5 100644 --- a/docs/schemes/hes.rst +++ b/docs/schemes/hes.rst @@ -1,4 +1,4 @@ -Homomorphic Encryption Standard +Homomorphic Encryption Parameters =============================== :: @@ -19,3 +19,11 @@ Homomorphic Encryption Standard >>> LWE.primal_hybrid(HESv111024128ternary) rop: ≈2^182.5, red: ≈2^181.7, svp: ≈2^181.4, β: 345, η: 2, ζ: 134, |S|: ≈2^212.4, d: 1915, prob: ≈2^-51.2, ↻: ≈2^53.4, tag: hybrid +:: + + >>> from estimator import * + >>> from estimator.schemes import SEAL22_8192 + >>> SEAL22_8192 + LWEParameters(n=8192, q=107839786668602559178668060348078522694548577690162289924414373888001, Xs=D(σ=0.82), Xe=D(σ=3.19), m=+Infinity, tag='SEAL22_8192') + >>> LWE.dual_hybrid(SEAL22_8192) + rop: ≈2^121.8, red: ≈2^121.8, guess: ≈2^107.6, β: 306, p: 3, ζ: 5, t: 50, β': 331, N: ≈2^67.3, m: ≈2^13.0 \ No newline at end of file