|
|
The NTRU Public Key Cryptosystem This tutorial describes how the NTRU Public Key Cryptosystem (PKCS) works. 1. NTRU PKCS Parameters The basic collection of objects used by the NTRU Public Key Cryptosystem is the ring R that consists of all truncated polynomials of degree N-1 having integer coefficients: a = a0 + a1X + a2X2 + a3X3 + . . . + aN-2XN-2 + aN-1XN-1. Polynomials are added in the usual way. They are also multiplied more-or-less as usual, except that XN is replaced by 1, XN+1 is replaced by X, XN+2 is replaced by X2, and so on. For more details about the ring R, see Section 2 of the Algebra Tutorial. A full implementation of the NTRU Public Key Cryptosystem is specified by a number of parameters. However, for the purposes of this overview we'll concentrate on the three most important: N - the polynomials in the truncated polynomial ring have degree N-1. In order to ensure security, it is essential that p and q have no common factors. The following table gives some possible values for NTRU parameters at various security levels.
These values are provided to give you some idea of the quantities used in commercial applications (in fact, for commerical applications we take p to have a slightly different form; more details are in the Advanced Topics section). For the examples in this tutorial we will use much smaller parameter values:
2. Key Generation Key Generation Overview
Bob must keep the values of the polynomials f and g private, since anyone who knows the value of either one of them will be able to decrypt messages sent to Bob. Bob's next step is to compute the inverse of f modulo q and the inverse of f modulo p. Thus he computes polynomials fq and fpwith the property that f*fq = 1 (modulo q) and f*fp = 1 (modulo p). (If by some chance these inverses do not exist, Bob will need to go back and choose another f. For information about computing inverses in the ring of truncated polynomials, see Section 3 of the Algebra Tutorial.) Now Bob computes the product h = pfq*g (modulo q). Bob's private key is the pair of polynomials f and fp. Bob's public key is the polynomial h. Key Generation: Example As described in Section 1, the example parameters are: N=11 q=32 p=3 We also need to define a "small" polynomial more precisely. For the purposes of this example, we do this using the quantities df and dg.
(The reason for the slight difference in form between f and g is that f has to be invertible, while g doesn't). For the purposes of this tutorial, we take df = 4 dg = 3. So Bob needs to choose a polynomial f of degree 10 with four 1's and three -1's, and he needs to choose a polynomial g of degree 10 with three 1's and three -1's. Suppose he chooses: f = -1 + X + X2 - X4 + X6 + X9 - X10 Next Bob computes the inverse fp of f modulo p and the inverse fq of f modulo q. He finds that: fp = 1 + 2X + 2X3 + 2X4 + X5 + 2X7 + X8 + 2X9 The final step in key creation is to compute the product h = pfq*g = 8 + 25X + 22X2 + 20X3 + 12X4 + 24X5 + 15X6 + 19X7 + 12X8 + 19X9 + 16X10 (modulo 32). Bob's private key is the pair of polynomials f and fp, and his public key is the polynomial h. 3. Encryption Encryption: Overview Alice wants to send a message to Bob using Bob's public key h. She first puts her message in the form of a polynomial m whose coefficients are chosen modulo p, say between -p/2 and p/2 (in other words, m is a small polynomial mod q). Next she randomly chooses another small polynomial, r. This is the "blinding value", which is used to obscure the message (similar to the way that the ElGamal algorithm uses a one-time random value when encrypting). Alice uses the message m, her randomly chosen polynomial r, and Bob's public key h to compute the polynomial e = r*h + m (modulo q). The polynomial e is the encrypted message which Alice sends to Bob. Encryption: Example As before, we need to specify what we mean by saying that r is a "small" polynomial. We do this using the quantity dr.
For the purposes of this tutorial, we take dr = 3. Now, suppose Alice wants to send the message m = -1 + X3 - X4 - X8 + X9 + X10 to Bob using Bob's public key h = 8 + 25X + 22X2 + 20X3 + 12X4 + 24X5 + 15X6 + 19X7 + 12X8 + 19X9 + 16X10. She first chooses a random polynomial r of degree 10 with three 1's and three -1's. Say she chooses r = -1 + X2 + X3 + X4 - X5 - X7. Then her encrypted message e is e = r*h + m = 14 + 11X + 26X2 + 24X3 + 14X4 + 16X5 + 30X6 + 7X7 + 25X8 + 6X9 + 19X10 (modulo 32). Alice sends the encrypted message e to Bob. 4. Decryption Decryption: Overview Now Bob has received Alice's encrypted message e and he wants to decrypt it. He begins by using his private polynomial f to compute the polynomial a = f*e (modulo q). Since Bob is computing a modulo q, he can choose the coefficients of a to lie between -q/2 and q/2. (In general, Bob will choose the coefficients of a to lie in an interval of length q. The specific interval depends on the form of the small polynomials. See the Advanced Topics tutorial for details.) It is very important that Bob does this before performing the next step. Bob next computes the polynomial b = a (modulo p). That is, he reduces each of the coefficients of a modulo p. Finally Bob uses his other private polynomial fp to compute c = fp*b (modulo p). The polynomial c will be Alice's original message m. Decryption: Example Bob has received the encrypted message e = 14 + 11X + 26X2 + 24X3 + 14X4 + 16X5 + 30X6 + 7X7 + 25X8 + 6X9 + 19X10 from Alice. He uses his private key f to compute a = f*e = 3 - 7X - 10X2 - 11X3 + 10X4 + 7X5 + 6X6 + 7X7 + 5X8 - 3X9 - 7X10 (modulo 32). Note that when Bob reduces the coefficients of f*e modulo 32, he chooses values lying between -15 and 16, not between 0 and 31. It is very important that he choose the coefficients in this way. Next Bob reduces the coefficients of a modulo 3 to get b = a = - X - X2 + X3 + X4 + X5 + X7 - X8 - X10 (modulo 3). Finally Bob uses fp, the other part of his private key, to compute c = fp*b = - 1 + X3 - X4 - X8 + X9 + X10 (modulo 3). The polynomial c is Alice's message m, so Bob has successfully decrypted Alice's message. 5. Why It Works Alice's encrypted message e looks like e = r*h + m (modulo q), but of course Bob doesn't initially know the values of r and m. Bob's first step is to compute f*e and reduce the coefficients modulo q. Remember that Bob's public key h was actually formed by multiplying pfq*g and reducing its coefficients modulo q. So although Bob doesn't know r and m, when he computes a = f*e (modulo q), he is actually performing the following computation:
Now look back at the sizes of the various parameters. The polynomials r, g, f, and m all have coefficients that are quite small. This means that the coefficients of the products r*g and f*m are also quite small, at least in comparison to q. Since the prime p is also small compared to q, this means (assuming that the parameters have been properly chosen) that the coefficients of the polynomial pr*g + f*m already lie between -q/2 and q/2, so reducing the coefficients modulo q has no effect at all! In other words, when Bob computes a by first mulitplying f*e and then reducing the coefficients modulo q, the polynomial a that he ends up with is exactly equal to the polynomial pr*g + f*m. When Bob next reduces the coefficients of a modulo p to form the polynomial b, he is really reducing the coefficients of pr*g + f*m modulo p, so the b that he ends up with is equal to b = f*m (modulo p). Keep in mind that Bob still doesn't know the value of m, but he now knows the value of b. So his final step is to multiply b by fp and use the fact that fp*f = 1 (modulo p) to compute c = fp* b = fp* f*m = m (modulo p), which allows him to recover Alice's message m. Next Steps This page has outlined the main concepts behind the NTRU cryptosystem. As described, it is already highly efficient. However, there are some parameter and implementation enhancements that we can use to speed up operations even more. These additional techniques are explained in the Advanced Topics tutorial and in the Low Hamming Weight Polynomials tutorial. Further Reading A complete description of the NTRU Public Key Cryptosystem with full technical details is given in the paper
Further enhancements to NTRU, including the use of f=1+p*F and p=X+2, are described in
A description of how to speed up NTRU and other cryptosystems by the use of quantities with small Hamming weight can be found in
These papers and short notes giving further information may be downloaded in a variety of formats from the NTRU Technical Center. The following are some additional sources to learn about algebra, number theory, algorithms, and cryptography.
Handbook of Cryptography, S. Vanstone, P. Van Oorschot, A. Menezes, CRC Press, Boca Raton, 1996.
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Created by PixelMEDIA |
|