From 1d6e682765fd055bb6ef7cf7e2743b8902fe6f9f Mon Sep 17 00:00:00 2001 From: "Martin R. Albrecht" Date: Wed, 8 May 2024 11:00:38 +0100 Subject: [PATCH] =?UTF-8?q?=E2=84=93=5F2=20norm=20triviality=20check=20sho?= =?UTF-8?q?uld=20be=20a=20bit=20more=20permissive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- estimator/sis_lattice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/estimator/sis_lattice.py b/estimator/sis_lattice.py index f3ae7d5..3183292 100644 --- a/estimator/sis_lattice.py +++ b/estimator/sis_lattice.py @@ -55,8 +55,8 @@ def cost_euclidean( **kwds, ): # Check for triviality - if params.length_bound >= params.q: - raise ValueError("SIS trivially easy. Please set norm bound < q.") + if params.length_bound >= sqrt(params.m) * params.q // 2: + raise ValueError("SIS trivially easy. Please set norm bound < √{m}⋅q/2.") if d is None: d = min(floor(SISLattice._opt_sis_d(params)), params.m)