Asymmetric Cryptography ยท 3.3

๐Ÿ“ Elliptic Curve Cryptography (ECC)

Stronger security, dramatically smaller keysโฑ ~3 min

๐ŸŽฏECC: stronger safe, half the weight

A 256-bit ECC key provides roughly the same security as a 3072-bit RSA key. Smaller keys mean faster operations, less bandwidth, and less storage. This matters enormously on mobile devices, IoT sensors, TLS certificates, and any system where millions of operations happen per second.

What Is an Elliptic Curve?

An elliptic curve is defined by the equation yยฒ = xยณ + ax + b over a finite field. Points on the curve (pairs of numbers satisfying the equation) form a group โ€” you can 'add' two points on the curve to get a third point on the curve, using a geometric rule.

โ˜… FactThe hard problem: given a point P on the curve and the result Q = kP (the point P added to itself k times), find k. This is the elliptic curve discrete logarithm problem (ECDLP), and no efficient algorithm is known for it on properly chosen curves.

Common ECC Curves

CurveKey SizeSecurityUsed In
P-256 (secp256r1)256 bits~128 bitsTLS certificates, HTTPS, most browsers
P-384 (secp384r1)384 bits~192 bitsHigh-security government use (NSA Suite B)
Curve25519255 bits~128 bitsSignal, WireGuard, SSH, modern TLS โ€” fastest and most trusted
secp256k1256 bits~128 bitsBitcoin and Ethereum (not common in TLS)
๐Ÿ”’ SecurityCurve25519 (designed by Daniel J. Bernstein) is preferred in new systems because: it is faster than NIST curves, its parameters are transparent (no secret generation that could hide backdoors), and it is immune to several implementation pitfalls. Use X25519 for key exchange and Ed25519 for signatures when possible.

ECDH โ€” Elliptic Curve Diffie-Hellman

ECDH replaces classic Diffie-Hellman in modern protocols. Alice and Bob each generate an ECC key pair. They exchange public keys and each compute the same shared secret using their own private key and the other's public key. A third party who sees both public keys cannot compute the shared secret (ECDLP).

ECDSA โ€” Digital Signatures with ECC

ECDSA (Elliptic Curve Digital Signature Algorithm) is the ECC equivalent of RSA signatures. It generates a signature (r, s) from a message hash and private key. Verification uses the public key. ECDSA with P-256 is used in most TLS certificates today.

โš  WarningECDSA has a critical vulnerability: if the random nonce k used during signing is ever reused for two different messages with the same key, the private key can be extracted algebraically. This is what happened to the PlayStation 3 โ€” Sony used the same constant k for every ECDSA signature instead of generating a random one each time, and hackers recovered the private key used to sign games.
๐Ÿง Quick Checkfirst try = +5 XP

A 256-bit ECC key is roughly as strong as an RSA key ofโ€ฆ

โญ 0 XP๐Ÿ”ฅ 0 days