Google-Apps
Hauptmenü

Post a Comment On: Ken Shirriff's blog

"Simple Cryptanalysis with Arc"

3 Comments -

1 – 3 of 3
Anonymous Anonymous said...

"Since the key repeats, it is likely that characters in the ciphertext will also repeat with the same frequency." ... you say.

I don't get this - surely it'll only be the case on the off-chance that the plain text has the same characters at 6-character offsets?

February 12, 2009 at 2:27 AM

Blogger BitShifter said...

Basically statistics helps you out. As long as the sub-texts are long enough to gather statistically significant samples, you can perform letter frequency analysis. If you select every 6th letter from an english text, e should still be the most common letter in the text. With punctuation, space may beat it.

I think this is roughly what he meant with the letters should repeat.

February 12, 2009 at 9:07 AM

Blogger Ken Shirriff said...

In English text, it's pretty likely that there will be some spaces 3 characters apart, 4 characters apart, 5 characters apart, 6 characters apart, and so on. (For instance, every 5-letter word will be surrounded by spaces 6 characters apart.) Similarly, there are likely to be e's and t's spaced a variety of distances apart.

If the key is 6 characters long, each pair of spaces 6 characters apart will turn into a pair of something 6 characters apart. One pair might turn into a pair of Q's, another might turn into a pair of @'s. Likewise with pairs of any other plaintext character. Thus, you'll end up with as many 6-character-offset pairs as in the plaintext. Pairs at other distances, say, 5, will turn into different characters when the key is applied. The result is the ciphertext will have a bunch of cases with the same character 6 apart, and not very many for other distances. You'll get some matches at other distances just by chance, but this will be fairly small.

As bitshifter mentions, the statistics are important. English text tends to have a fair number of repeats. If the plaintext were random data, this technique wouldn't work.

February 13, 2009 at 8:57 AM

You can use some HTML tags, such as <b>, <i>, <a>

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.
Please prove you're not a robot