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

Similar documents
Key Exchange. Secure Software Systems

CS 161 Computer Security

Chapter 9 Public Key Cryptography. WANG YANG

Great Theoretical Ideas in Computer Science. Lecture 27: Cryptography

Math From Scratch Lesson 22: The RSA Encryption Algorithm

Other Uses of Cryptography. Cryptography Goals. Basic Problem and Terminology. Other Uses of Cryptography. What Can Go Wrong? Why Do We Need a Key?

Public-key encipherment concept

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

Public Key Algorithms

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

CS Computer Networks 1: Authentication

Diffie-Hellman. Part 1 Cryptography 136

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

Cryptography. How to Protect Your Data

Modern cryptography 2. CSCI 470: Web Science Keith Vertanen

Uzzah and the Ark of the Covenant

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

CSE 127: Computer Security Cryptography. Kirill Levchenko

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

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

Cryptography and Network Security. Prof. D. Mukhopadhyay. Department of Computer Science and Engineering. Indian Institute of Technology, Kharagpur

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

An overview and Cryptographic Challenges of RSA Bhawana

1 Identification protocols

CPSC 467: Cryptography and Computer Security

Applied Cryptography and Computer Security CSE 664 Spring 2018

Encryption. INST 346, Section 0201 April 3, 2018

CS 6324: Information Security More Info on Key Establishment: RSA, DH & QKD

Senior Math Circles Cryptography and Number Theory Week 1

Introduction to Cryptography and Security Mechanisms. Abdul Hameed

A Tour of Classical and Modern Cryptography

Key Exchange. References: Applied Cryptography, Bruce Schneier Cryptography and Network Securiy, Willian Stallings

Lecture 30. Cryptography. Symmetric Key Cryptography. Key Exchange. Advanced Encryption Standard (AES) DES. Security April 11, 2005

Elements of Cryptography and Computer and Networking Security Computer Science 134 (COMPSCI 134) Fall 2016 Instructor: Karim ElDefrawy

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

Cryptography (Overview)

ASYMMETRIC CRYPTOGRAPHY

Public Key Cryptography and the RSA Cryptosystem

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security


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

Public Key Algorithms

Lecture 9a: Secure Sockets Layer (SSL) March, 2004

Kurose & Ross, Chapters (5 th ed.)

RSA Cryptography in the Textbook and in the Field. Gregory Quenell

Algorithms (III) Yijia Chen Shanghai Jiaotong University

Introduction to Modern Cryptography. Benny Chor

Algorithms (III) Yijia Chen Shanghai Jiaotong University

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

Ref:

CS61A Lecture #39: Cryptography

Cryptography Worksheet

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

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

Chapter 9. Public Key Cryptography, RSA And Key Management

Applied Cryptography Protocol Building Blocks

18733: Applied Cryptography Anupam Datta (CMU) Basic key exchange. Dan Boneh

Key Establishment and Authentication Protocols EECE 412

Activity Guide - Public Key Cryptography

Spring 2010: CS419 Computer Security

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

ECE596C: Handout #9. Authentication Using Shared Secrets. Electrical and Computer Engineering, University of Arizona, Loukas Lazos

Public Key Cryptography

CS 43: Computer Networks Security. Kevin Webb Swarthmore College December 7, 2017

Intro to Public Key Cryptography Diffie & Hellman Key Exchange

Algorithms (III) Yu Yu. Shanghai Jiaotong University

Digital Signatures. KG November 3, Introduction 1. 2 Digital Signatures 2

Real-time protocol. Chapter 16: Real-Time Communication Security

RSA (algorithm) History

CSE 3461/5461: Introduction to Computer Networking and Internet Technologies. Network Security. Presentation L

Midterm Exam. CS381-Cryptography. October 30, 2014

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

Lecture 7 - Applied Cryptography

Cryptography (DES+RSA) by Amit Konar Dept. of Math and CS, UMSL

CS 161 Computer Security

CS3235 Seventh set of lecture slides

