David Evans CS588: Security and Privacy University of Virginia Computer Science Lecture 12: Non-secret Key Cryptosystems.

Slides:



Advertisements
Similar presentations
RSA cryptosystem 1 q The most important public-key cryptosystem is the RSA cryptosystem on which one can also illustrate a variety of important ideas of.
Advertisements

CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (4) Information Security.
CSE331: Introduction to Networks and Security Lecture 19 Fall 2002.
22C:19 Discrete Structures Integers and Modular Arithmetic
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.
Great Theoretical Ideas in Computer Science.
Session 4 Asymmetric ciphers.
Cryptography in World War II Jefferson Institute for Lifelong Learning at UVa Spring 2006 David Evans Class 4: Modern Cryptography
Attacks on Digital Signature Algorithm: RSA
ECOMMERCE TECHNOLOGY SUMMER 2002 COPYRIGHT © 2002 MICHAEL I. SHAMOS Cryptographic Security.
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
1 Lecture #10 Public Key Algorithms HAIT Summer 2005 Shimrit Tzur-David.
Cryptography & Number Theory
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
Introduction to Modern Cryptography Lecture 7 1.RSA Public Key CryptoSystem 2.One way Trapdoor Functions.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
Dr.Saleem Al_Zoubi1 Cryptography and Network Security Third Edition by William Stallings Public Key Cryptography and RSA.
Public Key Algorithms 4/17/2017 M. Chatterjee.
Public Key Cryptography RSA Diffie Hellman Key Management Based on slides by Dr. Lawrie Brown of the Australian Defence Force Academy, University College,
Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.5 Public Key Algorithms.
Lecture 6: Public Key Cryptography
Public Key Model 8. Cryptography part 2.
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
Because both the system’s privacy and the security of digital money depend on encryption, a breakthrough in mathematics or computer science that defeats.
Information Security and Management 13. Digital Signatures and Authentication Protocols Chih-Hung Wang Fall
CS5204 – Fall Cryptographic Security Presenter: Hamid Al-Hamadi October 13, 2009.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
Prime Numbers Prime numbers only have divisors of 1 and self
Network and Communications Network Security Department of Computer Science Virginia Commonwealth University.
Lecture 19 Page 1 CS 111 Online Symmetric Cryptosystems C = E(K,P) P = D(K,C) E() and D() are not necessarily the same operations.
RSA Implementation. What is Encryption ? Encryption is the transformation of data into a form that is as close to impossible as possible to read without.
Great Theoretical Ideas in Computer Science.
RSA Ramki Thurimella.
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.
David Evans CS200: Computer Science University of Virginia Computer Science Class 36: Public-Key Cryptography If you want.
Midterm Review Cryptography & Network Security
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
Public-Key Encryption
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
Cryptography and Network Security Chapter 9 - Public-Key Cryptography
RSA Slides by Kent Seamons and Tim van der Horst Last Updated: Oct 1, 2013.
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
Scott CH Huang COM 5336 Cryptography Lecture 6 Public Key Cryptography & RSA Scott CH Huang COM 5336 Cryptography Lecture 6.
Public Key Cryptosystems RSA Diffie-Hellman Department of Computer Engineering Sharif University of Technology 3/8/2006.
Lecture 6.1: Misc. Topics: Number Theory CS 250, Discrete Structures, Fall 2011 Nitesh Saxena.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Cryptographic Security Identity-Based Encryption.
Chapter 4: Public Key Cryptography
CS 4803 Fall 04 Public Key Algorithms. Modular Arithmetic n Public key algorithms are based on modular arithmetic. n Modular addition. n Modular multiplication.
MM Clements Cryptography. Last Week Firewalls A firewall cannot protect against poor server, client or network configuration A firewall cannot.
Week 4 - Wednesday.  What did we talk about last time?  Finished DES  AES.
Lecture 9 Overview. Digital Signature Properties CS 450/650 Lecture 9: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
Great Theoretical Ideas in Computer Science.
EE 122: Lecture 24 (Security) Ion Stoica December 4, 2001.
David Evans CS551: Security and Privacy University of Virginia Computer Science Lecture 6: Key Exchange The era of “electronic.
RSA Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Foundations of Network and Computer Security J J ohn Black CSCI 6268/TLEN 5550, Spring 2014.
RSA Cryptosystem Great Theoretical Ideas In Computer Science S. Rudich V. Adamchik CS Spring 2006 Lecture 8Feb. 09, 2006Carnegie Mellon University.
David Evans CS588: Security and Privacy University of Virginia Computer Science Lecture 8: Non-secret Key Cryptosystems.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
CPIS 312 Chapter Four: PUBLIC KEY CRYPTO. Index 2 A.Introduction A.1 Asymmetric Key Cryptography- Introduction A.2 General ideas about the Public Key.
Lecture 5 Asymmetric Cryptography. Private-Key Cryptography Traditional private/secret/single key cryptography uses one key Shared by both sender and.
Private-Key Cryptography
Lecture 7: Non-secret Key Cryptosystems
Class 36: Public-Key Cryptography
Presentation transcript:

