Diffie-Hellman comparison

One hidden product, three algebraic worlds.

These systems preserve the hidden scalar relationship a * b. The operations and public inputs are visible, but a, b, and the raw product a * b remain private. What changes is the encoded result: g^(ab), abP, or e(P,Q)^(ab), and who is meant to compute it.

Publicoperator, g/P/Q, public keys
Privatea, b, raw a * b
Encoded resultDH/ECDH: private to Alice and Bob; pairing: often public
Read blog
Ordinary DH

Numbers in a finite group

shared = g^(ab)

Alice applies her secret exponent to Bob's public value. Bob does the symmetric calculation.

ECDH / X25519

Points on an elliptic curve

shared = abP

The same hidden product appears as scalar multiplication of a public base point.

Pairings

Public map into GT

shared-like value = e(P,Q)^(ab)

The result moves into a target group, and public keys can often be combined publicly.

Bitcoin address

Hash a secp256k1 public key

Base58Check(0x00 || HASH160(pubkey))

Legacy P2PKH addresses use SHA-256, RIPEMD-160, a version byte, and a checksum.

Ethereum address

Take the last 20 bytes

last20(Keccak256(pubkey_x || pubkey_y))

Ethereum hashes the uncompressed secp256k1 public key without the leading 0x04 byte.

Comparison matrix

Same hidden product, different algebraic worlds.

SystemProtocol shapePublic starting objectPrivate input(s)Public output(s)CalculationResultMain algebra or hash ruleWhere result livesTypical use
Ordinary Diffie-HellmanTwo-party key agreementGenerator number gAlice secret a and Bob secret bAlice publishes g^a; Bob publishes g^bAlice computes (g^b)^a; Bob computes (g^a)^bg^(ab)(g^a)^b = g^(ab)Number/group elementOlder finite-field DH
Elliptic-Curve Diffie-Hellman / X25519Two-party key agreementPublic curve point PAlice secret a and Bob secret bAlice publishes aP; Bob publishes bPAlice computes a(bP); Bob computes b(aP)abPa(bP) = abPElliptic-curve pointModern secure connections
Pairing versionPublic pairing relation or scheme-specific key/proof checkTwo public curve points, often P in G1 and Q in G2Scheme scalars such as a and bCould publish aP and bQ, depending on schemeOften compute e(aP, bQ)e(P,Q)^(ab)e(aP,bQ) = e(P,Q)^(ab)Target group element, usually written GTIdentity-based crypto, BLS signatures, zk-SNARKs
Bitcoin key/addressSingle-account key pair and address derivationsecp256k1 generator point GOne account private scalar kPublic key K = kG, usually compressed for P2PKHHASH160(compressed public key), then Base58CheckBitcoin address, for example P2PKHaddress = Base58Check(0x00 || RIPEMD160(SHA256(K)))Base58Check address stringReceiving funds and identifying spend conditions
Ethereum key/addressSingle-account key pair and address derivationsecp256k1 generator point GOne account private scalar kUncompressed public key K = kG = 0x04 || x || yKeccak256(x || y), then take the last 20 bytesEthereum account addressaddress = last20(Keccak256(public_key_without_04))20-byte address, usually hex with optional EIP-55 checksum casingAccount identity for balances, transactions, and contracts
Intentional capability

Pairings do not reveal the ECDH shared point.

In ordinary ECDH, an outsider seeing P, aP, and bP should not derive abP. In a pairing-friendly setting, a public observer may compute e(aP,bQ). That reveals a related target-group value, not a, b, or abP.

TechnologyWhat it intentionally lets you do
X25519Only Alice and Bob derive abP
PairingsPublicly combine points into e(P,Q)^(ab)
BLS signaturesVerify a signature relation with pairings
zk-SNARKsVerify algebraic proof relations efficiently
Identity-based encryptionDerive public keys from identities such as an email address