11.07.2015 Views

Cryptography - Sage

Cryptography - Sage

Cryptography - Sage

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Two statistical measures that we can use on ciphertext to determine if a digraph sequenceis typical of the English language are a digraph coincidence indexn∑n∑x∈A y∈An xy (n xy − 1)N(N − 1)where N is the total number of character pairs, and n xy is the number of occurrences ofthe pair xy, and the coincidence discriminant:∑ ∑x∈A y∈A(n xyN − ( ∑z∈An xz)( ∑Nz∈An zy) ) 2.NThe first term is the frequency of xy, and the latter is the product over the frequencies ofx as a first character and y as a second character. The coincidence discriminant measuresthe discrepancy between the probability space of pairs xy and the product probability space.What behavior do you expect for the coincidence index and coincidence discriminant ofthe above digraph decimation, if i and j were the positions of originally adjacent characters?Test your hypotheses with decimations of “real” English text, using the SAGEimplementations of coincidence index and coincidence discriminant.Why can we assume that i < j in the digraph sequence? What is the obstacle to extendingthese statistical measures from two to more characters?30 Chapter 3. Elementary Cryptanalysis

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!