Cipher – meaning zero (0), nothing or an empty set. Decipher – to make something out of that seemingly meaningless nothing.
Caroline or ‘Old Trout’ (as we affectionately remember her) was a brilliant mathematician. She could solve problems in hours that would tie my mind in knots for years!
Sadly, I never had the chance to meet her in person. She was always warm and friendly when we wrote to each other – although we did have our arguments. Caroline was the first person that I “spoke” to on Going Postal and this article is about what she wrote that caused me to make my first comment.
One Time Pad Cryptography
Many years back OldTrout wrote an article about ‘one-time-pad’ encryption/decryption. It’s a very simple system and practically impossible to ‘crack’.
So long as the ‘key’ is at least the same length as the massage and a different key is used between messages it’s impossible to hack. One slight problem – you’ve got to give the key to the ‘recipient’ of said message.
Keys could be from ‘wanted ads’ in newspapers to quotes from popular books. Psst…page 92, paragraph 3.
Don’t run off! This is really easy and one of the best cryptographic systems invented.
All ‘modulus’ means is that a ‘set’ of, say, numbers (or letters) ‘wrap or loop’ around after a certain value is reached.
For example: 123, as a set, would ‘loop’ like this…123123123123…forever. Or ABC, as a set, like this… ABCABCABCABC…forever.
A Little Addition
Let’s use ‘123’ as a key and ‘123456’ as a message. 123456 will also be the size of our numerical interval. i.e. after 6 we loop back to 1.
1 2 3 4 5 6 <- Message
1 2 3 1 2 3 <- Key
2 4 6 5 1 3 <- Encrypted message
To encrypt the message we add the message and key together. So, if we add 1+1 we get 2. If we add 6+3 we get 9 – oh! That’s greater than our interval of 6. Therefore we ‘loop around’. Keep counting starting at one and you end up at three:
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 1 2 3
A Little Subtraction
To decrypt the message we do the reverse, i.e subtraction. We subtract the key from the encrypted message:
2 4 6 5 1 3 <- Encrypted message
1 2 3 1 2 3 <- Key
1 2 3 4 ? ? <- Original message
For the last two values we get a negative number and a zero. Just write the original number line against negative numbers, like this:
-5 -4 -3 -2 -1 0 1 2 3 4 5 6
1 2 3 4 5 6 1 2 3 4 5 6
As subtraction has to pass through zero, the number six is zero! Hence, 3-3 = 0 = 6. Also, 1-2 = -1 = 5.
Doing The Same With The Alphabet
If we ignore the difference between upper and lower case, there are twenty six unique letters in the alphabet. Using the simple mathematics described above we can arrive at the following figure:
Looking at fig.1 we can see how easy it is to encode/decode a secret message. If the message is DOG and the key is CAT the cipher (or encoded) message is GPA. Here’s how:
Encode or build the cipher message:
1) Letters D + C = G or 4 + 3 = 7.
2) Letters O + A = P or 15 + 1 = 16.
3) Letters G + T = A or 7 + 20 = 27…hmm. As 27 is beyond the scope of our alphabet, just loop around back to the letter A. So, 26 = Z therefore 27 = A, 28 = B etc.
To decode or decipher the message we simply do the reverse – subtraction instead of addition:
1) Letters G – C = D or 7 – 3 = 4.
2) Letters P – A = O or 16 – 1 = 15.
3) Letters A – T = G or 1 – 20 = -19. As the result is a negative number, we use the numbers marked in red – the negative number line.
In fact, you can use either positive or negative numbers to encode your message. It all works out the same. The trick is to use as long a random key as is possible. The difficulty is getting that key to your secret agent!
Caroline was a very intelligent and also a strong willed person (to say the least!). Some of you might recall her ‘visit to the dentist’. This was during UKIP’s height. Anyhow, the dentist had a go at UKIP and supported the EU. Caroline, having none of it, told him where to…err…well you get the idea.
After retelling the story on Going-Postal she wrote: “Anyone know the telephone number for a good dentist?”.
She was also always emailing her MP, Penny Mordaunt. Poor Penny and even poorer secretary!
Speaking of emails. One afternoon I was stuck on a ‘probability’ problem. I emailed Caroline about it and she sent me back a pencil sketch with it all perfectly explained. After an hour of looking at it, I was still non the wiser.
Now, pure mathematicians (Caroline) and engineer mathematicians (Me), well… let’s just say cats and dogs!
I can’t remember the exact problem but the conversation went something like this:
Me: “Hi, Caroline. I can’t work this problem out. Can you help?”
Caroline: “Easy. The answer is 16. Here’s the solution.”
Me: “Okay, thanks. I’ll have a look.”
An hour (at least) later. Nothing stirring in the cogs of my mind. What to do? I know, I’ll use my engineering maths! Yeah, that’ll do it!
Me: “Hi Caroline, again. I think I’ve got the answer. I get 15.9996”
Caroline: “No, Doc. The answer is 16.”
Me: “Well, just round it up! It’s 16!”
Caroline was no doubt laughing at this point. She was, of course, correct. I did manage (eventually) to understand the answer that she had kindly written for me.
Caroline was extremely intelligent and her logic was flawless. I think that I can speak, or write, for all of us at Going-Postal when I say that you will be missed dearly. We all hope that you rest in heavenly peace and, perhaps, get to meet those great mathematicians that inspired you.
A Bit Of Fun
For OldTrout, your challenge, puffins, is to decode the following message using fig.1:
Message -> PIYRQO JAWSN ZPPTXPA
Key -> OLDTROUT
I’ve made this easy. No negative numbers are needed. Simply use the top numbers in fig.1. Add the key and message together. If the value is greater than 26 then simply loop around. For example: P + O = 15 + 16 = 31. Count from 26 (Z) through the letter (A) and you get to the letter (E). There’s your first letter. Remember to also ‘loop’ the key.
Now, you can cheat! There are online OTP solvers (I can hear the keyboards clicking away now!).
It would be nice, however, in memory of OldTrout to do the calculation manually. A pencil and notebook (which she loved) and a simple electronic calculator is all that you need.
It’s just basic addition and counting, which was Caroline’s passion.
The first person to email in the correct answer GP will make a donation to OldTrout’s charity Macmillan in their name commemorating Caroline.
Email: GP at the usual address here email
© Doc Mike Finnley 2022