Public Key Encryptions CS461/ECE422 Fall 2011. Reading Material Text Chapters 2 and 20 Handbook of Applied Cryptography, Chapter 8 –

Slides:



Advertisements
Similar presentations
RSA.
Advertisements

1 Pretty Good Privacy (PGP) Security for Electronic .
Public Key Cryptosystem
PUBLIC KEY CRYPTOSYSTEMS Symmetric Cryptosystems 6/05/2014 | pag. 2.
RSA and Public Key Cryptography Oct Nathanael Paul.
Public Key Cryptography INFSCI 1075: Network Security – Spring 2013 Amir Masoumzadeh.
30.1 Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Public-key encryption. Symmetric-key encryption Invertible function Security depends on the shared secret – a particular key. Fast, highly secure Fine.
Cryptography and Network Security Chapter 9
CSE331: Introduction to Networks and Security Lecture 19 Fall 2002.
Public Key Algorithms …….. RAIT M. Chatterjee.
Public-key Cryptography Montclair State University CMPT 109 J.W. Benham Spring, 1998.
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
ITIS 3200: Introduction to Information Security and Privacy Dr. Weichao Wang.
Csci5233 Computer Security & Integrity 1 Cryptography: Basics (2)
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.
Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender and receiver if this key is disclosed communications.
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.
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,
Cryptography and Network Security Chapter 10. Chapter 10 – Key Management; Other Public Key Cryptosystems No Singhalese, whether man or woman, would venture.
Public Key Cryptography and Cryptographic Hashes CS461/ECE422 Fall 2009.
CSCI 172/283 Fall 2010 Public Key Cryptography. New paradigm introduced by Diffie and Hellman The mailbox analogy: Bob has a locked mailbox Alice can.
C HAPTER 13 Asymmetric Key Cryptography Slides adapted from "Foundations of Security: What Every Programmer Needs To Know" by Neil Daswani, Christoph Kern,
Introduction to Public Key Cryptography
Public Key Model 8. Cryptography part 2.
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
1 CIS 5371 Cryptography 8. Asymmetric encryption-.
Page 1 Secure Communication Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Problems with symmetric (private-key) encryption 1) secure distribution of keys 2) large number of keys Solution to both problems: Public-key (asymmetric)
Great Theoretical Ideas in Computer Science.
10/1/2015 9:38:06 AM1AIIS. OUTLINE Introduction Goals In Cryptography Secrete Key Cryptography Public Key Cryptograpgy Digital Signatures 2 10/1/2015.
1 Lecture 9 Public Key Cryptography Public Key Algorithms CIS CIS 5357 Network Security.
Midterm Review Cryptography & Network Security
4 th lecture.  Message to be encrypted: HELLO  Key: XMCKL H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11.
Cryptography and Network Security (CS435) Part Eight (Key Management)
Cryptography and Network Security Chapter 10 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
1 Public-Key Cryptography and Message Authentication.
Computer and Network Security Rabie A. Ramadan Lecture 6.
Cryptography and Network Security Chapter 9 - Public-Key Cryptography
CS461/ECE422 Spring 2012 Nikita Borisov — UIUC1.  Text Chapters 2 and 21  Handbook of Applied Cryptography, Chapter 8 
Symmetric Cryptography, Asymmetric Cryptography, and Digital Signatures.
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
Cryptography & Network Security : Topic Seminar Description & Analysis Madhava.N 1RV06SCN05 2 nd Semester M.Tech CNE RVCE RSA ALGORITHM.
Chapter 3 – Public Key Cryptography and RSA (A). Private-Key Cryptography traditional private/secret/single-key cryptography uses one key shared by both.
Chapter 9 Public Key Cryptography and RSA. Private-Key Cryptography traditional private/secret/single key cryptography uses one key shared by both sender.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
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.
Key Management Network Systems Security Mort Anvari.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Introduction to Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Diffie-Hellman Key Exchange first public-key type scheme proposed by Diffie & Hellman in 1976 along with the exposition of public key concepts – note:
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
CSEN 1001 Computer and Network Security Amr El Mougy Mouaz ElAbsawi.
Public Key Cryptography and Cryptographic Hashes CS461/ECE422 1.
Key Exchange in Systems VPN usually has two phases –Handshake protocol: key exchange between parties sets symmetric keys –Traffic protocol: communication.
Lecture 5 Asymmetric Cryptography. Private-Key Cryptography Traditional private/secret/single key cryptography uses one key Shared by both sender and.
Public-key Cryptography
Public Key Cryptography Diffie-Hellman, Discrete Log, RSA
Cryptography: Basics (2)
Presentation transcript:

