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.

arbitrary permutation of the alphabet.space:For this purpose we define maps into Euclidean1. A → A 2 → R 2 defined byx ↦−→ xx ↦−→ ( P (x), P (xx) ) .2. A → A 2 → R 3 defined byfor some fixed character y.x ↦−→ xy ↦−→ ( P (x), P (xy | y), P (yx | y) ) ,See the documenthttp://echidna.maths.usyd.edu.au/ kohel/tch/Crypto/digraph frequencies.pdffor standard vectors for the English language.Solution. These maps can be applied to the solution of substitution ciphers by findingnearest elements to a known standard for the English language. For instance, assume thatthe ciphertext image x of E has been identified, one can look for pairs xy which are theimage of the plaintext pair ER, by searching for a nearest vector to:(0.05674, 0.13071, 0.11352).This will determine the ciphertext image y of R. This bootstrapping procedure successivelydetermines the substitution from the digraph frequencies of the ciphertext.Exercise 3.8 (Breaking transposition ciphers) In order to break transposition ciphersit is necessary to find the period m, of the cipher, and then to identify positionsi and j within each block 1 + km ≤ i, j ≤ (k + 1)m which were adjacent prior to the permutationof positions. Suppose we guess that m is the correct period. Then for a ciphertextsample C = c 1 c 2 . . . , and a choice of 1 ≤ i < j ≤ m, we can form the digraph decimationsequence c i c j , c i+m c j+m , c i+2m c j+2m , . . . .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)110 Appendix C. Solutions to Exercises

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

Saved successfully!

Ooh no, something went wrong!