Saturday, February 14, 2015

It's a secret (4)

(Continuation from Thursday)
The simplest form of substitution is what is known as the Caesar shift - each letter of the plain text is moved a set number of places down the alphabet.  Caesar himself (as in Julius) used to use 2 places, but it can be any number between 1 and 25 (26 of course would simply leave you back where you started).  So let's pick a number - 5 say, and let's make up a message -
PUT THE KETTLE ON BACK IN FIVE MINUTES
Now we need to write out the alphabet and then underneath it the alphabet moved on five places - 
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z
F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  A  B  C  D  E
And now we take each letter of the message in turn, find it on the top line and replace it with the letter immediately below, and the message becomes -
UZY YMJ PJYYQJ TS GFHP NS KNAJ RNSZYJX
The other party to the correspondence of course simply reverses the process - looking up each letter on the bottom row and replacing it with the letter immediately above. 

Next time we'll look at transposition.

No comments: