Activity Guide - Public Key Cryptography

Similar documents
Cryptography Worksheet

CS 161 Computer Security

Key Exchange. Secure Software Systems

Introduction to Cryptography and Security Mechanisms. Abdul Hameed

Algorithms (III) Yijia Chen Shanghai Jiaotong University

Algorithms (III) Yu Yu. Shanghai Jiaotong University

Smalltalk 3/30/15. The Mathematics of Bitcoin Brian Heinold

Algorithms (III) Yijia Chen Shanghai Jiaotong University

CS 161 Computer Security

Chapter 9 Public Key Cryptography. WANG YANG

Worksheet - Reading Guide for Keys and Passwords

Cryptography: Matrices and Encryption

Davenport University ITS Lunch and Learn February 2, 2012 Sneden Center Meeting Hall Presented by: Scott Radtke

Innovation and Cryptoventures. Digital Signatures. Campbell R. Harvey. Duke University, NBER and Investment Strategy Advisor, Man Group, plc

Innovation and Cryptoventures. Digital Signatures. Campbell R. Harvey. Duke University, NBER and Investment Strategy Advisor, Man Group, plc

Cryptography and Network Security

Key Management and Distribution

CS61A Lecture #39: Cryptography

Cryptography. How to Protect Your Data

Chapter 8 Security. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Senior Math Circles Cryptography and Number Theory Week 1

Public Key Algorithms

CSCI 454/554 Computer and Network Security. Topic 5.2 Public Key Cryptography

Introduction to Cryptography and Security Mechanisms: Unit 5. Public-Key Encryption

Overview. Public Key Algorithms I

Assignment 9 / Cryptography

Outline. CSCI 454/554 Computer and Network Security. Introduction. Topic 5.2 Public Key Cryptography. 1. Introduction 2. RSA

Outline. Public Key Cryptography. Applications of Public Key Crypto. Applications (Cont d)

Applied Cryptography and Network Security

CS 332 Computer Networks Security

Lecture 2 Algorithms with numbers

Quantum Encryption Keys

Public Key Algorithms

Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2010

Public Key Cryptography and the RSA Cryptosystem

What did we talk about last time? Public key cryptography A little number theory

Cryptography and Network Security Chapter 10. Fourth Edition by William Stallings

Channel Coding and Cryptography Part II: Introduction to Cryptography

Math From Scratch Lesson 22: The RSA Encryption Algorithm

Public-Key Cryptography. Professor Yanmin Gong Week 3: Sep. 7

CPSC 467b: Cryptography and Computer Security

CRYPTOGRAPHY Thursday, April 24,

Cryptography (Overview)

Secrets & Lies, Knowledge & Trust. (Modern Cryptography) COS 116 4/20/2006 Instructor: Sanjeev Arora

Uzzah and the Ark of the Covenant

A Tour of Classical and Modern Cryptography

Kurose & Ross, Chapters (5 th ed.)

Cryptography Lesson Plan

Outline Key Management CS 239 Computer Security February 9, 2004

Ref:

1. Diffie-Hellman Key Exchange

ICT 6541 Applied Cryptography. Hossen Asiful Mustafa

Blum-Blum-Shub cryptosystem and generator. Blum-Blum-Shub cryptosystem and generator

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl. Chapter 6 Introduction to Public-Key Cryptography

Chapter 9. Public Key Cryptography, RSA And Key Management

CS Computer Networks 1: Authentication

Modern cryptography 2. CSCI 470: Web Science Keith Vertanen

Encryption. INST 346, Section 0201 April 3, 2018

Applied Cryptography and Computer Security CSE 664 Spring 2018

ח'/סיון/תשע "א. RSA: getting ready. Public Key Cryptography. Public key cryptography. Public key encryption algorithms

Great Theoretical Ideas in Computer Science. Lecture 27: Cryptography

Computer Security. 08. Cryptography Part II. Paul Krzyzanowski. Rutgers University. Spring 2018

Lecture 3 Algorithms with numbers (cont.)

RSA. Public Key CryptoSystem

P2_L8 - Hashes Page 1

Cryptography. What is Cryptography?

Computer Security. 08r. Pre-exam 2 Last-minute Review Cryptography. Paul Krzyzanowski. Rutgers University. Spring 2018

Elliptic Curve Cryptography

CPSC 467: Cryptography and Computer Security

Unit 9: Cryptography. Dave Abel. April 15th, 2016

