Abstract

The proposed by Meier and Staffelbach Self-Shrinking Generator (SSG) which has efficient hardware implementation only with a single Linear Feedback Shift Register is suitable for low-cost and fast stream cipher applications. In this paper we generalize the idea of the SSG for arbitrary Galois Field . The proposed variant of the SSG is called the -ary Generalized Self-Shrinking Generator (pGSSG). We suggest a method for transformation of a non-binary self-shrunken pGSSG sequence into balanced binary sequence. We prove that the keystreams of the pGSSG have large period and good statistical properties. The analysis of the experimental results shows that the pGSSG sequences have good randomness properties. We examine the complexity of exhaustive search and entropy attacks of the pGSSG. We show that the pGSSG is more secure than SSG and Modified SSG against these attacks. We prove that the complexity of the used pGSSG attacks increases with increasing the prime . Previously mentioned properties give the reason to say that the pGSSG satisfy the basic security requirements for a stream chipper and can be useful as a part of modern stream ciphers.

1. Introduction

The binary Pseudorandom Sequences (PRSs) with maximum period and good statistical and correlation properties have established themselves as foundation for generation of many signals used in modern communication and information systems. Among the most important applications [1, 2] of these signals are the Code Division Multiple Access (CDMA) systems, wireless networks, and communication systems where the multiple access interference is minimized. Generators of pseudorandom sequences for security at authorization process and stream cipher are other key areas of the PRSs implementation in different kinds of local and global networks.

A great number of methods for generation of pseudorandom sequences are used in practice [313]. They are divided as linear and nonlinear [5]. Most linear methods such as Linear Congruent Generator, Multiplicative Linear Congruent Generator and Multiply Recursive Generator [5] cannot be used for ensuring the security and for information encryption in the communication network. Digital multi-step and formal series [5] can solve that problem but they are too slow because many steps are done recursive. In order to ensure practical stability of a chosen crypto-algorithm it is necessary to break the linearity in the generated linear sequence. It could be done by applying a nonlinear function over a part of the generated bits for additional allocation [5, 12]. The binary sequences with maximum period (-sequences) are mainly used in many communication systems because of their properties such as uniformly allocation of the binary digits and the runs over its period and the ideal two-level autocorrelation. The main methods for generation of the -sequences are Linear Feedback Shift Register (LFSR) which function is described by algebra in finite Galois field and Feedback with Carry Shift Register (FCSR) where the algebra in finite 2-adic field is used.

Self-shrinking generator [11] is a keystream generator used as a stream cipher. It is based on the shrinking principle [4, 14] and has remarkably low hardware requirements. So far, it has shown considerable resistance against cryptanalysis. The binary sequences generated by shrinking generator have very good encryption properties [4, 5, 9, 12, 15, 16].

The self-shrinking generator (SSG) was proposed by Meier and Staffelbach at Euro-crypt'94 in [11]. It is a variant of the original Shrinking Generator given by Coppersmith et al. in [4]. This amazingly simple cipher, containing a single LFSR, has up to now surprisingly well-resisted all the known cryptographic attack techniques. In [17] Mihaljevic presented a faster attack with minimal time complexity that needs a longer part of keystream sequence. It is shown that cryptanalysis is successful with high probability after steps, , where is -bit section of the keystream and is the key length. Since the procedure is done for , the running time can vary from in the very best case to under more unfavorable circumstances. Later Zenner et al. improve the cryptanalysis of self-shrinking generator. The attack [18] is based on a backtracking algorithm and will reconstruct the key from a short sequence of known keystream bits. The algorithm takes at most steps, where is the key length.

An attack on SSG requiring very small keystream data is the binary decision diagram (BDD) cryptanalysis proposed by Krause in [19] with time complexity and equivalent memory complexity . The BBD-attack was improved in [20] with the same time complexity and only memory complexity.

The best tradeoff between time, memory and data complexity today is the new guess-and-determine cryptanalysis [21]. The time complexity of this attack is and memory complexity from keystream bits for , and time complexity and memory complexity from keystream bits for .

In this paper a -ary generalized self-shrinking generator which produces nonbinary sequences is proposed. A method for transformation of nonbinary self-shrunken sequence into balance binary sequence is given.

The paper is organized as follows. First, the basic principles of the -ary LFSR are described. In Section 3 the function of the Self-Shrinking Generator is given. The working algorithm of the -ary Generalized Self-Shrinking Generator for Galois Field is given in Section 4. Then the properties of the proposed pGSSG are discussed and analyzed. Finally, the security of the pGSSG against the exhaustive search and entropy attacks are analysed.

2. Basics Principles of the -Ary LFSR

The basic principles of wide spread LFSR registers [5, 7, 10, 12] for when is arbitrary prime will be given in this section.

Real systems use pLSFR constructed in two different architectures Fibonachi and Galois. The properties of the finite Galois field [7, 22] are used.

Definition 1. If is a prime then generated -ary pseudorandom sequence (pPRS) consists of numbers and the appearance of every number is independent by the value of the previous and the following digits in the sequence.

2.1. pLFSR with Fibonachi Architecture

Definition 2. -ary LFSR with Fibonachi architecture and length (Figure 1) consists of stages (delay elements) , , and one input and one output.

Every element can remember one -ary number. The register is initialized by -ary sequence .

During each clock cycle the following operations are performed.(1)The content of stage 0 is output and forms part of the output sequence.(2)The content of element is passed to element for each , .(3)A calculation of the linear recurrent dependency is done and its result is stored in the most left element of the register.

The output sequence is described by (1) taking into consideration , the first -ary digits are eliminated from the output sequence.

Every configuration of this architecture is defined by the feedback coefficients , . The generated output sequence is well defined for and the feedback polynomial Every infinite -ary sequence can be represented by its generating function which is an element of the ring of the formal powers with coefficients in .

The generated sequence is periodic only if the generating function could be represented as a quotient of two polynomials The generated sequence is strictly periodic if the following condition is in effect: The reverse dependence is in effect as well. If is a strictly periodic sequence and is its generating function then is a connection polynomial of the pLFSR which generates sequence and a polynomial defines the initial state of the register by using

2.2. pLFSR with Galois Architecture

Definition 3. -ary LFSR with Galois architecture and length (Figure 2) consists of delay elements , , and one input and one output. The multipliers of the feedback are given as . Every element can remember one -ary number. The register is initialized by -ary sequence .

During each clock cycle the following operations are performed.(1)The content of stage 0 is output and forms part of the output sequence.(2)The content of element is passed to element for each , , and the following recurrent dependencies are in effect (3)The output of the element 0 is implemented in every multiplier of feedbacks and a sum with the previous element by modulo is done.

The Galois architecture of pLFSR is described by the feedback polynomial which is defined by (2) and the polynomial which is defined by the initial state of the register .

The generated output sequence is a sequence of polynomial coefficients . The reverse statement for defining and initial state by using (8) is also in effect.

2.3. Properties of the pLFSR Sequences

One of the most important properties of the pLFSR is the maximal period [22] and it depends on the length of the registers pPRS sequences which have a maximal period (mp-sequences) are used in cryptography and in communication systems for designing complex signals due to their good correlation properties. In order to generate mp-sequences it is necessary that the feedback polynomial of the pLFSR is primitive in extended Galois field .

The uniform allocation of the -ary digits and their runs (series) is another important property. The following statements are true.(i)The number of appearances of all nonzero elements in maximal period is for and the number of zero elements is . (ii)Every nonzero -ary runs (series) with length , appears in a period times and times if it is zero.

Figure 3 shows the 3LFSR register with Galois architecture and length . As one can see the output numbers 1 and 2 appear times in one period and the number of zeros is . All nonzero runs with length 2 appear only ones and zero run is not used.

3. Nonbinary Self-Shrinking Generator

3.1. Basics of Shrinking Generators

