Key exchange lets parties establish a shared secret across an open network without transmitting that secret directly. Each party keeps a private key, derives a public key, and combines its private key with the other party’s public key. Both computations produce the same secret, which can then drive a fast symmetric cipher such as AES for messages of arbitrary length. section 1.3.1 section 4.1
An elliptic-curve key exchange proceeds through these main operations:
- Choose public curve parameters, including a base point, field order, and cofactor. section 4.1.3
- Hash a passphrase into an integer modulo the system order to obtain a private key; keeping that value secret protects the system. section 4.1.3
- Multiply the base point by the private key to derive the public key, then exchange public keys. section 4.1 section 4.1.3
- Multiply one party’s private key by the other party’s public key; both sides obtain the same elliptic-curve point and use its x value as the shared key. section 4.5
Testing MQV shared secrets
MQV adds ephemeral private/public key pairs to static keys. The test generates both ephemeral pairs, computes each side’s share with mqv_share(), compares the results, and reports matching hexadecimal values. A successful run prints “MQV Keys match.” section 4.3.3
Figure 1.3 Creating a secret key by exchanging public keys
Trace how public keys cross the network while each party independently creates the same secret key. section 1.3.1

