A substitution cipher is an encryption which replaces characters in a text with another one. The receiver of the message has to know this replacement to decrypt the text.
If you don’t know the mapping, you can use letter frequencies, for example ‘e’ makes up about 12% of all letters in a text. If a letter in the encrypted text occurs with a frequency close to that you may guess that this letter corresponds to ‘e’. The same can be done for other letters. Also the frequency of two-letter pairs (bigrams) can be used.
This program helps with guessing the encryption mapping. The project was done for the course “Practical cryptoanalysis” at the Technical University of Denmark (DTU).
Program & code download: SourceForge/