95-712 OOP/Java1 Public Key Crytography From: Introduction to Algorithms Cormen, Leiserson and Rivest.

Slides:



Advertisements
Similar presentations
RSA.
Advertisements

Asymmetric-Key Cryptography
Public Key Encryption Algorithm
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
7. Asymmetric encryption-
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.
Distributed Systems1 Lecture 12: RSA Distributed Systems2 Plan for today: Introduce RSA and a toy example using small numbers. This is.
1 Lecture #10 Public Key Algorithms HAIT Summer 2005 Shimrit Tzur-David.
Public Key Cryptography
Public Encryption: RSA
RSA Exponentiation cipher
WS Algorithmentheorie 03 – Randomized Algorithms (Public Key Cryptosystems) Prof. Dr. Th. Ottmann.
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.
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.
Dr.Saleem Al_Zoubi1 Cryptography and Network Security Third Edition by William Stallings Public Key Cryptography and RSA.
1 Pertemuan 08 Public Key Cryptography Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
Public Key Cryptography RSA Diffie Hellman Key Management Based on slides by Dr. Lawrie Brown of the Australian Defence Force Academy, University College,
Codes, Ciphers, and Cryptography-RSA Encryption
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 Model 8. Cryptography part 2.
 Introduction  Requirements for RSA  Ingredients for RSA  RSA Algorithm  RSA Example  Problems on RSA.
Department of Mathematics and Statistics
Page 1 Secure Communication Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
The RSA Algorithm Rocky K. C. Chang, March
Computer Science 101 Cryptography Part II
10.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 10 Symmetric-Key Cryptography.
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.
Cryptography: RSA & DES Marcia Noel Ken Roe Jaime Buccheri.
10/1/2015 9:38:06 AM1AIIS. OUTLINE Introduction Goals In Cryptography Secrete Key Cryptography Public Key Cryptograpgy Digital Signatures 2 10/1/2015.
Encryption Coursepak little bit in chap 10 of reed.
Prelude to Public-Key Cryptography Rocky K. C. Chang, February
Symmetric versus Asymmetric Cryptography. Why is it worth presenting cryptography? Top concern in security Fundamental knowledge in computer security.
1 Lecture 9 Public Key Cryptography Public Key Algorithms CIS CIS 5357 Network Security.
Public-Key Cryptography CS110 Fall Conventional Encryption.
Midterm Review Cryptography & Network Security
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
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.
P1. Public-Key Cryptography and RSA 5351: Introduction to Cryptography Spring 2013.
CS461/ECE422 Spring 2012 Nikita Borisov — UIUC1.  Text Chapters 2 and 21  Handbook of Applied Cryptography, Chapter 8 
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
1 Introduction The State of the Art in Electronic Payment Systems, IEEE Computer, September 1997.
Cryptography & Network Security : Topic Seminar Description & Analysis Madhava.N 1RV06SCN05 2 nd Semester M.Tech CNE RVCE RSA ALGORITHM.
IT 221: Introduction to Information Security Principles Lecture 4: Public-Key Cryptography For Educational Purposes Only Revised: September 15, 2002.
Chapter 3 – Public Key Cryptography and RSA (A). Private-Key Cryptography traditional private/secret/single-key cryptography uses one key shared by both.
Public Key Cryptosystems RSA Diffie-Hellman Department of Computer Engineering Sharif University of Technology 3/8/2006.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
POON TENG HIN.  RSA  Shamir’s Three-Pass Protocol  Other issues.
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Cryptographic Security Identity-Based Encryption.
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.
Introduction to Cryptography Lecture 9. Public – Key Cryptosystems Each participant has a public key and a private key. It should be infeasible to determine.
Chapter 12: Cryptography MAT 320 Spring Cryptography: Basic Ideas We want to encode information so that no one other than the intended recipient.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
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.
SOA Seminar1 Seminar on Service Oriented Architecture RSA.
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
Intro to Cryptography ICS 6D Sandy Irani. Cryptography Intro Alice wants to send a message to Bob so that even if Eve can see the transmitted information,
Digital Signatures.
Public Key Cryptosystem
Chapter 3 - Public-Key Cryptography & Authentication
Introduction to Algorithms Second Edition by
Presentation transcript:

OOP/Java1 Public Key Crytography From: Introduction to Algorithms Cormen, Leiserson and Rivest

OOP/Java2 Purpose Privacy: to send encrypted messages over an insecure channel. Authentication: To digitally sign messages. Public Key Cryptography was first introduced by Diffie and Hellman in 1976.

OOP/Java3 The RSA Public-Key Cryptosystem Developed by Rivest, Shamir, and Aldeman in 1977 Since then the field of cryptography has blossomed

OOP/Java4 The Cast of Characters Eve - always peeking at messages she should not be seeing. Mallory - always trying to manipulate messages she has no business manipulating. Bob and Alice - always trying to communicate over insecure channels. Trent - A trusted third party who tries to help Bob and Alice.

OOP/Java5 The RSA Public-Key Cryptosystem 1.Select at random two large prime numbers p and q. These numbers would normally be about 500 digits in length. 2.Compute n by the equation n = p X q. 3.Compute  (n) = (p –1) X (q –1) 4.Select a small odd integer e that is relatively prime to  (n)

OOP/Java6 The RSA Public-Key Cryptosystem 5. Compute d as the multiplicative inverse of e modulo  (n). A theorem in number theory asserts that d exists and is uniquely defined. 6. Publish the pair P = (e,n) as the RSA public key. 7. Keep secret the pair S = (d,n) as the RSA secret key.

OOP/Java7 The RSA Public-Key Cryptosystem 8. To encrypt a message M compute C = M e (mod n) 9. To decrypt a message C compute M = C d (mod n)

OOP/Java8 Key Selection Phase 1.Select at random two large prime numbers p and q. These numbers would normally be about 500 digits in length. p = 3 q = 11 2.Compute n by the equation n = p X q. n = Compute  (n) = (p –1) X (q –1)  (n) = (2) X (10) = 20

OOP/Java9 Key Selection Phase 4. Select a small odd integer e that is relatively prime to  (n) p = 3 q = 11 n = 33  (n) = 20 e = 3

OOP/Java10 Key Selection Phase 5. Compute d as the multiplicative inverse of e, modulo  (n). A theorem in number theory asserts that d exists and is uniquely defined (since e and  (n) are relatively prime). We need a d so that ed mod  = 1 Let’s try 1. 3 X 1 mod 20 = 3 mod 20 = 3. Nope. p = 3 q = 11 n = 33  (n) = 20 e = 3

OOP/Java11 Key Selection Phase We need a d so that ed mod  = 1 Let’s try 2. 3 X 2 mod 20 = 6 mod 20 = 6. Nope. Let’s try 7. 3 X 7 mod 20 = 21 mod 20 = 1. We found it! We need a better way….we’ll see this soon. p = 3 q = 11 n = 33  (n) = 20 e = 3

OOP/Java12 Key Selection Phase 6. Publish the pair P = (e,n) as the RSA public key. “Hey everyone, my key pair is 3 and 33” 7. Keep secret the pair S = (d,n) as the RSA secret key. “I’m not telling anyone about 7 and 33!!” p = 3 q = 11 n = 33  (n) = 20 e = 3 d = 7

OOP/Java13 Message encoding phase e = 3 n = 33Bob’s public keys are Alice wants to send the letter ‘d’ to Bob. Suppose that we have a public code where ‘a’ = 0 ‘b’ = 1 ‘c’ = 2 ‘d’ = 3 and so on… Alice’s software knows that 8. To encrypt a message M compute C = M e (mod n) = 3 3 mod 33 = 27 mod 33 = 27

OOP/Java14 Message decoding phase d = 7 n = 33Bob’s private keys are Bob receives a 27 from Alice: 9. To decrypt a message C compute M = C d (mod n) = 27 7 mod 33 = mod 33 = 3 (which is ‘d’)