Security Provisions in Stream Ciphers Through Self Shrinking and Alternating Step Generator

in cryptography stream ciphers used to encrypt plain text data bits one by one. The security of stream ciphers depend upon randomness of key stream, good linear span and low probability of finding the initial states of pseudorandom generators. In this paper we propose a new stream cipher model use Feed back with carry shift registers (FCSRs) as building blocks which are considered as a source of long pseudorandom generator. Proposed model is the combined structure of alternating step generator and self shrinking generators which are commonly used stream ciphers generators. In this research we compare proposed generator against self shrinking generator (SSG), Alternating step generator (ASG) and alternating step self shrinking generator (ASSG) and we concludes that proposed generator architecture is best for encryption because it satisfies all necessary conditions of a good Stream cipher. Keywords-component; Alternating step generators; Feed back with carry shift registers; Self shrinking generators.


INTRODUCTION
Stream cipher is an important method for information encryption."A stream cipher is a symmetric cipher which operates with a time-varying transformation on individual plaintext digits" [1].Stream ciphers typically encrypt data efficiently and have very low memory requirements and therefore cheaper to implement in limited scenarios.Stream cipher techniques are usually best for the cases where the amount of data is either unknown, or continuous such as network streams.
Linear feedback shift registers (LFSRs) are mostly used in many key stream generators due to their simplicity but inherent linearity of LFSRs not sufficient to provide security to stream ciphers.Because of their linearity their initial vector can be determined by using Berlekamp-Massy algorithm.To improve the security a new type of pseudorandom binary sequence generator called FCSR is introduced.They have good statistical properties, having proved period, highly nonlinear in nature and have non degenerating states.[2].They are much similar to LFSRs except that instead of using addition modulo 2 FCSR uses carry propagations that bring non linearity in to their structure which is main characteristic of FCSR.
In this paper, we propose a model which combines two clock controlled keystream generators that are: alternating step generator and self shrinking generator to strengthen the security.Combined structure of both generators can help to avoid pitfalls that cause when these generators are used individually.Proposed generator is more secure because length of generated key stream is much greater than individual generators and complex structure is not easily breakable.Proposed model use FCSRs as a main building block and combine the output with full adder function.
The paper is organized in such a way that: section 2 discusses related work to proposed schemes, section 3 devoted to proposed framework, section 4 discuss proposed technique along with algorithm ,section 5 discuss simulation results and finally concluding remarks are given in section 6.

II. RELATED WORK
Ali kenso [3] proposed a modified version of existing self shrinking generator proposed by Meier and Staffelbach based on selection rule which XOR pair of bits.MSSG constructed with single LFSR having length of n bits.The selection rule for the output of LFSR is that : select triple-bit(a 3i, a 3i+1 ,a 3i+2 ) then XOR first pair of bit a 3i and a 3i if result of XOR is 1 then output of MSSG becomes 3 rd bit a 3i+2 else discard triple bit .MSSG satisfies the basic requirements of good stream ciphers that are long period ,high complexity and non-linearity and proved that period p satisfies p n/3 <=p<=p n-1 and linear complexity becomes greater than half the period.S.Shun-lung , Ko-ming Chiu, , and Lih-chyau Wuu [4], discuss "LFSR/FCSR based Alternating step generator" and a new combination function after analyzing existing ASG.According to the their analysis, the probability of finding the pairs of base sequence sequences (X n+1 , Yn+1 ) which satisfy the condition of zero edit distance D(X n+1 , Yn+1 ,K;Z n ) with exclusive-or operation is larger than addition operation.A new stream cipher generator is proposed by Ghosia Arshad [7], which is combination of shrinking generator and alternating step generator.Model is analyzed against co relational attacks and concluded that its security becomes 2 2L .

Model consists of 4 LFSRs A, B, C, D.LFSR A control sequence of LFSR B and C if output of LFSR A is 1 it activates LFSR B otherwise activate LFSR C. output of LFSR B and C
is XORed if its result is 1 then generate output keystream of LFSR D else discard output of D.

III. PROPOSED FRAMEWORK
The proposed model combines the features of both self shrinking generator proposed by Ali Kanso [3] and alternating step generator [4] to generate the strong pseudorandom keystream sequence.Proposed stream cipher system model based on FCSRs that introduce non linearity in proposed structure and make difficult to investigate the right initial states of registers due to carry propagations.To achieve the high www.ijacsa.thesai.orgsecurity and to ensure important properties of FCSRs following conditions must be satisfied.
 Connection integer q must be negative prime number.
 Additional bits of memory must be  The order of 2 modulo q is |q|-1 [8].The Proposed model as shown in "Fig.1"constructed in such a way that self shrinking generator is used to produce shrunken pseudorandom sequence and this shrunken output is used to control the remaining two registers.Output of these two registers is combined by full addition function and the resulting pseudorandom key stream is XORed with plain text to produce encrypted data.Resulting cipher data is again XORed with same key stream to obtain original plain text.Detail

