# Alice and Eve: An introduction to cryptography A small treasure hunt at the [World Scout Jamboree in Saemangeum, South Korea.](https://app.smartsheet.com/b/publish?EQBCT=451444e380af46ab8bb1b6bb2d2e4c65) This treasure hunt is meant to engage with young people (scouts) aged 14-18, and the main objective of the activity is to **spark curiosity** about some of the fundamental concepts of cryptography, information theory, game theory, and computer science. A secondary goal of the hunt is to introduce a novel use case for the ScoutPass wallet, which will have its beta launch at the WSJ. # Setting In the center tent in which workshops are taking place in the SDG village (see 'logistics' for more information), Alice's desk will be nondescriptly set up. Alice is friends with Bob, who's briefcase will also be hidden somewhere in the tent (or handy for a presentation). On a table near Alice's desk, 4 clipboards will present the "files" of character's Alice, Bob, Charlie, and Dohyun (도현). **Alice:** Alice's puzzle is an introductory puzzle to get players used to the concept of the game and puzzles. Her puzzle requires that players decode the pigpen cipher on Alice's desk to reveal her secret message to Bob: the number 37. **Bob:** Bob's briefcase is also hidden around the venue. To unlock Bob's briefcase, players must convert the number 37 into binary (100101). **Charlie**: Inside Bob's briefcase will be materials to help players understand that mathematical calculations can be performed on binary numbers using *logic*. By solving Charlie's logic gates puzzle, players can understand how 0's and 1's can be manipulated by machines. **DoHyun**: Doyun's puzzle isn't fully written yet, but the core concept needs to center around the idea of a *one-way function*: an operation that is easy to do in one direction, but impossible in the other. To do this, a prop of a rope and a clock can demonstrate how to perform clock arithmetic functions. ## Workshop On August 4th, the treasure hunt will be complemented by an hour long workshop in which some of the skills needed to solve the puzzles will be shared and discussed. The contents of this workshop will also be shared with a handful of volunteers from the scouts, who can run the tent-bound portion of the hunt (Alice, Bob, Charlie, DoHyun), while Griffin is further afield managing the more difficult puzzles (Fujiko, Gale, Hans, and Inioluwa) The workshop introduces the audience to the straightforward situation of Alice and Bob: ### Activity 1: Alice writes to Bob Select 2 volunteers from the audience to play Alice and Bob, while Griffin plays Eve (or a volunteer). Allow Alice to sit at her desk, and take a pen and paper as the audience contemplates her problem. *Alice wants to write her friend Bob, but relies on Eve to carry the message to him. Alice can try to write the message, and put the message into an envelope. But Eve is a robot, and can see all information contained in the message.* Lead the audience through the pig-pen cipher, a simple pictoral key that can be easily remembered: ![](https://storage.googleapis.com/ethereum-hackmd/upload_29ee49f5d07b056cc687462fa27a664e.jpeg) Give Alice the *decoder ring* so that she can write a (weakly) encrypted message to Bob. Now discuss a new problem: *Alice wonders to herself if her friend Bob will be able to understand the message she's sent. Probably not, as Bob was always concerned with his 0's and 1's, and never cared much for letters. So she decides to send the decoder ring along with her letter, to help Bob.* See if the audience catches Alice's error. What do we do? (Discuss briefly how Alice's problem is really the central problem of all cryptography: What do we need in order to design a way for Alice to communicate privately with Bob, without Eve being able to understand the message) ### Activity 2: Bob's Binary *Bob looks at the decoder ring that Alice has sent him, and shakes his head. Eve will now know how to decode any message encoded with the pigpen cipher. He needs a new code. Bob loves the simplicity of 0's and 1's, because they fit so well with electronics. He decides to create a code that will take the letters of the alphabet, and turn them into numbers.* Ask the audience if they can help Bob to encode his message. What would be a good way to go about it? (on the projector, show an ascii table to give the answer) *Bob decides to write the letters of the alphabet (as well as numbers, and punctuation too!) as binary numbers or base 2.* *He creates a chart, and creates his message. Now Bob has a new problem: Eve probably can guess this code (she is a computer, after all).* `# As much as I want to include Charlie's puzzle in the workshop (logic gates), it might be too much to have a consistent thread to follow from cipher to key. Some sleight-of-hand may be needed to jump from encoding to computing`. Bob needs help. ### Activity 3: Charlie's Calculator *Bob enlists his friend Charlie to help him devise a mathematical lock and key. Charlie is a logician, and generally likes to make statements involving AND, OR, NAND, and NOR* Demonstrate the [interactive picture of a Logic Gate](https://www.101computing.net/logic-gates-studio/?q={%22canvas%22:{%22x%22:-599,%22y%22:-459},%22circuits%22:[{%22t%22:%22button%22,%22id%22:0,%22x%22:139,%22y%22:259,%22d%22:true,%22oc%22:[{%22z%22:[{%22id%22:2,%22ix%22:1},{%22id%22:5,%22ix%22:1}]}]},{%22t%22:%22button%22,%22id%22:1,%22x%22:141,%22y%22:415,%22d%22:true,%22oc%22:[{%22z%22:[{%22id%22:2,%22ix%22:0},{%22id%22:5,%22ix%22:0}]}]},{%22t%22:%22xor%22,%22id%22:2,%22x%22:372,%22y%22:275,%22oc%22:[{%22z%22:[{%22id%22:3,%22ix%22:0}]}]},{%22t%22:%22light%22,%22id%22:3,%22x%22:582,%22y%22:226},{%22t%22:%22lbl%22,%22id%22:4,%22x%22:661,%22y%22:221,%22d%22:%22Sum%22},{%22t%22:%22and%22,%22id%22:5,%22x%22:372,%22y%22:400,%22oc%22:[{%22z%22:[{%22id%22:6,%22ix%22:0}]}]},{%22t%22:%22light%22,%22id%22:6,%22x%22:581,%22y%22:351},{%22t%22:%22lbl%22,%22id%22:7,%22x%22:665,%22y%22:356,%22d%22:%22Carry%22},{%22t%22:%22lbl%22,%22id%22:8,%22x%22:52,%22y%22:258,%22d%22:%22A%22},{%22t%22:%22lbl%22,%22id%22:9,%22x%22:56,%22y%22:414,%22d%22:%22B%22}]}) to show how True and False can have electrical analogues. Explain the general concept of logic gates, and then hand-wave all the way to **calculator**. *Charlie helps Bob devise a clever encoding scheme. First, Bob must think of a secret number (b). Then, Bob uses Charlies calculator to multiply (b) and the message (which is also a long number), to create a third number. Unless Eve knows Bob's secret number, it will be hard to guess Bob's secret number* Demonstrate with b=37 and m=('encoded message'). ### DoHyun and Clock Arithmetic # Narrative Alice *The narrative for the treasure hunt is not finalized, but it will follow a similar theme to [previous](https://medium.com/ethberlin/crypto-educational-escape-rooms-lessons-from-berlin-85f6765535c3) Daedalus Industries [productions](https://github.com/social-dist0rtion-protocol/th2022):* > Players are invited to investigate a set of 'suspicious' characters. These characters are mysterious members of a group of shadowy super-coders known as *Daedalus Industries*, and in order to find out more about the characters, players must solve puzzles that unlock new information. > > Daedalus is made up of many characters, who are all creative personas the same as [Alice and Bob](https://en.wikipedia.org/wiki/Alice_and_Bob) -- meant to illustrate thought experiments about common situation in Cryptography. > > The antagonist in this story is EVE, a robotic AI persona who represents **surveillance**, **capture, and control**. Eve is always trying to break into the communications of Alice et. al, which is why they must use the tools of cryptography in order to keep themselves safe from her clutches. # Logistics ![](https://www.2023wsjkorea.org/images/sub/campmap_b.jpg) ![](https://storage.googleapis.com/ethereum-hackmd/upload_2f73bd992becab5878863403e16c5d2f.png) # Mechanics and Concepts Each character in the story represents some important attitude or archetype that relates to the role of cryptography in the modern world. To unlock each character's badge (and have it issued through the ScoutPass wallet), players must enter the correct **text password** *or* must scan the correct **QR code**. These are the only two ways to obtain badges for the treasure hunt. ## Information, Cyphers, and Binary Encoding Alice and Bob's story is the set up for cryptography as a field. Alice: information, encoding, and decoding. ## Coordination and Games Maybe Charlie and Diego can emphasize some sort of coordination game, like a modified prisoner's dilemma situation? more work needed here. ## Codes and Ciphers Caesar Ciphers are always fun, and the idea of substituting letters is a good way to introduce the concept of encryption later. ## Encryption and Signatures The most advanced puzzles could actually get into the weeds a little bit, explaining how modular arithmetic gets used to create keys, and how public/private keypairs work on the most basic level of exponents and logarithmic functions. # Characters (Keys) ## Alice ![](https://storage.googleapis.com/ethereum-hackmd/upload_c17523cbcdbedc991c8972c6721e65dc.png) ## Bob ![](https://storage.googleapis.com/ethereum-hackmd/upload_113bcfc1c74a9ecf6c86e0b7198a1f10.png) Bob likes to work with numbers. Specifically, Bob uses *binary* and *hexadecimal* to introduces players to the format of most messages and operations in cryptography. **puzzle idea:** Bob's password is a number that must be converted from hexidecimal into binary or decimal notation. ## Charlie ![](https://storage.googleapis.com/ethereum-hackmd/upload_8a84b1b6f6932e8fec0c3888f166980d.png) Charlie's puzzle usually involes the Chess board, and some form of logical challenge (as Charlie is an 'old school' logician). In Bogota, Charlie's character was also a chef, and his puzzle was a recipe for `0xdeadbeef` hash: > deadbeef_hash > on a clean 128 bit array, arrange 4 slices of `deadbeef` end to end. > fry 3 times in `keccak-256` > Using a sharp knife, trim the last 5 nybbles from the back. > reduce once by boiling in `md5` > prepend 3 fresh slices of `f00` > Bake at `SHA256` until golden brown. > Garnish with `0x` ## DoHyun (도현) ![](https://storage.googleapis.com/ethereum-hackmd/upload_a814fec7ec584a400761bccaef788ca9.png) The character "D" whenever possible takes a name common for the location the event is taking place. ## Eve ![](https://storage.googleapis.com/ethereum-hackmd/upload_bc0e85a964186e964ce5bad45d84aaa3.png) ## Fujiko ![](https://storage.googleapis.com/ethereum-hackmd/upload_be65ec03dd97e2993df68c4c2bef9823.png) In Bogota, Fujiko's puzzle was a set of seed words **in japanese** -- this taught a lot of people that seed phrases do not necessarily need to be in English. ## Gale ![](https://storage.googleapis.com/ethereum-hackmd/upload_621014b5e68c5d576f2d40b2cb33eb93.png) Gale Guo is non-binary, and her puzzle always requires a trip to the toilet (in both Berlin and Bogota, Gale's puzzle was in both men's and women's restrooms). ## Hans ![](https://storage.googleapis.com/ethereum-hackmd/upload_70e663ebbd49f2bc1d8e3a2de478b084.png) Hans is a huge fan of public transit, and his puzzles usually involve some form of legwork. They are also usually the most popular puzzles, as they require less mathematical understanding and more willingness to explore. ## Inioluwa ![](https://storage.googleapis.com/ethereum-hackmd/upload_4ea607479a7ec3056b454d9cd23a90fb.png) Inioluwa Iromuanya is an expert digital art theif, and her puzzles in previous versions involved an elaborate NFT-based puzzle inside a smart contract. That puzzle is well beyond the capabilities of anyone but seasoned web3 developers, so it'll need to be either cut or completely re-written. ### Misc Assets ![](https://storage.googleapis.com/ethereum-hackmd/upload_0b73196d3e2a34c1a98b77a890202647.png) ![](https://storage.googleapis.com/ethereum-hackmd/upload_0c877438bb3537f4a2542e90dddceae8.jpg) ![](https://storage.googleapis.com/ethereum-hackmd/upload_7e9a029120d2b3977cf96f1df947d3a3.png)