Giter Site home page Giter Site logo

flatter's Introduction

flatter

flatter is a library for performing (f)ast (lat)tice (r)eduction of integer lattice bases. It implements the iterated compression algorithm in "Fast Practical Lattice Reduction through Iterated Compression" and efficiently achieves reduced lattice bases of analogous quality to the LLL algorithm. The flatter library is able to efficiently reduce lattice bases of dimension over 1000 and entries of millions of bits.

Additional examples.

Usage

$ flatter -h
Usage: flatter [-h] [-v] [-alpha ALPHA | -rhf RHF | -delta DELTA] [-logcond LOGCOND] [INFILE [OUTFILE]]
	INFILE -	input lattice (FPLLL format). Defaults to STDIN
	OUTFILE -	output lattice (FPLLL format). Defaults to STDOUT
	-h -	help message.
	-v -	verbose output.
	-q -	do not output lattice.
	-p -	output profiles.
	Reduction quality - up to one of the following. Default to RHF 1.0219
		-alpha ALPHA -	Reduce to given parameter alpha
		-rhf RHF -	Reduce analogous to given root hermite factor
		-delta DELTA -	Reduce analogous to LLL with particular delta (approximate)
	-logcond LOGCOND -	Bound on condition number.

flatter reduces lattice bases specified in the fplll format.

$ latticegen q 4 2 10 b | flatter
[[4 -1 1 0]
[2 10 8 2]
[1 4 -5 -13]
[4 4 -12 12]
]

Optionally, information about the input and output bases can be printed.

$ latticegen q 4 2 10 b | flatter -q -v -p
Input lattice of rank 4 and dimension 4
Largest entry is 7 bits in length.
Skipped determining input profile, as input is not lower-triangular.
Target reduction quality alpha = 0.0625081, rhf = 1.0219
Reduction took 84 milliseconds.
Output profile:
2.08496 3.7047 3.84562 4.08069
Achieved reduction quality alpha = 0, rhf = 0.792231

flatter is faster than fplll for most lattice bases.

$ latticegen q 100  50 100 b > qary_tiny.lat
$ latticegen q 200 100 200 b > qary_small.lat
$ latticegen q 300 150 300 b > qary_medium.lat
$ time flatter -q < qary_small.lat

real	0m36.948s
user	2m29.749s
sys	0m0.951s
$ time fplll < qary_small.lat >/dev/null

real	16m19.359s
user	16m18.654s
sys	0m0.093s

This is particularly true for large Coppersmith-style lattice bases. We include an implementation of the RSA partial factoring algorithm with high bits known. As the number of unknown bits approaches 512, the constructed lattice bases grow significantly in size. flatter handles these large bases with ease.

$ cd scripts/
$ ./rsahighbits.sage --unknown-bits=400 --step-1 | flatter | ./rsahighbits.sage --unknown-bits=400 --step-2
Recovered LSBs are 0xdd254e1d36fba86edc35c3f209fe896ef5062ac2dbfcd0439dbf792134b9a16c0f5e1099241d02d68938b1a9f008c2c1fa7b
$ ./rsahighbits.sage --unknown-bits=495 --step-1 > coppersmith_tiny.lat
$ ./rsahighbits.sage --unknown-bits=500 --step-1 > coppersmith_small.lat
$ ./rsahighbits.sage --unknown-bits=505 --step-1 > coppersmith_medium.lat

Visualization

We include a tool for visualizing the evolution of the profile during execution of our lattice reduction algorithm. The profile, or the base-2 logarithm of the Gram-Schmidt norms, is used to analyze the behavior of our algorithm. Like how the Lovasz condition bounds the decrease in Gram-Schmidt norm between neighboring elements in the profile, our lattice reduction algorithm bounds the decrease in Gram-Schmidt norm over the entire profile. As the algorithm runs, the profile flattens out until it is fully reduced.

$ latticegen q 100 50 100 b | FLATTER_LOG=./log flatter -q
$ python scripts/visualize_profile.py ./log

Installation

$ sudo apt install libgmp-dev libmpfr-dev fplll-tools \
	libfplll-dev libeigen3-dev
$ mkdir build && cd ./build
$ cmake ..
$ make
$ sudo make install
$ sudo ldconfig

License

flatter is licensed under GNU LGPLv3. Parts of this code are derived from works released under the BSD license.

  • FindMPFR.cmake is as used in the Eigen linear algebra library
  • mpfr_lapack.cpp is derived from the LAPACK linear algebra library

