Public Key Cryptography 2 RSA. Lemma 1 Let s and t be relatively prime. Then Proof: Let be given by First we show that  actually maps Then we show 

Slides:



Advertisements
Similar presentations
Number Theory Algorithms and Cryptography Algorithms Prepared by John Reif, Ph.D. Analysis of Algorithms.
Advertisements

RSA COSC 201 ST. MARY’S COLLEGE OF MARYLAND FALL 2012 RSA.
Cayley Theorem Every group is isomorphic to a permutation group.
CSE115/ENGR160 Discrete Mathematics 03/15/12
Data encryption with big prime numbers
22C:19 Discrete Structures Integers and Modular Arithmetic
Public Key Encryption Algorithm
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
Greatest Common Divisor. Definitions Let a and b be two non-zero integers. The greatest common divisor of a and b, denoted gcd(a,b) is the largest of.
Cyclic Groups Part 2.
1 The RSA Algorithm Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
OOP/Java1 Public Key Crytography From: Introduction to Algorithms Cormen, Leiserson and Rivest.
RSA ( Rivest, Shamir, Adleman) Public Key Cryptosystem
Public Key Crytography1 From: Introduction to Algorithms Cormen, Leiserson and Rivest.
Elliptic Curve. p2. Outline EC over Z p EC over GF(2 n )
Cryptography Lecture 11: Oct 12. Cryptography AliceBob Cryptography is the study of methods for sending and receiving secret messages. adversary Goal:
CSE115/ENGR160 Discrete Mathematics 03/17/11 Ming-Hsuan Yang UC Merced 1.
Theory of Computation Transparency No. 1-1 Chapter 2 Introduction to Number Theory and Its applications Cheng-Chia Chen October 2002.
Public Key Cryptography
IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly.
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.
Codes, Ciphers, and Cryptography-RSA Encryption
1 CIS 5371 Cryptography 8. Asymmetric encryption-.
Dan Boneh Intro. Number Theory Intractable problems Online Cryptography Course Dan Boneh.
The RSA Algorithm Rocky K. C. Chang, March
Introduction to Modular Arithmetic and Public Key Cryptography.
Prelude to Public-Key Cryptography Rocky K. C. Chang, February
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.
MA/CSSE 473 Day 11 Primality testing summary Data Encryption RSA.
Cryptography Inverses and GCD Piotr Faliszewski. GCD(a,b) gcd(a, 0) = a gcd(a, b) = gcd(b, a mod b) a = b*q + r Here: q =  a / b  r = a mod b (a –
Introduction to Cryptography
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
RSA Slides by Kent Seamons and Tim van der Horst Last Updated: Oct 1, 2013.
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.
IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly.
Discrete Logarithm(s) (DLs) Fix a prime p. Let a, b be nonzero integers (mod p). The problem of finding x such that a x ≡ b (mod p) is called the discrete.
22C:19 Discrete Structures Integers and Modular Arithmetic Fall 2014 Sukumar Ghosh.
1 Network and Computer Security (CS 475) Modular Arithmetic and the RSA Public Key Cryptosystem Jeremy R. Johnson.
Math 3121 Abstract Algebra I Lecture 5 Finish Sections 6 + Review: Cyclic Groups, Review.
Lecture 6.1: Misc. Topics: Number Theory CS 250, Discrete Structures, Fall 2011 Nitesh Saxena.
ENCRYPTION TAKE 2: PRACTICAL DETAILS David Kauchak CS52 – Spring 2015.
David Kauchak CS52 – Spring 2015
1 Section Congruences In short, a congruence relation is an equivalence relation on the carrier of an algebra such that the operations of the algebra.
CS Modular Division and RSA1 RSA Public Key Encryption To do RSA we need fast Modular Exponentiation and Primality generation which we have shown.
Ch1 - Algorithms with numbers Basic arithmetic Basic arithmetic Addition Addition Multiplication Multiplication Division Division Modular arithmetic Modular.
Great Theoretical Ideas in Computer Science for Some.
Chapter 12: Cryptography MAT 320 Spring Cryptography: Basic Ideas We want to encode information so that no one other than the intended recipient.
CS Lecture 14 Powerful Tools     !. Build your toolbox of abstract structures and concepts. Know the capacities and limits of each tool.
Assignment #3 Solutions January 24, Practical Aspects of Modern Cryptography Problem #1 Use Fermat’s Little Theorem and induction on k to prove.
Primality Testing. Introduction The primality test provides the probability of whether or not a large number is prime. Several theorems including Fermat’s.
Lecture 3.1: Public Key Cryptography I CS 436/636/736 Spring 2015 Nitesh Saxena.
Great Theoretical Ideas in Computer Science.
Great Theoretical Ideas In Computer Science COMPSCI 102 Fall 2010 Lecture 16October 27, 2010Duke University Modular Arithmetic and the RSA Cryptosystem.
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.
RSA Cryptosystem Great Theoretical Ideas In Computer Science S. Rudich V. Adamchik CS Spring 2006 Lecture 8Feb. 09, 2006Carnegie Mellon University.
CS/COE 1501 Recitation RSA Encryption/Decryption Extended Euclidean Algorithm Digital Signatures.
L131 Exponential Inverses Finding modular inverses is good enough for decoding simple modular cryptography. However, in RSA encryption consists of exponentiating.
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
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.
Revision. Cryptography depends on some properties of prime numbers. One of these is that it is rather easy to generate large prime numbers, but much harder.
Dr Nazir A. Zafar Advanced Algorithms Analysis and Design Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar.
Introduction to Cryptography
Advanced Algorithms Analysis and Design
Systems Architecture I
CSE 321 Discrete Structures
Modular Inverses Recall the simple encryption function
Presentation transcript:

Public Key Cryptography 2 RSA

Lemma 1 Let s and t be relatively prime. Then Proof: Let be given by First we show that  actually maps Then we show  is an isomorphism.

Example Let s = 8, t = 15, so that st = 120.  (83) = (83 mod 8, 83 mod 15) = (3,8)  (29) = (29 mod 8, 29 mod 15) = (5,14)  (8329) =  (7) = (7,7) = (35 mod 8, 814 mod 15) =  (83)  (29)

Choose any x in U(st). Then gcd(x,st) = 1. There exist integers a, b with ax + bst = 1. Then 1 is a linear combination of x and s, so gcd(x,s) =1. Hence x mod s is in U(s). Similarly x mod t is in U(t).

 is one-to-one Suppose  (x) =  (y) where 0 ≤ x ≤ y < st. Then (x mod s,x mod t) = (y mod s,y mod t) So x mod s = y mod s and x mod t = y mod t Hence s and t both divide y–x. But s, t are relatively prime, so st divides y–x as well. Also 0 ≤ y–x < st, so y–x = 0. It follows that  is one-to-one.

 is onto Choose any (x s,x t ) in There exist integers a, b with as + bt = 1. Let x = (btx s + asx t ) mod st. In moment, we will show that x is in U(st). Then x = btx s + asx t + stn for some n. So x mod s = (1x s + 0x t + 0n) mod s = x s x mod t = (0x s + 1x t + 0n) mod t = x t So  (x) = (x s, x t ), and  is onto. gcd(x,st) =1

Example: The inverse of   (x) = (x mod 8, x mod 15) Suppose  (x) = (3,8). Find x. First write 28+(-1)15 = 1 Then x = (-115)(3) + (28)(8) = = 83

To show gcd(x,st) = 1: Given x s in U(s), x t in U(t), x = (btx s + asx t ) where as+bt = 1. Set y = (btx s -1 + asx t -1 ). Now xy = (btx s + asx t )(btx s -1 + asx t -1 ), so xy mod s = (1x s + 0)(1 x s ) mod s = 1. xy mod t = (0 + 1x t )(0 + 1x t -1 ) mod t = 1. Now s | xy–1, t |xy–1, and gcd(s,t)=1 implies st | xy–1, so xy mod st = 1. Hence x and st are relatively prime.

 is Operation Preserving  (x)  (y) = (x mod s,x mod t)(y mod s,y mod t) = (xy mod s,xy mod t) =  (xy) Since  is one-to-one, onto, and operation preserving,  is an isomorphism. Therefore,

Theorem: (Gauss) Let p be an odd prime, n > 0. Corollary 1. For odd prime p, Corollary 2. Let p and q be odd primes. Proof:

RSA Recipe Choose (large) odd primes p,q Let N = pq, m = lcm(p-1,q-1) Choose E relatively prime to m Let D = E -1 in U(m) To encode message M: C = M E mod N To decode message C: M = C D mod N Public Key is E, N Private Key is D, N

Will RSA work? M = lcm(p-1,q-1) = h(p-1) = k(q-1) for some integers h, k. ED + sM = 1 for some integer s. So, ED mod (p-1) = ED mod (q-1) = 1 Also, isomorphism Let. Then.

Will RSA work? M = lcm(p-1,q-1) = h(p-1) = k(q-1) for some integers h, k. We claim Let be an isomorphism. Say. Then So as required. Operation Preserving One-to-One

Encoding, Decoding are inverses Recall that E and D are inverses mod M. So ED = 1+sM for some integer s. Let x in U(N) be a message. In U(N), y = x E is the encrypted message. The decrypted message is z = y D = x ED = x 1+sM = x(x M ) s = x RSA works!

How to break RSA Everyone is given E, N. Factor N into pq  Note p and q are large. Let M = lcm(p-1,q-1) = (p-1)(q-1) gcd(p-1,q-1) Let D = E -1 mod M Euclidean Algorithm