liveBook · Manning

Key exchange

As explained in Elliptic Curve Cryptography for Developers

A cryptographic process in which parties establish a common secret over a network without transmitting that secret directly.

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
figure

Trace how public keys cross the network while each party independently creates the same secret key. section 1.3.1

How Elliptic Curve Cryptography for Developers covers it

How deep it goes
Builds elliptic-curve key generation and Diffie-Hellman computation, then tests MQV sharing; defers deeper Diffie-Hellman treatment.
Examples
Uses Alice-and-Bob exchange diagrams, passphrase-derived keys, elliptic-curve parameters, and an MQV test with matching hexadecimal shares.
What it assumes
Assumes finite-field and elliptic-curve mathematics while scaffolding passphrase hashing, public parameters, and point multiplication.
What you can do after
Builds elliptic-curve key pairs, computes shared secrets, and verifies matching MQV outputs in code.
How it connects
Connects public-key cryptography, elliptic curves, finite fields, symmetric encryption, AES, hashing, and perfect forward secrecy.

Also explained in

Compare how 2 books explain key exchange →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Elliptic Curve Cryptography for Developers. The section links point to the parts of the book it draws on.