flatter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

flatter's Issues

Wrong profile

When running printf "[[127 0]\n[75 1]]" | flatter -q -p, the output profile (log2) is 2.96537 3.95405. However, the actual profile should have norms [7.81025, 16.2607] instead of [7.81026, 15.4984]. This can e.g. be checked with printf "[[127 0]\n[75 1]]" | fplll -a bkz -b 2 -bkzdumpgso log_norms which outputs the natural log of all the GS squared norms.

Note that in all cases, the same reduced basis is acquired (up to signs): [[-6 5 ], [11 12 ]].

MPFR assertion failed

I am using fllatter to reduce a 72-dimensional square lattice, the largest element of which is 11980 bits, but I encountered

round_prec.c:60: MPFR assertion failed: ((prec) >= 1 && (prec) <= ((mpfr_prec_t) ((((mpfr_uprec_t) -1) >> 1) - 256)))

flatter exited so quickly, so I think an overflow occurred during the initialization phase.

Heuristic3 Assertion failed?

Hi, flatter is really fast, thank you very much for this job. It's great, but I encountered the following problem when dealing with the coppersmith lattice. When the parameter m is small, there is no problem, but when m is large, I encountered this. Is this also related to insufficient memory? If not, how can I avoid it. Note: I am using an upper triangular matrix.

