60 likes | 191 Views
Lecture 6 STREAM CIPHER SYSTEM. By: NOOR DHIA AL- SHAKARCHY 2012-2013. STREAM CIPHER SYSTEMS. X 2 =. Statistical Tests: 1-frequency test:. 0 < x 2 < 3.84. n = length of sequence. n0= number of 0's in sequence. n1= number of 1's in sequence. X 2 =. 2- serial test:. x2 ≤ 5.99.
E N D
Lecture 6STREAM CIPHER SYSTEM By: NOOR DHIA AL- SHAKARCHY 2012-2013
STREAM CIPHER SYSTEMS X2 = Statistical Tests: 1-frequency test: 0 < x2 < 3.84 n = length of sequence. n0= number of 0's in sequence. n1= number of 1's in sequence. X2 = 2- serial test: x2 ≤ 5.99 n = length of sequence. n0= number of 0's in sequence. n1= number of 1's in sequence. nij = numbers of ij in sequence.
STREAM CIPHER SYSTEMS Example:- Test the sequence : 0101011101100011111001101001000 1- frequency test: (-1)2 1 = = 31 31 (15 - 16 )2 X2 = n = 31 n0= 15 n1= 16 31 0 < x2 < 3.84 pass n00 = 6 n01= 8 n10= 8 n11 = 8 2- serial test: 4 2 n X2 = (n002+n012+n102+n112) - (n02+n12) + 1 n-1 4 2 31 = (62+82+82+82) - (152+162) + 1 30 = 30 – 4 -31.032 +1 = 0.368 ≤ 5.99 pass
STREAM CIPHER SYSTEMS Statistical Tests: 3- poker test: 2m F (xi)2 (mi)) X2 = ∑im=0 - F n m F = m i m! (m-i) !i ! F = the number of segment in sequence. m = the length oF the segment. Xi = the number of segments contain i of 1's. m-i = the number of segments contain i of 0's, (default with xi).
STREAM CIPHER SYSTEMS m= 5 01010 11101 10001 11110 01101 00100 0 Example poker test: ignore 31 5 F = = 6 X0 = 0 X1 = 1 X2 = 2 X3 = 1 X4 = 2 X5 = 0 5 0 5! (5-0) ! 0! 5! (5-0) ! 0 ! = = = 1 5 1 5! (5-1) ! 1 ! 5*4! 4 ! 1 ! = = = 5 5 2 5! (5-2) ! 2 ! 5*4*3! 3 ! 2 ! = = = 10 5 3 5! (5-3) ! 3 ! 5*4*3! 2 ! 3 ! = = = 10 5 4 5! (5-4) ! 4 ! 5*4! 1 ! 4 ! = = = 5 5 5 5! (5-5) ! 5! 5! (0) ! 5 ! = = = 1 25 6 (xi)2 )5i) X2 = ∑i5=0 - 6 32 6 0 1 1 5 4 10 1 10 4 5 0 1 = + + + + + pass 2+4+1+8 10 = 5.33 - 6 = 1.99