Sometimes we want to convey information but in way which hides its meaning from evesdroppers. The best way to do this is to ensure that no-one who shouldn't know the message's contents can know it even exists! However, for safety we have to assume that evesdroppers will hear messages they shouldn't. To protect information and keep it secret we need to use some form of secret code or cypher to encrypt the message.

The simplest way to do this is to use a plain substitution code or cypher.


The picture above illustrates an example of a substitution cypher. Here we replace each letter with some other symbol. (In somecase the replacements are also letters, so we might replace every a with a k, every b with a q, and so on.) This kind of code is fine for a very short message, or if we only want to make the message difficult to read. However it isn't a very good way to hide information from a determined evesdropper or spy. The reason it is so poor is obvious from the example shown above.

The weakness of a simple substitution cypher is that each original letter is always replaced with the same cypher symbol. As a result the pattern of the way symbols re-occur is exactly the same as in the original ‘clear’ message. For example, e is the most common letter in normal English language. Similarly, words like the occur much more often than ones like zebra. Someone who is determined to ‘crack’ the encrypted message can therefore use the method called Entropic Attack and break it fairly easily. You can probably do that and read the hidden messages in the above illustration.

To avoid encrypted messages from being cracked so easily we need a more complex coding scheme. This can be done in various ways, but in practice these are always based on the ideas of the one time pad and a extended form of substitution code where we encrypt groups of characters - perhaps as many as a few dozen at a time. Specific long strings of characters re-occur much less often than individual letter in natural languages like English, and a typical message will require fewer extended symbols. This makes it harded to collect the statistical information required for entropic attack to succeed.

Electronics homepage
Course contents


Content and pages maintained by: Jim Lesurf (jcgl@st-and.ac.uk)
using HTMLEdit3 on a StrongARM powered RISCOS machine.
University of St. Andrews, St Andrews, Fife KY16 9SS, Scotland.