Let F_a(x) be the frequency of some letter, x, in you're alphabet, and let F_m(x) be the frequency of some letter, x, in the message. Now, for all 0 <= s <= 25 calculate for each letter, x, in your alphabet the sum of the squares of F_m((x + s)(mod 26)) / F_a(x). The value of s for which this obtains a minimum is the shift used to encipher the message.
In reply to Re: encryption (chi-squared test)
by gumby
in thread encryption
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |