System and method for constructing a cryptographic pseudo random bit generator5909494Abstract A pseudo-random bit generator using at least one N-round Feistel construction that uses random functions. A block of data is permuted and divided into a stream word and a modification word. The stream word is used to build the pseudo-random bitstream. The modification word is used to modify a selected element of a random function used in a Feistel construction. When a single Feistel construction is used, its random functions are dynamically changed by the modification words as they are generated. When a plurality of Feistel constructions are used, the random functions of a selected inactive construction are modified by modification words generated by an active construction. When all of the elements of all of the functions of the inactive construction have been modified, the active and inactive functions are exchanged. Claims What is claimed is: Description FIELD OF THE INVENTION
______________________________________
INPUT 000 001 010 011 100 101 110 111
OUTPUT 010 111 000 110 100 001 011 101
______________________________________
A truly random function is said to be unconditionally secure because there is no correlation between any one subset of mappings and any other, i.e., the most compact representation of the function is simply a list of all of its mappings of inputs to outputs. Truly random functions can be cumbersome to represent in computer-readable memory for practical block ciphers, and hence are often replaced with pseudo-random functions (PRF) that map inputs to outputs in an apparently random fashion in accordance with a prescribed method. For the most part, only the method (and not the complete listing) of a PRF need be stored in computer-readable memory, resulting in a more efficient implementation of the cipher. The drawback is that a PRF is not unconditionally secure. A known block cipher is the Feistel construction. H. Feistel, "Cryptography and Computer Privacy." Scientific American, Vol. 228, 1973. The Feistel primitive is shown symbolically as follows:
______________________________________
X = A.vertline.B /*cleartext*/
A = A + f.sub.e
B = B + A
X = B.vertline.A /*ciphertext*/
______________________________________
X=A.vertline.B indicates that block of data X has two concatenated halves A and B (".vertline." indicates concatenation). Entry f.sub.e of PRF f is added in this embodiment bitwise modulo-2 (represented by the "+" operator) to A. The result replaces A, which is then added to B modulo-2, resulting in a new value for B. The positions of A and B are switched and concatenated to form a permuted X=B.vertline.A. The primitive can repeated again any number of times using a different PRF each time. Each instance that the primitive is invoked is called a "round." An symbolic representation of a four round Feistel construction is as follows:
______________________________________
X = L.vertline.R /*cleartext*/
R = R + f.sub.1 (L)
L = L + f.sub.2 (R)
R = R + f.sub.3 (L)
L = L + f.sub.4 (R)
X = L.vertline.R /*ciphertext*/
______________________________________
Here, f.sub.1, f.sub.2, f.sub.3 and f.sub.4 are secret pseudo random functions. For a four round, 2n-bit Feistel construction using four n-bit functions a 2n-bit block is divided into a right half R and a left half L in step 1. In step 2, the n-bit left half L of a 2n-bit block X is permuted with a pseudo random function f.sub.1 and added to the n-bit right half R of the block. The result becomes the new right half R. In step 3, the permuted right half R is permuted with another PRF f.sub.2 and added to left half L. The result becomes the new left half L. In step 4, the L is permuted with another PRF f.sub.3 and added to R, the result of which becomes the new R. In step 5, R is permuted with PRF f.sub.4 and added to L, the result of which becomes the new L. In step 6, an enciphered block X=L.vertline.R is obtained. In order to decipher a block enciphered with the Feistel primitive, the order of the steps of the primitive are reversed and carried out on the enciphered block. This is shown for the Feistel primitive as follows:
______________________________________
X = B.vertline.A /*ciphertext*/
B = B + A
A = A + PRF
X = A.vertline.B /*cleartext*/
______________________________________
In order to decipher blocks enciphered with multiple rounds, the rounds should be reversed in reverse order, the most recently used round first. In other words, if the primitive is applied in the sequence r1, r2, . . . , r5, the reverse primitive should be applied in the order r5, r4, . . . , r1 to decipher the block. This is shown as follows:
______________________________________
X = L.vertline.R /*ciphertext*/
L = L + f.sub.4 (R)
R = R + f.sub.3 (L)
L = L + f.sub.2 (L)
R = R + f.sub.1 (L)
X = L.vertline.R /*cleartext*/
______________________________________
Luby and Rackoff showed that if the PRF in an at least four-round Feistel construction are themselves secure, then the resulting permutation is secure. M. Luby and C. Rackoff, "How to Construct Pseudo random Permutations from Pseudo random Functions." SIAM J., Comput., 17 (1988), 373-386. However, Luby and Rackoff provided no information on how to determine if an arbitrary PRF is in fact secure. Thus, a system and method that uses functions known to be secure in an at least four-round Feistel construction will produce permutations that are known to be secure. The Feistel construction cipher is advantageous because its security (using at least 3 rounds, more preferably at least 4 rounds, and most preferably at least 6 rounds) is closely related to the difficulty of solving the Numerical Matching with Target Sums (NMTS) problem, an NP-Complete problem for which there are no known mathematical techniques to analytically solve. In other words, the only known way to compromise a Feistel construction cipher of three or more rounds is by brute force (e.g., trying all possibilities.) The security of a stream cipher is partly determined by the period length of the secure bitstream. The bitstream period length is the number of blocks that can be generated before the sequence begins to repeat itself. When the sequence repeats itself, it can be cryptanalytically attacked using known methods. For a block size of 2n there are 2.sup.2 n different blocks, and thus a period length of 2.sup.2 n. The larger the block size, the longer the bitstream period length, and the more secure the PRBG stream cipher. Although increasing the block length increases the security of the bitstream, increasing block length also increases processing time and requires more computer-readable memory, reducing the efficiency of the stream cipher. A better PRBG stream cipher would possess the advantage of having known security properties such as those disclosed by Luby and Rackoff for the Feistel construction, and be able to be efficiently and practically implemented on computers within the present state of the art. SUMMARY OF THE INVENTION The present invention is a PRBG that uses at least a part of the output of a Feistel construction using random functions to modify the at least one random function of the same or another Feistel construction. The remainder of the output is used as part of a pseudo random bitstream. When a plurality of Feistel constructions are employed, one construction is designated as the active construction, and the rest as inactive. One of the inactive constructions is selected and its at least one random function is modified with output from the active construction. When every entry in the inactive construction has been modified, then the selected inactive Feistel construction becomes active, and the active construction becomes inactive. When a single Feistel construction is used, the output of the construction is used to modify the construction's own random function in an ongoing fashion. The present invention uses secure random functions in the initial Feistel construction. In accordance with the information disclosed by Luby and Rackoff, the permutations produced by each construction are also secure. This security is closely related to the difficulty of solving the NMTS problem, an NP Complete problem that cannot be solved analytically using known mathematical techniques. The speed of the present invention implemented in software on known computers is comparable to that of known PRBGs. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 shows an embodiment of the present invention using a single Feistel construction. FIG. 2 shows an embodiment of the present invention using three Feistel constructions. DETAILED DESCRIPTION In accordance with the present invention, a block of data of 2n bits permuted by a Feistel construction is halved into a "modification word" used to modify the at least one random function of a Feistel construction, and a "stream word" that is used to build a pseudo random bitstream. In one embodiment of the present invention, input block is a counter value. In another embodiment, each half of the input block is a counter value. In one embodiment of the present invention, only a single Feistel construction is used, with the modification word used to modify the random function of the Feistel construction itself. Thus, the random functions of the single Feistel construction are modified in an ongoing fashion dynamically as the Feistel construction permutes input blocks. This is shown in FIG. 1. Feistel construction 11 generates a modification word 13 and a stream word 14. Stream word 14 is used to build pseudo random bitstream 15. Modification word 13 is used to modify a random function in the set of random functions 12 of the Feistel construction. This process is iterated as long as there is a need for further stream words 14 for bitstream 15. In another embodiment of the present invention, a plurality of Feistel constructions are established, one being active and the rest inactive. A block of input data of length 2n bits is permuted by the active Feistel construction. The permuted block is then halved into the stream word and the modification word, each of length n bits. The stream word is used to build the pseudo random bitstream, and the modification word is used to modify a random function in a selected inactive Feistel construction. This modification is carried out in one embodiment of the present invention by adding the modification word bitwise modulo-2 to an entry in the random function of the Feistel construction. This is repeated until all of the entries in all of the random functions of the selected inactive construction have been modified. When all of the entries in the random functions of the selected inactive construction have been modified, the inactive construction becomes the active construction, and the active construction becomes an inactive construction. Each random function in the inactive Feistel construction requires 2.sup.n n-bit words for the random function to be completely modified. Thus, an inactive N-round Feistel construction requires N2.sup.n n-bit words generated from the active Feistel construction in order to be completely modified. Another inactive Feistel construction is selected for modification in accordance with various approaches. In one embodiment, the next Feistel construction is selected in a round-robin fashion from the inactive constructions. In another embodiment, the next construction is selected randomly from the inactive constructions. A pseudo-code embodiment of the present invention with a plurality of N-round Feistel constructions (called Hare) is as follows:
______________________________________
Hare(X) = {
k = 1
/* k is an index for the kth entry of
random function f.sub.inactive */
while k is less than or equal to N2.sup.n {
/* N is the
number of
rounds in
the Feistel
construation */
n=1 /* n is an index for the nth
funation in an N-round Feistel
construation */
while n is less than or equal to N {
X = L.vertline.R
/* L and R are counters in this
embodiment */
R = R + f.sub.n,active (L)
X = R.vertline.L
}
f.sub.n,k,inactive = f.sub.n,k,inactive + R
/* modify the kth entry of
the nth random function of
the selected inactive
construction by adding R
bitwise modulo-2 */
k = k + 1
bitstream = L
/* use L to build the
bitstream */
}
swap active, inactive
/* after all of the
entries of the inactive
Feistel construction are
modified by the
modification words
generated by the active
construction, swap the
active with the inactive
construction. The
bitstream is continued by
repeating this method for
the new active Feistel
construction, and so on. */
______________________________________
An embodiment of the present invention that uses three Feistel constructions is shown in FIG. 2. The active Feistel construction produces a modification word 21 and a stream word 22. Stream word 22 is used to build pseudo random bitstream 23. Modification word 21 is used to modify a random function in the set of random functions 24 in the selected inactive Feistel construction. When all of the entries of all of the random functions 24 of the selected inactive Feistel construction have been modified by modification words 21, the selected inactive Feistel construction is swapped with the active construction, i.e., the selected inactive construction becomes the active construction, and the formerly active construction becomes inactive. The next construction selected for modification is chosen from the inactive constructions in a round robin, random, or other suitable selection strategy. The present invention provides an economical, efficient and practical method for generating a pseudo random bitstream with known security properties.
|
Same subclass Same class Consider this |
||||||||||
