MA/CSSE 473 Day 10 Data Encryption RSA.

Slides:



Advertisements
Similar presentations
RSA COSC 201 ST. MARY’S COLLEGE OF MARYLAND FALL 2012 RSA.
Advertisements

Digital Signatures. Anononymity and the Internet.
Data encryption with big prime numbers
Public Key Encryption Algorithm
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
Public-key Cryptography Montclair State University CMPT 109 J.W. Benham Spring, 1998.
RSA ( Rivest, Shamir, Adleman) Public Key Cryptosystem
Public Key Crytography1 From: Introduction to Algorithms Cormen, Leiserson and Rivest.
Cryptography Lecture 11: Oct 12. Cryptography AliceBob Cryptography is the study of methods for sending and receiving secret messages. adversary Goal:
1 Lecture #10 Public Key Algorithms HAIT Summer 2005 Shimrit Tzur-David.
CSE 321 Discrete Structures Winter 2008 Lecture 8 Number Theory: Modular Arithmetic.
Introduction to Modern Cryptography Lecture 7 1.RSA Public Key CryptoSystem 2.One way Trapdoor Functions.
Public Key Algorithms 4/17/2017 M. Chatterjee.
Lecture 6: Public Key Cryptography
Public Key Model 8. Cryptography part 2.
 Introduction  Requirements for RSA  Ingredients for RSA  RSA Algorithm  RSA Example  Problems on RSA.
Chapter 12 Cryptography (slides edited by Erin Chambers)
The Complexity of Primality Testing. What is Primality Testing? Testing whether an integer is prime or not. – An integer p is prime if the only integers.
Cryptography Dec 29. This Lecture In this last lecture for number theory, we will see probably the most important application of number theory in computer.
1 Lecture 9 Public Key Cryptography Public Key Algorithms CIS CIS 5357 Network Security.
MA/CSSE 473 Day 11 Primality testing summary Data Encryption RSA.
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
RSA Public Key Crypto System. About RSA Announced in 1977 by Ronald Rivest, Adi Shamir, and Leonard Adleman Relies on the relative ease of finding large.
MA/CSSE 473 Day 10 Primality testing summary Data Encryption RSA.
Algebra of RSA codes Yinduo Ma Tong Li. Ron Rivest, Adi Shamir and Leonard Adleman.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
David Kauchak CS52 – Spring 2015
CS Modular Division and RSA1 RSA Public Key Encryption To do RSA we need fast Modular Exponentiation and Primality generation which we have shown.
CS 4803 Fall 04 Public Key Algorithms. Modular Arithmetic n Public key algorithms are based on modular arithmetic. n Modular addition. n Modular multiplication.
Ch1 - Algorithms with numbers Basic arithmetic Basic arithmetic Addition Addition Multiplication Multiplication Division Division Modular arithmetic Modular.
Introduction to Cryptography Lecture 9. Public – Key Cryptosystems Each participant has a public key and a private key. It should be infeasible to determine.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
Data encryption with big prime numbers DANIEL FREEMAN, SLU.
Chapter 1 Algorithms with Numbers. Bases and Logs How many digits does it take to represent the number N >= 0 in base 2? With k digits the largest number.
Intro to Cryptography ICS 6D Sandy Irani. Cryptography Intro Alice wants to send a message to Bob so that even if Eve can see the transmitted information,
MA/CSSE 473 Day 9 Primality Testing Encryption Intro.
Cryptography By: Nick Belhumeur. Overview What is Cryptography? What is Cryptography? 2 types of cryptosystems 2 types of cryptosystems Example of Encryption.
Overview Modern public-key cryptosystems: RSA
Encryption Take 2: Practical details
Public Key Cryptography
Digital Signatures.
CS480 Cryptography and Information Security
Public Key Encryption Major topics The RSA scheme was devised in 1978
Asymmetric-Key Cryptography
Public Key Encryption.
Fermat’s Little Theorem
Practical Aspects of Modern Cryptography
David Kauchak CS52 – Spring 2016
Network Security.
Public-key Cryptography
Chap 6: Security and Protection
Cryptography.
Number Theory and Euclidean Algorithm
Rivest, Shamir and Adleman
Public-key encryption
Analysis of the RSA Encryption Algorithm
Symmetric-Key Cryptography
Systems Architecture I
Network Security.
Where Complexity Finally Comes In Handy…
Chapter -5 PUBLIC-KEY CRYPTOGRAPHY AND RSA
Chapter 3 - Public-Key Cryptography & Authentication
CSCI284 Spring 2009 GWU Sections 5.1, 5.2.2, 5.3
Symmetric-Key Cryptography
Where Complexity Finally Comes In Handy…
Introduction to Cryptography
Cryptography Lecture 18.
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
The RSA Public-Key Encryption Algorithm
Where Complexity Finally Comes In Handy…
Presentation transcript:

MA/CSSE 473 Day 10 Data Encryption RSA

MA/CSSE 473 Day 10 Solution to Yesterday's quiz Student questions? Next Session, come prepared to discuss the interview with Donald Knuth (linked from the schedule page, Session 11) and Brute Force Algorithms and amortization Today: Cryptography Introduction RSA

Cryptography introduction We'll only scratch the surface, but there is MA/CSSE 479 Cryptography introduction

Cryptography Scenario You want to transmit a message m to me You encode the message and send it to me in a form e(m) that I can readily decode by running d(e(m)), Hopefully, a form that an eavesdropper has little chance of decoding Private-key protocols You and I meet beforehand and agree on e and d. Public-key protocols I publish an e for which I know the d, but it is very difficult for someone else to guess the d. Then you can use e to encode messages that only I* can decode The e and d will be based on very large prime numbers. That's where the stuff on primality testing will come in handy. In general, e and d are functions for encoding and decoding messages. In the RSA case, they will be integers, to be used as exponents. * and anyone else who can figure out what d is, based on e

Messages can be integers Since a message is a sequence of bits … We can consider the message to be a sequence of b-bit integers (where b is fairly large), and encode each of those integers. Here we focus on encoding and decoding a single integer.

RSA Public-key Cryptography Rivest-Shamir-Adleman (1977) References : Weiss, Section 7.4 Dasgupta, Pages 33-34 Consider a message to be an integer modulo N, which has k bits (longer messages can be broken up into k-bit pieces) The encryption function will be a bijection on {0, 1, …, N-1}, and the decryption function will be its inverse How to pick the N and the bijection? bijection: a function f from a set X to a set Y with the property that for every y in Y, there is exactly one x in X such that f(x) = y. In other words, f is both one-to-one and onto.

N = p q Pick two large primes, p and q, and let N = pq. Property: If e is any number that is relatively prime to N' = (p-1)(q-1), then the mapping xxe mod N is a bijection on {0, 1, …, N-1}, and If d is the inverse of e mod N', then for all x in {0, 1, …, N-1}, (xe)d  x (mod N). We'll first apply this property, then prove it.

Public and Private Keys The first (bijection) property tells us that xxe mod N is a reasonable way to encode messages, since no information is lost If you publish (N, e) as your public key, anyone can encode and send messages to you The second tells how to decrypt a message When you receive an encoded message m', you can decode it by calculating (m')d mod N.

Example (from Wikipedia) p=61, q=53. Compute N = pq = 3233 N' = (p-1)(q-1) = 60∙52 = 3120 Choose e=17 (relatively prime to 3120) Compute multiplicative inverse of 17 (mod 3120) Thus d = 2753 (evidence: 17∙2753 = 46801 = 1 + 15∙3120) To encrypt m=123, take 12317 (mod 3233) = 855 To decrypt 855, take 8552753 (mod 3233) = 123 In practice, we would use much larger numbers for p and q. On exams, smaller numbers  Another example (Dasgupta p 33): N=55 = 5*11. e = 3, d = 3-1 mod 40 = 27. 13^3 = 52 mod 55, 52^27 = 13 mod 55.

Recap: RSA Public-key Cryptography Pick any two large primes, p and q, and let N = pq. Consider a message to be a number modulo N, a k-bit number (longer messages can be broken up into k-bit pieces) Property: If e is any number that is relatively prime to N' = (p-1)(q-1), then the mapping xxe mod N is a bijection on {0, 1, …, N-1} If d is the inverse of e mod N', then for all x in {0, 1, …, N-1}, (xe)d  x (mod N) We have applied the property; we should prove it Modular arithmetic properties will be used heavily in the proof!

RSA security Assumption (Factoring is hard!): Given N, e, and xe mod N, it is computationally intractable to determine x What would it take to determine x? Presumably this will always be true if we choose N large enough But people have found other ways to attack RSA, by gathering additional information So these days, more sophisticated techniques are needed. MA/CSSE 479 We'd have to find d. This would be easy if we knew p and q, but factoring is hard.

Student questions On primality testing, RSA or anything else?