SlideShare a Scribd company logo
11
Primitive Roots If  x n  = a  then  a  is called the  n-th  root of  x For any prime number  p , if we have a number  a  such that powers of  a  mod  p  generate all the numbers between  1  to  p-1  then  a  is called a  Primitive Root  of  p . In terms of the Group terminology  a  is the generator element of the multiplicative group of the finite field formed by mod  p Then for any integer  b  and a primitive root  a  of prime number  p  we can find a unique exponent  i  such that b = a i  mod p The exponent  i  is referred to as the  discrete logarithm  or  index , of  b  for the base  a .
Most read
21
Diffie-Hellman Example q  = 97   = 5 X A  = 36 X B  = 58 Y A  = 5 36  = 50 mod 97 Y B  = 5 58  = 44 mod 97 K = (Y B ) X A  mod  q  = 44 36  mod 97 = 75 mod 97 K = (Y A ) X B  mod  q =  50 58  mod 97 = 75 mod 97
Most read
22
Why Diffie-Hellman is Secure? Opponent has  q ,   , Y A  and Y B To get X A  or X B  the opponent is forced to take a discrete logarithm The security of the Diffie-Hellman Key Exchange lies in the fact that, while it is relatively easy to calculate exponentials modulo a prime, it is very difficult to calculate discrete logarithms. For large primes, the latter task is considered infeasible.
Most read
Diffie-Hellman Key Exchange Whittfield Diffie and Martin Hellman are called the inventors of Public Key Cryptography.  Diffie-Hellman Key Exchange is the first Public Key Algorithm published in 1976.
What is Diffie-Hellman? A Public Key Algorithm Only for Key Exchange Does NOT Encrypt or Decrypt Based on Discrete Logarithms Widely used in Security Protocols and Commercial Products  Williamson of Britain’s CESG claims to have discovered it several years prior to 1976
Discrete Logarithms What is a logarithm? log 10 100 = 2  because  10 2  = 100 In general if  log m b = a  then  m a  = b Where  m  is called the  base  of the logarithm A  discrete logarithm  can be defined for integers only In fact we can define  discrete logarithms   mod p  also where  p  is any prime number
Discrete Logarithm Problem The security of the Diffie-Hellman algorithm depends on the difficulty of solving the discrete logarithm problem (DLP) in the multiplicative group of  a finite field
Sets, Groups and Fields A set is any collection of objects called the elements of the set Examples of sets:  R ,  Z ,  Q If we can define an operation on the elements of the set and certain rules are followed then we get other mathematical structures called groups and fields
Groups A group is a set  G  with a custom-defined binary operation + such that: The group is closed under +, i.e., for  a ,  b      G: a + b     G The Associative Law holds i.e., for any  a ,  b ,  c      G: a + (b + c) = (a + b) + c There exists an identity element  0 , such that  a + 0 = a For each  a     G  there exists an inverse element  –a  such that  a + (-a) = 0 If for all  a ,  b      G:   a + b = b + a  then the group is called an Abelian or commutative group If a group  G  has a finite number of elements it is called a finite group
More About Group Operations + does not necessarily mean normal arithmetic addition + just indicates a binary operation which can be custom defined The group operation could be denoted as  • The group notation with + is called the additive notation and the group notation with • is called the multiplicative notation
Fields A field is a set  F  with two custom-defined binary operations + and  •  such that: The Field is closed under + and  • , i.e., for  a ,  b      F: a + b     F  and  a  •  b     F The Associative Law holds i.e., for any  a ,  b ,  c      F: a + (b + c) = (a + b) + c  and  a  •  (b  •  c) = (a  •  b)  •  c  There exist identity elements  0  and  1 , such that  a + 0 = a  and  a  •  1 = a For each  a     F  there exist inverse elements  –a  and  a -1 such that  a + (-a) = 0  and  a  •   a -1  = 1 If a field  F  has a finite number of elements it is called a finite field
Examples of Groups Groups Set of real numbers  R  under + Set of real numbers  R  under * Set of integers  Z  under + Set of integers  Z  under *? Set of integers modulo a prime number  p  under + Set of integers modulo a prime number  p  under * Set of 3 X 3 matrices under + meaning matrix addition Set of 3 X 3 matrices under * meaning matrix multiplication? Fields Set of real numbers  R  under + and * Set of integers  Z  under + and * Set of integers modulo a prime number  p  under + and *
Generator of Group If for  a      G,  all members of the group can be written in terms of  a  by applying the group operation * on  a  a number of times then  a  is called a generator of the group  G Examples 2 is a generator of  Z * 11 2 and 3 are generator of  Z * 19 1 6 3 7 9 10 5 8 4 2 2 m   mod  11 10 9 8 7 6 5 4 3 2 1 m 1 10 5 12 6 3 11 15 17 6 3 14 7 13 16 8 4 2 2 m   mod  19 11 12 10 11 16 10 12 15 4 14 14 13 17 16 13 17 1 18 18 6 2 7 15 5 8 9 3 3 m   mod  19 9 8 7 6 5 4 3 2 1 m
Primitive Roots If  x n  = a  then  a  is called the  n-th  root of  x For any prime number  p , if we have a number  a  such that powers of  a  mod  p  generate all the numbers between  1  to  p-1  then  a  is called a  Primitive Root  of  p . In terms of the Group terminology  a  is the generator element of the multiplicative group of the finite field formed by mod  p Then for any integer  b  and a primitive root  a  of prime number  p  we can find a unique exponent  i  such that b = a i  mod p The exponent  i  is referred to as the  discrete logarithm  or  index , of  b  for the base  a .
 
 
Diffie-Hellman Algorithm Five Parts Global Public Elements User A Key Generation User B Key Generation Generation of Secret Key by User A Generation of Secret Key by User B
Global Public Elements q Prime number     < q  and    is a primitive root  of  q The global public elements are also sometimes called the domain parameters
User A Key Generation Select private X A   X A   < q Calculate public Y A   Y A  =     X A  mod  q
User B Key Generation Select private X B   X B   < q Calculate public Y B   Y B  =     X B  mod  q
Generation of Secret Key by User A K = (Y B ) X A  mod  q
Generation of Secret Key by User B K = (Y A ) X B  mod  q
Diffie-Hellman Key Exchange
Diffie-Hellman Example q  = 97   = 5 X A  = 36 X B  = 58 Y A  = 5 36  = 50 mod 97 Y B  = 5 58  = 44 mod 97 K = (Y B ) X A  mod  q  = 44 36  mod 97 = 75 mod 97 K = (Y A ) X B  mod  q =  50 58  mod 97 = 75 mod 97
Why Diffie-Hellman is Secure? Opponent has  q ,   , Y A  and Y B To get X A  or X B  the opponent is forced to take a discrete logarithm The security of the Diffie-Hellman Key Exchange lies in the fact that, while it is relatively easy to calculate exponentials modulo a prime, it is very difficult to calculate discrete logarithms. For large primes, the latter task is considered infeasible.