Public Key Encryptions CS461/ECE422 Fall 2011

Reading Material Text Chapters 2 and 20 Handbook of Applied Cryptography, Chapter 8 –

Slide #9-3 Public-Key Cryptography

Slide #9-4 Public Key Cryptography Two keys –Private key known only to individual –Public key available to anyone Idea –Confidentiality: encipher using public key, decipher using private key –Integrity/authentication: encipher using private key, decipher using public one –Symmetric Key distribution

Major Public Key Algorithms AlgorithmDigital SignatureSymmetric Key Distribution Encryption of secret keys RSAYes Diffie-HellmanNoYesNo DSSYesNo Elliptic CurveYes

Requirements 1.It is computationally easy for a party to generate a key pair 2.It is computationally easy to encrypt a message using a public key. 3.It is computationally easy for the receiver to decrypt a message using the private key 4.It is computationally infeasible for an opponent knowing only the public key to determine the private key. 5.It is computationally infeasible for an oponent knowing the public key and a ciphertext to recover the original message. 6.Either of the two related keys can be used for encryption with the other used for decryption.

Slide #9-7 General Facts about Public Key Systems Public Key Systems are much slower than Symmetric Key Systems –RSA 100 to 1000 times slower than DES. 10,000 times slower than AES? –Generally used in conjunction with a symmetric system for bulk encryption Public Key Systems are based on “hard” problems –Factoring large composites of primes, discrete logarithms, elliptic curves Only a handful of public key systems perform both encryption and signatures

Slide #9-8 Diffie-Hellman The first public key cryptosystem proposed Usually used for exchanging keys securely Compute a common, shared key –Called a symmetric key exchange protocol Based on discrete logarithm problem –Given integers n and g and prime number p, compute k such that n = g k mod p –Solutions known for small p –Solutions computationally infeasible as p grows large

Slide #9-9 Algorithm Public Constants: prime p, integer g ≠ 0, 1, or p–1 Choose private keys and compute public keys –Alice chooses private key kAlice, computes public key KAlice = g kAnne mod p –Similarly Bob chooses kBob, computes Kbob = g kBob mod p Exchange public keys and compute shared information –To communicate with Bob, Alice computes Kshared = KBob kAlice mod p –To communicate with Alice, Bob computes Kshared = KAlice kBob mod p

Working the Equations (KBob) kAlice mod p = (g kBob mod p) kAlice mod p = g kBob kAlice mod p (Kalice) kBob mod p = (g kAlice mod p) kBob mod p = g kAlice kBob mod p If Eve sees Kalice and Kbob, why can't she compute the common key?

Slide #9-11 Example Assume p = 53 and g = 17 Alice chooses kAlice = 5 –Then KAlice = 17 5 mod 53 = 40 Bob chooses kBob = 7 –Then KBob = 17 7 mod 53 = 6 Shared key: –KBob kAlice mod p = 6 5 mod 53 = 38 –KAlice kBob mod p = 40 7 mod 53 = 38

Real public DH values For IPSec and SSL, there are a small set of g's and p's published that all standard implementations support. – Group 1 and 2 – Group 5 and newer proposed values groups-00 groups-00

Diffie-Hellman and Man-in-the-Middle Alice Bob Eve

Slide #9-14 RSA by Rivest, Shamir& Adleman of MIT in 1977 best known & widely used public-key scheme based on exponentiation in a finite (Galois) field over integers modulo a prime –nb. exponentiation takes O((log n)3) operations (easy) uses large integers (eg bits) security due to cost of factoring large numbers –nb. factorization takes O(e log n log log n ) operations (hard)

Modular Arithmetic a mod b = x if for some k >= 0, bk + x = a Associativity, Commutativity, and Distributivity hold in Modular Arithmetic Inverses also exist in modular arithmetic – a + (-a) mod n = 0 – a * a -1 mod n = 1

Modular Arithmetic Reducibility also holds – (a + b) mod n = (a mod n + b mod n) mod n – a * b mod n = ((a mod n) * b mod n) mod n Fermat’s Thm: if p is any prime integer and a is an integer, then a p mod p = a – Corollary: a p-1 mod p = 1 if a != 0 and a is relatively prime to p

