in reply to Encryption/Decryption Program:

For extra credit, propose code that can be used to automatically break the substitution cipher. See this explanation for a starting point. At some point you'll end up with some good guesses on what might be the most likely substitutions.

The article mentions that "E", "I", and "A" are most common for English. Here are a few other heuristics you might apply:

I haven't investigated strategies more than to just think about it a bit, but I suppose you would work out probabilities, and then start testing assumptions against a dictionary to see if they work out. Then you can test those assumptions against the original string to see if they turn it into something recognizable.

Rotation ciphers are even easier, as the number of possibilities allows for brute force testing.


Dave