Data encryption with big prime numbers

Slides:



Advertisements
Similar presentations
RSA.
Advertisements

RSA COSC 201 ST. MARY’S COLLEGE OF MARYLAND FALL 2012 RSA.
CSE331: Introduction to Networks and Security Lecture 19 Fall 2002.
Public Key Cryptosystems - RSA Receiver Sender Eavesdroppe r p q p q p q p and q prime.
22C:19 Discrete Structures Integers and Modular Arithmetic
BY : Darshana Chaturvedi.  INTRODUCTION  RSA ALGORITHM  EXAMPLES  RSA IS EFFECTIVE  FERMAT’S LITTLE THEOREM  EUCLID’S ALGORITHM  REFERENCES.
Public Key Encryption Algorithm
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
Notation Intro. Number Theory Online Cryptography Course Dan Boneh
7. Asymmetric encryption-
1 The RSA Algorithm Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
Session 4 Asymmetric ciphers.
The RSA Cryptosystem and Factoring Integers (II) Rong-Jaye Chen.
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.
Public Encryption: RSA
CSE331: Introduction to Networks and Security Lecture 20 Fall 2002.
Cryptography & Number Theory
Introduction to Modern Cryptography Lecture 7 1.RSA Public Key CryptoSystem 2.One way Trapdoor Functions.
RSA Encryption William Lu. RSA Background  Basic technique first discovered in 1973 by Clifford Cocks of CESG (part of British GCHQ)  Invented in 1977.
Public Key Algorithms 4/17/2017 M. Chatterjee.
DTTF/NB479: Dszquphsbqiz Day 9 Announcements: Homework 2 due now Homework 2 due now Computer quiz Thursday on chapter 2 Computer quiz Thursday on chapter.
© Copyright Martin Tompa, 1999 Secret Codes, Unforgeable Signatures, and Coin Flipping on the Phone Martin Tompa Computer Science & Engineering University.
RSA Encryption Caitlin O’Dwyer. What is an RSA Number? An RSA number n is a number s.t. n=pq Where p and q are distinct, large, prime integers.
“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.
Lecture 6: Public Key Cryptography
The RSA Algorithm Based on the idea that factorization of integers into their prime factors is hard. ★ n=p . q, where p and q are distinct primes Proposed.
 Introduction  Requirements for RSA  Ingredients for RSA  RSA Algorithm  RSA Example  Problems on RSA.
1 CIS 5371 Cryptography 8. Asymmetric encryption-.
1 Network Security Lecture 6 Public Key Algorithms Waleed Ejaz
Section 4.3: Fermat’s Little Theorem Practice HW (not to hand in) From Barr Text p. 284 # 1, 2.
RSA and its Mathematics Behind
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.
Lecture 2 Basic Number Theory and Algebra. In modern cryptographic systems,the messages are represented by numerical values prior to being encrypted and.
MA/CSSE 473 Day 11 Primality testing summary Data Encryption RSA.
Implementing RSA Encryption in Java
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
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.
Algebra of RSA codes Yinduo Ma Tong Li. Ron Rivest, Adi Shamir and Leonard Adleman.
RSA and its Mathematics Behind July Topics  Modular Arithmetic  Greatest Common Divisor  Euler’s Identity  RSA algorithm  Security in RSA.
22C:19 Discrete Structures Integers and Modular Arithmetic Fall 2014 Sukumar Ghosh.
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!
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.
Ch1 - Algorithms with numbers Basic arithmetic Basic arithmetic Addition Addition Multiplication Multiplication Division Division Modular arithmetic Modular.
Chapter 12: Cryptography MAT 320 Spring Cryptography: Basic Ideas We want to encode information so that no one other than the intended recipient.
Encryption on the Internet Jeff Cohen. Keeping Information Secret What information do we want to be secret? –Credit card number –Social security number.
Fermat’s Little Theorem The RSA Cryptosystem will require exponentiation to decrypt messages. Exponentiation Notation Example 1: Compute Exponentials Example.
Introduction to Number Theory
Dan Boneh Intro. Number Theory Fermat and Euler Online Cryptography Course Dan Boneh.
Great Theoretical Ideas in Computer Science.
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.
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
Information and Computer Security CPIS 312 Lab 8 1 Asymmetric Key Algorithms RSA Algorithm TRIGUI Mohamed Salim.
Copyright © Zeph Grunschlag, RSA Encryption Zeph Grunschlag.
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
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.
Public Key Cryptography
Public Key Encryption Major topics The RSA scheme was devised in 1978
RSA Preliminaries.
Cryptography Lecture 22.
Number Theory and Euclidean Algorithm
Public-key encryption
Cryptography Lecture 18.
Presentation transcript:

Data encryption with big prime numbers Daniel FreemaN, SLU

Old school codes Full knowledge of the code is needed to both encrypt messages and to decrypt messages. The code can only be used between a small number of trusted people.

Public key encryption If you buy something online, you need to send your credit card number to Amazon. Your computer needs to be able to encrypt your credit card number. Amazon does NOT want you to be able to decrypt other people’s credit card numbers. Everyone needs to be able to encrypt but only Amazon should be able to decrypt. We need a mathematical technique that is computationally very simple to evaluate, but is extremely computationally difficult to invert.

Multiplication is easy, factoring is hard Typing in the following into Wolfram Alpha 3568535685356853568535723 * 7564533681359827542555893 gives an output of 26994308385016394749558484505346578147056894665639 Typing in the following into Wolfram Alpha factor 26994308385016394749558484505346578147056894665639 gives an output of factor 26994308385016394749558484505346578147056894665639

Mod n We think of x mod n as the remainder when x is divided by n. 1≡7 𝑚𝑜𝑑 3 2≡12 𝑚𝑜𝑑 5 0≡15 𝑚𝑜𝑑 5 More generally, x≡y mod n means that x and y have the same remainder when divided by n, or that x-y is a multiple of n. 10≡7 𝑚𝑜𝑑 3 22≡12 𝑚𝑜𝑑 5 30≡15 𝑚𝑜𝑑 5

Modular exponentiation 3 1 ≡3 𝑚𝑜𝑑 5 3 42 ≡ 3 2 5 + 2 3 +2 𝑚𝑜𝑑 5 3 2 ≡9≡4 𝑚𝑜𝑑 5 ≡ 3 2 5 + 2 3 +2 𝑚𝑜𝑑 5 3 3 ≡3∗ 3 2 ≡3∗4 ≡12≡2 𝑚𝑜𝑑 5 ≡ (3 2 ) 5 (3 2 ) 3 3 2 𝑚𝑜𝑑 5 3 4 ≡3∗ 3 3 ≡3∗2 ≡6≡1 𝑚𝑜𝑑 5 ≡ 4 5 ∗4 3 ∗4 𝑚𝑜𝑑 5 ⋮ ≡4 𝑚𝑜𝑑 5 Fermat’s little theorem: Let p be a prime number and let x be an integer that is not divisible by p. Then, 𝑥 𝑝−1 ≡1 mod p or 𝑥 𝑝 ≡x mod p

Key points of modular exponentiation xm mod n can be efficiently calculated by expressing the exponent m in binary. Fermat’s little theorem: Let p be a prime number and let x be an integer that is not divisible by p. Then, 𝑥 𝑝−1 ≡1 mod p Euler’s theorem: Let p and q be distinct prime numbers and let x be an integer that is not divisible by p or q. Then, 𝑥 (𝑝−1)(𝑞−1) ≡1 𝑚𝑜𝑑 𝑝𝑞 𝑥 𝑝−1 𝑞−1 +1 ≡𝑥 𝑚𝑜𝑑 𝑝𝑞 More generally, if m ≡ 1 mod (p-1)(q-1) then 𝑥 𝑚 ≡𝑥 𝑚𝑜𝑑 𝑝𝑞

RSA encryption Choose 2 large prime numbers p and q. Calculate n=pq. p and q should be so large that it is not computationally feasible to factor n. n will be publicly shared, but p and q will be secret. Choose a positive integer e which is relatively prime to (p-1)(q-1). e will be publicly shared. Choose a positive integer d such that ed ≡ 1 mod (p-1)(q-1) d will be secret Suppose someone wants to encrypt the integer x such that 1<x<n-1. They encrypt x as the value y ≡ xe mod n To decrypt, we exponentiate to the power d to get yd ≡ xed ≡ x mod n

RSA example Choose p = 2498359 q = 5418341 p and q are just two big prime numbers Calculate n = pq = 2498359 * 5418341 = 13536961002419 Calculate φ(n) = (p-1)(q-1) = 2498358 * 5418340 = 13536953085720 Choose e = 234234239 e was picked to be a prime number big enough to most likely not a factor of (p-1)(q-1) Solve ed ≡ 1 mod (p-1)(q-1) d = 9846393595559 Suppose you want to send the number x=432564456 to Amazon. You calculate and send y=10021380275883 ≡ xe mod n Amazon then calculates x ≡ yd mod n