wire / wire-format / ecc

Elliptic Curve Cryptography (ECC)

ECC is a public-key cryptosystem based on the discrete logarithm problem on elliptic curves. Curve: y^2 = x^3 + ax + b (mod p) for prime curves, or y^2 + xy = x^3 + ax^2 + b (binary curves). Key pair: private key d (random scalar), public key Q = d*G (point multiplication). ECDH: shared secret = d_A * Q_B = d_B * Q_A. ECDSA: signature (r, s) where r = (k*G)_x mod n, s = k^(-1)(z + r*d) mod n.

wire-format kind wire-format status standard verification verified tier B wire-format@1

aka: Elliptic Curve Cryptography (ECC)

wire format

spec: SEC 2 / RFC 6090

ECC is a public-key cryptosystem based on the discrete logarithm problem on elliptic curves. Curve: y^2 = x^3 + ax + b (mod p) for prime curves, or y^2 + xy = x^3 + ax^2 + b (binary curves). Key pair: private key d (random scalar), public key Q = d*G (point multiplication). ECDH: shared secret = d_A * Q_B = d_B * Q_A. ECDSA: signature (r, s) where r = (k*G)_x mod n, s = k^(-1)(z + r*d) mod n.

fieldsizemeaning
Curve equation (prime)parametersy^2 = x^3 + ax + b (mod p). p = prime, a, b = curve coefficients.
Base point (G)2 coordinatesGenerator point on the curve. Order n (prime).
Private key (d)n bitsRandom scalar in [1, n-1].
Public key (Q)2 coordinatesQ = d * G (scalar multiplication). (x, y) on the curve.
ECDH shared secretoperationShared = d_A * Q_B = d_B * Q_A (point on curve). Use x-coordinate as key material.
ECDSA signature2 scalars (r, s)r = (k*G)_x mod n. s = k^(-1)(z + r*d) mod n. (k = random nonce, z = hash of message.)
ECDSA verifyoperationu1 = z * s^(-1) mod n. u2 = r * s^(-1) mod n. R = u1*G + u2*Q. Verify R_x == r mod n.
Common curvesnamesP-256 (secp256r1), P-384, P-521 (NIST). Curve25519 (X25519 for ECDH, Ed25519 for signatures). secp256k1 (Bitcoin).

example:

00 00 00 00

ECC (placeholder)


provenance

agent: curl -H 'accept: application/json' wire.phall.io/wire-format/ecc or /wire-format/ecc.json