Social Icons

twitterfacebookgoogle plusemail

jueves, 30 de agosto de 2012

Statistical Analysis of One-Time-Pad

I did some tests to prove that my key generated by my code is secure. The test that I did, was the monobit test, this test focus on the frequencies of zeros and ones. The prupose 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.

This is the key to test.


Then we convert the odd numbers to ones and the pair numbers to 0.


After we test the ones and zeros into my monobit function. Here's my code.


And our p-value is:

The p-value is the probability that a test statistic would be obtained a certain probability to expect that is true. We assum that we have an alfa value this value is the expected value I expected that I'll have 0.5 value, and I got 0.510797798174, it's very close but still being above my alfa value, so my key value is not really good, because I have certain patterns that a hacker could hack fast.
Source:
P-value http://mathworld.wolfram.com/HypothesisTesting.html
Max's blog http://maxkalavera.blogspot.mx/search/label/Clase%20modelado%20y%20simulaci%C3%B3n%20de%20sistemas%20din%C3%A1micos

1 comentarios:

  1. It would have been better to include several different tests. 5 pts.

    ResponderEliminar