Public Key Cryptosystems RSA Diffie-Hellman Department of Computer Engineering Sharif University of Technology 3/8/2006.

Slides:



Advertisements
Similar presentations
1 Complexity ©D.Moshkovitz Cryptography Where Complexity Finally Comes In Handy…
Advertisements

IS 302: Information Security and Trust Week 4: Asymmetric Encryption
CSE331: Introduction to Networks and Security Lecture 19 Fall 2002.
Public Key Encryption Algorithm
7. Asymmetric encryption-
Great Theoretical Ideas in Computer Science.
OOP/Java1 Public Key Crytography From: Introduction to Algorithms Cormen, Leiserson and Rivest.
Public-key Cryptography Montclair State University CMPT 109 J.W. Benham Spring, 1998.
RSA ( Rivest, Shamir, Adleman) Public Key Cryptosystem
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:
ITIS 3200: Introduction to Information Security and Privacy Dr. Weichao Wang.
1 Lecture #10 Public Key Algorithms HAIT Summer 2005 Shimrit Tzur-David.
Public Encryption: RSA
WS Algorithmentheorie 03 – Randomized Algorithms (Public Key Cryptosystems) Prof. Dr. Th. Ottmann.
Theory I Algorithm Design and Analysis (9 – Randomized algorithms) Prof. Dr. Th. Ottmann.
WS Algorithmentheorie 03 – Randomized Algorithms (Public Key Cryptosystems) Prof. Dr. Th. Ottmann.
RSA Encryption William Lu. RSA Background  Basic technique first discovered in 1973 by Clifford Cocks of CESG (part of British GCHQ)  Invented in 1977.
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.
© Copyright Martin Tompa, 1999 Secret Codes, Unforgeable Signatures, and Coin Flipping on the Phone Martin Tompa Computer Science & Engineering University.
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.
“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.
Public Key Model 8. Cryptography part 2.
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
 Introduction  Requirements for RSA  Ingredients for RSA  RSA Algorithm  RSA Example  Problems on RSA.
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.
1 Public-Key Cryptography and Message Authentication Ola Flygt Växjö University, Sweden
Prime Numbers Prime numbers only have divisors of 1 and self
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Network Security (A Very Brief Introduction)
Network and Communications Network Security Department of Computer Science Virginia Commonwealth University.
1 Network Security Lecture 6 Public Key Algorithms Waleed Ejaz
Great Theoretical Ideas in Computer Science.
RSA Ramki Thurimella.
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.
Implementing RSA Encryption in Java
Improving Encryption Algorithms Betty Huang Computer Systems Lab
Introduction to Algorithms Second Edition by Cormen, Leiserson, Rivest & Stein Chapter 31.
Public Key Encryption CS432 – Security in Computing Copyright © 2005, 2008 by Scott Orr and the Trustees of Indiana University.
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
A Method for Obtaining Digital Signatures and Public-key Cryptosystems
Information Security -- Part II Public-Key Encryption and Hash Functions Frank Yeong-Sung Lin Information Management Department National Taiwan University.
Darci Miyashiro Math 480 April 29, 2013
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
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.
1 Public-Key Cryptography and Message Authentication.
CS461/ECE422 Spring 2012 Nikita Borisov — UIUC1.  Text Chapters 2 and 21  Handbook of Applied Cryptography, Chapter 8 
Algebra of RSA codes Yinduo Ma Tong Li. Ron Rivest, Adi Shamir and Leonard Adleman.
The RSA Algorithm. Content Review of Encryption RSA An RSA example.
Cryptography & Network Security : Topic Seminar Description & Analysis Madhava.N 1RV06SCN05 2 nd Semester M.Tech CNE RVCE RSA ALGORITHM.
Lecture 8 Overview. Analysis of Algorithms Algorithms – Time Complexity – Space Complexity An algorithm whose time complexity is bounded by a polynomial.
RSA The algorithm was publicly described in 1977 by Ron Rivest, Adi Shamir, and Leonard Adleman at MIT Partly used for PGP (Pretty Good Privacy) to encrypt.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
POON TENG HIN.  RSA  Shamir’s Three-Pass Protocol  Other issues.
PUBLIC-KEY CRYPTOGRAPHY AND RSA – Chapter 9 PUBLIC-KEY CRYPTOGRAPHY AND RSA – Chapter 9 Principles Applications Requirements RSA Algorithm Description.
Public Key Cryptosystem Introduced in 1976 by Diffie and Hellman [2] In PKC different keys are used for encryption and decryption 1978: First Two Implementations.
CS 4803 Fall 04 Public Key Algorithms. Modular Arithmetic n Public key algorithms are based on modular arithmetic. n Modular addition. n Modular multiplication.
UNIVERSITY OF BIELSKO- BIALA AKADEMIA TECHNICZNO-HUMANISTYCZNA Faculty of Mechanical Engineering and Computer Science.
Introduction to Cryptography Lecture 9. Public – Key Cryptosystems Each participant has a public key and a private key. It should be infeasible to determine.
RSA Pubic Key Encryption CSCI 5857: Encoding and Encryption.
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
RSA Algorithm Date: 96/10/17 Wun-Long Yang. Outline Introduction to RSA algorithm RSA efficient implementation & profiling.
Public Key Cryptosystem
Asymmetric-Key Cryptography
Analysis of the RSA Encryption Algorithm
Presentation transcript:

