Public summary: 

Learn about codes and ciphers through a selection of demonstrations of different methods using whiteboards and padlocks.

Learn about codes and ciphers
Useful information
Kit List: 

Morse code
Morse buzzer and clicker
Morse code chart

Semaphore Flags (2 per transmitter)
Semaphore Sheet

Paper Telephones and Envelopes
Two paper cups connected by string
Third paper cup on a string
Some envelopes

Ceaser Shifts
Whiteboards and pens
Laminated alphabet wheels
Laminated alphabets

Asymetric Encryption
Two padlocks with keys
Box with two padlock holes

Public key encryprion
Padlock with key (needs to lock without key)
Box with at least one padlock hole

Quantum Cryptography
Polarisation Experiment with extra filters

Pollard's Kangaroo
Kruskal's Count Experiment

Packing Away: 

Lives in maths box
Polarisation is it's own experiment


Firstly this is a large selection of small demos, each one is relatively fun and some link together well. They start of relatively easy however some of the demos at the end are really quite hard.

The main thing you'll get confused about is this technicality
Code - converts whole words
Cipher - acts letter by letter
This means lots of things we call codes are ciphers!

Morse 'code'
Press down and make a buzz, using the translation table you can transmit messages. Get one person to transmit and the others to try and transcribe the message.
Most competent transmitters can manage 40 words per minute and the record is 75.2wpm. As words and characters have different lengths this is just an average though.

Display the flags in the patterns for each letter. Similarly to Morse one group transmits and one transcribes. It was used pre-telegraph and Morse code to transmit messages long distance, using towers and spyglasses to relay messages faster than horse and rider. You can easily split the groups with one transmitting Morse and receiving semaphore and vice versa.

Paper Telephones and Envelopes
These phones allow you to communicate like a telephone, it works by vibrating the string to transmit. If you loop on the third cup there's now an eves dropper (a wire tap). This transmission is not secure due to this.
Similarly if two people pass envelopes between a third postman they can communicate. However the postman can open letters, or even just change them.
We can think about what properties we want when sending messages there are a few contenders.
Confidentiality - only the person meant to receive the message does.
Integrity - the message has not been altered in sending.
Authenticity - the message comes from the right person.
How can we fix these? Let people come up with ideas.
Seal envelopes to make it harder to open and close. Sign letters. Talk in code/cipher.

Ceaser Shifts
These are named after julius Ceaser even though they've existed long before. They work by rotating the alphabet and replacing letters like this. The code wheels are very useful to do this, they can do both the encryption and decryption. This code is really easy to break, there's only 26 options so we just have to try a few, you can even get people to do this. Just by trying a few letters you can decide to move on and try the next rotation, it's very unlikely the message starts 'zm'.
This encryption sees only one common use, since it's so insecure it's mainly used for spoilers. They use a form called ROT13 which rotates 13 places, try it and try encrypting something twice! You'll find it's self inverting which saves on code.
In these for someone else to decrypt they just need to know the number you've rotated by.
Because it's so simple one way to add complexity is by also agreeing a word, write this under the start of the alphabet and then write out the remaining letters in order. This makes it harder for someone to guess as they need to get your word.
Can we still break this code? Yes quite easily, write a long message in English, count up how many times each letter appears, are they all equal? Which letters appear most often? If we find these in a long coded message we can see which letter is most common and try and match them up. E, T, A and O are the most common, while Z, Q and X are rarest. We can also do this looking at pairs and find TH, ER, ON, and AN are the most common pairs of letters (termed bigrams or digraphs), and SS, EE, TT, and FF are the most common repeated letters.

(A)symmetric Encryption
Symmetric encryption uses the same information to encrypt and decrypt, this is like the shared secret of how many place to rotate. We can see how this works by giving two people identical keys to the same padlock. Then they may use the lock to pass the box around without other people opening it. However how do they get matching keys, if a key is ever passed a copy could be made and everything is ruined. Asymmetric encryption aims to stop this passing of decryption keys.
One way used in ElGamel and Diffe-Hellman is as follows, each person has their own padlock and key. Person A wants to send a message to B, they lock it in a box with their own lock and send it to B, B receives the box but can't open it as they don't have A's key, they padlock it with their own lock and send it back to A, A now can't open it either but they unlock their padlock and send it back to B, this time B can open and read the message.
One more modern encryption scheme is RSA, this is also an asymmetric scheme. Its a public key scheme, a public key here is an unlocked padlock and we leave them with a central repository, anyone wanting to send A a message goes and gets an unlocked A padlock uses it to seal the message to A and then only A can unlock it. There is one weakness with this, if the person in the repository is dodgy then they can read all messages, they give out their own padlocks, open the message then attach the correct padlock.

For really competent groups who've probably already seen group theory you can go into detail of how RSA actually works. It's quite complicated though. You can link in Hexaflexagons to solve some equations.

Quantum Cryptography (PLUS)
Digitally we encode using binary, we can represent this in any way punched holes, magnetism. However we've seen photons have a polarisation and we could use this.
Alice has a light and polarizer and Bob has a polarizer and screen. On the screen the difference in brightness should be apparent between the filters being aligned, off by 45 or opposite.
A simple way of transmitting messages is for Alice to rotate her filter horizontal for 0 and vertical for 1. Bob leaves his filter horizontal and can observe. This has all the same problems as paper telephones. You may wonder why polarisation is used, it turns out its a really robust property of photons.
Now we move onto the full quantum scheme, we need to set up some random shared information. Alice and Bob both flip coins to generate this. Alice picks a string of test bits to send.
Alice flips her coin and heads mean she uses the convention before of horizontal 0 and vertical 1, tails means she rotates this by 45 degrees and diagonal is 0 and antidiagonal(135) is 1.
Bob sets his polarizer horizontal with a head and diagonal at tails.
Bob records as before however if its intermediate he flips a coin and records that.
Alice then reads her coin toss results to Bob and anyone else that wants to listen in. Bob knows anytime he flipped the same he can trust what he saw (this should be roughly half the string) To check there's no eves dropper he confirms some of the successes with Alice, if they don't agree they've outed an eves dropper.
Eve to listen in needs a set up like Bob and then Alice. She tries to read Alice's message then re-transmit to Bob. So she needs to flip coins for both Alice and Bob. This means half the verification is expected to go wrong as she'll disagree. However anything that did get through can be used.
In real quantum you'd want to use single photons, this method is vulnerable to slightly dimming the light in the middle but this isn't possible for single photons.

Pollard's Kangaroo (PLUS)
So you can solve some discrete log stuff (which is used in DiffieHelam and ElGammel) using basically Kruskal's count with some fancy number theory rules...

Risk Assessment
Date risk assesment last checked: 
Wed, 12/12/2018
Risk assesment checked by: 
Date risk assesment double checked: 
Tue, 01/01/2019
Risk assesment double-checked by: 
Risk Assessment: 

Polarisation risks should be signed for if that part is being demoed (separate RA).

Hazard Risk Likelihood Severity Overall Mitigation Likelihood Severity Overall
Paper Paper cuts 4 2 8 File edges of paper before use 3 2 6
Morse Code Buzzer Electrocution from Morse code buzzer 2 3 6 Make sure power is low (i.e. small battery) and people don't try and make connection using a finger. 1.5 2 3
Persons padlocked together. Persons padlocked together indefinitely. 4 2 8 Make sure padlocks have working keys before use. Make sure kids don't mess with them. 2 2 4
Padlock. Fingers caught in padlock. 3 1 3 Ensure padlocks not messed with 2.9 1 2.9