Copyright © Zeph Grunschlag, 2001-2002. RSA Encryption Zeph Grunschlag.

Slides:



Advertisements
Similar presentations
RSA.
Advertisements

Number Theory Algorithms and Cryptography Algorithms Prepared by John Reif, Ph.D. Analysis of Algorithms.
COMP 170 L2 Page 1 L06: The RSA Algorithm l Objective: n Present the RSA Cryptosystem n Prove its correctness n Discuss related issues.
Public Key Cryptosystems - RSA Receiver Sender Eavesdroppe r p q p q p q p and q prime.
Data encryption with big prime numbers
BY : Darshana Chaturvedi.  INTRODUCTION  RSA ALGORITHM  EXAMPLES  RSA IS EFFECTIVE  FERMAT’S LITTLE THEOREM  EUCLID’S ALGORITHM  REFERENCES.
hap8.html#chap8ex5.
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
Great Theoretical Ideas in Computer Science.
Session 4 Asymmetric ciphers.
1 Efficient Algorithms for Elliptic Curve Cryptosystems Original article by Jorge Guajardo and Christof Paar Of WPI ECE Department Presentation by Curtis.
RSA ( Rivest, Shamir, Adleman) Public Key Cryptosystem
COMP 170 L2 Page 1 Part 2 of Course Chapter 2 of Textbook.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Tuesday, 26 November Number-Theoretic Algorithms Chapter 31.
The Algebra of Encryption CS 6910 Semester Research and Project University of Colorado at Colorado Springs By Cliff McCullough 20 July 2011.
Cryptography Lecture 11: Oct 12. Cryptography AliceBob Cryptography is the study of methods for sending and receiving secret messages. adversary Goal:
Cryptography & Number Theory
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
RSA Encryption William Lu. RSA Background  Basic technique first discovered in 1973 by Clifford Cocks of CESG (part of British GCHQ)  Invented in 1977.
1 CIS 5371 Cryptography 8. Asymmetric encryption-.
The RSA Algorithm Rocky K. C. Chang, March
Elgamal Public Key Encryption CSCI 5857: Encoding and Encryption.
Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Copyright © The McGraw-Hill Companies, Inc. Permission required.
MATH 224 – Discrete Mathematics
Section 4.3: Fermat’s Little Theorem Practice HW (not to hand in) From Barr Text p. 284 # 1, 2.
Great Theoretical Ideas in Computer Science.
RSA Ramki Thurimella.
Systems of Equations as Matrices and Hill Cipher.
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.
Cryptography Lecture 7: RSA Primality Testing Piotr Faliszewski.
Introduction to Algorithms Second Edition by Cormen, Leiserson, Rivest & Stein Chapter 31.
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
Section 4.4: The RSA Cryptosystem Practice HW Handwritten and Maple Exercises p at end of class notes.
PUBLIC KEY CRYPTOSYSTEMS Symmetric Cryptosystems 23/10/2015 | pag. 2.
Elements of Coding and Encryption Continuation 1.
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.
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.
1 Simple and Unbreakable: The Mathematics of Internet Security Dr. Monica Nevins Department of Mathematics and Statistics University of Ottawa University.
Fast Exponentiation (3/31) What is the most efficient way to compute (mod 32591)? We will need an efficient algorithm in order to do “RSA cryptography”,
1 Network and Computer Security (CS 475) Modular Arithmetic and the RSA Public Key Cryptosystem Jeremy R. Johnson.
Scott CH Huang COM 5336 Cryptography Lecture 6 Public Key Cryptography & RSA Scott CH Huang COM 5336 Cryptography Lecture 6.
Lecture 6.1: Misc. Topics: Number Theory CS 250, Discrete Structures, Fall 2011 Nitesh Saxena.
What use are prime numbers? ?. o All the primes, apart from 2, are odd numbers. o 1 is not a prime number. Why? o There are infinitely many prime numbers!
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.
Fermat’s Little Theorem The RSA Cryptosystem will require exponentiation to decrypt messages. Exponentiation Notation Example 1: Compute Exponentials Example.
9.1 Primes and Related Congruence Equations 23 Sep 2013.
Great Theoretical Ideas in Computer Science.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
RSA Pubic Key Encryption 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.
Elgamal Public Key Encryption CSCI 5857: Encoding and Encryption.
RSA Cryptosystem Great Theoretical Ideas In Computer Science S. Rudich V. Adamchik CS Spring 2006 Lecture 8Feb. 09, 2006Carnegie Mellon University.
The Fundamentals: Algorithms, Integers, and Matrices CSC-2259 Discrete Structures Konstantin Busch - LSU1.
CS480 Cryptography and Information Security
L131 Exponential Inverses Finding modular inverses is good enough for decoding simple modular cryptography. However, in RSA encryption consists of exponentiating.
Lecture 6. RSA Use in Encryption to encrypt a message M the sender: – obtains public key of recipient PU={e,n} – computes: C = M e mod n, where 0≤M
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,
RSA Algorithm Date: 96/10/17 Wun-Long Yang. Outline Introduction to RSA algorithm RSA efficient implementation & profiling.
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.
Fast Modular Exponentiation
Chapter Applications of Number Theory Some Useful Results
Advanced Algorithms Analysis and Design
PUBLIC-KEY ENCRYPTION Focusing on RSA
ALGORITHM NUMBER THEORY
Analysis of the RSA Encryption Algorithm
Discrete Math for CS CMPSC 360 LECTURE 14 Last time:
Presentation transcript:

Copyright © Zeph Grunschlag, RSA Encryption Zeph Grunschlag

L132 Agenda RSA Cryptography A useful and basically unbreakable method for encoding messages Needed for implementing RSA: Fast Exponentiation Extended Euler’s Algorithm Modular inverses F L T (Fermat’s Little Theorem) CRT (Chinese Remainder Theorem)

L133 RSA Cryptography N = 4559, e = 13. Smiley Transmits: “Last name Smiley”  L A S T N A M E S M I L E Y   mod 4559, mod 4559, …  m e mod N

L134 RSA Cryptography FrogsRUs.com receives the encrypted blocks n = m e mod N. They have a private decryption exponent d which when applied to n recovers the original blocks m : (m e mod N ) d mod N = m For N = 4559, e = 13 the decryptor d = 3397.

L135 RSA Cryptography N = 4559, d = 3397   mod 4559, mod 4559, …   L A S T N A M E S M I L E Y

L136 RSA Cryptography The key to security of RSA cryptosystem: The public key (N,e) must be such that it is very difficult for Snoop Snoopy Snoop to figure out what d is, yet very simple for FrogsRUs.com to come up with.

L137 Fast Modular Exponentiation In order to implement RSA exponentiation relative some modulo needs to be done a lot. So this operation better be doable, and fast. Q: How is it even possible to compute mod 4559 ? After all, has approximately 3397·4 digits!

L138 Fast Modular Exponentiation A: By taking the mod after each multiplication. EG, a more lucid example: 23 3 mod 30  -7 3 (mod 30)  (-7) 2 ·(-7) (mod 30)  49 · (-7) (mod 30)  19·(-7) (mod 30)  -133 (mod 30)  17 (mod 30)

L139 Fast Modular Exponentiation Therefore, 23 3 mod 30 = 17. Q: What if had to figure out mod 30. Same way tedious: need to multiply 15 times. Is there a better way?

L1310 Fast Modular Exponentiation A: Better way. Notice that 16 = 2·2·2·2 so that = 23 2·2·2·2 = (((23 2 ) 2 ) 2 ) 2 Therefore: mod 30  (((-7 2 ) 2 ) 2 ) 2 (mod 30)  (((49) 2 ) 2 ) 2 (mod 30)  (((-11) 2 ) 2 ) 2 (mod 30)  ((121) 2 ) 2 (mod 30)  ((1) 2 ) 2 (mod 30)  (1) 2 (mod 30)  1(mod 30) Which implies that mod 30 = 1. Q: How ‘bout mod 30 ?

L1311 Fast Modular Exponentiation A: The previous method of repeated squaring works for any exponent that’s a power of isn’t. However, we can break 25 down as a sum of such powers: 25 = Apply repeated squaring to each part, and multiply the results together. Previous calculation: 23 8 mod 30 = mod 30 = 1 Thus: mod 30  (mod 30) 

L1312 Fast Modular Exponentiation A: The previous method of repeated squaring works for any exponent that’s a power of isn’t. However, we can break 25 down as a sum of such powers: 25 = Apply repeated squaring to each part, and multiply the results together. Previous calculation: 23 8 mod 30 = mod 30 = 1 Thus: mod 30  (mod 30)  ·23 8 ·23 1 (mod 30)  1·1·23 (mod 30) Final answer: mod 30 = 23

L1313 Fast Modular Exponentiation Q: How could we have figured out the decomposition 25 = from the binary (unsigned) representation of 25?

L1314 Fast Modular Exponentiation A: 25 = (11001) 2 This means that 25 = 1·16+1·8+0·4+0·2+1·1 = Can tell which powers of 2 appear by where the 1’s are. This follows from the definition of binary representation.