IV. PROPOSED TECHNIQUE
The graphical model of proposed generator is depicted in "Fig.1"which shows that initial inputs to FCSRs are given, which generate sequences.The Generated sequence than produce key stream.Data from database is retrieved which is first converted to binary form and than encrypted with generated key stream.

A. Operational scenerio of proposed model
In this section we discuss the detail operation of our proposed generator .Initially before starting the process of key stream generation for each FCSR we should determine connection polynomial q, size of register r and additional memory m.After that r cells of FCSRs are initialized with binary data.
 Output the rightmost bit a n-r and all cells shift one step right.
 Shift parity bit of σ n (mod 2) in to leftmost cell and high order bit σ n (div 2) in to carry cell.
2. Sequence of first FCSR is shrunken with self shrinking generator as follows:  Triple-bit (a 3i, a 3i+1 ,a 3i+2 ) of first FCSR are taken at a time if (a 3i XOR a 3i+1==1 ) than output becomes a 3i+2 otherwise discard 3 bits .
3. Take shrunken sequence of FCSR as clock sequence and use to control other two base FCSRs sequences.
4. At each clock cycle output of two base sequences is added in to full addition function along with carry register.Output key stream is calculated as Z(mod2) and Carry register retained a new value Z (div2).

5.
Output key stream is XORed with plain text bit to produce cipher text.
6. Plain text can be degenerate by XORing Cipher text with same keystream.

B. Algorithm:
Pseudo code of proposed model is First input is given to connection integer which must be negative prime number then size of FCSR is calculated with connection integer.Initial value are given to each FCSR and with each FCSR we generate a unique sequence .
First FCSR behave like self shrinking generator and remaining two FCSRs act like alternating step generator.Output of these two FCSRs are combined with addition function.

A. Probability of finding initial states:
We can find the probability of success for finding correct initial values of registers R2 and R3 if addition modulo 2 is used as combined function as [4].
(1) Here r2 and r3 are length of shift registers R1 and R2.
If full addition function is used as combination function then probability of success for initial states is determined as: (2) K1 is initial value of carry register of full adder function.We have and According to "Table 1" the structure of proposed generator is more secure than ASSG and SG because due to carry propagations it is difficult to estimate the right initial states of registers.

B. Graphical comparison ofprobabilty of proposed model with other models: Case 1:
In case 1we compare the probabilities of success of finding right initial values of alternating step base registers.
For example by giving values 9 and 11 to ASG and ASSG registers r2 and r3 respectively we calculate probability as:

C. Comparison of proposed generator with other generators:
Comparison of properties of proposed model with other models is shown in "  After comparing proposed generator with other generators it is found that proposed generator use FCSRs and full addition function which make structure highly non linear, so that proposed model is highly resistant to linear attacks as compared to other generators which uses LFSRs.Period of ASG and SSG is less than proposed generator while period of ASSG is greater because number of registers used in proposed generator less than ASSG registers which increase period of ASSG.Unless the period of proposed generator is less than ASSG it becomes more secure against attacks due to its non linearity [6].

VI. CONCLUSION
In this paper, we propose a model of keystream generator which is based on FCSRs and combine the features of both SSG and ASG to remove pitfalls that may occurs when these generators used individually.The description of proposed models and necessary conditions for model is well elaborated .The proposed model consists of 3 FCSRs which combine in such a way 1 st FCSR used as clock sequence which controls the other 2 base FCSRs.Full addition function is used to combine the output of base registers.
Use of FCSRs, addition modulo2function and full addition function increase non linearity of proposed generator and make it more secure and highly resistant to external attacks .Next the comparison of proposed generator with other generators shows that it's become a good choice because it is difficult to predict the right initial states of registers due to carry propagations in structure.

Figure 1 :
Figure 1: Detail structure of proposed model for stream ciphers generator

( 3 )
Given values to proposed generator registers r2 r3 are 9 and 11.values to clock control sequence initial values of carry registers 1,2,3 are 7,1,2,3 respectively.then probability of Proposed generator(Ppg) becomes (4) So that Probability of finding right initial states is low in proposed model then other models as shown in "Fig 2" and its difficult to find initial states of registers .

Figure 2 : 2 :
Figure 2: Case1: probability of success to find initial states

Figure 3 :
Figure 3: Case 2:probability of success to find initial states

TABLE I .
COMPARISON OF PROBABILITIES OF DIFFERENT GENERATORS

TABLE II .
COMPARISON OF PROPOSED MODEL WITH OTHER MODELS