Cryptography

Introduction
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

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

Packing Away: 

Lives in maths box
Polarisation is it's own experiment

Explanation
Explanation: 

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.

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)symetric 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 encryprition 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.

RSA
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.

Quantum Cryptography
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 dojt 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 retransmit 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.

Risk Assessment
Risk Assessment: 

Paper cuts
File edges of paper before use
First Aid

Electrocution from Morse code buzzer
Make sure power is low (i.e. small battery) and people don't try and make connection using a finger.
First Aid.

Persons padlocked together.
Make sure padlocks have working keys before use. Make sure kids don't mess with them.
If key can not be found call 111 to break padlock.

Fingers caught in padlock
Ensure padlocks not messed with
First Aid.

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

0
0
Images