Slide #9-17 Background Totient function  (n) –Number of positive integers less than n and relatively prime to n Relatively prime means with no factors in common with n Example:  (10) = ? –4 because 1, 3, 7, 9 are relatively prime to 10 Example:  (p) = ? where p is a prime –p-1 because all lower numbers are relatively prime

Background Euler generalized Fermat’s Thm for composite numbers. – Recall Fermat's Thm a p-1 =1 mod p if a != 0 Euler’s Thm: x  (n) =1 mod n – Where q and p are primes – n = pq – then  (n) = (p–1)(q–1)

Slide #9-19 RSA Algorithm Choose two large prime numbers p, q –Let n = pq; then  (n) = (p–1)(q–1) –Choose e < n such that e is relatively prime to  (n). –Compute d such that ed mod  (n) = 1 Public key: (e, n); private key: d Encipher: c = m e mod n Decipher: m = c d mod n Generically: F(V, x) = V x mod n

Working through the equations C = F(M, e) = M e mod n M = F(F(M, e), d) M = (M e mod n) d mod n M = M ed mod n – ed mod  (n) = 1 – k*  (n) + 1 = ed M = (M mod n * M k  (n) mod n) mod n – By Euler' theorem X  (n) mod n = 1 M = M mod n

Where is the security? What problem must you solve to discover d? Public key: (e, n); private key: d

Slide #9-22 Security Services Confidentiality –Only the owner of the private key knows it, so text enciphered with public key cannot be read by anyone except the owner of the private key Authentication –Only the owner of the private key knows it, so text enciphered with private key must have been generated by the owner

Slide #9-23 More Security Services Integrity –Enciphered letters cannot be changed undetectably without knowing private key Non-Repudiation –Message enciphered with private key came from someone who knew it

Slide #9-24 Example: Confidentiality Take p = 7, q = 11, so n = 77 and  (n) = 60 Alice chooses e = 17, making d = 53 Bob wants to send Alice secret message HELLO ( ) –07 17 mod 77 = 28 –04 17 mod 77 = 16 –11 17 mod 77 = 44 –14 17 mod 77 = 42 Bob sends

Slide #9-25 Example Alice receives Alice uses private key, d = 53, to decrypt message: –28 53 mod 77 = 07 –16 53 mod 77 = 04 –44 53 mod 77 = 11 –42 53 mod 77 = 14 Alice translates message to letters to read HELLO –No one else could read it, as only Alice knows her private key and that is needed for decryption

Slide #9-26 Example: Integrity/Authentication Take p = 7, q = 11, so n = 77 and  (n) = 60 Alice chooses e = 17, making d = 53 Alice wants to send Bob message HELLO ( ) so Bob knows it is what Alice sent (no changes in transit, and authenticated) –07 53 mod 77 = 35 –04 53 mod 77 = 09 –11 53 mod 77 = 44 –14 53 mod 77 = 49 Alice sends

Slide #9-27 Example Bob receives Bob uses Alice’s public key, e = 17, n = 77, to decrypt message: –35 17 mod 77 = 07 –09 17 mod 77 = 04 –44 17 mod 77 = 11 –49 17 mod 77 = 14 Bob translates message to letters to read HELLO –Alice sent it as only she knows her private key, so no one else could have enciphered it –If (enciphered) message’s blocks (letters) altered in transit, would not decrypt properly

Slide #9-28 Example: Both Alice wants to send Bob message HELLO both enciphered and authenticated (integrity-checked) –Alice’s keys: public (17, 77); private: 53 –Bob’s keys: public: (37, 77); private: 13 Alice enciphers HELLO ( ): –(07 53 mod 77) 37 mod 77 = 07 –(04 53 mod 77) 37 mod 77 = 37 –(11 53 mod 77) 37 mod 77 = 44 –(14 53 mod 77) 37 mod 77 = 14 Alice sends

Slide #9-29 Warnings Encipher message in blocks considerably larger than the examples here –If 1 character per block, RSA can be broken using statistical attacks (just like classical cryptosystems) –Attacker cannot alter letters, but can rearrange them and alter message meaning Example: reverse enciphered message of text ON to get NO

Key Points Public Key systems enable multiple operations – Confidentiality (key encryption) – Integrity and nonrepudiation – Symmetric key exchange