Ntruhps2048509
The NTRU lattice KEM in its HPS and HRSS forms, a NIST Round 3 finalist
Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.
About Ntruhps2048509
Ntruhps2048509 is one of 6 NTRU variants in the NextSSL registry, a key encapsulation mechanism. It uses a 699-byte public key, a 935-byte secret key, a 699-byte ciphertext and a 32-byte shared secret. It is designed to resist attacks by large quantum computers. NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).
Overview
NTRU is one of the oldest lattice-based public-key schemes, dating from 1996. The NIST submission merged two variants, NTRU-HPS and NTRU-HRSS, into a CCA-secure KEM that reached the third round as a finalist but was not selected.
NTRU works with polynomials in a ring of the form Z_q[X]/(X^n - 1). The private key is a pair of short polynomials f and g, and the public key is essentially h = g/f modulo q. Recovering short f and g from h is a hard lattice problem. Encryption adds a short random multiple of h to the encoded message; the key holder multiplies by f to cancel the mask and reduces modulo a small number to recover the message.
NTRU-HPS follows the original design by Hoffstein, Pipher and Silverman with fixed-weight ternary secrets. NTRU-HRSS, by Hülsing, Rijneveld, Schanck and Schwabe, uses arbitrary ternary secrets and a prime-cyclotomic ring structure, which removes the need for fixed-weight sampling. Both are built as deterministic public-key encryption schemes, which allows a tight CCA conversion and parameters with no decryption failures at all. The original NTRU patents have expired.
Parameter sets present: ntruhps2048509 (category 1), ntruhps2048677 (category 3), ntruhps4096821 and ntruhps40961229 (category 5), ntruhrss701 (category 3) and ntruhrss1373 (higher security). Keys and ciphertexts are between about 700 bytes and 2 KB. A variant of NTRU-HRSS was combined with X25519 in Google and Cloudflare's CECPQ2 TLS experiment in 2019. All six sets share the same KEM interface and differ in ring degree n and modulus q.
History
1996–2025NTRU presented by Hoffstein, Pipher and Silverman
NTRUEncrypt standardised in IEEE 1363.1
NIST calls for post-quantum KEMs and signatures
NIST Post-Quantum Cryptography standardisationNTRU variants submitted to NIST PQC
26 candidates advance to round 2
NIST Post-Quantum Cryptography standardisationRound 3 finalists and alternates announced
NIST Post-Quantum Cryptography standardisationKyber, Dilithium, Falcon and SPHINCS+ selected; round 4 opens
NIST Post-Quantum Cryptography standardisationFIPS 203 (ML-KEM), FIPS 204 (ML-DSA) and FIPS 205 (SLH-DSA) published
NIST Post-Quantum Cryptography standardisationHQC selected as a second KEM
NIST Post-Quantum Cryptography standardisation
How it works
- KeyGen samples short polynomials f and g and publishes h, essentially g divided by f modulo q.
- Encaps samples short r and m and computes c = r*h + m modulo q.
- Decaps multiplies c by f, reduces to recover m, and re-derives r.
- The shared key is a hash of (r, m); malformed ciphertexts lead to implicit rejection.
Security notes
No practical attack is known against these parameters, but NIST chose Kyber (ML-KEM) instead, so NTRU is not a NIST standard. Implementations must use constant-time polynomial inversion and arithmetic.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| pk | 699 | Public key |
| sk | 935 | Secret key |
| ct | 699 | Ciphertext |
| ss | 32 | Shared secret |
| seed | 0 | Seed |
| coins | 0 | Encapsulation randomness |
Use it
from nextssl_demo import NextSSL
root = NextSSL(root=True) # tier 'unverified' is reachable from the root API only
pk, sk = root.call("kem_keygen", "ntruhps2048509", None, outs=2)
ct, ss = root.call("kem_encaps", "ntruhps2048509", None, pk, outs=2)
assert ss == root.call("kem_decaps", "ntruhps2048509", None, sk, ct)[0]
nextssl_root_kem_keygen("ntruhps2048509", NULL, pk, sk);
nextssl_root_kem_encaps("ntruhps2048509", NULL, pk, ct, ss);
nextssl_root_kem_decaps("ntruhps2048509", NULL, sk, ct, ss);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_kem_in(reg::all(), Policy::Any, "ntruhps2048509", &Params::new())?;
let (pk, sk) = alg.keygen(&mut *rng)?;
let (ct, ss) = alg.encaps(&pk, &mut *rng)?;
assert_eq!(ss, alg.decaps(&sk, &ct)?);
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Other NTRU variants
5Similar names
Looking for something else?More key encapsulation
All 110Frequently asked questions
What is Ntruhps2048509?
Ntruhps2048509 is a KEM in the NTRU family. NTRU is one of the oldest lattice-based public-key schemes, dating from 1996.
What are the Ntruhps2048509 sizes?
In NextSSL, Ntruhps2048509 uses: public key 699 bytes, ciphertext 699 bytes, shared secret 32 bytes.
Is Ntruhps2048509 post-quantum?
Yes. Ntruhps2048509 is a post-quantum kem: it is designed to resist attacks by large quantum computers. Its tier in NextSSL is unverified.
Who designed Ntruhps2048509 and when?
Ntruhps2048509 belongs to the NTRU family, first published in 1996 by Jeffrey Hoffstein, Jill Pipher, Joseph H. Silverman (original NTRU); Andreas Hülsing, Joost Rijneveld, John M. Schanck, Peter Schwabe (HRSS). Its origin: NIST PQC Round 3 finalist.
Is Ntruhps2048509 safe to use?
Ntruhps2048509 is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).
What other NTRU variants are there?
NextSSL also registers ntruhps2048677, ntruhps40961229, ntruhps4096821, ntruhrss1373, ntruhrss701 in the NTRU family.
Related families
The Round 3 submission of Kyber, predecessor of the ML-KEM standard
ML-KEMNIST's primary post-quantum key encapsulation mechanism, standardised in FIPS 203
NTRU+NTT-friendly NTRU-based KEM selected in Korea's post-quantum competition
FalconCompact NTRU-lattice signatures using fast Fourier sampling, the basis of FN-DSA