Cryptography and Network Security
Public Key Cryptography
Chapter 10 – Other Public Key
Cryptosystems
Amongst the tribes of Central Australia every man, woman, and child has a secret
or sacred name which is bestowed by the older men upon him or her soon after
birth, and which is known to none but the fully initiated members of the group.
This secret name is never mentioned except upon the most solemn occasions;
to utter it in the hearing of men of another group would be a most serious
breach of tribal custom. When mentioned at all, the name is spoken only in a
whisper, and not until the most elaborate precautions have been taken that it
shall be heard by no one but members of the group. The native thinks that a
stranger knowing his secret name would have special power to work him ill by
means of magic.
—The Golden Bough, Sir James George Frazer
Diffie-Hellman Key Exchange
 first public-key type scheme proposed
 by Diffie & Hellman in 1976 along with the
exposition of public key concepts
ïŹ
note: now know that Williamson (UK CESG)
secretly proposed the concept in 1970
 is a practical method for public exchange
of a secret key
 used in a number of commercial products
Diffie-Hellman Key Exchange
 a public-key distribution scheme
ïŹ
cannot be used to exchange an arbitrary message
ïŹ
rather it can establish a common key
ïŹ
known only to the two participants
 value of key depends on the participants (and
their private and public key information)
 based on exponentiation in a finite (Galois) field
(modulo a prime or a polynomial) - easy
 security relies on the difficulty of computing
discrete logarithms (similar to factoring) – hard
Diffie-Hellman Setup
 all users agree on global parameters:
ïŹ
large prime integer or polynomial q
ïŹ
a being a primitive root mod q
 each user (eg. A) generates their key
ïŹ chooses a secret key (number): xA < q
ïŹ
compute their public key: yA = a
xA
mod q
 each user makes public that key yA
Diffie-Hellman Key Exchange
 shared session key for users A & B is KAB:
KAB = a
xA.xB
mod q
= yA
xB
mod q (which B can compute)
= yB
xA
mod q (which A can compute)
 KAB is used as session key in private-key
encryption scheme between Alice and Bob
 if Alice and Bob subsequently communicate,
they will have the same key as before, unless
they choose new public-keys
 attacker needs an x, must solve discrete log
Diffie-Hellman Example
 users Alice & Bob who wish to swap keys:
 agree on prime q=353 and a=3
 select random secret keys:
ïŹ
A chooses xA=97, B chooses xB=233
 compute respective public keys:
ïŹ
yA=3
97
mod 353 = 40 (Alice)
ïŹ
yB=3
233
mod 353 = 248(Bob)
 compute shared session key as:
ïŹ
KAB= yB
xA
mod 353 = 248
97
= 160 (Alice)
ïŹ
KAB= yA
xB
mod 353 = 40
233
= 160 (Bob)
Key Exchange Protocols
 users could create random private/public
D-H keys each time they communicate
 users could create a known private/public
D-H key and publish in a directory, then
consulted and used to securely
communicate with them
 both of these are vulnerable to a Man-in-
the-Middle Attack
 authentication of the keys is needed
Man-in-the-Middle Attack
1. Darth prepares by creating two private / public keys
2. Alice transmits her public key to Bob
3. Darth intercepts this and transmits his first public key to Bob. Darth also
calculates a shared key with Alice
4. Bob receives the public key and calculates the shared key (with Darth instead
of Alice)
5. Bob transmits his public key to Alice
6. Darth intercepts this and transmits his second public key to Alice. Darth
calculates a shared key with Bob
7. Alice receives the key and calculates the shared key (with Darth instead of
Bob)
 Darth can then intercept, decrypt, re-encrypt, forward all messages between
Alice & Bob

More Related Content

PPTX
Diffie Hellman.pptx
PPT
ch10_pkcs_nemo.pptxxczxczxczxczxczxczxczxczxczx
PPT
ch10_key_management.ppt
PPT
Unit - 3.ppt
PPTX
4_Diffie Hellman algorithm for graduates.pptx
PPT
PPT
ch10.KeyManagement.Diffie-Hellman.ECC.ppt
PPT
Rsa diffi-network security-itt
Diffie Hellman.pptx
ch10_pkcs_nemo.pptxxczxczxczxczxczxczxczxczxczx
ch10_key_management.ppt
Unit - 3.ppt
4_Diffie Hellman algorithm for graduates.pptx
ch10.KeyManagement.Diffie-Hellman.ECC.ppt
Rsa diffi-network security-itt

Similar to Diffie Hellman Key Exchange protocol.pptx (20)

PPT
KEY MGMT.ppt
PDF
CRYPTOGRAPHY AND NETWORK SECURITY
PPTX
Diffie Hellman.pptx
PPTX
Diffie hellman
PPT
Lec 10 - Key Management.ppt
PDF
CNS - Unit - 4 - Public Key Cryptosystem
PPT
Rsa and diffie hellman algorithms
PPT
Other public key systems
PPTX
information security(Public key encryption its characteristics and weakness, ...
PPT
16974 ch 15 key management
PDF
PPTX
2.11 Diffie -hellman exchange.pptx
PPTX
aacyberessential3cryptography-131067585699078884.pptx
 
PPTX
Cryptography Key Management.pptx
PPT
public-key cryptography Shamir
PPT
Secure Communication (Distributed computing)
PPT
Diffie-hellman algorithm
PDF
Elliptic curve Cryptography and Diffie- Hellman Key exchange
 
PPTX
ET4045-2-cryptography-2
PDF
CNIT 141: 11. Diffie-Hellman
KEY MGMT.ppt
CRYPTOGRAPHY AND NETWORK SECURITY
Diffie Hellman.pptx
Diffie hellman
Lec 10 - Key Management.ppt
CNS - Unit - 4 - Public Key Cryptosystem
Rsa and diffie hellman algorithms
Other public key systems
information security(Public key encryption its characteristics and weakness, ...
16974 ch 15 key management
2.11 Diffie -hellman exchange.pptx
aacyberessential3cryptography-131067585699078884.pptx
 
Cryptography Key Management.pptx
public-key cryptography Shamir
Secure Communication (Distributed computing)
Diffie-hellman algorithm
Elliptic curve Cryptography and Diffie- Hellman Key exchange
 
ET4045-2-cryptography-2
CNIT 141: 11. Diffie-Hellman
Ad

More from RohitAhuja58 (11)

PPTX
Industrial Internet of Things and its APPLICATIONS.pptx
PPT
wiresharktslecturev10006july2009-12501942038813-phpapp03.ppt
PPTX
Cybersecurity and its Application Perspective.pptx
PPTX
Social Network with its ImplicationsPresentation.pptx
PPTX
packet sniffing with Wireshark and its implementation.pptx
PPTX
system hacking and its usages with its Application.pptx
PPT
Types of NETWORK RECONNAISSANCE with its Cases.ppt
PPTX
2. Footprinting and scanning and its sequence.pptx
PPT
1.hacking and its types for all types of attackers.ppt
PPTX
Internet -of- things and its applications.pptx
PPTX
Blockchain AND ITS APPLICATIONS FOR FINANCE.pptx
Industrial Internet of Things and its APPLICATIONS.pptx
wiresharktslecturev10006july2009-12501942038813-phpapp03.ppt
Cybersecurity and its Application Perspective.pptx
Social Network with its ImplicationsPresentation.pptx
packet sniffing with Wireshark and its implementation.pptx
system hacking and its usages with its Application.pptx
Types of NETWORK RECONNAISSANCE with its Cases.ppt
2. Footprinting and scanning and its sequence.pptx
1.hacking and its types for all types of attackers.ppt
Internet -of- things and its applications.pptx
Blockchain AND ITS APPLICATIONS FOR FINANCE.pptx
Ad

Recently uploaded (20)

PPTX
Group 4 [BSIT-1C] Computer Network (1).pptx
PDF
SAHIL PROdhdjejss yo yo pdf TOCOL PPT.pdf
PPTX
unit1d-communitypharmacy-240815170017-d032dce8.pptx
PPTX
vortex flow measurement in instrumentation
PPT
System Unit Components and its Functions
PDF
Maxon CINEMA 4D 2025 Crack Free Download Latest Version
PPTX
AIR BAG SYStYEM mechanical enginweering.pptx
PDF
ISS2022 present sdabhsa hsdhdfahasda ssdsd
PPTX
Chapter no 8 output devices dpart 2.pptx
PDF
Topic-1-Main-Features-of-Data-Processing.pdf
PDF
Printing Presentation to show beginners.
DOCX
Copy-OT LIST 12.8.25.docxjdjfufufufufuuffuf
PPTX
dDifference Beetween Saving slides And Investment Slides.pptx
PDF
ICT grade for 8. MATATAG curriculum .P2.pdf
PDF
Tcl Scripting for EDA.pdf
PPTX
Clauses_Part1.hshshpjzjxnznxnxnndndndndndndndnndptx
PPTX
RTS MASTER DECK_Household Convergence Scorecards. Use this file copy.pptx
PDF
GENERATOR AND IMPROVED COIL THEREFOR HAVINGELECTRODYNAMIC PROPERTIES
PDF
2- Physical Layer (06).pdfgshshshbsbshshshhs
PPTX
New professional education PROF-ED-7_103359.pptx
Group 4 [BSIT-1C] Computer Network (1).pptx
SAHIL PROdhdjejss yo yo pdf TOCOL PPT.pdf
unit1d-communitypharmacy-240815170017-d032dce8.pptx
vortex flow measurement in instrumentation
System Unit Components and its Functions
Maxon CINEMA 4D 2025 Crack Free Download Latest Version
AIR BAG SYStYEM mechanical enginweering.pptx
ISS2022 present sdabhsa hsdhdfahasda ssdsd
Chapter no 8 output devices dpart 2.pptx
Topic-1-Main-Features-of-Data-Processing.pdf
Printing Presentation to show beginners.
Copy-OT LIST 12.8.25.docxjdjfufufufufuuffuf
dDifference Beetween Saving slides And Investment Slides.pptx
ICT grade for 8. MATATAG curriculum .P2.pdf
Tcl Scripting for EDA.pdf
Clauses_Part1.hshshpjzjxnznxnxnndndndndndndndnndptx
RTS MASTER DECK_Household Convergence Scorecards. Use this file copy.pptx
GENERATOR AND IMPROVED COIL THEREFOR HAVINGELECTRODYNAMIC PROPERTIES
2- Physical Layer (06).pdfgshshshbsbshshshhs
New professional education PROF-ED-7_103359.pptx

Diffie Hellman Key Exchange protocol.pptx

  • 1. Cryptography and Network Security Public Key Cryptography
  • 2. Chapter 10 – Other Public Key Cryptosystems Amongst the tribes of Central Australia every man, woman, and child has a secret or sacred name which is bestowed by the older men upon him or her soon after birth, and which is known to none but the fully initiated members of the group. This secret name is never mentioned except upon the most solemn occasions; to utter it in the hearing of men of another group would be a most serious breach of tribal custom. When mentioned at all, the name is spoken only in a whisper, and not until the most elaborate precautions have been taken that it shall be heard by no one but members of the group. The native thinks that a stranger knowing his secret name would have special power to work him ill by means of magic. —The Golden Bough, Sir James George Frazer
  • 3. Diffie-Hellman Key Exchange  first public-key type scheme proposed  by Diffie & Hellman in 1976 along with the exposition of public key concepts ïŹ note: now know that Williamson (UK CESG) secretly proposed the concept in 1970  is a practical method for public exchange of a secret key  used in a number of commercial products
  • 4. Diffie-Hellman Key Exchange  a public-key distribution scheme ïŹ cannot be used to exchange an arbitrary message ïŹ rather it can establish a common key ïŹ known only to the two participants  value of key depends on the participants (and their private and public key information)  based on exponentiation in a finite (Galois) field (modulo a prime or a polynomial) - easy  security relies on the difficulty of computing discrete logarithms (similar to factoring) – hard
  • 5. Diffie-Hellman Setup  all users agree on global parameters: ïŹ large prime integer or polynomial q ïŹ a being a primitive root mod q  each user (eg. A) generates their key ïŹ chooses a secret key (number): xA < q ïŹ compute their public key: yA = a xA mod q  each user makes public that key yA
  • 6. Diffie-Hellman Key Exchange  shared session key for users A & B is KAB: KAB = a xA.xB mod q = yA xB mod q (which B can compute) = yB xA mod q (which A can compute)  KAB is used as session key in private-key encryption scheme between Alice and Bob  if Alice and Bob subsequently communicate, they will have the same key as before, unless they choose new public-keys  attacker needs an x, must solve discrete log
  • 7. Diffie-Hellman Example  users Alice & Bob who wish to swap keys:  agree on prime q=353 and a=3  select random secret keys: ïŹ A chooses xA=97, B chooses xB=233  compute respective public keys: ïŹ yA=3 97 mod 353 = 40 (Alice) ïŹ yB=3 233 mod 353 = 248(Bob)  compute shared session key as: ïŹ KAB= yB xA mod 353 = 248 97 = 160 (Alice) ïŹ KAB= yA xB mod 353 = 40 233 = 160 (Bob)
  • 8. Key Exchange Protocols  users could create random private/public D-H keys each time they communicate  users could create a known private/public D-H key and publish in a directory, then consulted and used to securely communicate with them  both of these are vulnerable to a Man-in- the-Middle Attack  authentication of the keys is needed
  • 9. Man-in-the-Middle Attack 1. Darth prepares by creating two private / public keys 2. Alice transmits her public key to Bob 3. Darth intercepts this and transmits his first public key to Bob. Darth also calculates a shared key with Alice 4. Bob receives the public key and calculates the shared key (with Darth instead of Alice) 5. Bob transmits his public key to Alice 6. Darth intercepts this and transmits his second public key to Alice. Darth calculates a shared key with Bob 7. Alice receives the key and calculates the shared key (with Darth instead of Bob)  Darth can then intercept, decrypt, re-encrypt, forward all messages between Alice & Bob

Editor's Notes

  • #1: Lecture slides by Lawrie Brown for “Cryptography and Network Security”, 5/e, by William Stallings, Chapter 10 – “Other Public Key Cryptosystems”.
  • #2: Opening quote.
  • #3: This chapter continues our overview of public-key cryptography systems (PKCSs), and begins with a description of one of the earliest and simplest PKCS, Diffie-Hellman key exchange. This first published public-key algorithm appeared in the seminal paper by Diffie and Hellman that defined public-key cryptography [DIFF76b] and is generally referred to as Diffie-Hellman key exchange. The concept had been previously described in a classified report in 1970 by Williamson (UK CESG) - and subsequently declassified in 1987, see [ELLI99]. The purpose of the algorithm is to enable two users to securely exchange a key that can then be used for subsequent encryption of messages. The algorithm itself is limited to the exchange of secret values. A number of commercial products employ this key exchange technique.
  • #4: The purpose of the algorithm is to enable two users to securely exchange a key that can then be used for subsequent encryption of messages. The algorithm itself is limited to the exchange of secret values, which depends on the value of the public/private keys of the participants. The Diffie-Hellman algorithm uses exponentiation in a finite (Galois) field (modulo a prime or a polynomial), and depends for its effectiveness on the difficulty of computing discrete logarithms.
  • #5: In the Diffie-Hellman key exchange algorithm, there are two publicly known numbers: a prime number q and an integer a that is a primitive root of q. The prime q and primitive root a can be common to all using some instance of the D-H scheme. Note that the primitive root a is a number whose powers successively generate all the elements mod q. Users Alice and Bob choose random secrets x's, and then "protect" them using exponentiation to create their public y's. For an attacker monitoring the exchange of the y's to recover either of the x's, they'd need to solve the discrete logarithm problem, which is hard.
  • #6: The actual key exchange for either party consists of raising the others "public key' to power of their private key. The resulting number (or as much of as is necessary) is used as the key for a block cipher or other private key scheme. For an attacker to obtain the same value they need at least one of the secret numbers, which means solving a discrete log, which is computationally infeasible given large enough numbers. Note that if Alice and Bob subsequently communicate, they will have the same key as before, unless they choose new public-keys.
  • #7: Here is an example of Diffie-Hellman from the text using prime q=353, showing how each computes its public key, and then how after they exchange public keys, each can compute the common secret key.I n this simple example, it would be possible by brute force to determine the secret key 160. In particular, an attacker E can determine the common key by discovering a solution to the equation 3a mod 353 = 40 or the equation 3b mod 353 = 248. The brute-force approach is to calculate powers of 3 modulo 353, stopping when the result equals either 40 or 248. The desired answer is reached with the exponent value of 97, which provides 397 mod 353 = 40. With larger numbers, the problem becomes impractical.
  • #8: Now consider a simple protocol that makes use of the Diffie-Hellman calculation. Suppose that user A wishes to set up a connection with user B and use a secret key to encrypt messages on that connection. User A can generate a one-time private key XA, calculate YA, and send that to user B. User B responds by generating a private value XB, calculating YB, and sending YB to user A. Both users can now calculate the key. The necessary public values q and a would need to be known ahead of time. Alternatively, user A could pick values for q and a and include those in the first message.
  • #9: The protocol described on the previous slide 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: Darth prepares for the attack by generating two random private keys XD1 and XD2 and then computing the corresponding public keys YD1 and YD2 Alice transmits YA to Bob. Darth intercepts YA and transmits YD1 to Bob. Darth also calculates K2 = (YA )^ XD2 mod q Bob receives YD1 and calculates K1=(YD1 )^ XB mod q Bob transmits YB to Alice. Darth intercepts YB and transmits YD2 to Alice. Darth calculates K1=(YB )^ XD1 mod q Alice receives YD2 and calculates K2=(YD2 )^ XA mod q . 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: Alice sends an encrypted message M: E(K2, M). Darth intercepts the encrypted message and decrypts it, to recover M. Darth sends Bob E(K1, M) or E(K1, M'), where M' is any message. In the first case, Darth simply wants to eavesdrop on the communication without altering it. In the second case, Darth wants to modify the message going to Bob. 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.