Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quarkslab/NFLlib
NTT-based Fast Lattice library
https://github.com/quarkslab/NFLlib
Last synced: about 1 month ago
JSON representation
NTT-based Fast Lattice library
- Host: GitHub
- URL: https://github.com/quarkslab/NFLlib
- Owner: quarkslab
- License: mit
- Created: 2015-11-26T14:24:36.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-10-14T22:25:00.000Z (about 2 years ago)
- Last Synced: 2024-08-01T22:44:49.181Z (5 months ago)
- Language: C++
- Size: 263 KB
- Stars: 162
- Watchers: 22
- Forks: 52
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-fhe - NFLlib - NTT-based Fast Lattice library specialized on power-of-two polynomials. (Libraries / [Sunscreen](https://sunscreen.tech/))
- awesome-he - NFLlib - NTT-based Fast Lattice library specialized on power-of-two polynomials. (Libraries)
README
# NFLlib
An NTT-based Fast Lattice library## Goal
NFLlib 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.).
## License
MIT
# Install Steps
You need cmake, GMP and Mpfr, as well as a C++11 compiler to build NFLLib.
To build, test and install a production version of nfllib, run the following:
```
$> mkdir _build
$> cd _build
$> cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/nfllib
$> make
$> make test
$> make install
```The following CMake options are relevant:
Option | Description
------------------------------------|---------------------------------
`-DCMAKE_INSTALL_PREFIX=` | Where the library is installed
`-DCMAKE_BUILD_TYPE=Release\|Debug` | The basic compiler configuration
`-DNFL_OPTIMIZED=ON` | Enable SSE/AVX-based optimization# SSE/AVX optimizations
To use SSE-based optimizations, compile the code with the flags `-DNFL_OPTIMIZED=ON -DNTT_SSE`.
To use AVX-based optimizations, compile the code with the flags `-DNFL_OPTIMIZED=ON -DNTT_AVX2`.
# Getting started
In order to get the documentation you need Sphinx and the Alabaster theme. Installation procedures are described at (we recommend using pip for both installations) :
* http://www.sphinx-doc.org/en/stable/install.html
* https://anaconda.org/pypi/alabasterAfter getting both Sphinx and the Alabaster theme build the documentation and show it with:
```
$> sphinx-build . build
$> your_favorite_browser build/nfl.html
```If you have issues building the documentation please contact the developper team.
# Contributors
This 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).