Skip to main content
edited tags
Link
Paŭlo Ebermann
  • 22.8k
  • 7
  • 81
  • 118
Tweeted twitter.com/#!/StackCrypto/status/327330108572594176
Source Link
user782220
  • 443
  • 1
  • 4
  • 4

repeating-key xor and hamming distance

I read that to break repeating-key xor you can do the following: try a keysize $n$ and compute the hamming distance between the first $n$ bits of the encrypted string and the bits $n+1$ to $2n$ of the encrypted string and normalize by keysize.

The true keysize probably minimizes this. Why?

It also suggests to average a couple of the near minimal values computed in this way. But why should keysizes that are not correct help compute the true keysize?