The shrinking generator [4, 9] consists of two Linear Feedback Shift Registers (LFSR) and generating the -sequences (denoted as sequence) and (denoted as sequence), respectively. The keystream sequence is constructed from these two sequences according to the following selection rule: for every clock , consider the selection bit . If , the output is . Otherwise, discard both and . This way, a nonlinear keystream is generated. Even a cryptanalyst who knows part of the keystream sequence cannot tell easily which corresponds to which , since the length of the gaps (i.e., the number of that has been discarded) is unknown. In [4, 14] the shrinking generator is shown to have good algebraic and statistical properties. It is shown that the number of attacks that could reconstruct the initial state of and increases and requires exponential running time in the length of register (LFSR ).

The self-shrinking generator is a modified version of the shrinking generator and was first presented by Meier and Staffelbach in [11].

The self-shrinking generator requires only one LFSR , whose length will be denoted by . The LFSR generates an -sequence . The selection rule is the same as for shrinking generator, using the even bits as -bits and the odd bits as -bits in the above sense. Thus, the self-shrinking rule requires a couple as input and outputs if .

The close relationship between shrinking and self-shrinking generator is shown in Figure 4.

In [12] an algorithm is given that transforms an -bit self-shrinking generator into a -bit shrinking generator. It is also shown that a shrinking generator with register lengths and has an equivalent self-shrinking generator of length . Despite this similarity, the self-shrinking generator has shown even more resistance to cryptanalysis than the shrinking generator [18].

3.2. -ary Generalized Self-Shrinking Generator

The proposed -ary generalized Self-Shrinking Generator (pGSSG), given in Figure 4, consists of a pLFSR generator , whose length will be denoted by . It generates sequence with -ary digits (i.e., , ) and . The multipliers of the feedbacks are given by coefficients , of the primitive polynomial in . Every element can remember one -ary number. The register is initialized by -ary sequence .

The pGSSG selects a portion of the output -ary LFSR sequence by controlling the -ary LFSR itself using the following algorithm.

Definition 4. The algorithm of the -ary Generalized Self-Shrinking Generator (Figure 5) consists of the following steps.(1)The -ary LFSR is clocked with clock sequence with period .(2)The output pLFSR sequence is split into -tuples , .(3)If the whole -tuple is discarded from the GSSG output, that is, the output is shrunken. (4)When , the corresponding digit in the -tuple forms the output of the GSSG. For example, if , then is output and the other digits are discard. If , then is output and the other digits are discard and so on. If , then is output and the other digits are discard.(5)The shrunken -ary GSSG output sequence is transformed into binary sequence in which every -ary number is presented with binary digits, where is the smallest integer which is greater or equal to . Every output number from 1 to of -ary GSSG sequence is depicted with -ary expansion of the number: For example the transformation of every -ary digit for is done according to the Table 1.(6)Every -ary zero in its appearance () of the generated -ary sequence can be represented binary by number , and initial condition .

3.3. Examples
3.3.1. 3GSSG

Let us chose Extended Galois field and the primitive polynomial that generates is . Then the corresponding pLFSR (i.e., 3LFSR) will be as shown in Figure 6.

The feedback polynomial is and all algebraic function is done modulo (i.e., ).

Let the initial state be .

For all possible 3-tuples generated by the 3LFSR the 3GSSG output for a period will be and the way of its derivation according to the given algorithm is shown in Table 2.

The period of sequence is . The output is chosen from the value of the first symbol of 3-tuple, which defines which symbol forms the 3GSSG output. It is pointed out by the bold digits. Then the 3-ary output sequence is transformed into binary by the rules 5 and 6 in the pGSSG algorithm for given in Table 1.

The binary output is given in the brackets in Table 2.

3.3.2. 5GSSG

Let us chose Extended Galois field and primitive polynomial is . The corresponding pLFSR (i.e., 5LFSR) is shown in Figure 7.

The feedback polynomial is and all algebraic function is done modulo 5 (i.e., ).

Let the initial state be .