Public Key Cryptosystems RSA Diffie-Hellman Department of Computer Engineering Sharif University of Technology 3/8/2006

Public-Key Cryptosystems  Encryption and decryption procedure  A procedure consists of a general method and a key  D(E(M)) = M  Both E and D are easy to compute  D is not easily computable from E  E(D(M)) = M

Signatures  The signature must be message-dependent, as well as signer-dependent  Bob wants to send Alice a “signed” message  Sends E A (D B (M))  Bob cannot deny having sent Alice this message  Alice cannot modify M (use Bob’s sign for M’)

RSA  Ron Rivest, Adi Shamir and Leonard Adleman  Represent the message as integers between 0 and n-1  C  M e (mod n), for a message M  M  D(C)  C d (mod n), for a cipher text C  Encryption does not increase the size of a message  Encryption key is (e, n), Decryption key is (d, n)

The Keys  Generate two large random primes, p and q  n = pq  Pick d, a large random integer, relatively prime to (p-1)(q-1)  e is the “multiplicative inverse” of d mod (p-1)(q-1)  e.d  1 ( mod (p-1)(q-1) )  Prove that  D(E(M))  M (mod n)  E(D(M))  M (mod n)

An Example  p = 2, q = 11  n = 22 d should be relatively prime to (p-1)(q-1) = 10 d should be relatively prime to (p-1)(q-1) = 10  d = 7  e is the “multiplicative inverse” of d mod 10  e = 3 (e.d = 3 * 7 = 21  1 (mod 10)) The message, M = 4 The message, M = 4  C = M e mod 22 = 4 3 mod 22 = 20 M’ = C d mod 22 = 20 7 mod 22 = 4 = M M’ = C d mod 22 = 20 7 mod 22 = 4 = M

The Underlying Mathematics   (n) : The Euler totient function   (p) = p-1 for prime numbers   (n) =  (p).  (q) = (p-1).(q-1)  e.d  1 ( mod (p-1)(q-1) )  e.d  1 ( mod  (n) )  D(E(M))  (E(M)) d  (M e ) d  M e.d (mod n)  E(D(M))  (D(M)) e  (M d ) e  M e.d (mod n)  Using the corollary of Euler’s theorem  M e.d  M k  (n) + 1  (mod n)

How to find Large Prime Numbers?  Generate odd 100-digit random numbers (n)  by the prime numbers theorem, about ln( )/2 = 115 numbers will be tested before a prime is found  Test n with WITNESS(a, n) for 100 randomly choosen values of a  A negligible chance of for n to be composite  also the receiver would probably detect this (decryption doesn’t work correctly)

Large Prime Numbers (cont’d)  For more protection against factoring algorithms :  p and q should differ in length by a few digits  gcd (p - 1, q - 1) should be small  both (p - 1) and (q - 1) should contain large prime factors  to do so, generate a large prime u and let p be the first prime in the sequence ku + 1 for k = 2, 4, 6, …

Factoring n  Factoring n  break RSA  No polynomial-time algorithm known for Turing machines  Some quantum computer algorithm can factor in polynomial-time  Currently, unable to handle more than a half- dozen bits  The fastest algorithm known, by Richard Schroeppel, can factor n in ~ n steps sqrt ( ln ln(n) / ln(n) )

Factoring n (cont’d)  If P = NP breaking such systems is easy  An NP decision problem with complexity equivalent to that of integer factoring : L fact = { | there exist d (1 | there exist d (1 < d < a and d | b)}  The complement of L fact is also in NP (use the prime factorization of b as the certificate)  Factoring  NP  co-NP  If Factoring is NP-hard then NP = co-NP

Security (Cryptanalytic Approaches)  Obvious approaches for breaking this system are at least as difficult as factoring n  Computing  (n) without factoring n  Not easier than factoring n, n can be factored using  (n)  (n) = (p-1).(q-1) = n - (p + q) + 1  compute (p + q)  (n) = (p-1).(q-1) = n - (p + q) + 1  compute (p + q) (p - q) 2 = (p + q) 2 - 4n  compute p and q  Determining d without factoring n or computing  (n)  d  (e.d - 1) is a multiple of  (n)  n can be factored using any multiple of  (n) (Miller)

Diffie-Hellman Key Exchange  q and α: public elements  α < q and α a primitive root of prime number q  Alice  Select private X A < q  Calculate public Y A = α X mod q  Bob  Select private X B < q  Calculate public Y B = α X mod q  Generation of secret key: Alice: (Y B ) X mod q = Bob: (Y A ) X mod q A B A B

References  A Method for Obtaining Digital Signatures and Public-Key Cryptosystems, R.L. Rivest, A. Shamir, and L Adleman ( The P versus NP problem, Stephen Cook ( f) f Introduction to Quantum Information Processing, Richard Cleve ( Cryptographic Algorithms ( Introducing Public Key Cryptosystems (