More Related Content

What's hot (20)

MAC-Message Authentication Codes
MAC-Message Authentication CodesMAC-Message Authentication Codes
MAC-Message Authentication Codes
DarshanPatil82
 
RSA Algorithm
RSA AlgorithmRSA Algorithm
RSA Algorithm
Srinadh Muvva
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
Gopal Sakarkar
 
ElGamal Encryption Algoritham.pptx
ElGamal Encryption Algoritham.pptxElGamal Encryption Algoritham.pptx
ElGamal Encryption Algoritham.pptx
Indian Institute of information technology Una
 
Network security cryptography ppt
Network security cryptography pptNetwork security cryptography ppt
Network security cryptography ppt
Thushara92
 
Asymmetric Cryptography
Asymmetric CryptographyAsymmetric Cryptography
Asymmetric Cryptography
UTD Computer Security Group
 
2. public key cryptography and RSA
2. public key cryptography and RSA2. public key cryptography and RSA
2. public key cryptography and RSA
Dr.Florence Dayana
 
Elliptic curve cryptography
Elliptic curve cryptographyElliptic curve cryptography
Elliptic curve cryptography
Cysinfo Cyber Security Community
 
Message Authentication Code & HMAC
Message Authentication Code & HMACMessage Authentication Code & HMAC
Message Authentication Code & HMAC
Krishna Gehlot
 
Data Encryption Standard (DES)
Data Encryption Standard (DES)Data Encryption Standard (DES)
Data Encryption Standard (DES)
Haris Ahmed
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
Md. Afif Al Mamun
 
Double DES & Triple DES
Double DES & Triple DESDouble DES & Triple DES
Double DES & Triple DES
Hemant Sharma
 
Message authentication
Message authenticationMessage authentication
Message authentication
CAS
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
Janani S
 