For a part of all possible 5-tuples generated by the 5LFSR the output of the 5SSG generator for a part of period will be . The way of its derivation according to the given algorithm is shown in Table 3.

The period is . The output is chosen from the value of the first symbol of 5-tuple, which defines which position symbol from this point to be selected to exit. Finally the 5-ary output sequence is transformed into binary by the rules 5 and 6 in the pGSSG algorithm for given in Table 1. The binary output is given in the brackets in Table 3.

4. Properties of the pGSSG Output Sequence

The research of the -ary GSSG has been modeled with Visual C++. To analyze the properties of the -ary GSSG output sequence have been made more than 1000 tests with prime up to 257 and various primitive feedback polynomials and initial states.

In this section first the pGSSG period is established. Then is proven that the output pGSSG sequence is balanced, that is, the number of 1s and 0s are equal in a period of pGSSG sequence. In Section 4.3 the minimum length of the used pLFSR registers to guarantee a key length of 512 and 1024 bits, which is useful for cryptographic applications nowadays, is calculated. Finally the good randomness properties of the pGSSG output sequences are proven by the results of the statistical NIST test suite.

4.1. Period of pGSSG

Hence a -ary LFSR sequence is with period then the pGSSG output sequence also is periodic. In fact after bits of the original sequence, the sequence of -tuples has been processed and the next -tuple will be the same as first . As is well known, the -tuples occurs balanced in one -sequence period. Therefore of all -tuples will begin with bit of all will begin with 1 and so on of all will begin with . Thus the   -tuples will be discarding because they begin with 0 bit. Remaining   -tuples will produce an one bit in the output sequence because this -tuples begin with nonzero bits. Consequently the period of the -ary GSSG output sequence will be-ary digits.

When pGSSG output sequence is transformed into balanced binary sequence the period will be bits.

4.2. Number of Elements in -Ary GSSG Sequence

Since the -sequence, produced by the -ary LFSR is balanced and the pGSSG output sequence also is balanced the number of the each elements is equal to After binary transformation the balanced property is in fact also, thus the number of zeros and ones are equal to The experimental results for different pGSSG and their parameters are given in Table 4.

4.3. Key for Encryption

The encryption key for the GSSG is an initial state of the pLFSR register. Thus the encryption key will be long -ary digits.

One -ary digit may be presented by bits, where denote the smallest integer greater and equal to . Consequently length of the encryption key is As one can see the greater is the longer the key is. Table 5 shows the minimum length of the used pLFSR register to guarantee a key length of 512 and 1024 bits, which are useful for cryptographic applications nowadays.

4.4. Statistical Properties

To test statistical properties of the keystreams generated by the pGSSG with prime up to 257, 1000 sequences of length 106 have been tested by the National Institute of Standards and Technology (NIST) statistical test suite [23]. Table 6 shows the NIST test results for two sets of 100 keystreams each of length 106 for and . To generate these 100 keystreams randomly chosen primitive polynomials and initial states are used.

The results demonstrate that pGSSG keystreams have good randomness properties, that is, they are well balanced, uniform, scalable and uncompressible.

4.5. Implementation

Unfortunately, the hardware implementation of the pGSSG is not as simple as the original SSG, because the algebraic operations are performed in the , . It takes triggers to present one -ary number. Hardware accelerators can perform the computationally intensive operations far quicker. Field-Programmable Gate Arrays (FPGAs) are well-suited for this application due to their reconfigurability and versatility.

The pGSSG is more suitable for software implementation. The cases with and are particularly suitable, because the binary output of the generator produces 4 or 8 bits at a time, respectively.

5. Cryptanalysis

The goal of the stream cipher attack based on a clock controlled generators is to recover the secret key that includes the initial state of the used LFSRs. For better security the key may contain the feedback polynomial of the LFSRs. In this section, the security of the pGSSG against the exhaustive search and entropy attacks are analysed.

The suggested from Maier and Staffelbach two general attacks named exhaustive search attack and entropy attack [11] recover the initial state of the SSG from the knowledge of the short segment of the generated keystream requiring respectively and computational steps.

In these attacks we assume that the secret key consists only of the initial state of the -ary GSSG.

5.1. Exhaustive Search Attack

Let be a known portion of the binary keystream generated by pGSSG. As the prime is also known the attacker can divide it by bits. Each portion of bits presents one -ary number.

Let then be a known -ary portion of the pGSSG. The -ary number for some is generated by the -tuple of the output pLFSR sequence , , where the index is unknown.

From the knowledge of the first -ary number one can conclude that for the first -tuple there is possible cases: For each case in (17) there are possibilities for the unknown -ary numbers. In other hand by definition 4 of the pGSSG algorithm for the -ary number there are two possible cases: first, the one -ary number from 1 to , defined by (10) or second, the -ary zero in its appearance by (11).

Therefore the number of possibilities for the first -ary number is .

For the next known -ary number there are the same possible cases for the second -tuple : In addition to the above cases there are another possibilities for which the output pGSSG sequence is shrunken Hence all possible cases for the -ary number are For each of these possibilities there are another possibilities for the next -tuple and so on.

Therefore, for reconstructing   -tuples, that is,   -ary numbers, are needed possible states for the pLFSR.

Example 1 (). The known bit portion of the sequence is equal to the known -ary portion of the pGSSG because bits. Every bit 0 can present the 3-ary bit 1 or the 3-ary zero. The bit 1 can present the 3-ary bit 2 or the 3-ary zero (see Table 1). From the known first bit there are two possible cases for the first triple Each 3-ary number , that is, the six possible cases are and another six possible cases in which is 3-ary zero are For the next triple there are 12 possibilities of the same kind and 9 possible cases when the output is shrunken Therefore the possible cases are which is listed above.
Then we calculate the possible pLFSR states

Example 2 (). The number of possible cases for the 5-tuples are and states of the used pLFSR are

5.2. Entropy Attack

The entropy of the -tuples will be calculated. As mentioned above for the -tuple there are possibilities, where are in the form (18). In the half of these possibilities -ary number and the probability of each of them is . In the other half and each of them has probability . The other possibilities of the form (19) also have probability .

Therefore, the entropy of the -tuple is Because the entropy per one -ary number is , the entropy search among all different cases would require steps.

For the entropy of 3-tuples is Hence, the complexity of the entropy attack is .

The complexity of exhaustive search and entropy attack of the pGSSG for primes up to 17 is compared to the SSG and recently proposed MSSG [8] in Table 7.

The results show that the pGSSG is more secure than SSG and MSSG against exhaustive search and entropy attack. The complexity of the used pGSSG attack increases with increasing the prime .

6. Conclusions and Future Works

In this paper the generalization of the self-shrinking generator in Galois Field for arbitrary prime is proposed. The architecture of the new -ary Generalized Self-Shrinking Generator is suggested. It is proved that the pGSSG has large period and good statistical properties. The experimental results analysis shows that the sequence generated by pGSSG is well balanced, uniform, scalable, uncompressible and unpredictable.

The complexity of the exhaustive search and entropy attack of the pGSSG is established. It is shown that the pGSSG is more secure than SSG and MSSG against exhaustive search and entropy attack. It is proven that the complexity of the used pGSSG attack increases with increasing the prime .

Above-mentioned properties give the reason to consider the pGSSG as a pseudorandom generator that can be useful as a part of modern stream ciphers.

However, there are some theoretical and practical issues that need to be addressed. From a theoretical point of view, improved cryptanalysis of the pGSSG keystream sequences is necessary to be done and the complexity of other known self-shrinking attacks like attack using long keystream segment, BDD-based attack and guess-and-determine attack, must be investigated.

On the practical side, the hardware FPGA implementation of the pGSSG generator must be designed. It will provide faster execution of the algebraic operations in the for any prime number .

Acknowledgment

The authors would like to thank the referees for their helpful comments.