Security: privacy and encryption

This should be an interactive class with kids actively participating in the roles of two parties, mailman and pirates.

The kids should help brainstorm ideas and experiment with them.

This is a big topic and it's more like a workshop than a presentation

Overview:

1. Explain the problem - transferring a secret from one person to another so that it's not being known by the pirates. 

2. Brainstorm various scenarios and fail all of them. 

3. Encrypt/obfuscate messages - use "color coding" - specifying the letters of interest in a specific color, mixing them with letters of other colors to obfuscate. 

4. For any encryption you need to have a way to decrypt it. It's impossible to tell your friend about it without pirates finding out.

5. Use color analogy to the key exchange algorithm designed by Diffie-Hellman http://en.wikipedia.org/wiki/Diffie-Hellman_key_exchange

6. Derive the same color on two sides with pirates failing to get the color. Send a message to pass the secret and fool the pirates

Part 1: The secret

Do you have secrets? Imagine that you live in one part of the world, and your friend lives in another part of the world

<pic with google earth globe and two big pictures of kids on two sides on the earth>

And you have a secret you want to share with your friend. {Brainstorm secrets}

Example: The island on the atlantic ocean where you hid the treasure

<pic of the island>

On this island there is a tree

<close up of the island and a tree>

There is a treasure in the ground next to the tree.

BUT!

There are pirates

<pic of pirates>

Pirates listen to your phone

Pirates follow the mailman

Pirates check all packages you send to your friend

They want to know where your treasure is.

They want to know your secret.

You can send a letter to your friend with the name of the island, or a map.

{Assign friends, pirates, postman}

Mailman picks up your letter, brings it to the post office and goes home.

The pirates get to your box, open it ... and your secret is gone, and so are the treasures.

<pirates rejoicing>

Part 2: Explore alternatives

Get kids to come up with solutions

Some of the alternatives:

- do it yourself - visit your friend

- send an army to guard the secret

- send a locked case - hmm, how do you open it?

- send a key with the case - yeah right

- send them separately 

    Show how you can make a duplicate of a key

- send a key inside the case! :)

- send a case, make sure it's delivered and then send the key

    Pirates can make a case similar to yours and send a fake one

       but you can check the scratches over the phone

    Imagine pirates have a machine that duplicates everything, including the content of the case! - when you send information via computers it is the case

       can't wait for the key

Part 3: Let's confuse the pirates (encryption / obfuscation)

Look into different ways to confuse the pirates

- jigsaw puzzle of the map

- send letters separately and let your friend figure out how to connect them

If the pirates are stupid, it works, what if the pirates are as smart as your friend?

A need for agreement

Look into different agreements and how the text / images can be encrypted

- numbers on the back of the pieces

- additional letters

Color coding - draw letters in different colors and use only one color to pass the right information, and the other colors to pass wrong information.

The "color coding" is crucial to key exchange algorithm we'll use later.

BUT

How do you tell your friend the color to use so that the pirates don't know?

{Brainstorm again with no luck}

Part 4: Solution: Key exchange algorithm

Let's try fooling the pirates by mixing the colors: One person has one color, the other person has second color. They pass colors to each other and mix them. This is the Key colors.

- pirates can do the same, assuming equal proportions) To go deeper, you can try to pass information about proportions, but this comes down to the same thing - pirates will find out everything you tell your friend.

{Have real paints and experiment with mixing them in different proportions}

Propose the solution analogical to the key exchange algorithm * 

* The main idea of Diffie-Hellman algorithm is the following: http://en.wikipedia.org/wiki/Diffie-Hellman_key_exchange

Paul comes up with a number A that he doesn't show anybody, Lilly comes up with B. 

Paul comes up with number C to Lilly. of course pirates can see it. 

Then Paul does something with A and C and sends the result to Lilly. Lilly applies B to the that thing and as a result gets the Key.

Lilly also sends Paul a function of B and C and when Paul applies A to that result he gets exactly the same Key.

Pirates can not derive the key, so Paul and Lilly can encrypt their messages with the Key and decrypt them.

We use the similar analogy - two parties pick any color each, this is their secret color. They share the third "common" color. 

One person sends the mix of his secret color with the common color to the other person. The other person does the same. Upon receiving the mix each of them adds their secret color to it.  As a result since they mixed 3 colors in the same proportions they get the same Key color. The pirates can see the mixes, but they can't come up with the Key color, since if they mix the two mixes passed around the proportion of the common color will be different than that of the Key color.

The "wrong" assumption here is that if you have a mix A+B and color A, you can't figure out exactly what color B is. This is not true, but for practical purposes it's not obvious and we can use this assumption.

Walk through the whole algorithm. Make sure the colors match on two sides and the pirate color is different.

Part 5: Passing the secret safely

Come up with the name of the island, e.g. "Pieland" and use the color coding to write it. - the letters from "Pieland" are in Key colors, and they are mixed with random letters of other colors.

Also fool pirates by embedding a different word with pirate's colors (Mixes of AB & BC - this is what pirates likely to do).

Read the message on the other side. Laugh at pirates