Scott CH Huang COM 5336 Lecture 7 Other Public-Key Cryptosystems Scott CH Huang COM 5336 Cryptography Lecture 7.

Slides:



Advertisements
Similar presentations
Key Management Nick Feamster CS 6262 Spring 2009.
Advertisements

Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
7. Asymmetric encryption-
Public Key Algorithms …….. RAIT M. Chatterjee.
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
Cryptography1 CPSC 3730 Cryptography Chapter 10 Key Management.
Key Management public-key encryption helps address key distribution problems have two aspects of this: –distribution of public keys –use of public-key.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Cryptography and Network Security Chapter 10 Fourth Edition by William Stallings.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
Cryptography1 CPSC 3730 Cryptography Chapter 9 Public Key Cryptography and RSA.
Chapter3 Public-Key Cryptography and Message Authentication.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
1 Pertemuan 08 Public Key Cryptography Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
Cryptography and Network Security Chapter 10. Chapter 10 – Key Management; Other Public Key Cryptosystems No Singhalese, whether man or woman, would venture.
Diffie-Hellman Key Exchange
Computer Science Public Key Management Lecture 5.
Public Key Model 8. Cryptography part 2.
1 CIS 5371 Cryptography 8. Asymmetric encryption-.
Information Security and Management 13. Digital Signatures and Authentication Protocols Chih-Hung Wang Fall
Page 1 Secure Communication Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
J. Wang. Computer Network Security Theory and Practice. Springer 2008 Chapter 3 Public-Key Cryptography and Key Management.
Cryptography and Network Security Chapter 14 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Key Management and Diffie- Hellman Dr. Monther Aldwairi New York Institute of Technology- Amman Campus 12/3/2009 INCS 741: Cryptography 12/3/20091Dr. Monther.
Applied Cryptography (Public Key) RSA. Public Key Cryptography Every Egyptian received two names, which were known respectively as the true name and the.
Information Security Principles & Applications
Information Security -- Part II Public-Key Encryption and Hash Functions Frank Yeong-Sung Lin Information Management Department National Taiwan University.
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
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
Cryptography and Network Security Chapter 10
Cryptography and Network Security Key Management and Other Public Key Cryptosystems.
ECE509 Cyber Security : Concept, Theory, and Practice Key Management Spring 2014.
Chapter 3 – Public Key Cryptography and RSA (A). Private-Key Cryptography traditional private/secret/single-key cryptography uses one key shared by both.
Scott CH Huang COM 5336 Cryptography Lecture 6 Public Key Cryptography & RSA Scott CH Huang COM 5336 Cryptography Lecture 6.
1 Chapter 10: Key Management in Public key cryptosystems Fourth Edition by William Stallings Lecture slides by Lawrie Brown (Modified by Prof. M. Singhal,
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
Cryptography and Network Security Chapter 14
Key Management Network Systems Security Mort Anvari.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Lecture 11 Overview. Digital Signature Properties CS 450/650 Lecture 11: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Lecture 9 Overview. Digital Signature Properties CS 450/650 Lecture 9: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
Cryptography and Network Security Chapter 10 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
COM 5336 Lecture 8 Digital Signatures
Fall 2006CS 395: Computer Security1 Key Management.
1 Chapter 3-3 Key Distribution. 2 Key Management public-key encryption helps address key distribution problems have two aspects of this: –distribution.
Diffie-Hellman Key Exchange first public-key type scheme proposed by Diffie & Hellman in 1976 along with the exposition of public key concepts – note:
Lecture 14 Public Key Cryptography and RSA. Summary principles of public-key cryptography principles of public-key cryptography RSA algorithm, implementation,
1 Diffie-Hellman (Key Exchange) Protocol Rocky K. C. Chang 9 February 2007.
Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys – use of public-key.
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.
Key Exchange in Systems VPN usually has two phases –Handshake protocol: key exchange between parties sets symmetric keys –Traffic protocol: communication.
Cryptography and Network Security Chapter 14 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Information Security Lab. Dept. of Computer Engineering 251/ 278 PART II Asymmetric Ciphers Key Management; Other CHAPTER 10 Key Management; Other Public.
CSCE 715: Network Systems Security
Chapter 10: Key Management (Again) and other Public Key Systems
Key Management Network Systems Security
CSCE 715: Network Systems Security
CSCE 715: Network Systems Security
Presentation transcript:

Scott CH Huang COM 5336 Lecture 7 Other Public-Key Cryptosystems Scott CH Huang COM 5336 Cryptography Lecture 7

Scott CH Huang Outline Rabin public-key encryption algorithm ElGamal public-key encryption algorithm Diffie-Hellman key exchange protocol

COM 5336 Cryptography Lecture 7 Scott CH Huang Contemporary Public-Key Cryptosystems Based on the Factorization Problem: – RSA, Rabin Based on the Discrete Logarithm Problem: – ElGamal, Elliptic Curve, DSA (signature scheme only), Diffie-Hellman (key exchange & encryption)

COM 5336 Cryptography Lecture 7 Scott CH Huang Rabin Public-Key Cryptosystem Rabin encryption is an extremely fast operation as it only involves a single modular squaring. By comparison with RSA. Rabin decryption is slower than encryption but is comparable in speed to RSA decryption

COM 5336 Cryptography Lecture 7 Scott CH Huang Rabin Key Generation Generate 2 large random numbers primes p an q, each with the same size Compute N=pq The public key is N and the private key is p and q

COM 5336 Cryptography Lecture 7 Scott CH Huang Rabin Encryption Rabin Encryption is nothing more than doing a SQUARE operation as follows. – Represent the message as an integer m in the range {0,1,….,N-1} – Ciphertext is c  m 2 mod N

COM 5336 Cryptography Lecture 7 Scott CH Huang Rabin Decryption Rabin Decryption is a SQROOT operation – Find the square roots m1,m2,m3 and m4 of c mod N – The message sent was either m1,m2,m3 or m4.

COM 5336 Cryptography Lecture 7 Scott CH Huang The Legendre Symbol The Legendre symbol is a useful tool for keeping track of whether or not an integer has a sqrt mod a prime number p. Let p be an odd prime and a an integer. The Legendre symbol (a/p) is defined as follows.

COM 5336 Cryptography Lecture 7 Scott CH Huang Facts of the Legendre Symbol (a/p)  a (p-1)/2 mod p (ab/p)=(a/p)(b/p) (Law of quadratic reciprocity) If q is an odd prime distinct from p, then (p/q)=(q/p)(-1) (p-1)(q-1)/4

COM 5336 Cryptography Lecture 7 Scott CH Huang Find SQROOT in Z p INPUT: an odd prime p & an odd integer a s.t. 0<a<p OUTPUT: two square roots of a mod p 1.If (a/p)=-1, stop & return 2.Select b (0<b<p) with (b/p)=-1. Represent p-1=2 s t where t is odd. 3.Compute a -1 mod p 4.c← b t mod p, r ← a (t+1)/2 mod p 5.For i from 1 to s-1 do 1.Compute 2.If d  -1 mod p, set r ← rc mod p 3.c ← c 2 mod p 6.Return (r,-r)

COM 5336 Cryptography Lecture 7 Scott CH Huang Find SQROOT in Z p where p≡3 mod 4 INPUT: an odd prime p where p≡3 mod 4, and square a s.t. 0<a<p OUTPUT: two square roots of a mod p 1.Compute r  a (p+1)/4 mod p 2.Return (r,-r)

COM 5336 Cryptography Lecture 7 Scott CH Huang Find SQROOT in Z p where p≡5 mod 8 INPUT: an odd prime p where p≡5 mod 8, and square a s.t. 0<a<p OUTPUT: two square roots of a mod p 1.Compute d  a (p-1)/4 mod p 2.If d  1 mod p then compute r  a (p+3)/8 mod p 3.If d  -1 mod p then compute r  2a(4a) (p-5)/8 mod p 4.Return (r,-r)

COM 5336 Cryptography Lecture 7 Scott CH Huang Find SQROOT in Z n where n=pq (p,q primes) INPUT: n=pq & an integer a s.t. 0<a<n, a has SQROOT(s) OUTPUT: four sqrts of a mod p 1.Find the two sqrts (r,-r) of a mod p 2.Find the two sqrts (s,-s) of a mod q 3.Use extended Euclid’s algorithm to find integers c,d s.t. cp+dq=1 4.Set x  rdq+scp mod n and y  rdq-scp mod n 5.Return (x,-x,y,-y)

COM 5336 Cryptography Lecture 7 Scott CH Huang A Problem Regarding Rabin’s Encryption Scheme To decrypt a ciphertext, we need to compute the sqrt. However, there are 4 sqrts, how to decide which one is the plaintext??? Appropriate coding is needed to decide which one is the plaintext. In practice, we usually take part of the plaintext and append it to the end.

COM 5336 Cryptography Lecture 7 Scott CH Huang Rabin – An Example Key generation: Alice chooses the primes p=277, q=331, and computes N=pq= Alice’s public key is N=91687 and private key is p=277 and q=331 Encryption: Suppose that the last six bits of the original messages are required to be appended prior to encryption. In order to encrypt the 10-bits message m= , Bob appends the last six bits of m to obtain 16-bits message. m= which in decimal notation is m=40569, the ciphertext is: C ≡ m 2 mod N ≡ mod ≡ 62111

COM 5336 Cryptography Lecture 7 Scott CH Huang Rabin (cont’d) Decryption: to decrypt C, Alice computes the four sqrts of C mod N m1=69954,m2=22033,m3=40569,m45118 – m1= , – m2= , – m3= , – m4= Therefore, m3 is the plaintext.

COM 5336 Cryptography Lecture 7 Scott CH Huang SQROOT Problem – If x 2  a mod N has a solution for a given composite integer N=pq (p,q primes), find a sqrt of a mod N. FACTOR =>? SQROOT – Use previous algorithm, we can find sqrt mod p and sqrt mod q – Then we use extended Euclid’s algorithm to find sqrt mod N

COM 5336 Cryptography Lecture 7 Scott CH Huang SQROOT Problem SQROOT=>? FACTOR – Suppose A is an algorithm that solves SQROOT – Then we generate x randomly and compute a  x 2 mod N – Apply A to find sqrt y – If y=x or –x, try another x and repeat – If not, we are done! (why?)

COM 5336 Cryptography Lecture 7 Scott CH Huang Security of Rabin Rabin=SQROOT=Factor Provably secure against passive adversary (cf. RSA) Susceptible to chosen ciphertext attack similar to RSA Many RSA attacks can be applied to Rabin

COM 5336 Cryptography Lecture 7 Scott CH Huang Finite Cyclic Groups and the Discrete Logarithm Problem A finite group G is cyclic if it can be represented as powers of some element g in G as follows. – G={e,g,g 2,g 3,…g n-1 } – g is called a generator of G, and n is called the order of G. Example: Let p=97. Then Z 97 * is a cyclic group of order n=96. A generator of Z 97 * is g=5. Since 5 32  35 (mod 97), log 5 35 = 32 in Z 97 *. Let G be a finite cyclic group of order n. Let g be a generator of G, and let y  G. The discrete logarithm of y to the base g, denoted log g y, is the unique integer x, 0  x  n-1, such that y = g x.

COM 5336 Cryptography Lecture 7 Scott CH Huang Discrete Logarithm Problem DLP in Z p * : Given a prime p, a generator g of Z p *, and an element y  Z p *, find the integer x, 0  x  p-2, such that g x  y (mod p). The security of many cryptographic techniques depends on the intractability of the discrete logarithm problem. Both ElGamal encryption scheme and Diffie-Hellman key exchange are based on DLP in Z p *.The Elliptic curve Cryptosystem is based on DLP in general cyclic groups.

COM 5336 Cryptography Lecture 7 Scott CH Huang ElGamal Encryption Scheme ElGamal encryption scheme is an asymmetric key encryption algorithm ElGamal encryption is non-deterministic, meaning that a single plaintext can be encrypted to many possible ciphertexts

COM 5336 Cryptography Lecture 7 Scott CH Huang ElGamal Key Generation Each entity randomly choose a large prime p and picks a generator g  Z p * Each entity randomly chooses an exponent x (x<p), and computes y  g x (mod p). Public key = (p,g,y) Private key= x

COM 5336 Cryptography Lecture 7 Scott CH Huang ElGamal Encryption Suppose Bob wants to encrypt a message M (M<p) and send to Alice 1.Bob obtains Alice’s public key (p,g,y) and randomly picks an integer r (r<p) 2.Bob computes – A  g r mod p – B  My r mod p 3.Ciphertext C = (A, B).

COM 5336 Cryptography Lecture 7 Scott CH Huang ElGamal Decryption Alice does the followings –Computes K  A x mod p, –M  BK -1 mod p

COM 5336 Cryptography Lecture 7 Scott CH Huang ElGamal - An Example Key Generation: – p =2357 – g = 2 – x = 1751 – y  g x   1185 (mod 2357) Public key: (p,g,y) = (2357, 2, 1185) Private key: x = 1751

COM 5336 Cryptography Lecture 7 Scott CH Huang ElGamal Encryption: – say M = Pick a random number r = Computes A = g r   1430 (mod 2357) B = My r  2035 *  697 (mod 2357) – The ciphertext C = (A, B) = (1430, 697) Decryption: 1.Computes K  A x   2084 (mod 2357) 2.M  B K -1  697 *  2035 (mod 2357)

COM 5336 Cryptography Lecture 7 Scott CH Huang Remarks on ElGamal Encryption Scheme ElGamal encryption scheme is non-deterministic Randomization is introduced to – increase the effective size of the plaintext space i.e. one plaintext can map to a large set of possible ciphertexts – decrease the effectiveness of chosen-plaintext attack by means of a one- to-many mapping in the encryption process Efficiency: – encryption requires two exponentiation operations – exponentiation operations may be very expensive when implemented on some low-power devices. e.g. low-end PalmPilots, smart cards and sensors. – message expansion by two-fold Security: – depends on the difficulty of solving DLP (more precisely, Computational Diffie-Hellman Problem).

COM 5336 Cryptography Lecture 7 Scott CH Huang Diffie-Hellman Key Exchange A Key Exchange Protocol: – provide a secure way for two communicating party to share a symmetric key (so called a session key) – This session key is then used to provide privacy and authentication for subsequent message flow. – History: problem first posed by Merkle at UC Berkeley, Diffie and Hellman came up with the protocol: Alice Bob a<p g a mod p g b mod p b<p Shared Session Key = g ab mod p W. Diffie, M. E. Hellman, “New directions in Cryptography”, IEEE Trans. Information Theory, IT-22, pp , Nov 1976.

COM 5336 Cryptography Lecture 7 Scott CH Huang Man-in-the-Middle Attack 30 gaga gxgx gygy gbgb Alice computes g ab Bob computes g xy Diffie-Hellman key exchange

COM 5336 Cryptography Lecture 7 Scott CH Huang Key Management Using Other PKC Public-key encryption helps address key distribution problems in two aspects: – distribution of public keys – use of public-key encryption to distribute secret keys

COM 5336 Cryptography Lecture 7 Scott CH Huang Distribution of Public Keys Can use the following approaches: – Public announcement – Publicly available directory – Public-key authority – Public-key certificates

COM 5336 Cryptography Lecture 7 Scott CH Huang Public Announcement Users distribute public keys to recipients or broadcast to community at large – eg. append PGP keys to messages or post to news groups or list Major weakness is forgery – anyone can create a key claiming to be someone else and broadcast it can masquerade as claimed user until forgery is discovered

COM 5336 Cryptography Lecture 7 Scott CH Huang Publicly Available Directory Achieve greater security by registering keys with a public directory Directory must be trusted with properties: – contains {name,public-key} entries – participants register securely with directory – participants can replace key at any time – directory is periodically published – directory can be accessed electronically still vulnerable to tampering or forgery

COM 5336 Cryptography Lecture 7 Scott CH Huang Public-Key Authority Further improve security by tightening control over distribution of keys from directory Keeps all the properties of directory Requires users to know the public key for the directory Users interact with directory to obtain any desired public key securely – does require real-time access to directory when keys are needed

COM 5336 Cryptography Lecture 7 Scott CH Huang Public-Key Authority

COM 5336 Cryptography Lecture 7 Scott CH Huang Public-Key Certificates Certificates allow key exchange without real-time access to public-key authority a certificate binds identity to a public key – usually with other info such as period of validity, rights of use etc with all contents signed by a trusted Public-Key or Certificate Authority (CA) can be verified by anyone who knows the public-key authorities’ public-key

COM 5336 Cryptography Lecture 7 Scott CH Huang Public-Key Certificates

COM 5336 Cryptography Lecture 7 Scott CH Huang Distribution of Secret Keys using Public-Key public-key cryptography can be used for secrecy or authentication – but public-key algorithms are slow – so usually we want to use private-key encryption to protect message contents, such as using a session key There are several alternatives for negotiating a suitable session key

COM 5336 Cryptography Lecture 7 Scott CH Huang Simple Secret Key Distribution proposed by Merkle in 1979 – A generates a new temporary public key pair – A sends B the public key and their identity – B generates a session key K sends it to A encrypted using the supplied public key – A decrypts the session key and both use problem is that an opponent can intercept and impersonate both halves of protocol

COM 5336 Cryptography Lecture 7 Scott CH Huang Public-Key Distribution of Secret Keys if A and B have securely exchanged public-keys: