# Cryptographic Protocols

## The Peruvian Coin Flip #

This is another activity that achieves something that doesn’t seem possible – people who don’t trust each other and can’t see each other are able to agree on the outcome of a random coin flip.

This is an absorbing activity for an individual student or a whole classroom.

## Videos #

### More activities and lessons #

• The Royal Institution UK and Microsoft Research together have produced activities in encryption, cryptography, and zero knowledge protocols for the classroom at the locations below:
• Centre for Innovation in Mathematics Teaching has the following teaching packages developed to teach Codes and Ciphers in their Maths Curriculum:
• Shodor Interactivate has the following resources in Ciphers and Codes that includes activities and explanations for learners and instructors with discussions:
• Count On has a complete section dedicated to Codebreaking with lots of online activities students can try in the following Ciphers and techniques:
• Mike Koss created a Paper Enigma Machine, which students can use to create a paper version of the Enigma machine and make it work as per the instructions on the sheet. There are a set of slides on this activity here.
• Stephen C Phillips has the following fun activities and resources on Morse Code:
• Center for Discrete Mathematics & Theoretical Computer Science at Rutgers University has the following relevant resources created by various high school teachers:
• [Requires software download] Wolfram Demonstrations Project has the following demonstration activities. Note: You will need to install the Wolfram CDF Player in order to use these activities. You can either download each demonstration or use your browser to run it.
• Solve the Cryptoquote: Try your hand at decoding some famous quotes encoded using a substitution cipher. The person to whom the quote is attributed is encoded after the quote. Each cipher is a derangement of the letters of the alphabet, so that no letter stands for itself. If you need a hint to get started, the “show hint” button will randomly select a letter in the coded message and decode it for you.
• Solve the Cryptoquote Automatically: A cryptoquote is a puzzle, commonly found in newspapers, in which a substitution cipher is used to encrypt a famous quote. Here a brute force approach is taken to automatically decipher the encrypted text for 33 different puzzles listed in order of difficulty. The encrypted puzzle is dynamically updated as the solution progresses. Experiment with different solving strategies to enhance or degrade performance.
• Decoding the Arecibo Message: In 1974 a message was beamed from the Arecibo radio telescope towards a cluster of stars 25,000 light years distant in the constellation of Hercules. It consisted of 1679 binary digits transmitted in sequence. To read the message, the binary digits must be formed into a low resolution image on a two dimensional grid. But what sized grid should be used? Use the slider control to vary the number of columns in the grid and “decode” the Arecibo message.
• Learn the Radio Code: This Demonstration is one way to learn the International Civil Aviation Organization (ICAO) radio code. It lists several words and displays the conversion to the radio code. It can also speak the converted answer.
• Substitution Cipher Encoder: Substitution ciphers are one of the simplest forms of encryption, where replacement rules are provided that map each letter of the alphabet onto a different letter.This tool will generate randomly chosen keys that map the 26 letters of the English alphabet onto themselves. It also generates snippets of sample text from a range of English sources.
• Vernam Cipher: This Demonstration generates a random bit key for both sender and receiver of the Vernam cipher and provides a simple way to encryptand decrypt messages in various Unicode-supported languages.
• Hackers Language: Criminal hackers usually leave messages when breaking into a website or any system. The messages are written in a kind of code. It is not meant to be cryptography; the idea is just to show that it was left by a hacker. The language replaces some characters, for example: t to 7, B to 8, l to 1, i to !, s to z, and so on, but there is no strong rule. There are also legal hackers who program free software and open source projects such as Linux Kernel, KDE and Gnome user interfaces, Apache web server, and many others.
• RSA Encryption and Decryption: The RSA algorithm for public-key encryption was originated by Ron Rivest, Adi Shamir, and Leonard Adleman at MIT in 1977. Several similar methods had been proposed by earlier workers. The algorithm is based on the fact that it is far more difficult to factor a product of two primes than it is to multiply the two primes. Even the most powerful modern supercomputers would require more time than the age of the universe to factor a 400-digit number.
• Hill Cipher Encryption and Decryption: In a Hill cipher encryption, the plaintext message is broken up into blocks of length according to the matrix chosen. Each block of plaintext letters is then converted into a vector of numbers and is dotted with the matrix. The results are then converted back to letters and the ciphertext message is produced. For decryption of the ciphertext message, the inverse of the encryption matrix must be found. Once found, the decryption matrix is then dotted with each -block of ciphertext, producing the plaintext message.
• An Unforgettable Substitution Code: The characters in the two keywords give the beginning of the encryption alphabet completed by the remaining characters.
• Additive Cipher: The mono-alphabetic substitution cipher provides the simplest form of cryptography, where the cipher alphabet is simply a rearrangement of the plaintext alphabet. In an additive cipher, the cipher alphabet is a shift of the plaintext alphabet.
• Visual Encryption Pad: Only one position of the random mask will reveal clear text hidden in the cypher pad. The security of the code depends on a safe way to pass or keep the random mask. Application of the trivial rules {0->1, 1->0, 2->1} to the sum of clear text and random mask generates the cypher pad.
• Redundancy in Written Language: Languages have different levels of redundancy. Move the slider to remove increasing numbers of letters. Some languages remain readable even after removing a significant portion of the letters, while others become unreadable much sooner.
• Decoding Nazi Secrets: a television broadcast from November 9, 1999 offers some materials for teacher use which based on the program. Please note that the video is not required for using these activities:
• PBS’ NOVA Online has the following resources available in codes and ciphers with worked out examples:
• Crack the Ciphers : offers three World War II-style ciphers of different levels of difficulty for you to try to break
• Send a Coded Message : offers an online version of an Enigma-like machine to encode your own message, then e-mail that message to a friend with instructions on how to decode it using a secret key.
• A Simple Cipher: lets you learn some of the tricks codebreakers use to solve ciphers, and use your new talents to make sense of what looks like a bunch of gibberish.
• Are Web Transactions Safe?: looks at all the ways encryption affects you, with a special emphasis on the Internet.
• Mind of a Codebreaker: led by Alan Turing, inventor of the computer, the codebreakers of Bletchley Park were a brilliant, quirky bunch who broke the Engima in large part by learning to think like the German codemakers themselves.
• How the Enigma Works: The Enigma looks roughly like a typewriter, but it is infinitely more complex, with fully 17,576 ring settings for each of 60 possible wheel orders—and that is just to set it up for use.
• Melissa Salpietra has the following interactive online activities:
• Cryptography 101: an interactive activity that demonstrates different ways to make messages secret including transposition and substitution ciphers
• Send a Secret Message: an interactive activity that lets you write a note, encode it, and send it to a friend for decoding.
• SECRET CODE BREAKERis a comprehensive site covering a series of cryptography publications for young readers that provide detailed instructions explaining how to “crack” secret codes and ciphers for beginning cryptanalysts. Included are computer programs for code breaking and a series of coded secret messages actually sent by secret agents, spies and military commanders beginning with the Revolutionary War to the present including messages from the CIA “mole” Aldrich Ames to the KGB.
• Dirk Rijmenants has an entire website Cipher Machines and Cryptology with loads of resources in Cryptography. A great activity challenge of interest is the following challenge which could be used as teaching tools:
• Enigma Challenge: The Enigma cipher challenge gives you the chance to show your code breaking skills. Anyone, interested in the Enigma machine, can join the challenge.
• Cryptobox Challenge: The Crypto Box Challenge is a contest to decipher three scrambled pieces of text

### Great Principles of Computer Science #

• Communication