flatter: /flatter/src/problems/lattice_reduction/heuristic_3.cpp:328: virtual void flatter::LatticeReductionImpl::Heuristic3::collect_U(): Assertion `mpz_cmp_ui(dU_iter(i,j), 0) == 0' failed.
Command '['flatter']' died with <Signals.SIGABRT: 6>.

Installation on Arch

I want to install flatter on Arch. I followed the installation instructions, with trying to replace the mentioned packages with appropriate Arch packages (though I don't know if they provide the same). The installation seems to go fine, i.e., it doesn't show any errors, but when I want to run flatter it says

Here is the full installation:

Coding ➤ sudo pacman -S gmp mpfr fplll eigen                                                                                                                                                               git:main*
warning: gmp-6.3.0-1 is up to date -- reinstalling
warning: mpfr-4.2.1-2 is up to date -- reinstalling
warning: fplll-5.4.5-1 is up to date -- reinstalling
warning: eigen-3.4.0-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (4) eigen-3.4.0-2  fplll-5.4.5-1  gmp-6.3.0-1  mpfr-4.2.1-2

Total Download Size:    0.43 MiB
Total Installed Size:  37.17 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] n

Coding ➤ git clone https://github.com/keeganryan/flatter
Cloning into 'flatter'...
remote: Enumerating objects: 253, done.
remote: Counting objects: 100% (253/253), done.
remote: Compressing objects: 100% (186/186), done.
remote: Total 253 (delta 72), reused 236 (delta 58), pack-reused 0
Receiving objects: 100% (253/253), 3.53 MiB | 5.89 MiB/s, done.
Resolving deltas: 100% (72/72), done.

Coding ➤ cd flatter

flatter ➤ mkdir build && cd ./build

build ➤ cmake ..
-- The CXX compiler identification is GNU 13.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Found GMP: /usr/include  
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Found BLAS: /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so;/opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_sequential.so;/opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_core.so;-lm;-ldl  
-- Looking for cheev_
-- Looking for cheev_ - found
-- Found LAPACK: /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_intel_lp64.so;/opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_sequential.so;/opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_core.so;-lm;-ldl;-lm;-ldl  
-- Found MPFR: /usr/include (Required is at least version "1.0.0") 
-- Found FPLLL: /usr/include (found suitable version "5.4.5", minimum required is "5.1.0") 
-- Configuring done (1.4s)
-- Generating done (0.0s)
-- Build files have been written to: /home/johann/Coding/flatter/build

build ➤ make
[  1%] Building CXX object src/CMakeFiles/flatter.dir/math/matrix_tools.cpp.o
[  2%] Building CXX object src/CMakeFiles/flatter.dir/math/mpfr_blas.cpp.o
[  3%] Building CXX object src/CMakeFiles/flatter.dir/math/mpfr_lapack.cpp.o
[  5%] Building CXX object src/CMakeFiles/flatter.dir/problems/problem.cpp.o
[  6%] Building CXX object src/CMakeFiles/flatter.dir/problems/fused_qr_sizered/fused_qr_size_reduction.cpp.o
[  7%] Building CXX object src/CMakeFiles/flatter.dir/problems/fused_qr_sizered/base.cpp.o
[  9%] Building CXX object src/CMakeFiles/flatter.dir/problems/fused_qr_sizered/columnwise.cpp.o
[ 10%] Building CXX object src/CMakeFiles/flatter.dir/problems/fused_qr_sizered/columnwise_double.cpp.o
[ 11%] Building CXX object src/CMakeFiles/flatter.dir/problems/fused_qr_sizered/iterated.cpp.o
[ 12%] Building CXX object src/CMakeFiles/flatter.dir/problems/fused_qr_sizered/lazy_refine.cpp.o
[ 14%] Building CXX object src/CMakeFiles/flatter.dir/problems/fused_qr_sizered/params.cpp.o
[ 15%] Building CXX object src/CMakeFiles/flatter.dir/problems/fused_qr_sizered/seysen_refine.cpp.o
[ 16%] Building CXX object src/CMakeFiles/flatter.dir/problems/matrix_multiplication/matrix_multiplication.cpp.o
[ 18%] Building CXX object src/CMakeFiles/flatter.dir/problems/matrix_multiplication/base.cpp.o
[ 19%] Building CXX object src/CMakeFiles/flatter.dir/problems/matrix_multiplication/aliased.cpp.o
[ 20%] Building CXX object src/CMakeFiles/flatter.dir/problems/matrix_multiplication/elementary_mpfr.cpp.o
[ 22%] Building CXX object src/CMakeFiles/flatter.dir/problems/matrix_multiplication/elementary_mpz.cpp.o
[ 23%] Building CXX object src/CMakeFiles/flatter.dir/problems/matrix_multiplication/elementary_native.cpp.o
[ 24%] Building CXX object src/CMakeFiles/flatter.dir/problems/matrix_multiplication/elementary_RRZ.cpp.o
[ 25%] Building CXX object src/CMakeFiles/flatter.dir/problems/matrix_multiplication/elementary_RRl.cpp.o
[ 27%] Building CXX object src/CMakeFiles/flatter.dir/problems/matrix_multiplication/elementary_ZZl.cpp.o
[ 28%] Building CXX object src/CMakeFiles/flatter.dir/problems/matrix_multiplication/strassen.cpp.o
[ 29%] Building CXX object src/CMakeFiles/flatter.dir/problems/matrix_multiplication/threaded.cpp.o
[ 31%] Building CXX object src/CMakeFiles/flatter.dir/problems/matrix_multiplication/tri_matmul.cpp.o
[ 32%] Building CXX object src/CMakeFiles/flatter.dir/problems/qr_factorization/base.cpp.o
[ 33%] Building CXX object src/CMakeFiles/flatter.dir/problems/qr_factorization/blocked.cpp.o
[ 35%] Building CXX object src/CMakeFiles/flatter.dir/problems/qr_factorization/householder_mpfr.cpp.o
[ 36%] Building CXX object src/CMakeFiles/flatter.dir/problems/qr_factorization/eigen_impl.cpp.o
[ 37%] Building CXX object src/CMakeFiles/flatter.dir/problems/qr_factorization/qr_factorization.cpp.o
[ 38%] Building CXX object src/CMakeFiles/flatter.dir/problems/qr_factorization/threaded.cpp.o
[ 40%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/base.cpp.o
[ 41%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/fplll_impl.cpp.o
[ 42%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/goal.cpp.o
[ 44%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/heuristic_1.cpp.o
[ 45%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/heuristic_2.cpp.o
[ 46%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/heuristic_3.cpp.o
[ 48%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/irregular.cpp.o
[ 49%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/lagrange.cpp.o
[ 50%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/lattice_reduction.cpp.o
[ 51%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/latred_relative_sr.cpp.o
[ 53%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/schoenhage.cpp.o
[ 54%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/params.cpp.o
[ 55%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/proved_1.cpp.o
[ 57%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/proved_2.cpp.o
[ 58%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/proved_3.cpp.o
[ 59%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/recursive_generic.cpp.o
[ 61%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/sublattice_split.cpp.o
[ 62%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/sublattice_split_2.cpp.o
[ 63%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/sublattice_split_3.cpp.o
[ 64%] Building CXX object src/CMakeFiles/flatter.dir/problems/lattice_reduction/threaded_3.cpp.o
[ 66%] Building CXX object src/CMakeFiles/flatter.dir/problems/size_reduction/base.cpp.o
[ 67%] Building CXX object src/CMakeFiles/flatter.dir/problems/size_reduction/blocked.cpp.o
[ 68%] Building CXX object src/CMakeFiles/flatter.dir/problems/size_reduction/elementary_ll.cpp.o
[ 70%] Building CXX object src/CMakeFiles/flatter.dir/problems/size_reduction/elementary_ZZ.cpp.o
[ 71%] Building CXX object src/CMakeFiles/flatter.dir/problems/size_reduction/size_reduction.cpp.o
[ 72%] Building CXX object src/CMakeFiles/flatter.dir/problems/relative_size_reduction/base.cpp.o
[ 74%] Building CXX object src/CMakeFiles/flatter.dir/problems/relative_size_reduction/generic.cpp.o
[ 75%] Building CXX object src/CMakeFiles/flatter.dir/problems/relative_size_reduction/triangular.cpp.o
[ 76%] Building CXX object src/CMakeFiles/flatter.dir/problems/relative_size_reduction/orthogonal.cpp.o
[ 77%] Building CXX object src/CMakeFiles/flatter.dir/problems/relative_size_reduction/orthogonal_double.cpp.o
[ 79%] Building CXX object src/CMakeFiles/flatter.dir/problems/relative_size_reduction/params.cpp.o
[ 80%] Building CXX object src/CMakeFiles/flatter.dir/problems/relative_size_reduction/relative_size_reduction.cpp.o
[ 81%] Building CXX object src/CMakeFiles/flatter.dir/data/matrix/matrix.cpp.o
[ 83%] Building CXX object src/CMakeFiles/flatter.dir/data/matrix/matrix_data.cpp.o
[ 84%] Building CXX object src/CMakeFiles/flatter.dir/data/matrix/matrix_data_mpfr.cpp.o
[ 85%] Building CXX object src/CMakeFiles/flatter.dir/data/matrix/matrix_data_mpz.cpp.o
[ 87%] Building CXX object src/CMakeFiles/flatter.dir/data/matrix/matrix_data_int64.cpp.o
[ 88%] Building CXX object src/CMakeFiles/flatter.dir/data/matrix/matrix_data_double.cpp.o
[ 89%] Building CXX object src/CMakeFiles/flatter.dir/data/matrix/workspace_buffer.cpp.o
[ 90%] Building CXX object src/CMakeFiles/flatter.dir/data/lattice/lattice.cpp.o
[ 92%] Building CXX object src/CMakeFiles/flatter.dir/flatter.cpp.o
[ 93%] Building CXX object src/CMakeFiles/flatter.dir/computation_context.cpp.o
[ 94%] Building CXX object src/CMakeFiles/flatter.dir/monitor.cpp.o
[ 96%] Building CXX object src/CMakeFiles/flatter.dir/profile.cpp.o
[ 97%] Linking CXX shared library ../lib/libflatter.so
[ 97%] Built target flatter
[ 98%] Building CXX object apps/CMakeFiles/flatter_bin.dir/flatter.cpp.o
[100%] Linking CXX executable ../bin/flatter
[100%] Built target flatter_bin

build ➤ sudo make install
[ 97%] Built target flatter
[100%] Built target flatter_bin
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/libflatter.so
-- Set non-toolchain portion of runtime path of "/usr/local/lib/libflatter.so" to ""
-- Up-to-date: /usr/local/include/flatter
-- Installing: /usr/local/include/flatter/computation_context.h
-- Installing: /usr/local/include/flatter/problems.h
-- Installing: /usr/local/include/flatter/monitor.h
-- Up-to-date: /usr/local/include/flatter/data
-- Installing: /usr/local/include/flatter/data/matrix.h
-- Installing: /usr/local/include/flatter/data/lattice.h
-- Up-to-date: /usr/local/include/flatter/data/matrix
-- Installing: /usr/local/include/flatter/data/matrix/matrix.h
-- Installing: /usr/local/include/flatter/data/matrix/matrix_data.h
-- Up-to-date: /usr/local/include/flatter/data/lattice
-- Installing: /usr/local/include/flatter/data/lattice/lattice.h
-- Installing: /usr/local/include/flatter/data/lattice/profile.h
-- Installing: /usr/local/include/flatter/flatter.h
-- Up-to-date: /usr/local/include/flatter/problems
-- Installing: /usr/local/include/flatter/problems/qr_factorization.h
-- Up-to-date: /usr/local/include/flatter/problems/fused_qr_sizered
-- Installing: /usr/local/include/flatter/problems/fused_qr_sizered/params.h
-- Installing: /usr/local/include/flatter/problems/fused_qr_sizered/base.h
-- Up-to-date: /usr/local/include/flatter/problems/matrix_multiplication
-- Installing: /usr/local/include/flatter/problems/matrix_multiplication/base.h
-- Installing: /usr/local/include/flatter/problems/size_reduction.h
-- Installing: /usr/local/include/flatter/problems/lattice_reduction.h
-- Installing: /usr/local/include/flatter/problems/matrix_multiplication.h
-- Up-to-date: /usr/local/include/flatter/problems/qr_factorization
-- Installing: /usr/local/include/flatter/problems/qr_factorization/base.h
-- Up-to-date: /usr/local/include/flatter/problems/relative_size_reduction
-- Installing: /usr/local/include/flatter/problems/relative_size_reduction/params.h
-- Installing: /usr/local/include/flatter/problems/relative_size_reduction/base.h
-- Installing: /usr/local/include/flatter/problems/fused_qr_size_reduction.h
-- Up-to-date: /usr/local/include/flatter/problems/size_reduction
-- Installing: /usr/local/include/flatter/problems/size_reduction/base.h
-- Up-to-date: /usr/local/include/flatter/problems/lattice_reduction
-- Installing: /usr/local/include/flatter/problems/lattice_reduction/params.h
-- Installing: /usr/local/include/flatter/problems/lattice_reduction/base.h
-- Installing: /usr/local/include/flatter/problems/lattice_reduction/sublattice_split.h
-- Installing: /usr/local/include/flatter/problems/lattice_reduction/goal.h
-- Installing: /usr/local/include/flatter/problems/relative_size_reduction.h
-- Installing: /usr/local/include/flatter/problems/problem.h
-- Installing: /usr/local/include/flatter/workspace_buffer.h
-- Installing: /usr/local/bin/flatter
-- Set non-toolchain portion of runtime path of "/usr/local/bin/flatter" to ""

build ➤ sudo ldconfig

build ➤ flatter 
flatter: error while loading shared libraries: libflatter.so: cannot open shared object file: No such file or directory

Do you know what could have gone wrong?

Segmentation fault for large lattice on Apple M1

I encountered segfault at https://github.com/keeganryan/flatter/blob/main/src/data/lattice/lattice.cpp#L104 on my M1, but this issue never appeared when I run on my Ubuntu WSL.

    for (unsigned int i = 0; i < dim; i++) {
        for (unsigned int j = 0; j < rank; j++) {
            mpz_set_str(dM(i, j), data[j][i].c_str(), 0);
        }
    }

Input lattice: example_lattice.txt (40 x 40 lattice with ~8100 digits per entry)

CMake log:

-- The CXX compiler identification is Clang 15.0.7
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Users/lap15281/mambaforge/envs/sage/bin/arm64-apple-darwin20.0.0-clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenMP_CXX: -fopenmp=libomp (found version "5.0") 
-- Found OpenMP: TRUE (found version "5.0")  
-- Found GMP: /Users/lap15281/mambaforge/envs/sage/include  
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Found BLAS: /Users/lap15281/mambaforge/envs/sage/lib/libopenblas.dylib  
-- Looking for cheev_
-- Looking for cheev_ - found
-- Found LAPACK: /Users/lap15281/mambaforge/envs/sage/lib/libopenblas.dylib;-lm;-ldl  
-- Found MPFR: /Users/lap15281/mambaforge/envs/sage/include (Required is at least version "1.0.0") 
-- Found FPLLL: /Users/lap15281/mambaforge/envs/sage/include (found suitable version "5.4.4", minimum required is "5.1.0") 
-- Configuring done (2.8s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/lap15281/Desktop/Workspace/flatter/build

About overflow in mpz type.

Glad to find this tool! I managed to do lattice-based attacks with this tool and it worked well.
But sometimes I got 'gmp: overflow in mpz type' with no reason, and the smallest lattice matrix I got was (10972bit)30*27.
I generated some larger random matrix with 20000bits(or even bigger) elements, but it worked successfully.
Maybe there are some bugs in the code because I dont think mpz is so easy to 'get overflowed'? Or it's just because I used the tool unproperly lol.

Question: comparison with NTL

Thanks for open-sourcing the excellent library.

May I ask how flatter compares with NTL in terms of scope and performance benchmark of comparable algorithms?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.