See more Elliptic curve Diffie%E2%80%93Hellman articles on AOD.

Article provided by Wikipedia

( => ( => ( => Elliptic-curve Diffie–Hellman [pageid] => 3357958 ) =>

Elliptic-curve Diffie–Hellman (ECDH) is an anonymous "key agreement protocol that allows two parties, each having an elliptic-curve public–private key pair, to establish a "shared secret over an insecure channel.[1][2][3] This shared secret may be directly used as a key, or to "derive another key. The key, or the derived key, can then be used to encrypt subsequent communications using a "symmetric-key cipher. It is a variant of the "Diffie–Hellman protocol using "elliptic-curve cryptography.

## Key establishment protocol

The following example will illustrate how a key establishment is made. Suppose "Alice wants to establish a shared key with "Bob, but the only channel available for them may be eavesdropped by a third party. Initially, the "domain parameters (that is, ${\displaystyle (p,a,b,G,n,h)}$ in the prime case or ${\displaystyle (m,f(x),a,b,G,n,h)}$ in the binary case) must be agreed upon. Also, each party must have a key pair suitable for elliptic curve cryptography, consisting of a private key ${\displaystyle d}$ (a randomly selected integer in the interval ${\displaystyle [1,n-1]}$) and a public key represented by a point ${\displaystyle Q}$ (where ${\displaystyle Q=dG}$, that is, the result of "adding ${\displaystyle G}$ to itself ${\displaystyle d}$ times). Let Alice's key pair be ${\displaystyle (d_{A},Q_{A})}$ and Bob's key pair be ${\displaystyle (d_{B},Q_{B})}$. Each party must know the other party's public key prior to execution of the protocol.

Alice computes point ${\displaystyle (x_{k},y_{k})=d_{A}Q_{B}}$. Bob computes point ${\displaystyle (x_{k},y_{k})=d_{B}Q_{A}}$. The shared secret is ${\displaystyle x_{k}}$ (the x coordinate of the point). Most standardized protocols based on ECDH derive a symmetric key from ${\displaystyle x_{k}}$ using some hash-based key derivation function.

The shared secret calculated by both parties is equal, because ${\displaystyle d_{A}Q_{B}=d_{A}d_{B}G=d_{B}d_{A}G=d_{B}Q_{A}}$.

The only information about her private key that Alice initially exposes is her public key. So, no party other than Alice can determine Alice's private key, unless that party can solve the elliptic curve "discrete logarithm problem. Bob's private key is similarly secure. No party other than Alice or Bob can compute the shared secret, unless that party can solve the elliptic curve "Diffie–Hellman problem.

The public keys are either static (and trusted, say via a certificate) or ephemeral (also known as ECDHE, where 'E' stands for "ephemeral"). "Ephemeral keys are temporary and not necessarily authenticated, so if authentication is desired, authenticity assurances must be obtained by other means. Authentication is necessary to avoid "man-in-the-middle attacks. If one of either Alice's or Bob's public keys is static, then man-in-the-middle attacks are thwarted. Static public keys provide neither "forward secrecy nor key-compromise impersonation resilience, among other advanced security properties. Holders of static private keys should validate the other public key, and should apply a secure "key derivation function to the raw Diffie–Hellman shared secret to avoid leaking information about the static private key. For schemes with other security properties, see "MQV.

While the shared secret may be used directly as a key, it is often desirable to hash the secret to remove weak bits due to the Diffie–Hellman exchange.[4]