NTRU Encryption

NTRU is a lattice-based asymmetric encryption algorithm that is believed to be resistant to quantum computer attacks.

Generate NTRU Keys

About NTRU Parameters

NTRU security is determined by its parameter sets:

  • NTRU-HPS-2048-509: NIST Level 1 security (equivalent to AES-128)
  • NTRU-HPS-2048-677: NIST Level 3 security (equivalent to AES-192)
  • NTRU-HPS-4096-821: NIST Level 5 security (equivalent to AES-256)
  • NTRU-HRSS-701: NIST Level 3 security with different tradeoffs

Higher security levels provide stronger protection but require more computational resources.

Encrypt File with NTRU

Decrypt File with NTRU

About NTRU Encryption

NTRU (Nth-degree TRUncated polynomial ring) is a lattice-based public key cryptosystem that was first proposed in 1996 by mathematicians Jeffrey Hoffstein, Jill Pipher, and Joseph H. Silverman.

Key Features:
  • Post-Quantum Security: NTRU is believed to be resistant to attacks by quantum computers, unlike RSA and ECC
  • Efficiency: NTRU operations are typically faster than RSA for equivalent security levels
  • Standardization: NTRU is standardized in IEEE 1363.1 and is a finalist in NIST's post-quantum cryptography standardization process
  • Maturity: With over 25 years of cryptanalysis, NTRU is one of the most well-studied post-quantum algorithms
How it Works:

NTRU is based on the mathematical problem of finding short vectors in lattices, which is believed to be hard even for quantum computers. The algorithm operates in a polynomial ring and uses polynomial multiplication and division for its operations.

  1. Key Generation: Creates a private key (f, g) and a public key h = g/f in the polynomial ring
  2. Encryption: Uses the public key to encrypt a message by adding "noise" that only the private key can remove
  3. Decryption: Uses the private key to remove the noise and recover the original message
Hybrid Encryption:

Like most public key systems, NTRU is typically used in a hybrid mode for file encryption:

  1. Generate a random symmetric key (e.g., for AES)
  2. Encrypt the file with the symmetric key
  3. Encrypt the symmetric key with NTRU
  4. Send both the encrypted file and the encrypted symmetric key
Note: NTRU is one of the most promising candidates for post-quantum cryptography. Its long history of cryptanalysis and efficient implementation make it a strong choice for applications that need to be secure against future quantum computer attacks.