shared secret
key
which will be used for further encrypting a big message. How is this possible ? n
, number of attackers waiting for the
transmission. Diffie-Hellman
method.
Steps | Akbar | Birbal | n Attackers |
---|---|---|---|
1 |
Decides a huge prime number P and a generator point G and shares it publically
over unsecure channel with Birbal .
|
Receive P and G from Akbar .
|
Intercepts the value of P and G from Akbar .
|
2 |
Decides a Secret key a .
|
Decides a Secret key b .
|
Waiting for transmission. |
3 |
Compute Sa Which is Sa = G a mod P |
Compute Sb Which is Sb = G b mod P |
Waiting for transmission. |
4 |
Transmit Sa over unsecure
channel.
|
Transmit Sb over unsecure channel
|
Intercepts the value of Sa and Sb .
|
5 |
Compute Secret S Which is S = Sb a mod P which is equivalent to
S = (G b mod P ) a mod P which is further equivalent to
S = G ba mod P
|
Compute Secret S Which is S = Sa b mod P which is equivalent to
S = (G a mod P ) b mod P which is further equivalent to
S = G ab mod P
|
Trying to evaluate a and b from Sa and
Sb respectively which is next to impossible.
|
6 | Secret shared successfully ready for communication over a unsecure channel. | Secret shared successfully ready for communication over a unsecure channel. | ---- |
Steps | Akbar | Birbal | n Attackers |
---|---|---|---|
1 |
Let's assume prime number P = 29 and a generator point G = 7 and shares it publically
over unsecure channel with Birbal .
|
Receive P = 29 and G = 7 from Akbar .
|
Intercepts the value of P = 29 and G = 7 from Akbar .
|
2 |
Decides a Secret key a = 3 .
|
Decides a Secret key b = 5 .
|
Waiting for transmission. |
3 |
Compute Sa Which is Sa = G a mod P Sa = 7 3 mod 29 Sa = 343 mod 29 Sa = 24 |
Compute Sb Which is Sb = G b mod P Sb = 7 5 mod 29 Sb = 16807 mod 29 Sb = 16 |
Waiting for transmission. |
4 |
Transmit Sa= 24 over unsecure
channel.
|
Transmit Sb = 16 over unsecure channel
|
Intercepts the value of Sa=24 and Sb=16 .
|
5 |
Compute Secret S Which is S = Sb a mod P S = 16 3 mod 29 S = 4096 mod 29 S = 7 |
Compute Secret S Which is S = Sa b mod P S = 24 5 mod 29 S = 7962624 mod 29 S = 7 |
Trying to evaluate a = ? and b = ? from Sa = 24 and
Sb = 16 respectively which is next to impossible.
|
6 | Secret shared successfully ready for communication over a unsecure channel. | Secret shared successfully ready for communication over a unsecure channel. | ---- |