Codemakers, Codebreakers Readerful Books for Sharing Sample Pages
Codes and ciphers
Cryptography is the art of keeping information secret. People have used it for thousands of years, often in spying and war. It can be done in two key ways: through codes and through ciphers.
In a code, whole words or phrases are replaced with other words or phrases. For example, a spy using a code name to protect their identity.
Give yourself a special code name! You could use your favourite colour + your favourite animal.
In a cipher, each separate letter is represented by another letter, number or symbol. This makes it much harder to crack. Often, people say ‘codes’ when they mean ‘ciphers’.
Calling ‘Blue Flamingo!’
Caesar shift
One of the earliest ciphers is called the ‘Caesar shift’. It was created around 2000 years ago and named after the ancient Roman general, Julius Caesar.
This cipher moves, or ‘shunts’, the alphabet forwards by three letters, so that A becomes D and so on, like this:
ZABCDEF
Can you put ‘ROMAN’ into cipher using the original Caesar shift of three letters?
1. Draw a 2x26 grid, or use squared paper, then write the letters of the alphabet into it.
2. Underneath each letter, write the new letter that has been shunted forwards by three places (so that A becomes D and so on).
3. Use the grid to work out the new letters for R-O-M-A-N.
4. What other messages could you write?
ABCDEFGH
So, using this cipher, ‘HI, HOW ARE YOU?’ becomes ‘KL, KRZ DUH BRX?’
That’s hard to say out loud! Can you try?
There can be Caesar shifts of up to 25 shunts.
A B C D E F G H I J K L M D E F G H I J K L M N O P
Double-check you’ve used the correct letters, otherwise your coded message will be inaccurate!
Arab cryptology
Hundreds of years ago, Arab thinkers (from the part of the world that is now Iraq, Syria and Egypt) shared their ideas with each other. They studied and wrote about the art and science of codes.
One of the most skilled specialists in the Arab ‘school’ of cryptology was called al-Kindi. He devised a cipher-breaking method called ‘frequency analysis’.
Frequency analysis counts how often certain encrypted letters are used, and then compares them to how often letters are usually used in normal writing.
So, if you know S is the most commonly used letter in your language, then whichever letter appears most often in the encryption is likely to correspond to S.
People from this area formed the Arab 'school' of cryptology.
Do you know which letter is used most often in the English language?
Answer: E – so you’d expect the most frequently used letter in an encoded sentence to represent ‘E’. That sentence has more E’s than any other letter – and so does this one!