libntruprime: Intro

libntruprime is a microlibrary for the Streamlined NTRU Prime cryptosystem. Streamlined NTRU Prime (sntrup) is a lattice-based cryptosystem with the following features:

libntruprime has a very simple stateless API based on the SUPERCOP API, with wire-format inputs and outputs, providing functions that directly match the KEM operations provided by the sntrup specification, such as functions

sntrup1277_keypair
sntrup1277_enc
sntrup1277_dec

for the sntrup1277 KEM.

Internally, libntruprime includes implementations designed to work portably across CPUs, and implementations designed for higher performance on Intel/AMD CPUs with AVX2 instructions. libntruprime includes automatic run-time selection of implementations.

libntruprime is intended to be called either by larger multi-function libraries (such as traditional cryptographic libraries) or directly by applications. This includes libraries and applications in other languages via FFI. The idea is that libntruprime takes responsibility for the details of sntrup computation, including optimization, timing-attack protection, and (in ongoing work) verification, freeing up the calling libraries and applications to concentrate on application-specific needs such as protocol integration.

If you're using Debian (starting with Debian 13) or Ubuntu (starting with Ubuntu 25.04), you can install libntruprime by typing apt install libntruprime-dev -y as root, and then jump straight into using the library. Alternatively, you can download and install the latest version of libntruprime from this site. You might also be interested in python-ntruprime, available in Debian and Ubuntu as python3-ntruprime; this provides a Python wrapper around libntruprime.

Latest release: 20260717.


Version: This is version 2026.07.17 of the "Intro" web page.