Elliptic curve cryptography (ECC) is public key cryptography built on the algebra of points on an elliptic curve over a finite field, and it now protects most TLS connections, SSH logins, passkeys, code signatures and blockchain wallets. Its appeal is small keys and fast operations for the same security as much larger RSA keys. Its danger is that a few implementation details (a reused signing nonce, an unvalidated public key, the wrong curve for the job) hand an attacker the private key. This guide explains what ECC is, how ECDH, ECDSA and EdDSA work, which curves to use under NIST SP 800-186 and the IETF RFCs, the mistakes that break it, and what the October 2026 final NIST IR 8547 means for its retirement. For the wider picture of where encryption sits in a programme, see the Encryption Guide.
Key takeaways
- Small keys, same strength: a 256-bit curve such as P-256 or Curve25519 gives about 128 bits of security, the level NIST SP 800-186 assigns to those curves.
- Use the right algorithm on the right curve: ECDSA and EC key establishment on P-256, P-384 or P-521; EdDSA on Edwards25519 or Edwards448; X25519 and X448 for key agreement. Binary curves are deprecated.
- The nonce is the weak point of ECDSA: a repeated or biased per-signature value reveals the private key. Deterministic ECDSA (RFC 6979) and EdDSA (RFC 8032) remove that dependency on randomness.
- Validation failures are real-world bugs: CVE-2020-0601 (CurveBall) let spoofed ECC certificates pass Windows CryptoAPI checks and is in the CISA Known Exploited Vulnerabilities catalogue.
- ECC has a dated end: NIST IR 8547 (final, 27 October 2026) deprecates ECDSA, EdDSA and EC Diffie-Hellman after 2030 and disallows them after 2035, because a large quantum computer would break them.
What it is
An elliptic curve, for cryptography, is the set of points (x, y) that satisfy an equation such as y² = x³ + ax + b, with all arithmetic done modulo a large prime, plus a special "point at infinity". Points can be "added" to each other by a fixed geometric rule, and adding a point to itself k times is called scalar multiplication. Computing k × G from a number k and a base point G is fast. Working back from the result to k, the elliptic curve discrete logarithm problem, is believed to be infeasible on classical computers for well-chosen curves. That one-way function is the whole basis of ECC: the private key is the number k, and the public key is the point k × G.
Because the best known classical attacks on good curves are much weaker than those on RSA, ECC reaches a given security level with far shorter keys. That means faster handshakes, smaller certificates and signatures, and less power on constrained devices such as smart cards, security keys and IoT sensors.
| Security strength (bits) | NIST curves (SP 800-186) | IETF curves | Comparable RSA modulus |
|---|---|---|---|
| 112 | P-224 | None | 2048 |
| 128 | P-256 | Curve25519 / Edwards25519 (X25519, Ed25519) | 3072 |
| 192 | P-384 | None | 7680 |
| 224 | None (Edwards448 and Curve448 sit here) | Curve448 / Edwards448 (X448, Ed448) | Between 7680 and 15360 |
| 256 | P-521 | None | 15360 |
The RSA column follows the NIST SP 800-57 Part 1 comparable-strength table; the curve strengths are from SP 800-186 Table 1.
How it works
Key agreement: ECDH, X25519 and X448
Each party generates a private scalar and publishes the matching point. Each multiplies the other's public point by its own private scalar and both arrive at the same shared point, from which a key derivation function produces session keys. Ephemeral ECDH (ECDHE), with fresh keys per session, gives forward secrecy and is how TLS 1.3 establishes keys. RFC 7748 defines X25519 and X448 on the Montgomery forms of Curve25519 and Curve448: 32-byte and 56-byte keys, built-in "clamping" of the private scalar, and an optional check that aborts if the shared secret is all zeros, which happens when the peer sends a small-order point. NIST SP 800-56A Rev. 3 specifies EC Diffie-Hellman and MQV for approved use.
Signatures: ECDSA
To sign, ECDSA picks a per-signature secret value k (the nonce), computes the point k × G, and combines its x-coordinate with the message hash and the private key to produce the signature pair (r, s). Anyone with the public key can verify. The scheme is only as strong as k: if k is ever reused for two messages, or is predictable, or leaks even a few bits across many signatures, the private key can be recovered with simple algebra or lattice techniques. RFC 6979 removes the dependency on a good random generator by deriving k deterministically from the private key and the message hash using HMAC, and its signatures remain "fully compatible with plain DSA and ECDSA", so verifiers need no change.
Signatures: EdDSA (Ed25519 and Ed448)
RFC 8032 EdDSA is deterministic by design: the nonce comes from hashing a secret key prefix with the message. Ed25519 has 32-octet keys and 64-octet signatures; Ed448 has 57-octet keys and 114-octet signatures. The RFC advises Ed25519 where 128-bit security is enough and Ed448 otherwise, recommends against the prehashed variants (Ed25519ph, Ed448ph), and allows context strings to separate protocol uses. NIST added EdDSA to FIPS 186-5 (February 2023), which matters for organisations that need FIPS-approved algorithms.
Which algorithm on which curve
| Use | Algorithm | Curves allowed in SP 800-186 | Where you meet it |
|---|---|---|---|
| Key agreement | ECDH / ECDHE | P-256, P-384, P-521 (P-224 at 112 bits) | TLS, IPsec IKEv2, FIPS-validated modules |
| Key agreement | X25519, X448 | Curve25519, Curve448 (alternative representations; not for ECDSA or EdDSA directly) | TLS 1.3, SSH, WireGuard, Signal-style messaging |
| Signatures | ECDSA (random or deterministic k) | P-256, P-384, P-521 | X.509 certificates, code signing, JWT ES256/ES384, WebAuthn passkeys |
| Signatures | EdDSA | Edwards25519, Edwards448 | SSH (ssh-ed25519), JWT EdDSA, package signing, DNSSEC |
| Blockchain signatures | ECDSA, Schnorr | secp256k1 (allowed for blockchain-related applications only) | Bitcoin, Ethereum and related wallets |
| Interoperability | ECDSA, ECDH | Brainpool curves (allowed for interoperability) | Some European government and smart card schemes |
| Avoid | Any | Binary curves K-/B- (deprecated); P-192, K-163, B-163 (legacy use only) | Old devices and libraries |
Why it matters
- It protects identities, not just data: machine and workload certificates, SSH keys, signed tokens and passkeys are increasingly ECC. Every one is a private key held by a person, server, pipeline or agent. See the SSH Key Management Guide, the JWT Security Guide and the Passwordless and Passkeys Guide.
- Failures are total: a symmetric cipher misused may leak some data; a broken ECDSA implementation leaks the signing key, which lets an attacker sign code, mint tokens or impersonate a server until the key is revoked everywhere. See the Code Signing Security Guide.
- Verification bugs are exploited: CISA lists CVE-2020-0601, a flaw in how Windows CryptoAPI (Crypt32.dll) validated ECC certificates, as known exploited; it allowed a spoofed code-signing certificate to make malware look legitimately signed and enabled man-in-the-middle attacks.
- It is on a retirement clock: NIST IR 8547 states that NIST will deprecate quantum-vulnerable signature algorithms after 2030 and disallow them after 2035, with the same dates for EC Diffie-Hellman and MQV. The final report also notes earlier deadlines for prioritised US federal systems (post-quantum key establishment by 31 December 2030, signatures by 31 December 2031). Note that the final report deprecates ECC at every strength after 2030, not only the 112-bit level the 2024 draft singled out. See the Post-Quantum Cryptography Migration Guide and the Post-Quantum Cryptography Deadlines Tracker.
Common misconceptions
- "A bigger curve is always better": P-384 and P-521 cost more and gain nothing against a quantum computer. Choose the strength your policy requires (128 bits for most uses) and spend the effort on implementation quality and migration planning.
- "Curve25519 and Ed25519 are the same thing": they are related representations of one curve, but X25519 is for key agreement and Ed25519 for signatures. SP 800-186 explicitly says the Montgomery and Weierstrass representations are not to be used for ECDSA or EdDSA directly. Do not reuse one key pair across key agreement and signing.
- "Randomness is the library's problem": it is, until the platform's random generator is weak at boot or in a cloned virtual machine. Prefer deterministic signing (RFC 6979 or EdDSA) so a bad generator cannot leak keys through signatures.
- "Any ECC is FIPS-approved": only specific curves and algorithms in FIPS 186-5 and SP 800-186, implemented in a validated module, count. See the FIPS 140-3 and Cryptographic Module Validation Guide.
- "Post-quantum means ECC is useless now": ECC remains approved until the dates above, and hybrid key exchange (X25519 combined with ML-KEM) is the common transition pattern. The task now is inventory and crypto-agility, not panic replacement.
- "Verifying is the easy half": verifiers must check that received points are on the curve and in the right subgroup, and that certificate curve parameters are the named ones. Skipping those checks enables invalid-curve attacks and spoofing like CurveBall.
Common failure patterns
| Failure | Consequence | Prevention | How to detect |
|---|---|---|---|
| ECDSA nonce reuse or bias | Private key recovered from public signatures | RFC 6979 or EdDSA; constant-time, well-reviewed libraries | Scan signature logs for repeated r values; library version inventory |
| Missing public key or point validation | Invalid-curve or small-subgroup attack leaks key bits | Libraries that validate by default; X25519 all-zero check | Code review and test vectors |
| Explicit curve parameters accepted in certificates | Spoofed certificates pass validation (CVE-2020-0601 class) | Accept named curves only; patch crypto libraries promptly | KEV tracking; certificate linting |
| Side-channel leakage | Key recovered through timing or power analysis | Constant-time implementations; HSMs or secure elements for high-value keys | Vendor evaluation evidence |
| Hand-rolled curve arithmetic | Any of the above | Never implement curve maths in application code | Static analysis for custom crypto |
| Deprecated curves still in use | Non-compliance; weak keys | Remove binary curves and P-192 from allowed lists | Cryptographic inventory and TLS scans |
See the Cryptographic Protocol Failures and Misuse Guide for the wider catalogue of crypto mistakes.
Related concepts
- RSA: the other widely deployed public key family, based on factoring; larger keys, and the same post-quantum dates. See the Cryptography Basics Guide.
- PKI and certificates: ECC keys usually travel inside X.509 certificates; key type and curve are certificate attributes to inventory. See the PKI Basics Guide.
- Key management: generation, storage, rotation and destruction of EC private keys follow the same lifecycle as any key. See the Cryptographic Key Management Guide and the HSM Deployment and Operations Guide.
- Threshold signatures: ECDSA and EdDSA can be split across parties so no single system holds the whole key. See the Secret Sharing and Threshold Cryptography Guide.
- Post-quantum algorithms: ML-KEM replaces ECDH and ML-DSA or SLH-DSA replace ECDSA and EdDSA in the NIST transition.
Choosing and rolling out ECC
- Inventory: find every EC key and certificate, with curve, algorithm, owner and system, including machine identities and code signing keys. See the Cryptographic Inventory and CBOM Guide.
- Set the policy: P-256 or P-384 with ECDSA where FIPS validation is required; Ed25519 and X25519 where it is not; no binary curves; no explicit curve parameters.
- Pilot: issue new ECC certificates for a low-risk service group, test client compatibility (older clients may lack Ed25519 support), and keep RSA certificates available for fallback.
- Roll out by rings and roll back by restoring the previous certificate or key type if handshake failures rise.
- Plan the next move: record crypto-agility requirements now, because every ECC deployment will need a post-quantum or hybrid replacement before 2035.
Small and large organisations: a small team can rely on platform defaults (modern TLS libraries, ssh-ed25519 keys, managed certificate services) and focus on patching and inventory. A large organisation needs a written algorithm policy, certificate linting in the issuing CA, and inventory tooling.
Measuring it
- Coverage: percentage of keys and certificates in the inventory with curve and owner recorded.
- Policy compliance: count of deprecated curves (binary, P-192) and RSA-1024 keys found by scans, trending to zero.
- Patch latency: days to patch crypto library vulnerabilities listed in the KEV catalogue.
- Deterministic signing: share of signing services using RFC 6979 or EdDSA.
- Migration readiness: share of systems with a documented post-quantum or hybrid path.
Framework mapping
| Framework | Reference | ECC relevance |
|---|---|---|
| NIST SP 800-53 Rev. 5 | SC-12, SC-13 | Key establishment and approved cryptographic protection |
| NIST SP 800-53 Rev. 5 | SC-8, IA-7 | Protected transmission; authentication to cryptographic modules |
| NIST CSF 2.0 | PR.DS-01, PR.DS-02 | Data at rest and in transit protection |
| ISO/IEC 27001:2022 Annex A | 8.24 Use of cryptography | Algorithm policy and key management |
| NIST standards | FIPS 186-5, SP 800-186, SP 800-56A Rev. 3, IR 8547 | Approved signature schemes, curves, key establishment and transition dates |
Practitioner checklist
- Build an inventory of EC keys and certificates with curve, algorithm, owner and expiry.
- Publish an algorithm policy naming allowed curves (P-256, P-384, P-521, Ed25519, X25519, Ed448, X448) and banning binary curves and P-192.
- Require deterministic ECDSA (RFC 6979) or EdDSA for new signing services.
- Use well-reviewed libraries that validate received points and never implement curve arithmetic yourself.
- Configure certificate validation to accept named curves only, and patch crypto libraries listed in the KEV catalogue quickly.
- Keep high-value signing keys in HSMs or secure elements.
- Keep key agreement and signing keys separate, even on related curves.
- Record a post-quantum or hybrid migration path for each ECC system against the 2030 and 2035 NIST dates.
Standards and references
- NIST: SP 800-186 Recommendations for Discrete Logarithm-based Cryptography: Elliptic Curve Domain Parameters
- NIST: FIPS 186-5 Digital Signature Standard
- NIST: IR 8547 Transition to Post-Quantum Cryptography Standards
- IETF: RFC 7748 Elliptic Curves for Security
- IETF: RFC 8032 Edwards-Curve Digital Signature Algorithm (EdDSA)
- IETF: RFC 6979 Deterministic Usage of DSA and ECDSA
- CISA: Known Exploited Vulnerabilities Catalog
- NIST: SP 800-53 Rev. 5
Related NHI Mgmt Group resources: Encryption Guide · Cryptography Basics Guide · Post-Quantum Cryptography Migration Guide · Cryptographic Key Management Guide