Photo by 🇨🇭 Claudio Schwarz | @purzlbaum on Unsplash

Handshaking Keys for Privacy with ECDH … Let’s “Go” Create It!

A fundamental part of creating a secure tunnel — such as with HTTPs — is that the client and server generate the same shared symmetric key (typically with the AES method), and that they use this to encrypt the data passed.

Private key (Alice) cca00b8290819e15451bf8e551cb0e5fc08c22647b5d99437c3c0f8a25abbbd3
--ECC Parameters--
Name: P-256
N: ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551
P: ffffffff00000001000000000000000000000000ffffffffffffffffffffffff
Gx: 6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296
Gy: 4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5
Bitsize: 100
Private key (Alice) 49ed920273c9493bbb8f012bedb1e8cc987ea209ad66066079e9ea4e535fa63f
Private key (Bob) bce5a446ce1d2632e9b12be975e62cfa2bd93825e7b63533ba746ee6ee6e99ad
Shared key (Alice) 8b48614129b344d81cc550643a1a480c7e26a5db3b84f8318ac49b6d48d3a4feShared key (Bob) 8b48614129b344d81cc550643a1a480c7e26a5db3b84f8318ac49b6d48d3a4fe

Elliptic Curve Diffie Hellman (ECDH)

ECDH is used to create a shared key. Bob will generate a public key and a private key by taking a point on the curve. The private key is a random number (dB) and the Bob’s public key (QB) will be:

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. EU Citizen. Auld Reekie native. Old World Breaker. New World Creator.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store