KEY AGREEMENT PROTOCOLS. CIS 400/628 Spring 2005 Introduction to Cryptography. This is based on Chapter 13 of Trappe and Washington

Lecture 2 Applied Cryptography (Part 2)

Cryptographic Protocols 1

CS 332 Computer Networks Security

Public Key Cryptography

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculty of Mathematics and Computer Science Exam Cryptology, Tuesday 31 October 2017

Crypto meets Web Security: Certificates and SSL/TLS

Encryption 2. Tom Chothia Computer Security: Lecture 3

Introduction to Cryptography Lecture 7

Assignment 9 / Cryptography

Eating from the Tree of Ignorance Part 2

Network Security. Chapter 4 Public Key Cryptography. Public Key Cryptography (4) Public Key Cryptography

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

Public Key Cryptography, OpenPGP, and Enigmail. 31/5/ Geek Girls Carrffots GVA

Part VI. Public-key cryptography

CSC 5930/9010 Modern Cryptography: Public Key Cryptography

0/41. Alice Who? Authentication Protocols. Andreas Zeller/Stephan Neuhaus. Lehrstuhl Softwaretechnik Universität des Saarlandes, Saarbrücken

CS 425 / ECE 428 Distributed Systems Fall 2017

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

Lecture 1: Perfect Security

Admin ENCRYPTION. Admin. Encryption 10/29/15. Assignment 6. 4 more assignments: Midterm next Thursday. What is it and why do we need it?

Securing Internet Communication: TLS

CS 161 Computer Security

Transcription:

Cryptography III Want to make a billion dollars? Just factor this one number! 3082010a0282010100a3d56cf0bf8418d66f400be31c3f22036ca9f5cf01ef614de2eb9a1cd74a0c344b5a20d5f80df9a23c89 10c354821aa693432a61bd265ca70f309d56535a679d68d7ab89f9d32c47c1182e8a14203c050afd5f1831e5550e8700e008f2 a7229b75688baf129fedbfa7d6a32bc150c047978d948443a0996aad472f62914e4987b7c274bc30beb8603d1a17e7a1c7cc10 941f726e62cca735018c861f55a7ca23c94e223a2586d1b8971b24dd50574939803ac131d0b133613dc2da3e7f2a58114e79ab 3da6dfa8f89f8061739f557686e11a8d59b7917166dc7d2a68dc7ba044a54cdcb02fcfb66b8104d7b29d2cb23dcf20a28ddc62 9b79683c7cf2525facff0203010001 Math Circle January 28, 2018 Today we are going to conclude our discussion about cryptography by talking about public key cryptography, and the extremely famous algorithm by Ron Rivest, Adi Shamir and Leonard Adleman, the RSA algorithm. Before we get there, let s motivate the need for public key cryptography at all. 1. As we talked about over the last two weeks, symmetric encryption schemes, like one-time padding, can be pretty awesome. As long as you and the person that you want to communicate have a shared secret key that you only use once, one-time padding is totally unbreakable. What if you don t have a secret key and you want to communicate? (a) Isn t this exactly what the Diffie-Hellman key exchange did? Describe in words (as precisely as you can remember) what Diffie-Hellman does. You don t have to explain the math operations, you can use the color analogy if you wish. 1

(b) One problem with Diffie-Hellman is that is susceptible to what is called a man-in-the-middle attack. To talk about what it is, it helps to lead up to it. Suppose that you lived in the good(?) old days and wanted to mail your friend Bob a check in the mail. The mail is picked up at your house and moved by your mailwoman Eve. You don t totally trust Eve. You trust her enough to deliver the mail (eventually), but not enough to not try and snoop around while the mail is in transit. Suppose that a long time ago you and Bob shared blueprints to make a unbreakable lock, and a key to open said lock. How can you send your check to Bob without the risk of Eve fiddling with your check? (c) Now suppose that you and Bob never shared those blueprints all of those years ago. How could you two use Diffie-Hellman to agree upon a secret blueprint that only you two know over the mail? 2

