Elliptic curve cryptography: how it works and its limits
Published
Elliptic curve cryptography (ECC) is a family of public-key algorithms built on arithmetic over points on an elliptic curve. This guide reads RFC 7748, RFC 8032, NIST SP 800-186 and NIST FIPS 186-5 for how those curves work, why modern protocols use Curve25519 and P-256, and where elliptic curves stop against quantum computers. Then it explains how Sealbox uses them across its three modes.
In short, elliptic curve cryptography reaches roughly a 128-bit classical security level with compact keys — 32 bytes for Curve25519 and Ed25519 public keys, and 64 bytes for an Ed25519 signature — which makes key agreement and digital signatures fast and small. Both RFC 7748 and RFC 8032 state the main ceiling plainly: a sufficiently large quantum computer would break those curves, so post-quantum confidentiality requires combining them with or replacing them by a post-quantum scheme.
What elliptic curve cryptography is and why key sizes shrink
Elliptic curve cryptography belongs to public key cryptography: each participant holds a private scalar and publishes a corresponding public point derived from a shared base point on the curve. Moving forward — multiplying the base point by a secret scalar — is fast. Reversing that step to recover the private scalar from the public point is the elliptic-curve discrete logarithm problem, which classical computers have no fast algorithm to solve for well-chosen curves.
RFC 7748 notes that it "specifies two elliptic curves over prime fields that offer a high level of practical security in cryptographic applications", including TLS. Those two curves — Curve25519 and Curve448 — are "intended to operate at the ~128-bit and ~224-bit security level, respectively, and are generated deterministically based on a list of required properties". In this guide's reading, deterministic generation matters because it lets reviewers check how the curve constants were picked rather than trusting opaque parameters.
Compact sizes are a direct consequence of that mathematical structure. In RFC 8032, the authors list one of the practical advantages of EdDSA: "EdDSA uses small public keys (32 or 57 bytes) and signatures (64 or 114 bytes) for Ed25519 and Ed448, respectively". Smaller keys and signatures reduce bandwidth, storage and handshake latency on mobile devices and constrained channels.
Curve families: Weierstrass, Montgomery and Edwards
Not every elliptic curve uses the same equation or behaves the same way in code. NIST SP 800-186 states that it "specifies the set of elliptic curves recommended for U.S. Government use". Its summary draws a clear line between older and newer curve forms: "In addition to the previously recommended Weierstrass curves defined over prime fields and binary fields, this Recommendation includes two newly specified Edwards curves, which provide increased performance, side-channel resistance, and simpler implementation when compared to traditional curves."
SP 800-186 also notes that "The new curves are interoperable with those specified by the Crypto Forum Research Group (CFRG) of the Internet Engineering Task Force (IETF)." In practice, two curve groups appear across most modern iPhone and internet protocols:
- NIST prime Weierstrass curves (such as P-256). Widely supported in hardware security modules and platform chips, including Apple's Secure Enclave, where the private key stays inside dedicated hardware.
- Montgomery and twisted Edwards curves (Curve25519 and Ed25519). RFC 7748 explains that Curve25519 and Curve448 "lend themselves to constant-time implementation" and scalar multiplication without special-case exceptions, making them resistant to a wide range of side-channel attacks including timing and cache attacks.
RFC 8032 adds a related property for Edwards-curve signatures: "The formulas are 'complete', i.e., they are valid for all points on the curve, with no exceptions." Complete, constant-time formulas reduce the number of special cases that an implementer can get wrong when handling untrusted public inputs.
Two jobs: key agreement and digital signatures
Elliptic curves rarely encrypt long messages directly. Instead, they perform two foundational jobs that surround symmetric encryption: establishing a shared secret and authenticating who signed data.
For key agreement, RFC 7748 says it "specifies how these curves can be used with the Diffie-Hellman protocol for key agreement". Two parties combine their own private scalar with the other side's public point to derive the same shared secret without sending that secret across the wire, and then pass it through a key derivation function to obtain symmetric encryption keys.
For authentication, NIST FIPS 186-5 states that it "specifies a suite of algorithms that can be used to generate a digital signature", and explains their role: "Digital signatures are used to detect unauthorized modifications to data and to authenticate the identity of the signatory." Alongside ECDSA over NIST curves, modern standards specify EdDSA in RFC 8032, which "describes elliptic curve signature scheme Edwards-curve Digital Signature Algorithm (EdDSA)" and is "instantiated with recommended parameters for the edwards25519 and edwards448 curves". One notable engineering safeguard in RFC 8032 is that "The use of a unique random number for each signature is not required", removing a classic failure mode where reusing a random nonce in ECDSA leaks the private key.
Where elliptic curve cryptography stops
The first hard limit is future quantum computing. RFC 7748 states this directly in its Security Considerations: "Large quantum computers, if ever created, will break both curve25519 and curve448". RFC 8032 repeats the same boundary for Ed25519 and Ed448: "A sufficiently large quantum computer would be able to break both." That means encrypted traffic recorded today under pure elliptic-curve key agreement could be decrypted later if a fault-tolerant quantum computer is built — the harvest-now-decrypt-later threat covered in our guide on post-quantum cryptography.
The second limit is protocol and implementation discipline. RFC 7748 warns that "Protocol designers using Diffie-Hellman over the curves defined in this document must not assume 'contributory behaviour'." It also notes that equivalent public keys can map to the same shared secret, so protocols should bind public keys into the key derivation rather than treating a shared secret alone as proof of identity.
The third limit sits outside curve arithmetic altogether. A valid curve point proves mathematical consistency, not human identity: without verifying whose public key you hold, a man-in-the-middle can substitute their own curve point at first contact. Likewise, curve security says nothing about who controls the unlocked device or what metadata the transport channel records.
How Sealbox uses elliptic curves — and where that stops
Sealbox is an iPhone app that seals messages before they enter any channel, using HPKE (RFC 9180) across three cryptographic modes. Each mode makes a distinct choice about elliptic curves and hardware boundaries, matching the app's reference page and code:
Three modes with clear curve roles. In Quantum (the default), the app pairs X25519 with ML-KEM-768 inside X-Wing for hybrid post-quantum key encapsulation, plus ML-DSA-65 (FIPS 204) for message signatures. In Classic, HPKE uses NIST P-256 with the decryption key living inside the iPhone's Secure Enclave, paired with Ed25519 signatures. In Compact, HPKE uses Curve25519 + ChaCha20-Poly1305 + Ed25519 for a compact payload outside the NIST curve family. In all three modes, the root identity is composite (Ed25519 + ML-DSA-65), so forging the identity requires breaking both algorithms, and every 1:1 message is authenticated and bound to the recipient.
The quantum limit by mode. Only Quantum mode provides post-quantum confidentiality and post-quantum message signatures. In Classic and Compact, both key agreement and message signatures rely on elliptic curves (P-256/Curve25519 and Ed25519), so a future quantum attacker could break confidentiality of recorded messages or forge new messages in those two modes, even though the composite root identity itself remains hedged. Use Quantum whenever payload size allows.
Device and session barriers around the keys. Across modes, decryption keys stay behind current biometrics with no passcode fallback, backed by a strong alphanumeric iPhone passcode as an additional barrier against physical brute force and a panic gesture that wipes local keys, contacts, drafts and files. In 1:1 conversations, view-once is the default: each message key is destroyed on reading, and an outer static HPKE envelope sealed to the recipient's public key means the sender cannot reopen what they sent. For high-risk endpoints, the app also supports carrying sealed messages off-network by QR, including on a dedicated device in Vault mode.
The limits outside the math. Curves and hardware gates protect message content in transit and at rest, not the transport channel's metadata (who talks to whom, when and message size). They also cannot defend against live biometric coercion, an attacker who already controls an unlocked device during use, or an unverified remote pairing where the 7-word security code was skipped. Operating off-network by QR reduces exposure to remote network attacks rather than eliminating every endpoint risk.
Sources
- RFC Editor: RFC 7748: Elliptic Curves for Security — Verified on
- RFC Editor: RFC 8032: Edwards-Curve Digital Signature Algorithm (EdDSA) — Verified on
- NIST: SP 800-186, Elliptic Curve Domain Parameters — Verified on
- NIST: FIPS 186-5, Digital Signature Standard (DSS) — Verified on
Frequently asked questions
What is elliptic curve cryptography used for?
Elliptic curve cryptography is used for public-key operations — mainly key agreement (such as Diffie-Hellman over Curve25519 in RFC 7748) and digital signatures (such as ECDSA in FIPS 186-5 and Ed25519 in RFC 8032). Protocols use it to establish shared symmetric keys and verify authenticity with much smaller keys than older public-key families.
What is the difference between P-256 and Curve25519?
P-256 is a NIST prime Weierstrass curve widely supported in hardware chips such as Apple's Secure Enclave. Curve25519 is a Montgomery curve (with its twisted Edwards twin Ed25519) specified in RFC 7748 and RFC 8032 for constant-time arithmetic without special-case exceptions and strong resistance to timing and cache side-channel attacks.
Is elliptic curve cryptography safe against quantum computers?
No. Both RFC 7748 and RFC 8032 state directly that a sufficiently large quantum computer would break Curve25519, Curve448, Ed25519 and Ed448. The same quantum limit applies to NIST elliptic curves such as P-256. Protecting against future quantum decryption requires post-quantum or hybrid schemes.
Which elliptic curves does Sealbox use?
Sealbox uses X25519 combined with ML-KEM-768 (X-Wing) in its default Quantum mode, NIST P-256 inside the Secure Enclave with Ed25519 in Classic mode, and Curve25519 with Ed25519 in Compact mode. The root identity is composite (Ed25519 + ML-DSA-65) across all modes.
Does choosing Classic or Compact mode give post-quantum protection?
No. Only Quantum mode provides post-quantum confidentiality and post-quantum message signatures. Classic and Compact rely on elliptic curves for key agreement and message signing, trading post-quantum protection for hardware-bound P-256 keys (Classic) or smaller payloads (Compact).
No form, no list, no tracker — it's just email. If the button doesn't open your mail app, write to support@sealbox.io with the subject "Notify me".
Coming to the App Store · iOS 26+