Permalink
Browse files

Merge pull request #361 from lgremy/hlll

Householder inside LLL
  • Loading branch information...
malb committed Dec 5, 2018
2 parents a075574 + 8400e7d commit a8cb5726c7f375f98929333a91141327c8f02dfd
Showing with 3,228 additions and 28 deletions.
  1. +1 −0 .gitignore
  2. +6 −1 README.md
  3. +4 −2 fplll/Makefile.am
  4. +24 −9 fplll/defs.h
  5. +1 −0 fplll/fplll.h
  6. +668 −0 fplll/hlll.cpp
  7. +178 −0 fplll/hlll.h
  8. +591 −0 fplll/householder.cpp
  9. +688 −0 fplll/householder.h
  10. +90 −1 fplll/main.cpp
  11. +5 −1 fplll/main.h
  12. +13 −2 fplll/nr/matrix.h
  13. +46 −9 fplll/nr/numvect.h
  14. +94 −0 fplll/util.cpp
  15. +5 −0 fplll/util.h
  16. +475 −2 fplll/wrapper.cpp
  17. +61 −0 fplll/wrapper.h
  18. +3 −1 tests/Makefile.am
  19. +3 −0 tests/lattices/example3_in
  20. +93 −0 tests/test_gso.cpp
  21. +179 −0 tests/test_hlll.cpp
@@ -68,4 +68,5 @@ doc/html/
/tests/test_cvp
/tests/test_gso
/tests/test_lll_gram
/tests/test_hlll
/fplll/pruner/*.o
@@ -176,8 +176,9 @@ The options are:
* `-a sld` : slide reduction.
* `-a cvp` : prints the vector in the lattice closest to the input vector.
* `-v` : verbose mode.
* `-nolll` : does not apply to LLL-reduction. In the case of bkz, hkz and svp, by default, the input basis is LLL-reduced before anything else. This option allows to remove that initial LLL-reduction (note that other calls to LLL-reduction may occur during the execution).
* `-nolll` : does not apply to LLL-reduction. In the case of bkz, hkz and svp, by default, the input basis is LLL-reduced before anything else. This option allows to remove that initial LLL-reduction (note that other calls to LLL-reduction may occur during the execution). In the cas of hlll, verify if the input basis is HLLL-reduced.
* `-a hlll` : HLLL-reduction.
Options for LLL-reduction:
@@ -245,6 +246,10 @@ Output formats:
A combination of these option is allowed (e.g., `-of bkut`).
Only for `-a hlll`:
* `-t theta` : θ (default=0.001). See [[MSV09](#MSV09)] for the definition of (δ,η,θ)-HLLL-reduced bases.
* `-c c` : constant for HLLL during the size-reduction (only used if `fplll` is compiled with `-DHOUSEHOLDER_USE_SIZE_REDUCTION_TEST`)
## llldiff ##
`llldiff` compares two bases (b1,...,bd) and (c1,...c_d'): they are considered
@@ -36,7 +36,8 @@ nobase_include_fplll_HEADERS=defs.h fplll.h \
bkz_param.h \
enum/enumerate.h enum/enumerate_base.h enum/enumerate_ext.h \
sieve/sieve_gauss.h sieve/sieve_common.h sieve/sieve_gauss_str.h sieve/sampler_basic.h \
pruner/pruner.h pruner/pruner_simplex.h
pruner/pruner.h pruner/pruner_simplex.h \
householder.h hlll.h
bin_PROGRAMS=fplll latticegen latsieve
check_PROGRAMS=llldiff
@@ -98,7 +99,8 @@ libfplll_la_SOURCES=fplll.cpp fplll.h \
sieve/sieve_gauss_3sieve.cpp \
sieve/sieve_gauss_4sieve.cpp \
sieve/sampler_basic.h \
sieve/sampler_basic.cpp
sieve/sampler_basic.cpp \
householder.cpp householder.h hlll.cpp hlll.h
EXTRA_libfplll_la_SOURCES= svpcvp.cpp
libfplll_la_LIBADD=$(LIBGMP) -lmpfr $(LIBQD_LIBADD)
@@ -145,18 +145,26 @@ const double LLL_DEF_ETA = 0.51;
const double LLL_DEF_EPSILON = 0.01;
const int SIZE_RED_FAILURE_THRESH = 5;
// Constraint: 1/2 < eta - theta
const double HLLL_DEF_THETA = 0.001;
// Constant for the size reduction.
const double HLLL_DEF_C = 0.1;
enum RedStatus
{
RED_SUCCESS = 0,
// Skips value 1
RED_GSO_FAILURE = 2,
RED_BABAI_FAILURE = 3,
RED_LLL_FAILURE = 4,
RED_ENUM_FAILURE = 5,
RED_BKZ_FAILURE = 6,
RED_BKZ_TIME_LIMIT = 7,
RED_BKZ_LOOPS_LIMIT = 8,
RED_STATUS_MAX = 9
RED_GSO_FAILURE = 2,
RED_BABAI_FAILURE = 3,
RED_LLL_FAILURE = 4,
RED_ENUM_FAILURE = 5,
RED_BKZ_FAILURE = 6,
RED_BKZ_TIME_LIMIT = 7,
RED_BKZ_LOOPS_LIMIT = 8,
RED_HLLL_FAILURE = 9,
RED_HLLL_NORM_FAILURE = 10,
RED_HLLL_SR_FAILURE = 11,
RED_STATUS_MAX = 12
};
const char *const RED_STATUS_STR[RED_STATUS_MAX] = {"success",
@@ -167,7 +175,10 @@ const char *const RED_STATUS_STR[RED_STATUS_MAX] = {"success",
"error in SVP solver",
"error in BKZ",
"time limit exceeded in BKZ",
"loops limit exceeded in BKZ"};
"loops limit exceeded in BKZ",
"error in HLLL",
"increase of the norm",
"error in weak size reduction"};
enum LLLMethod
{
@@ -179,6 +190,10 @@ enum LLLMethod
const char *const LLL_METHOD_STR[6] = {"wrapper", "proved", "heuristic", "fast"};
// LM_HEURISTIC is not (yet) an option for HLLL and cannot be called from the fplll binary, then
// we leave empty the third string.
const char *const HLLL_METHOD_STR[4] = {"wrapper", "proved", "", "fast"};
enum IntType
{
ZT_MPZ = 0,
@@ -24,6 +24,7 @@
#include "bkz.h"
#include "bkz_param.h"
#include "hlll.h"
#include "pruner/pruner.h"
#include "svpcvp.h"
#include "util.h"
Oops, something went wrong.

0 comments on commit a8cb572

Please sign in to comment.