Contact FutureLearn for Support
Skip main navigation
We use cookies to give you a better experience, if that’s ok you can close this message and carry on browsing. For more info read our cookies policy.
We use cookies to give you a better experience. Carry on browsing if you're happy with this, or read our cookies policy for more information.

Skip to 0 minutes and 0 secondsSo, we've talked a lot about operators on numbers, We've even spoken a bit about logic operators. What about operators on letters? Well, it's funny. Operators on letters, really change the letters, and make something that is legible - illegible! This is a nice way of thinking about secret codes. What are secret codes? You take a sentence, a phrase, a paragraph, even a word, encrypt it - that's the operator, and you get something that you cannot read. There are many, many kinds of secret codes. In fact, secret codes are so broad a topic, that you're going to have to do a course which hopefully we'll create, that is totally dedicated to secret codes.

Skip to 0 minutes and 56 secondsHowever, I want to give you just a small taste of two kinds of secret codes, and they differ in the way that we operate on or manipulate the letters.

Skip to 1 minute and 7 secondsWe're going to do this with an example of this famous sentence: "Ground control to Major Tom". One kind of an encryption is called substitution - substitution cipher. In a substitution cipher you substitute every letter in the plaintext with another letter. This is very, very well known, even appears in the bible, Julius Caesar used it a lot and it's called a Caesar cipher. Here's a very, very simple example, where we've just encrypted every letter in "Ground control to Major Tom" into the letter that comes afterwards. So G goes into H, R to S, O to P, U to V, N to O, D to E and so on. Each letter with the letter after it.

Skip to 2 minutes and 7 secondsSo, from "Ground control to Major Tom" we get a sentence: HSPVOE, DPOUSPM, UP, NBKPS, UPN. And of course that's illegible. Of course, it's not difficult to decipher this or to crack this code, because it pops up immediately that each letter is encrypted by the letter, previous. It can be made more difficult by shifting each letter 3 or 17 forwards or backwards or even just randomly associating each letter with another letter or another number, and this is just an archetype of substitution ciphers.

Skip to 2 minutes and 52 secondsNotice here also, another way of deciphering these codes, is by using statistics and seeing for instance that there's a lot of O's over here and in the sentence that corresponds to having a lot of P's here in the scrambled message. That's one kind of operation, substitution. Another kind of operation is called transposition. In transposition, you take a sentence and transpose it, mix it up.

Skip to 3 minutes and 33 secondsSo, this sentence over here: GDRMT, RCOAO, OOLJM, UNTOX, NTORX is the sentence "Ground control to Major Tom" with the letters scrambled in different order. You can see that the same letter O which is dominant in the original sentence "Ground control to Major Tom", is also dominant in the message, in the encrypted message, so it's the same letters but they're all scrambled up. And this is the way we scrambled them, we just wrote them inside a 5 by 5 table and then we wrote it in the rows and drew out the numbers in the columns.

Skip to 4 minutes and 14 secondsSo, "Ground control to Major Tom" and the X's just fill in the blanks at the end is written in the rows and we draw out the letters

Skip to 4 minutes and 29 secondsin the columns: GDRMT, RCOAO, OOLJM, UNTOX and NTORX. So we're going to give you a very small challenge on secret codes to end the course.

Secret codes

This is where all that we have learnt comes together. Secret codes. First, to get a brief introduction, please take time to watch the short video.

Secret codes can be viewed as a symbology, except that now different symbols encode letters instead of numbers. These symbols can be signs (like Morse code or Braille which are just encodings and not ‘secret’), or they can be other letters, or even the same letters themselves.

One can encode a message letter by letter, exchanging each letter with another symbol (these are substitution ciphers), or one can encode the whole message by scrambling up the order of the letters in the message (transposition ciphers).

But when we encrypt a message what are we really doing? We are operating on text with an operator that transforms the text into another symbology.

And when we want to try and break a code we have to work out what the symbology is and also what the encoding operator does. In other words, given an illegible encoded text, we have to work out what the operator is - is it a substitution cipher or a transposition cipher and how does the operator work? And we also have to work out the symbology in order to ‘break’ the secret code.

Cryptography is a huge topic in mathematics with many day-to-day applications, that deserves a full-fledge course. Still, I would like to challenge you with two secret codes, one a transposition and the other a substitution code that I have made up and see if you can ‘break’ the codes. I’m just going to give you the secret messages, and you can ‘break’ them for yourselves. I also have a special request - make up your own secret code, write it down in the discussion and let us all try and ‘break’ the codes. Here are my two:

Message 1:

TELLH NAROW OIANY WTEEO DTEVO HKMTI
WLSWE YUERI EOHNI ITIRO PTLGA NEKNT
AWWUA HDHDD SLKTR OHABE SLIIK

HINT: First create an empty rectangular box 15x6. The first column of the rectangular box should contain 15 letters, the other columns should contain only 14 letters.

Message 2:

PDUBK DGDOL WWOHO DPEOL WWOHO DPEOL WWOHO DPEPD UBKDG DOLWW OHODP ELWVI OHHFH ZDVZK LWHDV VQRZ

Good Luck!

Share this video:

This video is from the free online course:

Maths Puzzles: Cryptarithms, Symbologies and Secret Codes

Weizmann Institute of Science