This invention relates to encoding and decoding of information and, more particularly, to a public key cryptosystem for encryption and decryption of digital messages by processor systems.
Secure exchange of data between plural parties, for example between computers or mobile devices, requires encryption.
A public key cryptosystem is one in which each party can publish their encoding process without compromising the security of the decoding process. The encoding process is popularly called a trap-door function. Public key cryptosystems are in widespread use for transmitting important data and information, such as credit card numbers, and also to transmit a private key which is then used for private key encoding.
In the U.S. Pat. Nos. 6,081,597 and 6,298,137, assigned to the same ownership entity as the present Application, and incorporated herein by reference, there is disclosed a public key cryptosystem, which is a basis for a commercialized cryptosystem called “NTRU-Encrypt,” for which keys are relatively short and easily created, and for which the encoding and decoding processes can be performed rapidly. The technique thereof also has relatively low memory requirements and depends on a variety of parameters that permit substantial flexibility in balancing security level, key length, encoding and decoding speed, memory requirements, and bandwidth.
The technique of the referenced “NTRU-Encrypt” system allows keys to be chosen essentially at random from a large set of vectors, with key lengths comparable to the key lengths in other common public key cryptosystems, and provides encoding and decoding processes which are between one and two orders of magnitude faster than the most widely used public key cryptosystem. The encoding technique uses a mixing system based on polynomial algebra and reduction modulo two numbers, p and q, while the decoding technique uses an unmixing system whose validity depends on elementary probability theory. The security of the cryptosystem comes from the interaction of the polynomial mixing system with the independence of reduction modulo p and q. Security also relies on the experimentally observed fact that for most lattices, it is very difficult to find the shortest vector if there are a large number of vectors which are only moderately longer than the shortest vector.
As disclosed in the referenced U.S. Pat. Nos. 6,081,597 and 6,298,137, a method for encoding and decoding a digital message m, includes the following steps: selecting ideals p and q of a ring R; generating elements f and g of the ring R, and generating element Fq which is an inverse of f (mod q), and generating element Fp which is an inverse off (mod p); producing a public key that includes h, where h is congruent, mod q, to a product that can be derived using g and Fq; producing a private key from which f and Fp can be derived; producing an encoded message e by encoding the message m using the public key and a random element φ; and producing a decoded message by decoding the encoded message e using the private key.
As disclosed in an embodiment set forth in the above referenced U.S. Patents, an encrypted message e is in the form e=h·r+m (mod q), where h is the public key, r is a random element (described in an embodiment in the referenced Patents as the product pφ, where p is an originally chosen integer parameter which is part of the public key, and φ is a random polynomial) m is the digital message (e.g. in the form of a polynomial), and q is another originally chosen integer parameter (relatively prime with p) which is also part of the public key.
In a form of “NTRU Encrypt”, r includes r1, r2, r3. Parameter sets specify the exact number of 1's and −1's in each of r1, r2, r3, which reveals the quantity r(1). As an encrypted message has the form e=h·r+m, the value m(1) modulo q is implicitly revealed by the known quantities r(1), e(1), h(1). The value m(1) in turn reveals the difference between the number of 1's and the number of −1's in the randomly generated m, which will be a function of the original message under some encoding scheme. The question therefore arises as to how much information m(1) leaks. The expected value of m(1) is zero, but it becomes larger in absolute value as the disparity between the number of positive and negative 1's increases. As this disparity increases, the size of the search space for m decreases, making a so-called “meet in the middle” search for (r,m) easier. Thus, if adversaries could search through an arbitrarily long list of encrypted messages, they could concentrate their energies on a very small number of messages with sufficient large disparities to make such a search plausible. In fact, a list of messages must be exponentially long for such an attack to have a chance of succeeding. However, in the interest of ensuring the highest attainable level of security, it is among the objects hereof to eliminate the described possible attack on the cryptosystem by adversaries.
In accordance with a feature hereof, a method is set forth for ensuring that, in the type of cryptosystem described, an encrypted message does not leak information by ensuring that for any encrypted message, i.e., ciphertext, e=(e0, e1, . . . , eN-1), the sum e0+e1+ . . . +eN-1 is constant. Note that after interpreting e as a polynomial: e=e0+e1x+e2x2+ . . . +eN-1xN-1, this sum equals the polynomial evaluated at x=1. For an encrypted message of the form e=r·h+m, the technique hereof ensures that e(1) is constant by ensuring that r(1) and m(1) are constant. In an embodiment hereof, this is achieved as follows:
In place of the original encrypted message e=h·r+m, the encryptor reveals the altered encrypted message e=h·r+m−m(1). That is, the constant coefficient of the encrypted message has the value m(1) (mod q) subtracted from it. This effectively forces the value of the message, at an index of 1, to always equal 0, eliminating the attacker's ability to distinguish potentially weaker messages.
The process of decryption will proceed as before, the only difference being that every coefficient of the partially decrypted message f·e (mod q) will have 3m(1) subtracted from it. This will not alter the recovered message (except for the constant coefficient, which is discarded). It should be checked, however, that the possibility of decryption failure due to these larger coefficients remains acceptably low, for example less than 2−80. For this purpose a maximum bound M is set. For example, if the absolute value of m(1) exceeds M the message can be re-encrypted. If it is less than or equal to M the message is accepted. In the Table of
[It can be noted that to protect against adaptive chosen ciphertext attacks, standardized versions of “NTRU Encrypt” require the decryptor to reconstruct the ciphertext from the plaintext and check that the reconstructed cipher text is equal to the received ciphertext (see, for example, N. Howgrave-Graham, J. H. Silverman, W Whyte, Choosing Parameter Sets for NTRUEncrypt with NAEP and SVES-3, Topics in Cryptology-CT-RSA 2005, 118-135, Lecture Notes in Comput. Sci., 3376, Springer, Berlin, 2005. Htt;:///www.ntru.com/cryptolab/articles. Htm#2005.1; IEEE Std 1363.1-2008, IEEE Standard Specification for Public Key Cryptographic Techniques Based on Hard Problems Over Lattices, 2008.) The modified encoding method hereof is consistent with the use of these protections and introduces no additional risks.]
The described technique need only be used when the number of ones and negative ones in f and r are very close to N/3, as it is only in this case that the attacker will find it easier to mount an attack on a thin m than to attack f or r.
As an example with k=112: The top row of Table 1 (see
If |M1−M2|≦136 the message m is accepted and encrypted as e=h·r+m−M1+M2. If |M1−M2|>136 the message m is recomputed by adding a different random padding to m0.
In a further embodiment, the ensuring that the value of e(1) is constant can be achieved as follows. Proceed is as in the prior case, except that when |M1+M2|≦M, the encrypted message is computed as e=h·(r−M1+M2)+m. As the protocol ensures that h(1)=1, this will accomplish the same goal as in the prior case. The same M from the Table 1 will work, and in fact M can be increased beyond the value in the Table by following this technique.
In accordance with a form of the invention, a method is set forth for encrypting and decrypting a message, including the following steps: selecting a plurality of integers and a plurality of vectors, and deriving therefrom a public key that includes a collection of vectors and a private key; selecting a message, in the form of a vector; selecting a vector of random weights; deriving a preliminary encrypted message, in the form of a vector, as a function of the selected message, the public key, and the random weights; evaluating the preliminary encrypted message to derive a normalizing value; combining the preliminary encrypted message and the normalizing value, to obtain a security-enhanced encrypted message; and decrypting the security-enhanced encrypted message using the private key, to recover the selected message. In an embodiment of this form of the invention, the step of selecting a vector of random weights comprises selecting a vector with one weight for each of the public key vectors. In this embodiment, the preliminary encrypted message ep is
e
p
=h*r+m (mod q)
where h is the collection of public key vectors, r is the collection of random weights, m is the selected message, and q is one of the selected plurality of integers; and wherein the security-enhanced message ese is
e
se
=h*r+m−m
1 (mod q)
where m1 is the normalizing value. In this embodiment, the normalizing value, m1, is obtained from a normalizing weight n, which is the sum, modulo q, of the elements of the selected message m, so that the normalizing value m1 is chosen such that the sum of its indices is related to the normalizing weight n. Also in this embodiment, the normalizing value m1 is obtained from the normalizing weight n by: selecting one or more indices; ensuring that the value of the selected message m at these indices is a known value; and generating m1 such that m1 is non-zero only at the selected indices, m1 is 0 at all non-selected indices, and the sum of the entries of m1 is n. A single index is selected and the value of m1 at that index is set equal to m.
In an embodiment of this form of the invention, the step of decoding the security-enhanced encrypted message, using the private key, to recover the selected message, comprises: using the private key to recover the security-enhanced encrypted message; and deriving the selected message m from r*h+m+m1. In this embodiment, the step of deriving the selected message m from r*h+m+m1 is implemented by obtaining m+m1 from r*h+m+m1, obtaining the normalizing weight n from m+m1, obtaining m1 from n, and calculating m as (m+m1)−m1. The step of deriving the selected message m from r*h+m+m1 can be implemented by: obtaining m+m1 from r*h+m+m1; selecting those indices corresponding to the non-zero values of m1; and setting the entries of m+m1 at those indices to 0. The step of selecting those indices corresponding to the non-zero values of m1 is implemented by selecting a single index.
In a further form of the invention, a method is set forth for encrypting and decrypting a message, including the following steps: selecting a plurality of integers and a plurality of polynomials, and deriving therefrom a public key that includes a polynomial, and a private key; selecting a message, in the form of a polynomial; selecting a random polynomial; deriving a preliminary encrypted message, in the form of a polynomial, as a function of the selected message, the public key, and the random polynomial; evaluating the preliminary encrypted message to derive a normalizing value; combining the preliminary encrypted message and the normalizing value, to obtain a security-enhanced encrypted message; and decrypting the security-enhanced encrypted message using the private key, to recover the selected message. In an embodiment of this form of the invention, the preliminary encrypted message ep is
e
p
=h*r+m (mod q)
where h is the public key, r is the random polynomial, m is the selected message, and q is one of the selected plurality of integers; and the security-enhanced message ese is
e
se
=h*r+m−m
1 (mod q)
where m1 is the normalizing value. In this embodiment, the normalizing value, m1, is the value, modulo q, of the polynomial of the selected message, m, evaluated at x=1, where x is the polynomial variable. Also in this embodiment, the polynomial of the selected message is a polynomial whose coefficients lie between integers −k and +k, and said random polynomial is a polynomial whose coefficients consist of an equal number of +1's and −1's and the rest 0's.
Further features and advantages of the invention will become more readily apparent from the following detailed description when taken in conjunction with the accompanying drawings.
The subsystem 155 in this illustrative embodiment can have a similar configuration to that of subsystem 105. The processor 160 has associated input/output circuitry 164, memories 168, clock and timing circuitry 173, and a display 176. Inputs include a touchscreen/keyboard 155. Communication of subsystem 155 with the outside world is via transceiver 162 which, again, may comprise a modem or any suitable device for communicating signals.
The block 240 represents the routine that can be used by the message sender (that is, in this example, the user of processor system 155) to encode a plaintext message using the public key of the intended message recipient. This routine, in accordance with an embodiment of the invention, is described in conjunction with the flow diagram of
The block 260 of
The invention has been described with reference to particular preferred embodiments, but variations within the spirit and scope of the invention will occur to those skilled in the art. For example, it will be understood that alternative techniques can be employed for determining the security-enhanced encrypted message, consistent with the principles hereof.
This application claims priority from U.S. Provisional Patent Application No. 61/574,972, filed Aug. 12, 2011, and said Provisional Patent Application is incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
61574972 | Aug 2011 | US |