Diffie-Hellman Key Exchange

Slides:



Advertisements
Similar presentations
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
Advertisements

Cryptography and Network Security
Digital Signatures and Hash Functions. Digital Signatures.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
Public Key Cryptography RSA Diffie Hellman Key Management Based on slides by Dr. Lawrie Brown of the Australian Defence Force Academy, University College,
CSE 597E Fall 2001 PennState University1 Digital Signature Schemes Presented By: Munaiza Matin.
Network Security Essentials Fifth Edition by William Stallings Fifth Edition by William Stallings.
Public Key Model 8. Cryptography part 2.
13.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 13 Digital Signature.
Information Security and Management 13. Digital Signatures and Authentication Protocols Chih-Hung Wang Fall
Bob can sign a message using a digital signature generation algorithm
Lecture slides prepared for “Computer Security: Principles and Practice”, 2/e, by William Stallings and Lawrie Brown, Chapter 21 “Public-Key Cryptography.
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
Digital Signatures: Mathematics Zdeněk Říha. Data authentication Data integrity + data origin Digital signature Asymmetric cryptography public and private.
Hash Functions A hash function H accepts a variable-length block of data M as input and produces a fixed-size hash value h = H(M) Principal object is.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Cryptography, Authentication and Digital Signatures
Digital Signatures A primer 1. Why public key cryptography? With secret key algorithms Number of key pairs to be generated is extremely large If there.
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.
Chapter 21 Public-Key Cryptography and Message Authentication.
Cryptography and Network Security Chapter 10 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Lecture slides prepared for “Computer Security: Principles and Practice”, 3/e, by William Stallings and Lawrie Brown, Chapter 2 “Cryptographic Tools”.
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
1 Number Theory and Advanced Cryptography 6. Digital Signature Chih-Hung Wang Sept Part I: Introduction to Number Theory Part II: Advanced Cryptography.
Lecture 2: Introduction to Cryptography
Cryptography and Network Security
Prepared by Dr. Lamiaa Elshenawy
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
Cryptography Gerard Klonarides. What is cryptography? Symmetric Encryption Symmetric Encryption Asymmetric Encryption Asymmetric Encryption Other cryptography.
Digital Signature Standard (DSS) US Govt approved signature scheme designed by NIST & NSA in early 90's published as FIPS-186 in 1991 revised in 1993,
Public-Key encryption structure First publicly proposed by Diffie and Hellman in 1976First publicly proposed by Diffie and Hellman in 1976 Based on mathematical.
Lecture 9 Overview. Digital Signature Properties CS 450/650 Lecture 9: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
Diffie-Hellman Key Exchange first public-key type scheme proposed by Diffie & Hellman in 1976 along with the exposition of public key concepts – note:
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
Public Key Cryptography. Asymmetric encryption is a form of cryptosystem in which Encryption and decryption are performed using the different keys—one.
@Yuan Xue CS 285 Network Security Public-Key Cryptography Yuan Xue Fall 2012.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 14. Digital signature.
Public Key Encryption ● Diffie and Hellman – 1976 Famous Paper: New Directions In Cryptography New Directions In Cryptography ● First revolutionary.
Basics of Cryptography
CS457 Introduction to Information Security Systems
Key Exchange References: Applied Cryptography, Bruce Schneier
Network Security Unit-III
Cryptographic Hash Function
B. R. Chandavarkar CSE Dept., NITK Surathkal
Public Key Encryption and Digital Signatures
Introduction Used for communication to verify
S/MIME T ANANDHAN.
NET 311 Information Security
Elliptic Curve Cryptography (ECC)
Cryptography and Network Security
Elliptic Curve Cryptography (ECC)
Cryptography: Basics (2)
Public-Key Cryptography and Message Authentication
Cryptography and Network Security Chapter 10
Chapter -7 CRYPTOGRAPHIC HASH FUNCTIONS
Chapter 13 Digital Signature
Chapter 3 - Public-Key Cryptography & Authentication
Chapter 29 Cryptography and Network Security
Elliptic-Curve Cryptography (ECC)
Digital Signature Standard (DSS)
Key Exchange, Man-in-the-Middle Attack
Diffie-Hellman Algorithm
Presentation transcript:

