CSE 321 Discrete Structures

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.
22C:19 Discrete Structures Integers and Modular Arithmetic
CSE 311 Foundations of Computing I Lecture 13 Number Theory Autumn 2012 CSE
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
Great Theoretical Ideas in Computer Science.
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.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Tuesday, 26 November Number-Theoretic Algorithms Chapter 31.
Cryptography Lecture 11: Oct 12. Cryptography AliceBob Cryptography is the study of methods for sending and receiving secret messages. adversary Goal:
CS470, A.SelcukPublic Key Cryptography1 CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
Public Key Cryptography
Public Encryption: RSA
CSE 321 Discrete Structures Winter 2008 Lecture 8 Number Theory: Modular Arithmetic.
Theory I Algorithm Design and Analysis (9 – Randomized algorithms) Prof. Dr. Th. Ottmann.
Codes, Ciphers, and Cryptography-RSA Encryption
1 Introduction to Codes, Ciphers, and Cryptography Michael A. Karls Ball State University.
CSE 321 Discrete Structures Winter 2008 Lecture 10 Number Theory: Primality.
CSE 311 Foundations of Computing I Lecture 12 Primes, GCD, Modular Inverse Spring
RSA Public Key Algorithm. RSA Algorithm history  Invented in 1977 at MIT  Named for Ron Rivest, Adi Shamir, and Len Adleman  Based on 2 keys, 1 public.
Great Theoretical Ideas in Computer Science.
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.
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.
The RSA Algorithm. Content Review of Encryption RSA An RSA example.
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 311: Foundations of Computing Fall 2014 Lecture 12: Primes, GCD.
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.
POON TENG HIN.  RSA  Shamir’s Three-Pass Protocol  Other issues.
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.
CSE 311 Foundations of Computing I Lecture 14 Euclid’s Algorithm Mathematical Induction Autumn 2012 CSE
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.
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 
Week 4 - Wednesday.  What did we talk about last time?  Finished DES  AES.
CSE 311: Foundations of Computing Fall 2013 Lecture 12: Primes, GCD, modular inverse.
Great Theoretical Ideas in Computer Science.
RSA Cryptosystem Great Theoretical Ideas In Computer Science S. Rudich V. Adamchik CS Spring 2006 Lecture 8Feb. 09, 2006Carnegie Mellon University.
RSA Algorithm Date: 96/10/17 Wun-Long Yang. Outline Introduction to RSA algorithm RSA efficient implementation & profiling.
Lecture 5 Asymmetric Cryptography. Private-Key Cryptography Traditional private/secret/single key cryptography uses one key Shared by both sender and.
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.
RSA cryptosystem with large key length
Public Key Encryption Major topics The RSA scheme was devised in 1978
David Kauchak CS52 – Spring 2016
Chapter Applications of Number Theory Some Useful Results
RSA Slides by Kent Seamons and Tim van der Horst
CS 2210:0001Discrete Structures Modular Arithmetic and Cryptography
RSA Preliminaries.
PUBLIC-KEY ENCRYPTION Focusing on RSA
ALGORITHM NUMBER THEORY
Number-Theoretic Algorithms (UNIT-4)
Factoring large integers
CSE 311 Foundations of Computing I
Number Theory and Euclidean Algorithm
Analysis of the RSA Encryption Algorithm
Tuesday, 27 April Number-Theoretic Algorithms Chapter 31
Number Theory.
CSE 321 Discrete Structures
Discrete Math for CS CMPSC 360 LECTURE 14 Last time:
Where Complexity Finally Comes In Handy…
Chapter -5 PUBLIC-KEY CRYPTOGRAPHY AND RSA
Where Complexity Finally Comes In Handy…
Oblivious Transfer.
Where Complexity Finally Comes In Handy…
Presentation transcript:

CSE 321 Discrete Structures Winter 2008 Lecture 11 Number Theory: Applications

Announcements Readings Friday: Next week Midterm: Applications of Number Theory 3.7 (5th Edition: 2.6) Next week Induction and recursion 4.1-4.2 (5th Edition: 3.3-3.4) Midterm: Friday, February 8

Highlights from Lecture 10 Primality Discrete Log Problem Euclid’s Theorem Infinitude of Primes Density of Primes Factorization vs. Primality Testing Probabilistic Primality Testing

Greatest Common Divisor GCD(a, b): Largest integer d such that d|a and d|b GCD(100, 125) = GCD(17, 49) = GCD(11, 66) =

Euclid’s Algorithm GCD(x, y) = GCD(y, x mod y) a = 98, b = 35 int GCD(int a, int b){ /* a >= b, b > 0 */ int tmp; int x = a; int y = b; while (y > 0){ tmp = x % y; x = y; y = tmp; } return x;

Extended Euclid’s Algorithm If GCD(x, y) = g, there exist integers s, t, such sx + ty = g; The values x, y in Euclid’s algorithm are linear sums of a, b. A little book keeping can be used to keep track of the constants

Chinese Remainder Theorem Find an x in [0 . . . 11484] such that x mod 11 = 9 x mod 29 = 7 x mod 36 = 14 Simple version: Suppose: p, q prime x  a (mod p) x  b (mod q) What is x mod pq ?

p, q prime, x mod p = a, x mod q = b Choose s, t such that sp + tq = 1 Let f(a, b) = (atq + bsp) mod pq f(a, b) mod p = a; f(a, b) mod q = b f is 1 to 1 between [0..p-1][0..q-1] and [0..pq – 1] Corollary: x mod p = a; x mod q = a, then x mod pq = a

Cryptography ALICE BOB

Perfect encryption Alice and Bob have a shared n-bit secret S To send an n-bit message M, Alice sends M  S to Bob Bob receives the message N, to decode, Bob computes N  S

Public Key Cryptography How can Alice send a secret message to Bob if Bob cannot send a secret key to Alice? ALICE BOB My public key is: 13890580304018329082310291802198210923810830129823019128092183021398301292381320498068029809347849394598178479388287398457923893848928823748283829929384020010924380915809283290823823

RSA Rivest – Shamir – Adelman n = pq. p, q are large primes Choose e relatively prime to (p-1)(q-1) Find d, k such that de + k(p-1)(q-1) = 1 by Euclid’s Algorithm Publish e as the encryption key, d is kept private as the decryption key

Message protocol Bob Alice Precompute p, q, n, e, d Publish e, n Read e, n from Bob’s public site To send message M, compute C = Me mod n Send C to Bob Compute Cd to decode message M

Decryption de = 1 + k(p-1)(q-1) Cd  (Me)d= Mde = M1 + k(p-1)(q-1) (mod n) Cd M (Mp-1)k(q-1)  M (mod p) Cd M (Mq-1)k(p-1)  M (mod q) Hence Cd  M (mod pq)

Practical Cryptography ALICE Here is my public key BOB I want to talk to you, here is my private key ALICE BOB Okay, here is my private key ALICE BOB ALICE Yadda, yadda, yadda BOB