David Evans CS588: Security and Privacy University of Virginia Computer Science Lecture 12: Non-secret Key Cryptosystems (How Euclid, Fermat and Euler Created E-Commerce) Real mathematics has no effects on war. No one has yet discovered any warlike purpose to be served by the theory of numbers. G. H. Hardy, The Mathematician’s Apology, 1940.

CS588 Spring Applications of RSA Privacy: –Bob encrypts message to Alice using E A –Only Alice knows D A Signatures: –Alice encrypts a message to Alice using D A –Bob decrypts using E A –Knows it was from Alice, since only Alice knows D A Things you use every day: ssh, SSL, DNS,...

CS588 Spring Public-Key Applications: Privacy Alice encrypts message to Bob using Bob’s Private Key Only Bob knows Bob’s Private Key  only Bob can decrypt message Encrypt Decrypt Plaintext Ciphertext Plaintext Alice Bob Bob’s Public Key Bob’s Private Key

CS588 Spring Signatures Bob knows it was from Alice, since only Alice knows Alice’s Private Key Non-repudiation: Alice can’t deny signing message (except by claiming her key was stolen!) Integrity: Bob can’t change message (doesn’t know Alice’s Private Key) Encrypt Decrypt Plaintext Signed Message Plaintext Alice Bob Alice’s Private Key Alice’s Public Key

CS588 Spring Public-Key Cryptography Private procedure: E Public procedure: D Identity: E (D (m)) = D (E (m)) = m Secure: cannot determine E from D But didn’t know how to find suitable E and D

CS588 Spring Properties of E and D Trap-door one way function: 1. D (E (M)) = M 2. E and D are easy to compute. 3.Revealing E doesn’t reveal an easy way to compute D Trap-door one way permutation: also 4. E (D (M)) = M

CS588 Spring RSA E(M) = M e mod n d D(C) = C d mod n pqpq n = pqp, q are prime d d is relatively prime to (p – 1)(q – 1) d ed  1 (mod (p – 1)(q – 1)) red (red things are secret)

CS588 Spring Properties of E and D Trap-door one way function: 1. D (E (M)) = M 2. E and D are easy to compute. 3.Revealing E doesn’t reveal an easy way to compute D Trap-door one way permutation: also 4. E (D (M)) = M

CS588 Spring Property 1: D (E (M)) = M E(M) = M e mod n D(E(M)) = (M e mod n) d mod n = M ed mod n (as in D-H proof) Can we choose e, d and n with this property: M  M ed mod n equivalently: 1  M ed-1 mod n

CS588 Spring Finding e, d and n We are looking for e, d and n such that: M ed-1  1 mod n Euler’s Theorem: for a and n relatively prime: a  (n)  1 mod n Next: –What is  (n) –Proof of Euler’s Theorem –How it works for arbitrary M –Given  (n) how do we find e and d

CS588 Spring Euler’s Totient Function  (n) = number of positive integers less than n that are relatively prime to n If n is prime,  (n) = n – 1 –Proof by contradiction What if n = pq where p and q are prime?

CS588 Spring Totient Products For primes, p and q : n = pq  (n) = numbers < n not relatively prime to pq = pq – 1 ; numbers less than pq – (q – 1) ; size of p, 2p, …, (q – 1)p – (p – 1) ; size of q, 2q, …, (p – 1)q = pq – 1 – (q – 1) – (p – 1) = pq – (p + q) + 1 = (p – 1) (q – 1) =  (p)  (q)

CS588 Spring Fermat’s Little Theorem If n is prime and a is not divisible by n a n-1  1 mod n

CS588 Spring Fermat’s Little Theorem Proof If n is prime and a is not divisible by n : {a mod n, 2a mod n, …, (n-1)a mod n} = {1, 2, …, (n – 1) } Product of all elements in sets: a  2a  …  (n – 1) a  (n – 1)! mod n (n – 1)!a n-1  (n – 1)! mod n a n-1  1 mod n QED.

CS588 Spring Euler’s Theorem For a and n relatively prime: a  (n)  1 mod n Partial Proof: If n is prime,  (n) = n – 1 and a n - 1  1 mod n by Fermat’s Little Theorem What if n is not prime?

CS588 Spring Euler’s Theorem, cont. For a and n relatively prime: a  (n)  1 mod n  (n) = number of numbers < n not relatively prime to n We can write those numbers as: R = { x 1, x 2, …, x  (n) }

CS588 Spring Proving Euler’s Theorem R = { x 1, x 2, …, x  (n) } multiply by a mod n : S = { ax 1 mod n, ax 2 mod n, …, ax  (n) mod n} S is a permutation of R : a is relatively prime to n a is relatively prime to all x i ax i is relatively prime to n –Hence all elements of S are in R. –There are no duplicates in S. If ax i mod n = ax j mod n then i = j. since a is relatively prime to n

CS588 Spring Proving Euler’s Theorem x 1  x 2 …  x  (n) = ax 1 mod n  ax 2 mod n …  ax  (n) mod n  (ax 1  ax 2 …  ax  (n) ) mod n  a  (n)  x 1  x 2 …  x  (n) mod n 1  a  (n) mod nQED.

