100 likes | 330 Views
Randomness and Statistical Tests. Sayed Mahdi Mohammad Hasanzadeh Hasanzadeh@Raymandcrypto.ir Spring 2004. Goals in cryptography. 1) Cryptography remove the redundancy from sequence Pr(1)=Pr(0)=1/2 2) Cryptography is a mapping in the sequence space
E N D
Randomness and Statistical Tests Sayed Mahdi Mohammad Hasanzadeh Hasanzadeh@Raymandcrypto.ir Spring 2004
Goals in cryptography 1) Cryptography remove the redundancy from sequence Pr(1)=Pr(0)=1/2 2) Cryptography is a mapping in the sequence space 3)Cryptography provide security in some cases: data integrity, Authentication and identification ,…
Stream Cipher Pr(Pi=0) Pr(Pi=1) 1/2 Pr(Ci=0) =Pr(Ci=1) =1/2 Pr(ai=0) =Pr(ai=1) =1/2
Generator Properties • Randomness • Provable security • Bit rate • Key length • Complexity of algorithm • Memory • Resistant against every attack
Randomness • Golomb rules • Statistical tests • Linear Complexity
Golomb rules • Maximum period • Pseudorandom • #’1’ - #’0’ =0,1 • #run1=R/2^1, #run2=R/2^2,…,#runi=R/2^I • t : C(t)= • 01010001101111100111 • #run1=5,#run2=2,#run3=2,#run4=0,#run5=1 • #gap=5 , #block=5
Randomness • Golomb rules • Statistical tests • Linear Complexity
Why Statistical tests • impossible to give a mathematical proof that a generator is indeed a random bit generator, the tests help detect certain kinds of weaknesses the generator may have. • This is accomplished by taking a sample output sequence of the generator and subjecting it to various statistical tests.
Statistical tests • the term “accepted” should be replaced by “not rejected” • six Basic Test (Using Chi-square analysis) • Frequency Test: # of 0 and 1 • Serial Test: # of 00, 01, 10, 11 • Poker-k Test: # of each k-bit string • Run Test: comparing with expected run length • Autocorrelation test: correlations between s and shifted version • Binary derivation
Working with a Software for Statistical Tests