Diffie-Hellman Key Exchange First published public-key algorithm A number of commercial products employ this key exchange technique Purpose of the algorithm is to enable two users to exchange a secret key securely that then can be used for subsequent encryption of messages The algorithm itself is limited to the exchange of the keys Depends for its effectiveness on the difficulty of computing discrete logarithms The first published public-key algorithm appeared in the seminal paper by Diffie and Hellman that defined public-key cryptography [DIFF76] and is generally referred to as the Diffie–Hellman key exchange . A number of commercial products employ this key exchange technique. The purpose of the algorithm is to enable two users to exchange a secret key securely that then can be used for subsequent encryption of messages. The algorithm itself is limited to the exchange of the keys. The Diffie–Hellman algorithm depends for its effectiveness on the difficulty of computing discrete logarithms. © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

The Diffie–Hellman key exchange is summarized in Figure 3.13. © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Diffie-Hellman key exchange protocol is insecure against a man-in-the-middle attack. The key exchange protocol is vulnerable to such an attack because it does not authenticate the participants. This vulnerability can be overcome with the use of digital signatures and public-key © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Diffie-Hellman Key Exchange Algorithm Alice and Bob share a prime p and s, such as s < p and s is primitive root of p (s is called generator). Both p and s are public Alice selects a secret random x, 0< x< p-1, and Bob selects a secret random y, 0< y <p-1 Alice sends X = sx (mod p) to Bob Bob sends Y = sy (mod p) to Alice Using the X and Y they can each calculate shared key K. Alice calculates K = Yx (mod p) = (sy)x (mod p) Bob calculates K = Xy (mod p) = (sx)y (mod p) © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Man-In—The-Middle Attack Darth prepares for the attack by generating two random private keys, x1 and y1, and computing corresponding public keys : X1 = sx1 (mod p) and Y1 = sy1 (mod p) Alice sends X to Bob Darth intercepts X and instead transmits X1 to Bob. Darth also calculates K2 = Xy1 (mod p) Bob receives X1 and calculates K1 = X1y (mod p) Bob transmits Y to Alice Darth intercepts Y and instead transmits Y1 to Alice. Darth calculates K1 = Yx1 (mod p) Alice receives Y1 and calculates K2 = Y1x (mod p) © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Man-In-The-Middle Attack At this point, Bob and Alice think that they share a secret key. Instead: Bob and Darth share secret key K1, Alice and Darth share secret key K2. All future communication between Bob and Alice is compromised in the following way: Alice encrypts plaintext M using key K2 Darth intercepts ciphertext, decrypts it using K2 and recover M If Darth only wants to eavesdrop and read the plaintext after recovering M, Darth will encrypt it with key K1 and send it to Bob If Darth wants to alter message and modify the message that going to Bob, Darth will get an altered message M1, encrypt it with key K1 and send it to Bob © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Diffie-Hellman key exchange protocol is insecure against a man-in-the-middle attack. The key exchange protocol is vulnerable to such an attack because it does not authenticate the participants. This vulnerability can be overcome with the use of digital signatures and public-key certificates © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Digital Signature standard (DSS) FIPS PUB 186 Makes use of the SHA-1 and presents a new digital signature technique, the Digital Signature Algorithm (DSA) Originally proposed in 1991 and revised in 1993 and again in 1996 Uses an algorithm that is designed to provide only the digital signature function Unlike RSA, it cannot be used for encryption or key exchange The National Institute of Standards and Technology (NIST) has published Federal Information Processing Standard FIPS PUB 186, known as the Digital Signature Standard (DSS) . The DSS makes use of the SHA-1 and presents a new digital signature technique, the Digital Signature Algorithm (DSA). The DSS was originally proposed in 1991 and revised in 1993 in response to public feedback concerning the security of the scheme. There was a further minor revision in 1996. The DSS uses an algorithm that is designed to provide only the digital signature function. Unlike RSA, it cannot be used for encryption or key exchange. © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Digital signatures NIST FIPS PUB 186-4 (Digital Signature Standard (DSS)) defines a digital signature as: “the result of a cryptographic transformation of data that, when properly implemented, provides a mechanism for verifying origin authentication, data integrity, and signatory non-repudiation” Thus, a digital signature is a data-dependent bit pattern, generated by an agent as a function of a file, message, or other form of data block FIPS 186-4 specifies the use of one of three digital signature algorithms: Digital signature algorithm (DSA) RSA digital signature algorithm Elliptic curve digital signature algorithm (ECDSA) NIST FIPS PUB 186-4 [Digital Signature Standard (DSS) , July 2013] defines a digital signature as follows: The result of a cryptographic transformation of data that, when properly implemented, provides a mechanism for verifying origin authentication, data integrity, and signatory non-repudiation. Thus, a digital signature is a data-dependent bit pattern, generated by an agent as a function of a file, message, or other form of data block. Another agent can access the data block and its associated signature and verify that (1) the data block has been signed by the alleged signer and that (2) the data block has not been altered since the signing. Further, the signer cannot repudiate the signature. FIPS 186-4 specifies the use of one of three digital signature algorithms: ■ Digital Signature Algorithm (DSA): The original NIST-approved algorithm, which is based on the difficulty of computing discrete logarithms. ■ RSA Digital Signature Algorithm: Based on the RSA public-key algorithm. ■ Elliptic Curve Digital Signature Algorithm (ECDSA): Based on elliptic curve cryptography. In this section, we provide a brief overview of the digital signature process, then describe the RSA digital signature algorithm. © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Elliptic-curve cryptography (ECC) Technique is based on the use of a mathematical construct known as the elliptic curve Principal attraction of ECC compared to RSA is that it appears to offer equal security for a far smaller bit size, thereby reducing processing overhead The confidence level in ECC is not yet as high as that in RSA The vast majority of the products and standards that use public-key cryptography for encryption and digital signatures use RSA. The bit length for secure RSA use has increased over recent years, and this has put a heavier processing load on applications using RSA. This burden has ramifications, especially for electronic commerce sites that conduct large numbers of secure transactions. Recently, a competing system has begun to challenge RSA: elliptic curve cryptography (ECC) . Already, ECC is showing up in standardization efforts, including the IEEE P1363 Standard for Public-Key Cryptography. The principal attraction of ECC compared to RSA is that it appears to offer equal security for a far smaller bit size, thereby reducing processing overhead. On the other hand, although the theory of ECC has been around for some time, it is only recently that products have begun to appear and that there has been sustained cryptanalytic interest in probing for weaknesses. Thus, the confidence level in ECC is not yet as high as that in RSA. ECC is fundamentally more difficult to explain than either RSA or Diffie– Hellman. The technique is based on the use of a mathematical construct known as the elliptic curve. © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Digital Signatures Suppose that Bob wants to send a message to Alice. Although it is not important that the message be kept as a secret, he wants Alice to be certain that the message is indeed from him. For this purpose, Bob uses a secure hash function, such as SHA-512, to generate a hash value for the message. That hash value, together with Bob’s private key, serve as input to a digital signature generation algorithm that produces a short block that functions as a digital signature. Bob sends the message with the signature attached. © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Digital signatures When Alice receives the message plus signature, she (1) calculates a hash value for the message (2) provides the hash value and Bob’s public key as inputs to a digital signature verification algorithm. If the algorithm returns the result that the signature is valid, Alice is assured that the message must have been signed by Bob. No one else has Bob’s private key and therefore no one else could have created a signature that could be verified for this message with Bob’s public key. In addition, it is impossible to alter the message without access to Bob’s private key, so the message is authenticated both in terms of source and in terms of data integrity. © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Digital signatures Encryption process just described does not provide confidentiality. That is, the message being sent is safe from alteration, but not safe from eavesdropping. This is obvious in the case of a signature based on a portion of the message, because the rest of the message is transmitted in the clear. © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Rsa digital signature algorithm The essence of the RSA digital signature algorithm is to encrypt the hash of the message to be signed using RSA. However, as with the use of RSA for encryption of keys or short messages, the RSA digital signature algorithm first modifies the hash value to enhance security. There are several approaches to this, one of which is the RSA Probabilistic Signature Scheme (RSA-PSS). RSA-PSS is the latest of the RSA schemes and the one that RSA Laboratories recommends as the most secure of the RSA digital signature schemes. © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Rsa-pss overview Generate a hash value or message digest mHash from the message M to be signed Pad mHash with a constant value padding1 and pseudorandom value salt to form M’ Generate hash value from M’ Generate a block DB consisting of a constant value padding2 and salt © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

RSA-PSS Overview Use the mask generating function MGF, which produces a randomized output from input H of the same length as DB Create the encoded message (EM) block by padding H with hexadecimal constant BC and the XOR of H and DB Encrypt EM with RSA using the signer’s private key © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Rsa-pss The objective with this algorithm is to make it more difficult for an adversary to find another message that maps to the same message digest as a given message or to find two messages that map to the same message digest. Because the salt changes with every use, signing the same message twice using the same private key will yield two different signatures. This is an added measure of security. © 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2017 Pearson Education, Inc., Hoboken, NJ. All rights reserved.