The present invention relates to pseudo random number generators and the generation of a pseudo random bit sequence, and in particular to pseudo random number generators and the generation of pseudo random bit sequences based on a plurality of feedback shift registers.
Embodiments of the present invention are described in the following with respect to the figures. Among these figures,
In particular, the feedback shift registers 10 are clocked to output a pseudo random symbol and update an internal state per clock cycle. For example, the feedback shift registers 10 are commonly clocked by the same clock. Combiner 12 may be configured to combine, per clock cycle, a symbol of each of the feedback shift registers 10 to obtain, as an output, a resulting symbol at output 14. In case of bits as symbols, combiner 12 may be configured to bit wise combine bits entering combiner 12 to obtain a single bit. In this case, the bit-rate at which symbols are entering combiner 12 would be N times the bit-rate of the output sequence output at output 14 with N being the number of feedback shift registers 10. However, alternatively, combiner 12 may be designed to operate in another way so that the ratio between the input bit-rate and the output bit-rate differs from 1/N.
Internally, each feedback shift register 10 may comprise a plurality of memory cells connected in series. The memory cells may be configured to store binary values, i.e., 0 or 1. Alternatively, each memory cell may be configured to store a value or symbol of an alphabet R. In order to ease the description below, it is assumed that the memory cells are of binary nature.
The state of the memory cells of a certain feedback shift register 10 at a certain time instance represents the internal state of this feedback shift register 10. The state of all memory cells of all feedback shift registers 10 determines or represents the internal state of the pseudo random number generator of
As maybe seen from
As will become more clear with respect to
During a normal or free-running operation mode, the feedback shift registers 10 operates in an un-influenced and self-contained manner. That is, no external information influences the internal state of the feedback shift registers 10. However, at some initialization phase, the feedback shift registers 10 are seeded. The internal state of the feedback shift registers 10 at the beginning of the free-running mode, i.e., time instance t=0, is called a seed of the feedback shift registers 10. Accordingly, the internal state of all feedback shift registers 10 at time instance t=0 is the seed of the pseudo random number generator of
As becomes clear from the above, the seed of the pseudo random number generator (PRNG) is a relatively short bit sequence which may be “truly” random. The PRNG, then, generates a long pseudo random sequence out of the seed which may be truly random. That is, the relatively short seed is extended to a relatively long pseudo random sequence. The pseudo random sequence should comply with statistical tests proving that, for example, the number of 0's and 1's within the bit sequence output at output 14 is equal to each other, i.e., the 0's and 1's are equal probable, or that the probability distribution of the 0's and 1's has no bias.
Depending on the next-state-function logic of the feedback shift registers 10, the registers 10 may be linear feedback shift registers (LFSR) or no-linear feedback shift registers (NLFSR). Further, the bit sequences output by shift registers 10 are periodic bit sequences having a certain period length. The operation performed by combiner 12 on the bit sequences output by the plurality of feedback shift registers 10 may be designed such that the period length of the pseudo random bit sequence output at output 14 has a period length greater than or even by far greater than the maximum period length among the feedback shift registers 10. As already noted above, this operation may be a non-linear Boolean combinational function F.
As will be described in more detail below, the feedback shift registers 10 of
A feedback shift register having n memory cells such as flip-flops is called a n-stage feedback shift register or feedback shift register of length n. F2n shall denote the set of all binary n-vectors. That is, F2n shall denote the set of all row vectors having n binary coordinates, in following written as (a1, a2, a3, . . . , an)n with ai ε{1 . . . n}. Further, a feedback shift register is non-singular if each possible state of the feedback shift registers has an unique predecessor state. A non-singular feedback shift register could, therefore, also be reversely driven. It may be proved that non-singular feedback shift registers are exactly those feedback shift registers the feedback function F(x0,x1, . . . , xn) of which has the form
F(x0,x1, . . . xn)=x0+G(x1, . . . , xn)
i.e., the variable x0 is present merely once and is present merely as a linear component. As a precautionary measure only, it is noted that x0 to xn shall denote the content of the sequence of memory cells of the respective feedback shift register with the index denoting the memory cells in the order decreasing in shift direction of the shift register. The function G may be linear or non-linear. The notation used in order to define the non-singular shift registers by the above equation is based on the presumption that the feedback result F is fed back to memory cell n so that the new internal state is (x1, . . . , xn, F(x0, x1, . . . , xn)) obtained from the current state (x0, x1, . . . , xn).
Due to the properties of non-singular feedback shift registers, these feedback shift registers induce a class division within set F2n with n denoting the length of the feedback shift register. That is, non-singular feedback shift registers of length n divide-up the set F2n into disjoint or element-distinct classes. One way to gain this class division is to use the following procedure:
First, the feedback shift register is loaded with any binary vector of length n. This row vector shall be the first element of a class. Then, the shift register is clocked until the feedback shift register assumes the initial state or first element within the class again, i.e., until it holds the first row vector again. The set of the first element and all row vectors occurring therebetween form a class or a cycle of the feedback shift register. If this class is, however, a proper subset of F2n the procedure proceeds with loading a different row vector of F2n which is not element of the first class, into the feedback shift register in order to initialise the feedback shift register with this different vector. Again, all possible state vectors resulting from this initialisation, form the second class or second cycle. The procedure is performed further until the unity of classes thus obtained equals F2n. By this measure, all vectors of F2n are found. Further, each vector falls into exactly one class. And again, all classes taken together comprise all F2n vectors.
An example of a non-singular feedback shift register is shown in
The feedback shift register shown in
cycle 1: {(0,0,0)}
cycle 2: {(1,1,1)}
cycle 3: {(0,1,0)} {(1,0,1)}
cycle 4: {(0,0,1)} {(0,1,1)} {(1,1,0)} {(1,0,0)}
That is, the feedback shift register of
Similarly, another example for a non-singular feedback shift register as shown in
The feedback function of
cycle 1: {(0,0,0,0)}
cycle 2: {(1,1,1,1), (1,1,1,0), (1,1,0,1), (1,0,1,0), (0,1,0,1), (1,0,1,1), (0,1,1,1)}
cycle 3: {(0,0,1,1), (0,1,1,0), (1,1,0,0), (1,0,0,0,), (0,0,0,1), (0,0,1,0), (0,1,0,0), (1,0,0,1)}
After having described the properties of non-singular feedback shift registers, in the following, different types of these non-singular feedback shift registers are presented which have special properties which make them advantageous when using them for generating pseudo random bit sequences in combination or, for one of these types, even individually. In particular, the non-singular feedback shift registers of the types described below have a cycle of relatively long length of at least 2N−2. Beside this long cycle, these non-singular feedback shift registers have one or two cycles of length one or two with these short cycles comprising relatively “simple” state vectors selected from the group consisting of the all-one-vector (1,1,1,1), the all-zero-vector (0,0, . . . 0) and two vectors of alternating zeros and ones, namely (1,0,1, . . . ) and (0,1,0, . . . ).
In particular, a feedback shift register of length N shall be of type A if it is a non-singular shift register that has two cycles, namely a cycle of length 2N−1 comprising all vectors out of F2N less the all-zeros-vector (0,0,0 . . . ) and a cycle comprising merely the all-zeros-vector.
A feedback shift register of length N shall be of type B if it is a non-singular shift register having two cycles among which one cycle has length 2N−1 comprising all vectors out of F2N less the all-one-vector (1,1,1, . . . ), and among which the other cycle merely comprises the all-one-vector.
A feedback shift register of length of N shall be of type C if it is a non-singular feedback shift register, comprising three cycles, namely one cycle of length 2N−2 comprising all vectors out of F2N less the all-one-vector (1,1,1, . . . ) and the (all-)zero-vector, one cycle merely comprising the zero vector and another cycle merely comprising the all-one-vector.
Lastly, a feedback shift register of length N shall be of type D if it is a non-singular feedback shift register that has exactly two cycles among which one cycle has length two and comprises vectors (1,0,1, . . . ) and (0,1,0, . . . ) and among which another cycle has length 2N−2 comprising all other vectors out of F2N.
Individually, the feedback shift registers according to the above-mentioned types A to D are susceptible to different fault attacks or forcing attacks when using these feedback shift registers individually in an cryptographic application. In particular, some of these types are susceptible to fault attacks or forcing attacks which are easier to be performed than others. In so far, the above types are differently secure in cryptographic sense. Independently therefrom, the above types are less secure when used individually or in combination with feedback shift registers of the same type.
Imagine, for example, the PRNG of
For example, by use of fault attacks an attacker manipulates one or more data bits stored within memory cells. For example, these bits can be selectively set to one or deleted, i.e., set to zero, or they can be forced to switch uncontrolled or randomly, i.e., so-called random bit flip. The selection among the just-mentioned possibilities by the attacker depends on the capabilities and intention of the attacker. In particular, it is relatively easy to cause neighbouring flip-flops to be deleted at the same time. Further, it is relatively easy to set many neighbouring flip-flops to one.
The just mentioned-attacks are successful as soon as the pseudo random number bit sequence output at output 14 loses its randomness. This is the case if the feedback shift registers 10 do not operate in their long cycles. If, for example, all feedback shift registers 10 are caught in their short cycles, the period length of the bit sequence output at output 14 is also relatively short. However, if the pseudo random number generator of
Another possibility would be to use singular feedback shift registers, i.e., shift registers which are not able to operate in reverse sense, and in particular singular feedback shift registers which merely have one single large cycle. These feedback shift registers, however, show a disadvantage in that the implementation necessitates the outputs of all memory cells of the shift register to participate in the feedback function. This, in turn, causes a large implementation, large chip area and a large power consumption due to dynamic hazards.
Thus, all feedback shift registers 10 should operate in their largest cycles possible in order to achieve the strongest pseudo random bit sequence result. However, imagine that all feedback shift registers 10 are of type A in
Similarly, imagine that the feedback shift registers 10 of
The situation is even worse in case of type C. If all feedback shift registers 10 were of type C, the attacker would be successful in circumventing the pseudo randomness provided by pseudo random number generator of
In case of all feedback shift registers 10 being of type D, an attacker would successfully shorten the period length of the output sequence of the PRNG of
According to a further embodiment of the present invention, at least one of the feedback shift registers 10 is of one of types A to D while at least one other of the feedback shift registers 10 is of another of types A to D such that the short cycles of length 1 or 2 of the first type encompasses a set of vectors which is disjoint to the set of state vectors encompassed by the second type. To illustrate this, reference is made to the below table.
The table shows the state vectors occurring in any of the short cycles, i.e., the cycles being of length 1 or 2 of any of types A to D, i.e., 0,0,0 . . . , 1,1,1, . . . , 0,1,0, . . . and 1,0,1, . . . . These vectors are listed in the first column. The next four columns show for each of types A to D which of these vectors is comprised by the one or two short cycles of the respective type. For example, the table shows that the short cycle of type A merely comprises the all-zeros vector whereas the short cycle of type B merely comprises the all-one vector and so on.
First, according to the just-mentioned embodiment, the feedback shift registers 10 comprise at least a pair of feedback shift registers of different type among types A to D wherein the crosses for these types in the table do not commonly lie within one row. That is, the feedback shift registers may comprise a pair of feedback shift registers with the feedback shift registers of these pair being of types (A, B), (A,D), (B,D) or (C,D) according to different embodiments. According to even another embodiment, the feedback shift registers 10 comprises at least three feedback shift registers of the types of A to D, namely of type A, type B and type D. Of course, it is possible that all of the feedback shift registers 10 are of any of the types of the just-mentioned pairs, or just-mentioned triplets such as, in case of m FSRs, m1 being of type A and m2=m−m1 being of type B in case of pair (A,B).
Using the just-mentioned feedback shift registers 10 of different types within the PRNG of
Imagine, for example, that a feedback shift register of type A is used along with a feedback shift register of type B within the PRNG of
For the sake of completeness only, in the following, examples for NLFSRs of type A, type B and type D are given. An NLFSR of length N=5 is, for example, the feedback shift register having the feedback function F(x0,x1,x2,x3,x4)=x0+x2+x4+x1·x4. An example for an NLFSR of type B is, for example, the NLFSR of length N=6 having the feedback function of F(x0,x1,x2,x3,x4,x5)=1+x0+x2·x5. An example for an NLFSR of type D is the NLFSR of length N=5 having the feedback function of F(x0,x1,x2,x3,x4)=1+x0+x1+x2+x4+x1·x3. Another example for a feedback shift register of type D is an affine feedback shift register, i.e. a feedback shift register having a feedback function without multiplications or ANDs but only with additions or XORs, having the length N=6 and the feedback function F(x0,x1,x2,x3,x4,x5)=1+x0+x1+x4+x5.
Referring to
In particular, the PRNG of
The seed input of each of the influencing gates 44a and 44b are commonly connected to a seed source 46 via a switch 48. The seed source is, for example, a TRNG providing a true random number bit sequence. In case of the switch being closed, the true random bit sequence output by seed source 46 is applied to the seed input of influencing gates 44a and 44b so that during this situation of switch 48 being closed, the feedback shift registers 10a and 10b are seeded with the same seed.
The feedback shift registers 10a and 10b of the pseudo random number generator of
Finally, it is noted that the embodiments of
Further, it is noted that the PRNGs presented above with respect to
Finally, it is noted that the above embodiments where at least a pair of the feedback shift registers are of different types are not restricted to cases where the types of this pair of feedback shift registers is selected from the types A to D. Rather, in accordance within another embodiment, the feedback shift registers 10 of
Depending on an actual implementation, the above embodiments can be implemented in hardware or in software. Therefore, they also relate to a computer program, which can be stored on a computer-readable medium such as a CD, a disk or any other data carrier. These embodiments define, therefore, also a computer program having a program code which, when executed on a computer, performs the above methods described in connection with the above figures.
While this invention has been described in terms of several preferred embodiments, there are alterations, permutations, and equivalents which fall within the scope of this invention. It should also be noted that there are many alternative ways of implementing the methods and compositions of the present invention. It is therefore intended that the following appended claims be interpreted as including all such alterations, permutations, and equivalents as fall within the true spirit and scope of the present invention.