One of the easiest ways to encipher a message is to use "monoalphabetic substitution" - you go through the message and substitute, for example, change every "d" to "T", every "i" to "B"...). To crack a message encrypted this way, you can perform a simple frequency analysis and use this to guess which letter matches with which. (For example, "e" is normally the most common letter used in English, so you can guess that the most common letter in the ciphertext corresponds to "e".)
Substitution can be made more secure by using homophones - for example, we might give ourselves the option to encode "e" as either "Y" or "4" or "%", so that none of these is the most commonly-used character. However, I've written a script to perform multi-dimensional frequency analysis, which should make it possible to crack such a cipher. You can look at not just the frequency of a single character, but also of a combination of two characters (a "digraph") or of three characters (a "trigraph").
To crack a given message:
If you don't know which language the message is in, you can create a plaintext analysis for each possible language. The patterns revealed in the two-dimensional table should help you to find a best fit and decide which language to use to attempt to decipher the message. For example, one tell-tale 'blip' in the english language is a dark spot for 'TH' in the upper-mid region of the table (because 'T' is very common, but 'H' is not so common, but 'TH' is usually the most common digraph of all!).
If you want to look at some examples of different languages processed through this system follow these links:
If you'd like to try out your skills see if you can decipher this message (I still haven't managed to decipher it!):
Back to the world of MCLD