post quantum cryptography
Highly optimized implementation of the NTRUEncrypt algorithm
|
Highly optimized C implementation of the NTRUEncrypt algorithm, using the FLINT library.
Modern quantum computers will enable us to ride extremely effective attacks on crypto algorithms like rsa. One known attack is the quantum algorithm called Shor's algorithm. In the light of fast paced computer hardware development and known quantum algorithms, it is of importance to find and implement alternatives which are not vulnerable to these attacks.
One known alternative is called NTRU and will be our main focus. It is lattice-based (shortest vector problem in a lattice). In fact, NTRU is a parametrised family of cryptosystems. As such it is represented by the triple (N, p, q), where N is prime, q is always larger than p and p and q are coprime. As well as four sets of polynomials: a polynomial part of the private key, a polynomial for generation of the public key, the message and a blinding value, respectively, all of degree at most N - 1. It is, in theory, very efficient, since encryption and decryption only use simple polynomial multiplication which are very fast compared to asymmetric encryption schemes.
Our main goal is to implement an alternative library of the NTRU algorithm in C and gather experience in cryptographic programming. Further, it may help to raise awareness of the need of quantum-secure encryption and enable us to contribute to already present implementations. It may even reveal problems of other implementations and help advancing them. It may as well help with diversity in crypto implementations, which is always a good thing. On top of that we will provide a command-line interface to our library and allow basic operations like key creation and encryption from stdin.
Optimizing the algorithm itself is not within our scope. However, the library may undergo heavy changes on the mathematical implementation of polynomial arithmetic, in order to optimize run-time behaviour.
Most of the algorithms in ntru_poly.c, ntru_decrypt.c, ntru_encrypt.c and ntru_keypair.c are based on the pseudo-code from Efficient NTRU Implementations by Colleen Marie O'Rourke.
Further work is based on Das NTRU-Kryptosystem von Anja Moldenhauer and the official NTRU Cryptosystems Technical Report #14.
This library was written for Linux systems. Support for windows will not be added. \* FLINT-2.4.3 or later (compiled with gmp and mpfr) \* glib-2.0 \* pkg-config (for the build only)
\* make \* make install
See this API doc, the public headers are in the include/ subfolder.
See Performance Analysis on github.
\* This library on github \* Original NTRUEncrypt paper \* Efficient NTRU Implementations by Colleen Marie O'Rourke \* Das NTRU-Kryptosystem von Anja Moldenhauer \* NTRU Cryptosystems Technical Report #14 \* The NTRU Cryptosystem: Implementation and Comparative Analysis by Rodney D'Souza \* Wikipedia Article