ECDH Key Exchange • ECDH (Elliptic Curve Diffie–Hellman Ke…

metamitya ·

ECDH Key Exchange

• ECDH (Elliptic Curve Diffie–Hellman Key Exchange) is an anonymous key agreement method that allows two parties to create a shared secret over an insecure channel using elliptic-curve public and private key pairs.
• ECDH operates similarly to the classical Diffie–Hellman Key Exchange (DHKE) but employs elliptic curve cryptography (ECC) point multiplication instead of traditional modular exponentiation.
• A key feature of ECDH is the commutative property of multiplying a secret number by a generator point G, expressed as (a * G) * b = (b * G) * a.
• Each participant, referred to as Alice and Bob, generates their own ECC key pair, which includes a private key and a public key derived from the generator point G.
• Alice and Bob exchange their public keys over the insecure channel, enabling them to compute a shared secret using their private keys and the public key received from the other party.
• The shared secret is computed as: sharedKey = (bobPubKey * alicePrivKey) = (alicePubKey * bobPrivKey), ensuring both parties arrive at the same shared key.
• The ECDH algorithm is simple to implement, and a code example will be provided in the following section.