Homomorphic Encryption
Homomorphic EncryptionHomomorphic Encryption
Homomorphic Encryption
Vipin Tejwani
 
Hash Function
Hash FunctionHash Function
Hash Function
Siddharth Srivastava
 
Classical Encryption Techniques
Classical Encryption TechniquesClassical Encryption Techniques
Classical Encryption Techniques
university of education,Lahore
 
DES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentationDES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentation
sarhadisoftengg
 
CONVENTIONAL ENCRYPTION
CONVENTIONAL ENCRYPTIONCONVENTIONAL ENCRYPTION
CONVENTIONAL ENCRYPTION
SHUBHA CHATURVEDI
 
Elgamal digital signature
Elgamal digital signatureElgamal digital signature
Elgamal digital signature
MDKAWSARAHMEDSAGAR
 

Similar to Diffiehellman (20)

Chap4
Chap4Chap4
Chap4
nathanurag
 
RC CNS unit 2.pptx types of algorithms in cns
RC CNS unit 2.pptx types of algorithms in cnsRC CNS unit 2.pptx types of algorithms in cns
RC CNS unit 2.pptx types of algorithms in cns
swethajosephsastry
 
NumberTheory explanations in the easiest way.ppt
NumberTheory explanations in the easiest way.pptNumberTheory explanations in the easiest way.ppt
NumberTheory explanations in the easiest way.ppt
IshwariKhanal
 
doc6.pdf
doc6.pdfdoc6.pdf
doc6.pdf
aminasouyah
 
lecture5.pdf
lecture5.pdflecture5.pdf
lecture5.pdf
aminasouyah
 
sheet6.pdf
sheet6.pdfsheet6.pdf
sheet6.pdf
aminasouyah
 
paper6.pdf
paper6.pdfpaper6.pdf
paper6.pdf
aminasouyah
 
Number theory lecture (part 1)
Number theory lecture (part 1)Number theory lecture (part 1)
Number theory lecture (part 1)
Aleksandr Yampolskiy
 
P10co982 (2)
P10co982 (2)P10co982 (2)
P10co982 (2)
bharatsvnit
 
GTR final project
GTR final projectGTR final project
GTR final project
ChemistMikeLam
 
Forth Lecture
Forth LectureForth Lecture
Forth Lecture
Amalia Indrawati Gunawan
 
CRYPTOGRAPHY AND NUMBER THEORY, he ha huli
CRYPTOGRAPHY AND NUMBER THEORY, he ha huliCRYPTOGRAPHY AND NUMBER THEORY, he ha huli
CRYPTOGRAPHY AND NUMBER THEORY, he ha huli
harshmacduacin
 
Number theory and cryptography
Number theory and cryptographyNumber theory and cryptography
Number theory and cryptography
Yasser Ali
 
Ch04
Ch04Ch04
Ch04
Joe Christensen
 
Group Ring.ppt
Group Ring.pptGroup Ring.ppt
Group Ring.ppt
SauravDash10
 
Finite fields
Finite fields Finite fields
Finite fields
BhumikaPal1
 
Introduction to Network security and privacy
Introduction to Network security and privacyIntroduction to Network security and privacy
Introduction to Network security and privacy
MyilvahananJothivel
 
2.ppt
2.ppt2.ppt
2.ppt
TapodhirAcharjee2
 
Iss lecture 3
Iss lecture 3Iss lecture 3
Iss lecture 3
Ali Habeeb
 
1_Introduction NetSec_Sept2021.pdf
1_Introduction NetSec_Sept2021.pdf1_Introduction NetSec_Sept2021.pdf
1_Introduction NetSec_Sept2021.pdf
qarinahnita
 

Recently uploaded (20)

