RSA.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Cryptography encryption authentication digital signatures
1 Key Exchange Solutions Diffie-Hellman Protocol Needham Schroeder Protocol X.509 Certification.
Modular Arithmetic Several important cryptosystems make use of modular arithmetic. This is when the answer to a calculation is always in the range 0 –
Public Key Cryptosystem
Public Key Encryptions CS461/ECE422 Fall Reading Material Text Chapters 2 and 20 Handbook of Applied Cryptography, Chapter 8 –
Public Key Cryptography INFSCI 1075: Network Security – Spring 2013 Amir Masoumzadeh.
Addition 1’s to 20.
25 seconds left…...
Test B, 100 Subtraction Facts
Week 1.
1 Complexity ©D.Moshkovitz Cryptography Where Complexity Finally Comes In Handy…
Cryptography and Network Security Chapter 9
Data encryption with big prime numbers
22C:19 Discrete Structures Integers and Modular Arithmetic
Prime Numbers – True/False. 3. There are infinitely many primes. True We can prove this by assuming there aren’t: Multiply all the primes together,
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
Lecture 3.3: Public Key Cryptography III CS 436/636/736 Spring 2012 Nitesh Saxena.
7. Asymmetric encryption-
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.
Attacks on Digital Signature Algorithm: RSA
Public-key Cryptography Montclair State University CMPT 109 J.W. Benham Spring, 1998.
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.
Public Encryption: RSA
RSA Exponentiation cipher
Public Key Algorithms 4/17/2017 M. Chatterjee.
ELECTRONIC PAYMENT SYSTEMSFALL 2001COPYRIGHT © 2001 MICHAEL I. SHAMOS Electronic Payment Systems Lecture 6 Epayment Security II.
“RSA”. RSA  by Rivest, Shamir & Adleman of MIT in 1977  best known & widely used public-key scheme  RSA is a block cipher, plain & cipher text are.
Introduction to Public Key Cryptography
Asymmetric encryption. Asymmetric encryption, often called "public key" encryption, allows Alice to send Bob an encrypted message without a shared secret.
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
1 CIS 5371 Cryptography 8. Asymmetric encryption-.
Andreas Steffen, , 4-PublicKey.pptx 1 Internet Security 1 (IntSi1) Prof. Dr. Andreas Steffen Institute for Internet Technologies and Applications.
Department of Mathematics and Statistics
The RSA Algorithm Rocky K. C. Chang, March
1 AN EFFICIENT METHOD FOR FACTORING RABIN SCHEME SATTAR J ABOUD 1, 2 MAMOUN S. AL RABABAA and MOHAMMAD A AL-FAYOUMI 1 1 Middle East University for Graduate.
Merkle-Hellman Knapsack Cryptosystem Merkle offered $100 award for breaking singly - iterated knapsack Singly-iterated Merkle - Hellman KC was broken by.
HW6 due tomorrow Teams T will get to pick their presentation day in the order Teams T will get to pick their presentation day in the order Teams mostly.
Cryptography: RSA & DES Marcia Noel Ken Roe Jaime Buccheri.
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.
Public-Key Cryptography CS110 Fall Conventional Encryption.
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
Merkle-Hellman Knapsack Cryptosystem
CRYPTOGRAPHY. WHAT IS PUBLIC-KEY ENCRYPTION? Encryption is the key to information security The main idea- by using only public information, a sender can.
22C:19 Discrete Structures Integers and Modular Arithmetic Fall 2014 Sukumar Ghosh.
Scott CH Huang COM 5336 Cryptography Lecture 6 Public Key Cryptography & RSA Scott CH Huang COM 5336 Cryptography Lecture 6.
Attacking RSA Brian Winant Reference “Twenty Years of Attacks on the RSA Cryptosystem” By Dan Boneh In Notices of the American Mathematical.
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!
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.
Primality Testing. Introduction The primality test provides the probability of whether or not a large number is prime. Several theorems including Fermat’s.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
Data encryption with big prime numbers DANIEL FREEMAN, SLU.
Public Key Cryptosystem In Symmetric or Private Key cryptosystems the encryption and decryption keys are either the same or can be easily found from each.
Breaking Cryptosystems Joshua Langford University of Texas at Tyler Fall 2007 Advisor: Dr. Ramona Ranalli Alger.
Chapter 9 – Public Key Cryptography and RSA Every Egyptian received two names, which were known respectively as the true name and the good name, or the.
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
Copyright © Zeph Grunschlag, RSA Encryption Zeph Grunschlag.
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
Public Key Encryption Major topics The RSA scheme was devised in 1978
Public-key Cryptography
Presentation transcript:

RSA

Prime Numbers An integer p is a prime number if it has no factors other than 1 and itself. An integer which is greater than 1 and not a prime number is said to be composite. Thus given a composite number c we know that c=r*s for some non-trivial integers r and s.

Factorisation Given an integer n, there is an efficient algorithm to determine whether n is composite or prime. However determining the factors of a large composite number is a very hard problem. Known as the factorisation problem – this is the basis of the RSA cryptosystem.

The fastest factorisation algorithm at the moment is called the “Number Field Sieve” but even this is not all that efficient. To find the factors of a composite number n which is the product of 2 large primes, and has about 640 binary bits (approximately 200 decimal digits) is an impossible task even if you could use all of the computing power in the world!

Important to Note: Determining whether a large number is prime or composite is easy; Multiplying 2 large numbers together is easy; Factorising a large number which is the product of 2 large primes (i.e. retrieving the original prime factors) is very difficult.

Fermat’s Little Theorem If p is a prime number and a is any number between 1 and p-1 inclusive, then ap-1 mod p = 1 This is not true in general, which gives us a method to decide if a given number n is prime or composite.

Solving a problem Suppose I have a prime number p; a number m between 1 and p-1 inclusive; another number e also between 1 and p-1; And I compute c = me mod p If I give you c,e and p can you find m?

Yes you can if you take the following steps: Find a number d such that e*d=1 mod p-1 Compute cd mod p = m

Why does that work? We found d such that e*d = 1 mod p-1 That means that e*d – 1 = k(p-1) for some value of k. Or ed = k(p-1) +1

2. We computed cd mod p But cd = (me)d mod p = med mod p = mk(p-1) +1 mod p = mk(p-1) * m mod p = 1*m mod p = m mod p

This works because of Fermat’s Little Theorem. We know that since p is a prime we have ap-1=1 mod p for all a and so ck(p-1) = 1 mod p leaving us with the answer m in step 2. BUT if the modulus is not a prime number then the method doesn’t work.

Why doesn’t it work? In general an-1  1 mod n if n is not prime. We could make the method for finding m work if we knew the number r such that ar = 1 mod n If a and n are co-prime then there will be such a number r and there is a way to find it

Finding r In order to find r such that ar = 1 mod n, you have to be able to factorise n and find all of its prime factors. If n = p*q where p and q are primes then r = (p-1)*(q-1)

Important to note now: It is easy to determine whether a large number is prime or composite. It is easy to compute the product of two large primes n = p*q. Setting r = (p-1)*(q-1) we have mr = 1 mod n for all m co-prime with n.

Given e (co-prime with r), it is easy to determine d such that (e*d) =1 mod r It is easy to compute me mod n If c=me mod n then m=cd mod n and it is easy to compute cd mod n if you know d. You can only find d if you can find r and you can only find r if you can factorise n. Factorising n is hard.

This is the basis of the RSA public key cryptosystem This is the basis of the RSA public key cryptosystem. The holder of the public key knows p and q and therefore he/she can find r and therefore d and can compute cd mod n to find m. No-one else knows p and q, so they cannot find r or d and so they cannot recover m. There is no known way to recover m which is not equivalent to factorising n.

RSA – Key Generation Bob generates two large primes p and q (each with approx. 100 decimal digits). He computes n = p*q He computes r = (p-1)*(q-1) He chooses a random number e which is between 1 and r which has no factor in common with r.

He computes the private key d by solving the equation (e*d) =1 mod r. He can now carefully dispose of the values of p, q and r. Bob keeps d private but publishes the value of the pair (e,n). This is his public key.

RSA - Encryption Alice wishes to send Bob a message m. She takes the following steps: She looks up Bobs public key pair (e,n) . She computes c=me mod n and sends the value of c to Bob

RSA - Decryption Bob receives the value c from Alice. He decrypts it using his private key d by computing m=cd mod n

Notes The message m must be smaller than n. Alice breaks her message up into blocks each with a value less than n and encrypts each of these blocks individually. The public key can be used by anyone wishing to send Bob a message. He does not need a separate key pair for each correspondent.