Diffie-Hellmann Key Exchange
Introduction
- Public key exchange protocol
- Group based cryptography
Flavour
Given: A and B want to agree upon a secret colour. Eavesdropper C who is able to intercept their messages.Assumption: Color seperation is expensive.
- A and B publically agree on a common colour P.
- A and B choose some secret colour X and Y respectively.
- A mixes P+X and sends it to B
- B mixes P+Y and sends to A
- C intercepts P+x and P+Y
- A and B then mix their personal secret colours to the received colours.
- A's new mix = P+Y+X
- B's new mix = P+X+Y
- A and B arrive at the same colour
Source:Wikipedia
Simple cryptographic use case
A and B publicly agree on a prime number- A chooses secret integer
and computes - B chooses secret integer
and computes - A and B exchange A1 and B1
- C intercepts
and - *MAGIC*
- A performs
- B performs
- Thus A and B could now use this an their encryption key.
i.e.
Even though C is aware of prime number
But is this secure enough?
Discrete Logarithm Problem
GivenWhy generators? What do they generate?
Group
A group is a set with operation under : closure , existence of inverse element , associativity, existence of identity element . For instance, (Z,+) is integer group under addition.Groups which can be generated by a single element are called cyclic groups. These special elements are called generators.
Example: Consider a dot operation defined as
Also consider the notation that
A number
- 1 :
for any - 2 :
for respectively = G - 3 :
for respectively = G - 4 :
for
Generators have a property that
This way, the encryption key could take any value between
Such cyclic groups modulo
Flaws
Impersonation issues. Any information passed to the insecure channel could be intercepted by an impersonator who could act like the actual receiver.Further
We realise that since we use a large prime
An interesting area is Elliptic curve cryptography, which reduces the encryption key size and provides equivalent security.
==
Last Updated: 3 Apr 2020