NTRU

On this page 7

NTRU is a lattice-based public-key cryptosystem that encrypts data with arithmetic on truncated polynomial rings, and its security rests on the difficulty of finding short vectors in structured lattices. Proposed in 1996 by Jeffrey Hoffstein, Jill Pipher and Joseph Silverman, it is one of the oldest designs that remains unbroken by known quantum algorithms, which makes it a reference point in quantum security and in the wider field of quantum computing.

Unlike RSA and elliptic-curve cryptography, which Shor’s algorithm would break on a cryptographically relevant quantum computer, NTRU has no known efficient quantum attack. Today it appears mainly as a key encapsulation mechanism (KEM), for example in the NTRU Prime variant used by OpenSSH, and its lattice structure underpins the FN-DSA signature standard.

How NTRU encrypts with polynomial arithmetic

NTRU works in the ring of polynomials with integer coefficients modulo x^N – 1, where every product is reduced so that the degree stays below N. All coefficients are additionally reduced modulo a large modulus q or a small modulus p, usually p = 3, and the interplay between these two moduli is what makes decryption possible.

The private key is a pair of polynomials f and g with small coefficients, typically drawn from the values -1, 0 and 1. The public key h is essentially the quotient g divided by f in the ring modulo q, scaled by p. Because f and g are short, the public key hides a short vector in the NTRU lattice, and recovering it from h alone is believed to be hard.

To encrypt, the sender chooses a random small polynomial r and computes the ciphertext e = r·h + m modulo q, where m encodes the message with small coefficients. To decrypt, the receiver multiplies e by f, center-lifts the coefficients into the range around zero, and then multiplies by the inverse of f modulo p. The table summarizes the roles of the main components.

ComponentTypical formRole
Degree NPrime, for example 509 to 821Sets ring size and security level
Modulus qPower of two, 2048 to 8192Large modulus for public arithmetic
Modulus pUsually 3Small modulus that carries the message
Private f, gTernary small polynomialsTrapdoor that enables decryption
Public hPseudo-random polynomial mod qEncryption key shared openly
Main components of the NTRU scheme

Why NTRU resists quantum attacks

The security of NTRU reduces in practice to the NTRU problem: given h, find the short polynomials f and g. This is equivalent to finding an unusually short vector in a 2N-dimensional lattice, and the best known attacks use lattice reduction algorithms such as BKZ, whose cost grows exponentially with N.

Quantum computers offer only modest speedups against these lattice problems. Grover-style search can accelerate some subroutines, but no analogue of Shor’s algorithm is known for short-vector problems, so parameters are chosen with a margin for quantum sieving estimates. Cryptanalysts also consider the hybrid attack, which combines lattice reduction with a meet-in-the-middle search, and the overstretched NTRU attacks that apply only when q is very large relative to N.

NTRU variants and parameter sets

Several NTRU variants exist because the original design was refined over two decades. During the NIST PQC standardization process, the NTRU-HPS and NTRU-HRSS submissions merged into a single candidate that reached the third-round finalist stage, while Streamlined NTRU Prime ran as an alternate candidate. The table lists approximate sizes for common parameter sets.

Parameter setPublic keyCiphertextTarget security
ntruhps2048509699 bytes699 bytesNIST category 1
ntruhps2048677930 bytes930 bytesNIST category 3
ntruhrss7011,138 bytes1,138 bytesNIST category 3
ntruhps40968211,230 bytes1,230 bytesNIST category 5
sntrup7611,158 bytes1,039 bytesRoughly category 3
Approximate sizes of selected NTRU parameter sets

NTRU-HPS uses fixed-weight ternary polynomials, NTRU-HRSS avoids fixed weights to simplify sampling, and NTRU Prime replaces x^N – 1 with a ring defined by x^p – x – 1 to remove algebraic structure that some researchers considered a potential weakness. All modern variants are engineered to have no decryption failures, which closes a class of attacks that affected early parameter choices.

How NTRU compares with ML-KEM and other schemes

NTRU and ML-KEM are both lattice KEMs, but they rest on different assumptions. ML-KEM builds on module learning with errors, which has a tighter connection to worst-case lattice problems, whereas NTRU relies on the older NTRU assumption with a longer cryptanalytic history. NIST selected Kyber, now ML-KEM, partly for its balanced performance and flexible parameters, not because NTRU was broken.

SchemeHardness basisStatusMain trade-off
NTRUNTRU lattice problemNIST finalist, not selectedSlower key generation
ML-KEMModule learning with errorsFIPS 203 standardNewer but well analyzed
HQCQuasi-cyclic codesSelected as backup KEMLarger ciphertexts
Classic McElieceBinary Goppa codesConservative alternativeVery large public keys
X25519Elliptic-curve discrete logClassical onlyBroken by Shor’s algorithm
NTRU compared with related key establishment schemes

A distinctive strength of NTRU is fast encryption and decryption with compact ciphertexts. Its main cost is key generation, which requires polynomial inversion modulo both p and q and is noticeably slower than ML-KEM key generation, although optimized implementations reduce the gap considerably.

Deployment, standards and practical limits

NTRU has an unusually long standardization record. NTRUEncrypt appeared in IEEE 1363.1 and in the financial-sector standard ANSI X9.98, and the original patents were released into the public domain in 2017. In practice, the most visible deployment is the sntrup761x25519-sha512 hybrid key exchange, which OpenSSH made its default in 2022 to counter harvest now, decrypt later threats.

ConcernRiskRecommended practice
InteroperabilityFew protocols beyond SSH support itPrefer ML-KEM for new designs
Side channelsTiming leaks in inversion or samplingUse constant-time implementations
Single-algorithm relianceUndiscovered lattice attackDeploy as a hybrid key exchange
ComplianceNot a FIPS-approved KEMCheck CNSA 2.0 and sector rules
Practical considerations when adopting NTRU

A common misconception is that NTRUSign shares the security of NTRU encryption. The original NTRUSign signature scheme was broken by transcript attacks that recover the secret basis from many signatures, and the modern signature successor is FN-DSA, which uses NTRU lattices with Gaussian sampling instead.

A plain-language summary

NTRU is a way to lock data so that only the right person can open it. It uses math with polynomials, which are long lists of small numbers. The secret key is made of very small numbers. The public key looks random, but it hides that secret.

Future quantum computers could break the locks used on most websites today. NTRU is different. No known quantum method breaks it quickly. That is why experts call it post-quantum cryptography. It has been studied for almost thirty years, and it still stands.

An example from practice

A systems administrator at a research hospital manages several hundred Linux servers that hold patient imaging archives. These records must stay confidential for decades, so the security team worries that traffic captured today could be decrypted later by a quantum computer.

The administrator upgrades the servers and workstations to an OpenSSH release that negotiates sntrup761x25519-sha512 by default. Each SSH session now combines the classical X25519 exchange with the NTRU Prime KEM, so an attacker must break both. The handshake grows by roughly 2 kilobytes, and connection setup time changes by well under a millisecond.

The outcome is quantum-resistant remote administration with no change to user workflows. The team records the algorithm in its cryptographic inventory and plans to add ML-KEM hybrids as tools adopt them.