From 8ba7d1757a16d2bcaf6bcfa4fb61644c633498cf Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 13 Jan 2023 14:15:11 +0000 Subject: [PATCH] fl/ceil swap --- lattice-scripts/compare_curves_and_estimator.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lattice-scripts/compare_curves_and_estimator.py b/lattice-scripts/compare_curves_and_estimator.py index 41943c6be..4c48c5c26 100644 --- a/lattice-scripts/compare_curves_and_estimator.py +++ b/lattice-scripts/compare_curves_and_estimator.py @@ -1,10 +1,10 @@ -from estimator import LWE, ND -from sage.all import oo, load, floor -from generate_data import estimate, get_security_level -import argparse import os import sys -sys.path.insert(1, 'lattice-estimator') +sys.path.insert(1, '../lattice-estimator') +from estimator import LWE, ND, RC +from sage.all import oo, load, floor, ceil +from generate_data import estimate, get_security_level +import argparse LOG_N_MAX = 17 + 1 @@ -60,7 +60,7 @@ def estimate_stddev_with_current_curve(curve, lwe_dimension, log_q): """ def minimal_stddev(a, b, lwe_dim): - return 2. ** max(floor(a * lwe_dim + b), 2) + return 2. ** max(ceil(a * lwe_dim + b), 2) a = curve[0] b = curve[1] + log_q