Saturday, October 29, 2011

Solving Substitution Ciphers

For the past couple of days I've been trying to come up with a good method for solving substitution ciphers algorithmically and without a human moderator. The results were pretty terrible. However, while looking for a solution to my problem, I discovered this little gem:

http://25yearsofprogramming.com/fun/ciphers.htm

It's a tool for decoding a simple substitution cipher that allows you to test out substitutions while fixing certain other substitutions that you believe are correct. Essentially, it attacks the problem by asking, "How can I make it easier for a human to get the answer?" So it's really a tool for visualizing or reflecting on the thought process that people typically go through when they attempt to solve these ciphers. The result is, I think, much faster than a purely computational solution could be, and in any case, is much easier to code.