CS588 Spring Recap We are looking for e, d and n such that: M ed-1  1 mod n Euler’s Theorem: 1  a  (n) mod n for a and n relatively prime If n is prime,  (n) = n – 1. For p and q prime,  (pq) =  (p)  (q) ed – 1 =  (n) = (p-1)(q-1) What if M is not relatively prime to n ? n = pq

CS588 Spring M and n Suppose M and n not relatively prime: gcd (M, n)  1 Since n = pq and p and q are prime: gcd (M, p)  1 OR gcd (M, q)  1 Case 1: M = cp gcd (M, q) = 1 (otherwise M is multiple of both p and q, but M < pq). So, M  (q)  1 mod q (by Euler’s theorem, since M and q are relatively prime)

CS588 Spring M and n, cont Case 1: M = cp gcd (M, q) = 1 (otherwise M is multiple of both p and q, but M < pq). So, M  (q)  1 mod q (by Euler’s theorem, since M and q are relatively prime) M  (q)  1 mod q (M  (q) )  (p)  1 mod q M  (q)  (p)  1 mod q M  (n)  1 mod q

CS588 Spring M and n M  (n)  1 mod q M  (n) = 1 + k q for some k M = cp recall gcd (M, p)  1 M  M  (n) = (1 + k q)cp M  (n) + 1 = cp + k qcp = M + k cn M  (n) + 1  M mod n

CS588 Spring Where’s ED? ed – 1 =  (n) = (p-1)(q-1) So, we need to choose e and d: ed =  (n) + 1 = n – (p + q) Pick random d, relatively prime to  (n) gcd (d,  (n)) = 1 Since d is relatively prime to  (n) it has a multiplicative inverse e : de  1 mod  (n)

CS588 Spring Identity de  1 mod  (n) So, d * e = (k *  (n)) + 1 for some k. Hence, M ed-1 mod n = M k *  (n) mod n

CS588 Spring D (E (M)) = M M ed-1 mod n = M k *  (n) mod n Euler says 1  M  (n) mod n. So 1  M k *  (n) mod n 1  M ed-1 mod n M  M ed mod n QED.

CS588 Spring Properties of E and D Trap-door one way function: 1. D (E (M)) = M 2. E and D are easy to compute. 3.Revealing E doesn’t reveal an easy way to compute D Trap-door one way permutation: also 4. E (D (M)) = M 

Movie Break Adam Glaser and Portman Wills CS588 Fall 2001 PS4

CS588 Spring Questionable Statements in RSA Paper: Finalists 1) "The reader is urged to find a way to "break" the system. Once the method has withstood all attacks for a sufficient length of time it may be used with a reasonable amount of confidence." The authors appear to advocating the same method of validation that they called "fruitless" earlier in the paper (referring to the NBS certification). 2) RSA seems to gloss over the whole PKI issue. They suggest either a single authority to hold all the keys or publishing a book to all the users. I'd also like to point out that RSA like to "excessively" to quotation marks for no apparent "purpose." 1. The problem is mentioned on page 4 and 6 of the paper: The trusted distribution of the public portion of the key. If one were to modify the public keys in transport or to attack a central repository, then it would be impossible to be sure of the authenticity of the keys. (The suggestion of having a telephone book is not even possibly applicable due to the need to securely deliver it to all users from trusted central source). This can be seen as present problem with the loss of keys by Microsoft (resulting in forced revocation) and the limited trust one can put in Verisign due to limited checks done. 2. The assumption in conclusion that a protocol is secure due to lack of success in attacks for some period of time. The recent attacks upon SHA/MD5 show that even 10 years could be insufficient time to prove security.

CS588 Spring Only Two Submissions This is pathetic! There will be a Short Quiz in class Tuesday –Closed book, closed notes –Covers material in RSA paper and new paper handed out today –Andrew and Aleks are exempt

CS588 Spring Two “Questionable” Statements in RSA Paper 1.“The need for a courier between every pair of users has thus been replaced by the requirement for a single secure meeting between each user and the public file manager when the user joins the system.” (p. 6)

CS588 Spring Two “Questionable” Statements in RSA Paper 2.“(The NBS scheme (DES) is probably somewhat faster if special-purposed hardware encryption devices are used; our scheme may be faster on a general-purpose computer since multiprecision arithmetic operations are simpler to implement than complicated bit manipulations.)” (p. 4)

CS588 Spring Who really invented RSA? General Communications Headquarters, Cheltenham (formed from Bletchley Park after WWII) 1969 – James Ellis asked to work on key distribution problem Secure telephone conversations by adding “noise” to line Late 1969 – idea for PK, but function

CS588 Spring RSA & Diffie-Hellman Asks Clifford Cocks, Cambridge mathematics graduate, for help He discovers RSA (four years early) Then (with Malcolm Williamson) discovered Diffie-Hellman Kept secret until 1997! NSA claims they had it even earlier

CS588 Spring Charge Reread the parts of RSA paper you didn’t understand the first time Work on your project! Short Quiz on RSA material and Encrypted Searches paper in class Tuesday –Closed-book, closed-notes, open-T-shirt Next time: RSA Properties 2, 3 and 4