18-642: Cryptography 11/15/ Philip Koopman

CS669 Network Security

CRYPTOGRAPHY & DIGITAL SIGNATURE

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl

Diffie-Hellman. Part 1 Cryptography 136

Cryptography III. Public-Key Cryptography Digital Signatures. 2/1/18 Cryptography III

Lecture 2 Applied Cryptography (Part 2)

ASYMMETRIC (PUBLIC-KEY) ENCRYPTION. Mihir Bellare UCSD 1

Introduction to Cryptography. Ramki Thurimella

Cryptography III Want to make a billion dollars? Just factor this one number!

CS Lab 11. Today's Objectives. Prime Number Generation Implement Diffie-Hellman Key Exchange Implement RSA Encryption

Viability of Cryptography FINAL PROJECT

Introduction to Cryptography Lecture 7

Distributed Systems. 26. Cryptographic Systems: An Introduction. Paul Krzyzanowski. Rutgers University. Fall 2015

Module: Cryptographic Protocols. Professor Patrick McDaniel Spring CMPSC443 - Introduction to Computer and Network Security

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch

CS 161 Computer Security

! Addition! Multiplication! Bigger Example - RSA cryptography

Number Theory and RSA Public-Key Encryption

CSE 127: Computer Security Cryptography. Kirill Levchenko

Chapter 7 Public Key Cryptography and Digital Signatures

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl

A different kind of Crypto

1 Identification protocols

Proposal For C%: A Language For Cryptographic Applications

2.1 Basic Cryptography Concepts

ASYMMETRIC (PUBLIC-KEY) ENCRYPTION. Mihir Bellare UCSD 1

Making and Breaking Ciphers

Introduction to Cryptography Lecture 7

An overview and Cryptographic Challenges of RSA Bhawana

Transcription:

Unit 2 Lesson 19 Name(s) Period Date Activity Guide - Public Key Cryptography Introduction This activity is similar to the cups and beans encryption we did in a previous lesson. However, instead of using cups and beans as analogy for math and one way functions, today we ll use a version of the real thing. Clock Arithmetic (Modulo) In class you should have reviewed modular arithmetic which we refer to as clock arithmetic. The thought is that if you have a clock with the numbers 1-12 on its face and you want to move the hour hand around the clock to count up to some number of hours the hour hand will always be pointing to a number 1-12, no matter how many hours have passed. We can count this way with any size clock and any number. Do this: Experiment with the Modulo Clock in the Public Key Crypto Widget First thing to do is to get familiar with the modulo operation by experimenting with the Modulo Clock. The widget helps you visualize the result of modular arithmetic and experiment with different clock sizes and numbers. Go to the Public Key Crypto Widget. Click on the Modulo Clock Button. Experiment with different numbers and clock sizes. What s going on? What s the point? Modulo as a One-Way Function Clock Arithmetic (officially known as modular arithmetic ) is a one-way function because you can t tell what the number counted off was, just by looking at the clock face. Terminology The clock is a helpful visual and mental aid, but the real terms for what we re doing are: modulus - the size, or number of ticks on the clock modulo or mod - the name of the mathematical operation for wrapping a number around a clock. For example, if we want to see the result of counting up to 247 on a clock of size 37, we would say that we are doing 247 MOD 37. Note: The MOD operation is the same as finding the remainder when dividing the number by the clock size. So, 247 37 = 6 with remainder 25. 247 MOD 37 = 25. The Modulo Clock widget showing the result of 247 MOD 37 Using the modulo operation as a one-way function is one of the key ingredients behind the real math that makes public key cryptography possible. So now, instead of using cups and beans, let s see how we can use modulo along with multiplication to make public and private keys that are difficult to crack, and have Bob and Alice send secret messages to each other over public channels.

Do this: Public Key Encryption Procedure Setup Go back to the home screen of the Public Key Crypto Widget. Decide who is playing Alice, Bob and Eve, and click on the appropriate name to go to that character s screen. Each screen has the instructions for what that character should do. For the first round, Eve will read all the instructions out loud and Alice and Bob will follow along. Eve will intercept all messages going back and forth between Alice and Bob and try to crack them Eve, read everything out loud, starting here... Home Screen Eve In Public Key Cryptography some information is publicly known. One public piece of information is the size of the clock (the modulus) that will be used for encryption. Since it s publicly known, we ll even let Eve pick it. Pick a number 7 or higher. So... 1. Eve, first pick a clock size (modulus) that everyone else will use. You can pick any number from the list provided. For the first round, we suggest choosing a number less than 200. 2. Eve, announce this number and ask Alice and Bob to also set their clocks to the same number. Eve s screen Alice... Alice, make sure Eve and Bob can t see your screen. After you set the modulus, you need to choose a private key. Pick one from the list provided and keep it private. Never tell anyone this number. After you choose your private key, you should see a public key that was generated. Please announce the public key out loud. Alice, Bob and Eve should all write this number down. Write the Public Key here: Alice s Screen 2