(d) When you are doing the key exchange with Bob, how do you know that the messages that you are getting are really from Bob, and not Eve? (e) One way that Eve could ruin you and Bob s plan to send messages is to lose/destroy everything that both of you try and send. This is true, but if it was happening then you would be able to figure out that Eve was messing with you mail, and sue her! Eve doesn t want to get sued, and so wants to mess with your mail without you or Bob ever realizing it. How could she hijack your key exchange so that both you and Bob think that you re doing a legitimate exchange with the other person, but in fact you are doing a key exchange through Eve? 3

(f) The word authenticate means to show that something is true, or genuine. If you and Bob had a way of authenticating your messages, how could you two prevent Eve from doing the above? (g) Without authentication, how can you and Bob know that you are being hoodwinked? How can you stop it? Hopefully the above problems illustrated a shortcoming with Diffie-Hellman. It works when you know that your messages aren t being tampered with, but if your messages could be changed by a third party, it may be totally insecure. Now let s talk about public key cryptography. You know what time it is, time for another video! Today s video is called Public Key Cryptography: RSA Encryption Algorithm from the channel Art of the Problem. https://www.youtube.com/watch?v=wxb-v_keiu8 2. As usual, let s go through some of the things said in the video, but go through them a little bit more slowly... 4

(a) Just to make sure that you were paying attention (and do that you remember) let s go with the lock/key analogy again. Alice has a the blueprints for creating a lock and a corresponding key. She can send the blueprints to anyone she wants. If Bob wants to send Alice a secret message, what should Alice send Bob? What should Bob do? (b) And what should Alice do if Alice wants to send Bob a message? (c) Typically the blueprint to the lock is called the public key, and the blueprints to the lock s key the private key. Why are both of these called a key, if one of them is a lock? 5

3. Ok, now let s talk about what hard even means (a) In the video the author said that it s easy to multiply two numbers, and hard to factor them. In your opinion, what do you think that he meant when he said easy and hard? (b) Compute 59 83, as well as 73 79 and 107 101. (c) Now, try and find the prime factors of 8051 *Hint, there are two. **Hint, this is probably a problem that you should try and solve as a table. 6

(d) Let s say that first I ask you to multiply two 3 digit numbers, and then two 6 digit numbers, then two 12 digit ones (I won t! Don t worry!) estimate how much more time it would take every time I doubled the digits. Don t just say a lot longer, try and estimate how much longer. Would it be twice as long? 4 times? 10 times? 100 times? (e) Same question if I asked you to factor a 3 digit number, a 6 digit one, a 12 digit one etc... (f) You might think that a good method to factor numbers quickly would be to just have a huge list of all of the primes, and just go through them one by one! There is a very famous theorem called the Prime Number Theorem that says that the number of primes less than a x ln x number x is approximately. This is very difficult to prove, but for now just take it as fact. Suppose that you wanted to have a list of all primes with fewer than, say, 50 digits. How long would your list have to be? What about all primes with 300 digits? 7

4. Alright, now let s return to that function Φ, the prime counting function. Remember, we define Φ(n) to be the number of numbers less than n which are coprime to (that is, have no factors in common) to n. (a) Prove that if n is prime, then Φ(n) = n 1. *Hint, this should be really easy. If it s hard you re barking up the wrong tree. (b) Prove that if Φ(n) = n 1, then n is prime. *Hint, this proof should be a little different then the last problem. Still easy though. (c) Prove that for relatively prime m, n Φ(n m) = Φ(n)Φ(m). 8

(d) Compute Φ(n) where n are three numbers that you got in problem 3.b), as well as 8051. (e) If for any natural numbers m, n where m < n, m Φ(n) 1 mod(n) if true, show that for any k it is also true that m kφ(n)+1 m mod(n) (f) Once you choose the value for e, you need to choose d so that de 1 mod(φ(n)). How can one compute d given e? 9

5. Finally let s return to the problem of authentication. (a) One property of RSA is that you would swap the public and private keys, and nothing would change. Use this fact and show how, in our first example, Alice could authenticate a message, that is she could prove that a message definitely came from her. (b) How can Alice and Bob use this authentication technology to beat Eve? 10