PCIT303: Cryptography and Information Security
Sanjivani Rural Education Society’s
Sanjivani College of Engineering, Kopargaon-423603
(An Autonomous Institute Affiliated to Savitribai Phule Pune University, Pune)
NACC ‘A’ Grade Accredited, ISO 9001:2015 Certified
Department of Information Technology
(UG Programme - NBAAccredited)
Dr. M.A. Jawale
Professor and Head, Dept. of IT
Unit II : Cryptography
â–Ș Diffie-Hellman Key Exchange Algorithm
â–Ș Example
Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
Diffie-Hellman Key Exchange Algorithm
â–Ș A simple public-key algorithm is Diffie-Hellman key exchange. This protocol enables
two users to establish a secret key using a public-key scheme based on discrete
logarithms.
â–Ș The protocol is secure only if the authenticity of the two participants can be
established.
Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
Continue
.
Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
Continue
.
Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
Example
â–Ș q = 353 prime number
â–Ș Primitive root of 353, here α = 3
â–Ș A and B select secret keys XA = 97 and XB = 233 respectively
â–Ș A computes YA = 397 mod 353 = 40
â–Ș B computes YB = 3233 mod 353 = 248
â–Ș After they exchange public keys, each can compute the common secret key
â–Ș
Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
Diffie-Hellman Key Exchange
Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
Man-in-the-Middle Attack
â–Ș The protocol depicted in above Figure is insecure against a man-in-the-middle attack.
â–Ș Suppose Alice and Bob wish to exchange keys, and Darth is the adversary. The attack
proceeds as follows.
Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
Continue
.
Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
Continue
.
â–Ș At this point, Bob and Alice think that they share a secret key, but instead Bob and
Darth share secret key K1 and Alice and Darth share secret key K2.
â–Ș All future communication between Bob and Alice is compromised in the following
way
Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
Continue
.
â–Ș 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.
â–Ș
Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
Reference
1. William Stallings, “Cryptography and Network Security Principles and
Practice”, Fourth Edition, Chapter 10.
Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology

Diffie -Hellman Key Exchange Algorithm.

  • 1.
    PCIT303: Cryptography andInformation Security Sanjivani Rural Education Society’s Sanjivani College of Engineering, Kopargaon-423603 (An Autonomous Institute Affiliated to Savitribai Phule Pune University, Pune) NACC ‘A’ Grade Accredited, ISO 9001:2015 Certified Department of Information Technology (UG Programme - NBAAccredited) Dr. M.A. Jawale Professor and Head, Dept. of IT
  • 2.
    Unit II :Cryptography â–Ș Diffie-Hellman Key Exchange Algorithm â–Ș Example Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
  • 3.
    Diffie-Hellman Key ExchangeAlgorithm â–Ș A simple public-key algorithm is Diffie-Hellman key exchange. This protocol enables two users to establish a secret key using a public-key scheme based on discrete logarithms. â–Ș The protocol is secure only if the authenticity of the two participants can be established. Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
  • 4.
    Continue
. Unit-II: Part-IV CryptographyProf. Dr. Madhuri Jawale Department of Information Technology
  • 5.
    Continue
. Unit-II: Part-IV CryptographyProf. Dr. Madhuri Jawale Department of Information Technology
  • 6.
    Example â–Ș q =353 prime number â–Ș Primitive root of 353, here α = 3 â–Ș A and B select secret keys XA = 97 and XB = 233 respectively â–Ș A computes YA = 397 mod 353 = 40 â–Ș B computes YB = 3233 mod 353 = 248 â–Ș After they exchange public keys, each can compute the common secret key â–Ș Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
  • 7.
    Diffie-Hellman Key Exchange Unit-II:Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
  • 8.
    Man-in-the-Middle Attack â–Ș Theprotocol depicted in above Figure is insecure against a man-in-the-middle attack. â–Ș Suppose Alice and Bob wish to exchange keys, and Darth is the adversary. The attack proceeds as follows. Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
  • 9.
    Continue
. Unit-II: Part-IV CryptographyProf. Dr. Madhuri Jawale Department of Information Technology
  • 10.
    Continue
. â–Ș At thispoint, Bob and Alice think that they share a secret key, but instead Bob and Darth share secret key K1 and Alice and Darth share secret key K2. â–Ș All future communication between Bob and Alice is compromised in the following way Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
  • 11.
    Continue
. â–Ș The keyexchange 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. â–Ș Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology
  • 12.
    Reference 1. William Stallings,“Cryptography and Network Security Principles and Practice”, Fourth Edition, Chapter 10. Unit-II: Part-IV Cryptography Prof. Dr. Madhuri Jawale Department of Information Technology