Eve Eve now has an opportunity to crack the Alice s private key. All Eve has to do is solve this problem: figure out what number to multiply the public key by, so when MODed by the clock size, it comes out to 1. Eve s screen in widget will help experiment. Here s the math. In the equation below, Eve knows 2 of the 3 numbers needed - the public key and clock size. The third number is the private key. Can you guess it? Good luck. ( x ) MOD = 1? public key private key clock size Eve s widget makes it a little easier for her to guess by doing the math for her. Eve s Screen Bob... Bob, make sure that Eve and Alice can t see your screen while you do this: Enter the public key into the box provided on your screen. Enter a secret number to send to Alice. Note: It must be a number that is less than the clock size. Now multiply these two numbers together and mod the result by the clock size; the widget makes this easy. The number that comes up on the clock is the number you are sending to Alice in public. Announce the number you are sending to Alice. Alice and Eve can also write it down. Write down Bob s number here: Bob s Screen Eve... You have another opportunity to crack the message here. All you have to do is solve a similar but slightly different problem: you have to figure out what number to multiply the public key by, so that when MODed by the clock size, it comes out to the number Bob just announced. This time you know 3 out of the 4 things you need - the public key, the clock size, and the number Bob just announced. Can you guess the secret number? ( x ) MOD = public key secret number clock size Bob s number Eve s Screen 3

Alice You can now decrypt the message. Make sure Eve and Bob can t see your screen. Decrypting Bob s secret message is easy Multiply your private key by the number Bob just announced; the widget helps you do this multiplication. Then MOD that result by the clock size. The number that results on the clock is the secret number Bob sent you! Recap: Alice and Bob did not have to agree on anything, or communicate ahead of time. Alice and Bob only exchanged information in public, right in front of Eve. Eve even chose one of the numbers that was used for calculations! Eve would have to guess either Alice s private key or the secret number Bob is trying to send. Note: The encrypted messages only go one way. If Alice wanted to send a message to Bob, Bob would have to generate his own public/private key pair. However, because the message can only go one way, the sender can feel safe that ONLY the intended recipient can decrypt the message. Try it again? Change roles and try the procedure again to see how it works. Alternatively, you can play all three roles, switching back and forth between the screens. See if you can do the exchange faster. It only takes a few seconds, once you know what to do. Don t have Eve read the instructions. Just declare a clock size and Alice and Bob can start. Continue to send numbers by announcing them publicly. Try to make it harder for Eve: Choose bigger numbers. Eve should capture the numbers and start trying to crack them. What do you actually need to know? Public Key Cryptography can seem and feel complicated to think about. On a separate page, we explain the math behind the Public Key Crypto Widget and relate it to how a real asymmetric encryption scheme (called RSA) works. But if you don t care about the math, here are the key things you need to know about Public Key Cryptography: Cryptography has a mathematical foundation. It relies on asymmetric keys, which you can make using numbers and math. The modulo operation acts as a one-way function. When you multiply big numbers and mod them by other big numbers, it s really hard to figure out what the original numbers were; the technique is essentially reduced to random guessing. The security of publicly known encryption protocols is based on the fact that cracking a message by brute force would take an unreasonable amount of time. With a sufficiently large modulus (say, 256 bits, which would be roughly a 77-digit number), random guessing would take an unreasonable amount of time. Even if you had millions of computers working on it constantly, it would take trillions of years. Because the method of encryption is public, it actually increases the security, because good guys and bad guys know how hard it is to crack. 4

Reflection: 1. Explain what the modulo operation does. You may use the analogy of a clock in your answer if you like. 2. Why is modulo a one-way function? 3. Describe to a person who knows nothing about encryption why public key encryption is hard to crack. 4. What is 13 MOD 17? a. 0 b. 1 4/13 c. 4 d. 13 e. 17 5. What is 20 MOD 15? a. 0 b. 1.5 c. 5 d. 15 e. 20 5