The NTRU cryptosystem was developed in 1996 by Hoffstein, Pipher, and Silverman. NTRU is a public key cryptosystem not based on factorization or discrete logarithm problems. NTRU is based on the shortest vector problem in a lattice. The NTRU public key cryptosystem is one of the fastest known public key cryptosystems. NTRU works in the ring of truncated polynomials
where
The addition of two polynomials
The multiplication of two polynomials
As an example, let us compute
In the polynomial ring
For a given positive integer
In NTRU, the parameters are chosen as follows:
-
$N$ is a sufficiently large prime, -
$p$ and$q$ are relatively prime numbers such that$q$ is much larger than$p$ . -
$d_f$ ,$d_g$ , and$d_r$ are integers such that the polynomials from which the private keys are selected are from the set$B(d_f)$ and$B(d_g)$ . -
The set
$B(d_r)$ contains the polynomials from which the blinding value used during encryption is selected. -
$Z_p[X] / (X^N - 1)$ is the plaintext space.
To generate keys in the NTRU cryptosystem:
-
Choose Polynomials:
- Randomly select a polynomial
$f$ from the set$B(d_f)$ such that$f$ has an inverse modulo$p$ and$q$ . To Generate and Check if$f$ inverse modulo$p$ and$q$ exists we use Bezouts Identity. - Set
$f_p \equiv f^{-1} \pmod{p}$ and$f_q \equiv f^{-1} \pmod{q}$ . - Randomly choose a polynomial
$g$ from the set$B(d_g)$ .
- Randomly select a polynomial
-
Compute
$h$ :- Compute
$h \equiv g \star f_q \pmod{q}$ .
- Compute
-
Generate Keys:
- Public Key:
$(N, h)$ - Private Key:
$(f, f_p)$
- Public Key:
To encrypt a message in the NTRU cryptosystem:
-
Message Representation:
- Represent the message as a polynomial
$m$ from the plaintext space.
- Represent the message as a polynomial
-
Choose Blinding Polynomial:
- Randomly choose a polynomial
$r \in B(d_r)$ .
- Randomly choose a polynomial
-
Encrypt Message:
- Encrypt
$m$ using the following rule:$e \equiv p \star r \star h + m \pmod{q}$
- Encrypt
To decrypt a ciphertext in the NTRU cryptosystem, follow these steps:
-
Compute
$a$ :- Compute
$a \equiv f \star e \pmod{q}$ .
- Compute
-
Transform
$a$ :- Transform
$a$ to a polynomial with coefficients in the interval$[-q/2, q/2]$ .
- Transform
-
Compute
$m$ :- Compute
$m \equiv f_p \star a \pmod{p}$ .
- Compute
To check the computation and understand why the decryption procedure works, let's break down the steps:
We have:
We obtain that:
To illustrate the NTRU encryption/decryption, let's consider an example with:
$N = 7$ $p = 3$ $q = 41$ $f = X^6 - X^4 + X^3 + X^2 - 1$ $g = X^6 + X^4 - X^2 - X$ $m = -X^5 + X^3 + X^2 - X + 1$ $r = X^6 - X^5 + X - 1$
Here, we get:
$f_p = X^6 + 2X^5 + X^3 + X^2 + X + 1$ $f_q = 8X^6 + 26X^5 + 31X^4 + 21X^3 + 40X^2 + 2X + 37$ $h = 19X^6 + 38X^5 + 6X^4 + 32X^3 + 24X^2 + 37X + 8$ -
$e = 31X^6 + 19X^5 + 4X^4 + 2X^3 + 40X^2 + 3X + 25$ .
This computation demonstrates the encryption and decryption process in the NTRU cryptosystem.