lunes, 27 de agosto de 2012

Statistical Analysis Randomness OTP

Statistical analysis was performed by one-time pad where it is determined if the generator is random or not

NIST test was used which included:
  • Frequency Test: MonoBit
  • Frequency Test: Block
  • Runs Test
  • Discrete Fourier Transform (Spectral Test)
Test Monobit
The focus of the test is the proportion of zeroes and ones for the entire sequence. The purpose of this test is to determine whether the number of ones and zeros in a sequence are approximately the same as would be expected for a truly random sequence. The test assesses the closeness of the fraction of ones to ?, that is, the number of ones and zeroes in a sequence should be about the same. All subsequent tests depend on the passing of this test; there is no evidence to indicate that the tested sequence is non-random.
http://csrc.nist.gov/publications/nistpubs/800-22-rev1a/SP800-22rev1a.pdf


Frequency Test: Block

The frequency (or frequency within a block) test is used to test the randomness of a sequence of zeroes and ones (Dataplot will covert a data set with exactly two distinct values to a sequence of zeroes and ones). The test is based on the proportion of zeroes and ones. Specifically, it tests the closeness of the proportion of ones to 0.5. The frequency within a block test is a refinement that tests the proportion of ones within M-value blocks
http://csrc.nist.gov/publications/nistpubs/800-22-rev1a/SP800-22rev1a.pdf

Run Test

The purpose of this test, as stated is to determine whether the number of runs of ones and zeroes of various lengths is as expected for a random sequence. A run is anuninterrupted sequence of identical bits. A run of length k consists of exactly k identical bits bounded before and after with a bit of the opposite value. Practically, this test determines if the oscillation between the runs of ones and zeroes in the sequence is too slow or too fast
http://csrc.nist.gov/publications/nistpubs/800-22-rev1a/SP800-22rev1a.pdf

Spectral Test
Determine the max distance between adjacent hyper-planes.
http://www.cse.wustl.edu/~jain/cse567-08/ftp/k_27trg.pdf

We performed the following code in python for testing:
-----
-----


Histogram

We performed a program graph the frequency of each letter in this case each number from 0 to 25 numbers that are used for one time pad can be analyzed as frequency behaves.




Code:




Changed the random generator
/dev/random and /dev/urandom are also available on Solaris, Mac OS X, NetBSD, Tru64 UNIX 5.1B, AIX 5.2, and HP-UX 11i v2. As with FreeBSD, AIX implements its own Yarrow-based design, however AIX uses considerably fewer entropy sources than the standard /dev/random implementation and stops refilling the pool when it thinks it contains enough entropy

Yarrow is a PRNG; it generates cryptographically secure pseudorandom numbers on a computer. It can also be used as a real random number generator, accepting random inputs from analog random sources. We wrote Yarrow because after analyzing existing PRNGs and breaking our share of them, we wanted to build something secure.

Source

Random generator was tested with independent evidence


In another post where esplique each method in detail as is done

References:
http://csrc.nist.gov/publications/nistpubs/800-22-rev1a/SP800-22rev1a.pdf
http://www.dia.fi.upm.es/~ajimenez/Docu_Simulacion/Transparencias/Cap1-GenNumAleat.pdf
http://www.scribd.com/doc/71375513/6/Analisis-de-Aleatoriedad-con-visualizacion-3-D
http://jair.lab.fi.uva.es/~pablfue/leng_simulacion/slides/0607/alea_t_0607.pdf
http://www.scribd.com/doc/50639457/16/Pruebas-de-aleatoriedad
http://www.scribd.com/doc/58547826/documentatie-licenta
http://www.fi.muni.cz/~xkrhovj/lectures/2005_PA168_Statistical_Testing_slides.pdf
http://www.doughellmann.com/PyMOTW/random/
http://gerhardt.ch/random.php


1 comentario:

  1. Very good. It would have been helpful to add a paragraph at the end comparing the results of the original and the improved key generator. 7 pts.

    ResponderEliminar