• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

cmake/H18-Nov-2019-8363

doc/H18-Nov-2019-2,2931,480

include/H18-Nov-2019-4,2212,903

lib/H18-Nov-2019-4,9123,821

tests/H03-May-2022-1,6011,114

.travis.ymlH A D18-Nov-2019699 2721

README.mdH A D18-Nov-20192.2 KiB6038

README.md

1# NFLlib
2An NTT-based Fast Lattice library
3
4## Goal
5
6NFLlib is an efficient and open-source C++ library dedicated to ideal lattice cryptography. It is specialized in polynomial rings quotiented by a cyclotomic polynomial whose degree is a power of two. The library combines algorithmic optimizations (Chinese Remainder Theorem, optimized Number Theoretic Transform) together with programming optimization techniques (SSE and AVX2 specializations, C++ expression templates, etc.).
7
8## License
9
10MIT
11
12# Install Steps
13
14You need cmake, GMP and Mpfr, as well as a C++11 compiler to build NFLLib.
15
16To build, test and install a production version of nfllib, run the following:
17
18```
19$> mkdir _build
20$> cd _build
21$> cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/nfllib
22$> make
23$> make test
24$> make install
25```
26
27The following CMake options are relevant:
28
29Option                              | Description
30------------------------------------|---------------------------------
31`-DCMAKE_INSTALL_PREFIX=<value>`    | Where the library is installed
32`-DCMAKE_BUILD_TYPE=Release\|Debug` | The basic compiler configuration
33`-DNFL_OPTIMIZED=ON`                | Enable SSE/AVX-based optimization
34
35# SSE/AVX optimizations
36
37To use SSE-based optimizations, compile the code with the flags `-DNFL_OPTIMIZED=ON -DNTT_SSE`.
38
39To use AVX-based optimizations, compile the code with the flags `-DNFL_OPTIMIZED=ON -DNTT_AVX2`.
40
41# Getting started
42
43In order to get the documentation you need Sphinx and the Alabaster theme. Installation procedures are described at (we recommend using pip for both installations) :
44
45  * http://www.sphinx-doc.org/en/stable/install.html
46  * https://anaconda.org/pypi/alabaster
47
48After getting both Sphinx and the Alabaster theme build the documentation and show it with:
49
50```
51$> sphinx-build . build
52$> your_favorite_browser build/nfl.html
53```
54
55If you have issues building the documentation please contact the developper team.
56
57# Contributors
58
59This library is an extension/evolution of the NTTTools module from [XPIR](https://github.com/XPIR-team/XPIR) done by members of [CryptoExperts](https://www.cryptoexperts.com), [INP ENSEEIHT](http://www.enseeiht.com), [Quarkslab](http://www.quarkslab.com) (in alphabetical order).
60