post quantum cryptography
Highly optimized implementation of the NTRUEncrypt algorithm
 All Data Structures Files Functions Variables Typedefs Pages
Index Page

Table of Contents

Author
hasufell

Introduction

Highly optimized C implementation of the NTRUEncrypt algorithm, using the FLINT library.

Motivation

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.

Goals

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.

Algorithms

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.

License

LGPL-2.1

Dependencies

This library was written for Linux systems. Support for windows will not be added.

Installation

Usage

See this API doc, the public headers are in the include/ subfolder. This is only the external API. For the internal API please clone the repository, run 'make doc' and check the src/html subfolder.

Performance

See Performance Analysis on github.

References