[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
Jenny408767
 
Flower Identification Class-10 by Kushal Lamichhane.pdf
Flower Identification Class-10 by Kushal Lamichhane.pdfFlower Identification Class-10 by Kushal Lamichhane.pdf
Flower Identification Class-10 by Kushal Lamichhane.pdf
kushallamichhame
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-25-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-25-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-25-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-25-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
wygalkelceqg
 
What are the Features & Functions of Odoo 18 SMS Marketing
What are the Features & Functions of Odoo 18 SMS MarketingWhat are the Features & Functions of Odoo 18 SMS Marketing
What are the Features & Functions of Odoo 18 SMS Marketing
Celine George
 
Unit 4 Reverse Engineering Tools Functionalities & Use-Cases.pdf
Unit 4  Reverse Engineering Tools  Functionalities & Use-Cases.pdfUnit 4  Reverse Engineering Tools  Functionalities & Use-Cases.pdf
Unit 4 Reverse Engineering Tools Functionalities & Use-Cases.pdf
ChatanBawankar
 
How to Setup Lunch in Odoo 18 - Odoo guides
How to Setup Lunch in Odoo 18 - Odoo guidesHow to Setup Lunch in Odoo 18 - Odoo guides
How to Setup Lunch in Odoo 18 - Odoo guides
Celine George
 
QUIZ-O-FORCE PRELIMINARY ANSWER SLIDE.pptx
QUIZ-O-FORCE PRELIMINARY ANSWER SLIDE.pptxQUIZ-O-FORCE PRELIMINARY ANSWER SLIDE.pptx
QUIZ-O-FORCE PRELIMINARY ANSWER SLIDE.pptx
Sourav Kr Podder
 
Sri Guru Arjun Dev Ji .
Sri Guru Arjun Dev Ji                   .Sri Guru Arjun Dev Ji                   .
Sri Guru Arjun Dev Ji .
Balvir Singh
 
How to Setup Renewal of Subscription in Odoo 18
How to Setup Renewal of Subscription in Odoo 18How to Setup Renewal of Subscription in Odoo 18
How to Setup Renewal of Subscription in Odoo 18
Celine George
 
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
Arshad Shaikh
 
Multicultural approach in education - B.Ed
Multicultural approach in education - B.EdMulticultural approach in education - B.Ed
Multicultural approach in education - B.Ed
prathimagowda443
 
Policies, procedures, subject selection and QTAC.pptx
Policies, procedures, subject selection and QTAC.pptxPolicies, procedures, subject selection and QTAC.pptx
Policies, procedures, subject selection and QTAC.pptx
mansk2
 
Writing Research Papers: Guidance for Research Community
Writing Research Papers: Guidance for Research CommunityWriting Research Papers: Guidance for Research Community
Writing Research Papers: Guidance for Research Community
Rishi Bankim Chandra Evening College, Naihati, North 24 Parganas, West Bengal, India
 
Research Handbook On Environment And Investment Law Kate Miles
Research Handbook On Environment And Investment Law Kate MilesResearch Handbook On Environment And Investment Law Kate Miles
Research Handbook On Environment And Investment Law Kate Miles
mucomousamir
 
New syllabus entomology (Lession plan 121).pdf
New syllabus entomology (Lession plan 121).pdfNew syllabus entomology (Lession plan 121).pdf
New syllabus entomology (Lession plan 121).pdf
Arshad Shaikh
 
LDMMIA About me 2025 Edition 3 College Volume
LDMMIA About me 2025 Edition 3 College VolumeLDMMIA About me 2025 Edition 3 College Volume
LDMMIA About me 2025 Edition 3 College Volume
LDM & Mia eStudios
 
Quiz-E-Mataram (Under 20 Quiz Set) .pptx
Quiz-E-Mataram (Under 20 Quiz Set) .pptxQuiz-E-Mataram (Under 20 Quiz Set) .pptx
Quiz-E-Mataram (Under 20 Quiz Set) .pptx
SouptikUkil
 
0b - THE ROMANTIC ERA: FEELINGS AND IDENTITY.pptx
0b - THE ROMANTIC ERA: FEELINGS AND IDENTITY.pptx0b - THE ROMANTIC ERA: FEELINGS AND IDENTITY.pptx
0b - THE ROMANTIC ERA: FEELINGS AND IDENTITY.pptx
Julián Jesús Pérez Fernández
 
How to create and manage blogs in odoo 18
How to create and manage blogs in odoo 18How to create and manage blogs in odoo 18
How to create and manage blogs in odoo 18
Celine George
 
[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
[2025] Qualtric XM-EX-EXPERT Study Plan | Practice Questions + Exam Details
Jenny408767
 
Flower Identification Class-10 by Kushal Lamichhane.pdf
Flower Identification Class-10 by Kushal Lamichhane.pdfFlower Identification Class-10 by Kushal Lamichhane.pdf
Flower Identification Class-10 by Kushal Lamichhane.pdf
kushallamichhame
 
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
Active Surveillance For Localized Prostate Cancer A New Paradigm For Clinical...
wygalkelceqg
 
What are the Features & Functions of Odoo 18 SMS Marketing
What are the Features & Functions of Odoo 18 SMS MarketingWhat are the Features & Functions of Odoo 18 SMS Marketing
What are the Features & Functions of Odoo 18 SMS Marketing
Celine George
 
Unit 4 Reverse Engineering Tools Functionalities & Use-Cases.pdf
Unit 4  Reverse Engineering Tools  Functionalities & Use-Cases.pdfUnit 4  Reverse Engineering Tools  Functionalities & Use-Cases.pdf
Unit 4 Reverse Engineering Tools Functionalities & Use-Cases.pdf
ChatanBawankar
 
How to Setup Lunch in Odoo 18 - Odoo guides
How to Setup Lunch in Odoo 18 - Odoo guidesHow to Setup Lunch in Odoo 18 - Odoo guides
How to Setup Lunch in Odoo 18 - Odoo guides
Celine George
 
QUIZ-O-FORCE PRELIMINARY ANSWER SLIDE.pptx
QUIZ-O-FORCE PRELIMINARY ANSWER SLIDE.pptxQUIZ-O-FORCE PRELIMINARY ANSWER SLIDE.pptx
QUIZ-O-FORCE PRELIMINARY ANSWER SLIDE.pptx
Sourav Kr Podder
 
Sri Guru Arjun Dev Ji .
Sri Guru Arjun Dev Ji                   .Sri Guru Arjun Dev Ji                   .
Sri Guru Arjun Dev Ji .
Balvir Singh
 
How to Setup Renewal of Subscription in Odoo 18
How to Setup Renewal of Subscription in Odoo 18How to Setup Renewal of Subscription in Odoo 18
How to Setup Renewal of Subscription in Odoo 18
Celine George
 
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
"Orthoptera: Grasshoppers, Crickets, and Katydids pptx
Arshad Shaikh
 
Multicultural approach in education - B.Ed
Multicultural approach in education - B.EdMulticultural approach in education - B.Ed
Multicultural approach in education - B.Ed
prathimagowda443
 
Policies, procedures, subject selection and QTAC.pptx
Policies, procedures, subject selection and QTAC.pptxPolicies, procedures, subject selection and QTAC.pptx
Policies, procedures, subject selection and QTAC.pptx
mansk2
 
Research Handbook On Environment And Investment Law Kate Miles
Research Handbook On Environment And Investment Law Kate MilesResearch Handbook On Environment And Investment Law Kate Miles
Research Handbook On Environment And Investment Law Kate Miles
mucomousamir
 
New syllabus entomology (Lession plan 121).pdf
New syllabus entomology (Lession plan 121).pdfNew syllabus entomology (Lession plan 121).pdf
New syllabus entomology (Lession plan 121).pdf
Arshad Shaikh
 
LDMMIA About me 2025 Edition 3 College Volume
LDMMIA About me 2025 Edition 3 College VolumeLDMMIA About me 2025 Edition 3 College Volume
LDMMIA About me 2025 Edition 3 College Volume
LDM & Mia eStudios
 
Quiz-E-Mataram (Under 20 Quiz Set) .pptx
Quiz-E-Mataram (Under 20 Quiz Set) .pptxQuiz-E-Mataram (Under 20 Quiz Set) .pptx
Quiz-E-Mataram (Under 20 Quiz Set) .pptx
SouptikUkil
 
How to create and manage blogs in odoo 18
How to create and manage blogs in odoo 18How to create and manage blogs in odoo 18
How to create and manage blogs in odoo 18
Celine George
 

Diffiehellman

  • 1. Diffie-Hellman Key Exchange Whittfield Diffie and Martin Hellman are called the inventors of Public Key Cryptography. Diffie-Hellman Key Exchange is the first Public Key Algorithm published in 1976.
  • 2. What is Diffie-Hellman? A Public Key Algorithm Only for Key Exchange Does NOT Encrypt or Decrypt Based on Discrete Logarithms Widely used in Security Protocols and Commercial Products Williamson of Britain’s CESG claims to have discovered it several years prior to 1976
  • 3. Discrete Logarithms What is a logarithm? log 10 100 = 2 because 10 2 = 100 In general if log m b = a then m a = b Where m is called the base of the logarithm A discrete logarithm can be defined for integers only In fact we can define discrete logarithms mod p also where p is any prime number
  • 4. Discrete Logarithm Problem The security of the Diffie-Hellman algorithm depends on the difficulty of solving the discrete logarithm problem (DLP) in the multiplicative group of a finite field
  • 5. Sets, Groups and Fields A set is any collection of objects called the elements of the set Examples of sets: R , Z , Q If we can define an operation on the elements of the set and certain rules are followed then we get other mathematical structures called groups and fields
  • 6. Groups A group is a set G with a custom-defined binary operation + such that: The group is closed under +, i.e., for a , b  G: a + b  G The Associative Law holds i.e., for any a , b , c  G: a + (b + c) = (a + b) + c There exists an identity element 0 , such that a + 0 = a For each a  G there exists an inverse element –a such that a + (-a) = 0 If for all a , b  G: a + b = b + a then the group is called an Abelian or commutative group If a group G has a finite number of elements it is called a finite group
  • 7. More About Group Operations + does not necessarily mean normal arithmetic addition + just indicates a binary operation which can be custom defined The group operation could be denoted as • The group notation with + is called the additive notation and the group notation with • is called the multiplicative notation
  • 8. Fields A field is a set F with two custom-defined binary operations + and • such that: The Field is closed under + and • , i.e., for a , b  F: a + b  F and a • b  F The Associative Law holds i.e., for any a , b , c  F: a + (b + c) = (a + b) + c and a • (b • c) = (a • b) • c There exist identity elements 0 and 1 , such that a + 0 = a and a • 1 = a For each a  F there exist inverse elements –a and a -1 such that a + (-a) = 0 and a • a -1 = 1 If a field F has a finite number of elements it is called a finite field
  • 9. Examples of Groups Groups Set of real numbers R under + Set of real numbers R under * Set of integers Z under + Set of integers Z under *? Set of integers modulo a prime number p under + Set of integers modulo a prime number p under * Set of 3 X 3 matrices under + meaning matrix addition Set of 3 X 3 matrices under * meaning matrix multiplication? Fields Set of real numbers R under + and * Set of integers Z under + and * Set of integers modulo a prime number p under + and *
  • 10. Generator of Group If for a  G, all members of the group can be written in terms of a by applying the group operation * on a a number of times then a is called a generator of the group G Examples 2 is a generator of Z * 11 2 and 3 are generator of Z * 19 1 6 3 7 9 10 5 8 4 2 2 m mod 11 10 9 8 7 6 5 4 3 2 1 m 1 10 5 12 6 3 11 15 17 6 3 14 7 13 16 8 4 2 2 m mod 19 11 12 10 11 16 10 12 15 4 14 14 13 17 16 13 17 1 18 18 6 2 7 15 5 8 9 3 3 m mod 19 9 8 7 6 5 4 3 2 1 m
  • 11. Primitive Roots If x n = a then a is called the n-th root of x For any prime number p , if we have a number a such that powers of a mod p generate all the numbers between 1 to p-1 then a is called a Primitive Root of p . In terms of the Group terminology a is the generator element of the multiplicative group of the finite field formed by mod p Then for any integer b and a primitive root a of prime number p we can find a unique exponent i such that b = a i mod p The exponent i is referred to as the discrete logarithm or index , of b for the base a .
  • 12.  
  • 13.  
  • 14. Diffie-Hellman Algorithm Five Parts Global Public Elements User A Key Generation User B Key Generation Generation of Secret Key by User A Generation of Secret Key by User B
  • 15. Global Public Elements q Prime number   < q and  is a primitive root of q The global public elements are also sometimes called the domain parameters
  • 16. User A Key Generation Select private X A X A < q Calculate public Y A Y A =  X A mod q
  • 17. User B Key Generation Select private X B X B < q Calculate public Y B Y B =  X B mod q
  • 18. Generation of Secret Key by User A K = (Y B ) X A mod q
  • 19. Generation of Secret Key by User B K = (Y A ) X B mod q
  • 21. Diffie-Hellman Example q = 97  = 5 X A = 36 X B = 58 Y A = 5 36 = 50 mod 97 Y B = 5 58 = 44 mod 97 K = (Y B ) X A mod q = 44 36 mod 97 = 75 mod 97 K = (Y A ) X B mod q = 50 58 mod 97 = 75 mod 97
  • 22. Why Diffie-Hellman is Secure? Opponent has q ,  , Y A and Y B To get X A or X B the opponent is forced to take a discrete logarithm The security of the Diffie-Hellman Key Exchange lies in the fact that, while it is relatively easy to calculate exponentials modulo a prime, it is very difficult to calculate discrete logarithms. For large primes, the latter task is considered infeasible.