To prevent entropic attack from suceeding and allowing an evesdropper to break encrypted messages we have to use an encryption scheme which doesn't use the same symbol every time we want to encode the same letter. e.g. we want a system where, say, the first e in a message might be encoded as a p, the next as a d, the next as a w, and so on... In effect, this means a substitution code where the actual mapping from clear to encoded symbols is changed as we move along the message.
This certainly makes breaking an encrypted message harder. However, it also makes the process of encrypting and de-encrypting by the ‘legitimate’ users more difficult as well. To be able to read a message encrypted like this, the receiver has to know the details of the encryption process. The oldest way to achieve this is based on the one time pad.
These pads are a stack of paper sheets. On each sheet a series of apparently random numbers is printed. The pads are then used as shown below to encode/encrypt a message in conjunction with a code book.
Stage 1 is to look up each word (or the letters of any word not in the code book) and write down the relevant numbers from the code book. This series of numbers has simply been substitution coded, so in itself it could be broken by entropic attack. However, stage 2 is to add the encoded numbers to the random numbers from the pad, taking each pad number in turn and only using it once before moving on to the next. (Usually, the adding process discards any ‘carry’ i.e. we'd add 4 + 8 = 2, not 12. This ensures the result always has the same number digits as the original numbers.)
This process encrypts the message and essentially turns it into a sequence of apparently randomly varying numbers. Without knowing the pad sequence it is impossible to ‘crack’ the code provided the following rules were followed:
- The numbers on the pad are used in the given order.
- Each pad sequence is only ever used once. (Ideally, used sheets from the pad are destroyed immediately after use.)
- The numbers on the pads really are randomised.
- Only two copies of any given pad exist - one for the transmitter, one for the receiver.
- The sequence of numbers on the pad is kept secret from any evesdropper.
Given a copy of the one time pad and code book we can easily unscramble an encrypted message. Provided the rules are followed, messaged encypted in this way are truly unbreakable as the resulting encrypted message is indistinguishable from random numbers.
The main problem with the one time pad is that we must (secretly) print and distrubute lots of pairs of pads, each sheet of which can only be used once. This gets cumbersome if we have lots of spies (or diplomats) who want to send lots of messages. To get around this, modern system replace the paper pads with an recipe for generating an apparently random sequence of numbers. Computers are ideal for this, so most modern systems use a combination of a recipe (alogrythm) and some ‘key’ values to encrypt information.
Unfortunately, recipe systems like this are not completely safe as someone else might be able to find patterns in the encrypted messages (which can't be truly random if created using a recipe) and hence break the encryption. However modern systems are quite complex, so breaking them like this is fairly difficult. This area has become a battleground between one set of people/computers who try to devise ever better encryption systems and others who try to break their codes!
Electronics homepage
Course contents