Diffie Hellman Key exchange
- Initial setup, public parameters
- equation of elliptic curve
- finite field p
- point that acts as generator of the elliptic curve, R
- Alice will Choose an element a from (2,3,… n-1)
- Bob will choose an element b from (2,3 …. n-1)
- Alice,compute pub key, $K _a = a. R$
- Bob, compute pub key , $K_b = b.R$
- Alice will compute Common private key , $K_ca = a.K_b$
- Bob will compute common private key , $K_cb = b. K_A$
- $K_ca = K_cb$, because $a.K _b = a. (b. R)$ and $b. K_a = b. (a. R)$
- Therefore, a.b R = a.b.R, hence the computed private key is same for both Alice and Bob.
If we know public key of K, we have to find random element a which is very hard. Brute force, baby steps , giants steps which is why finding private key is hard.