Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Lecture 6 STREAM CIPHER SYSTEM By: NOOR DHIA AL- SHAKARCHY 2012-2013 STREAM CIPHER SYSTEMS Statistical Tests: X2 = 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 = x2 ≤ 5.99 2- serial test: 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: n = 31 X2 = = 31 n0= 15 (-1)2 (15 - 16 )2 = 31 0< x2 1 31 < 3.84 n1= 16 pass n00 = 6 4 n01= 8 X2 = 2- serial test: n10= 8 n11 = 8 = n-1 4 30 (n002+n012+n102+n112) - (62+82+82+82) - = 30 – 4 -31.032 +1 = 0.368 ≤ 5.99 pass 2 31 2 n (n02+n12) (152+162) +1 +1 STREAM CIPHER SYSTEMS Statistical Tests: 3- poker test: X2 = 2m ∑im=0 -F (mi)) F F= (xi)2 n m m m! i (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 Example poker test: m= 5 01010 11101 11110 01101 00100 0 ignore 31 F= 10001 = 6 5 X0 = 0 5 X1 = 1 0 5 X2 = 2 1 5 X3 = 1 X4 = 2 2 5 X5 = 0 3 5 4 5 = 25 = = 6 32 6 = 5.33 = 5*4! = 5! = 5*4*3! = 5! 5*4*3! = 5! 5*4! = 5! = 10 2!3 ! (5-4) ! 4 ! = = 10 3!2 ! (5-3) ! 3 ! = = 5 4!1 ! (5-2) ! 2 ! = 5 1!4 ! 5! = (5-5) ! 5! )5i) 1 0 + 1 2+4+1+8 5 10 5! = 1 (5-0) ! 0 ! (5-1) ! 1 ! (xi)2 ∑i5=0 5! = (5-0) ! 0 ! 5 X2 = 5! = 1 (0) ! 5 ! -6 + -6 4 + 10 = 1.99 1 10 + 4 5 + 0 1 pass