Elliptic Curve Playground — explorateur interactif de courbes elliptiques
Chaque clé ECDSA se résume à un scalaire et à une addition de points, répétée. Ici, la même arithmétique s’effectue sur un corps assez petit pour être dessiné : choisissez une courbe, additionnez des points, faites glisser k et regardez kG sauter d’un point à l’autre, puis voyez pourquoi le calcul inverse est la partie difficile.
100 % local : tout s’exécute dans votre navigateur, rien n’est envoyé à aucun serveur
Assez grande pour que le nuage de points ne ressemble plus à un motif, assez petite pour qu’une recherche complète ne prenne que quelques dizaines d’étapes. Ses 100 points ne forment pas un cycle unique : la plus longue suite qu’un générateur produise ici est de 50.
y² = x³ + 2x + 3 sur F₉₇ : tracé de tous les points
Cliquez sur un point pour en faire le générateur G. La ligne pointillée est y = p/2 : chaque point a un symétrique par rapport à elle, et ce symétrique est son opposé −P. Les points où y = 0, sur la rangée du bas, n’ont pas de symétrique : chacun est son propre opposé.
Générateur et scalaire
1G = 1 × (0, 10)
(0, 10)
Le calcul direct est peu coûteux : doubler-et-additionner
Personne ne calcule 1G en additionnant G à lui-même 0 fois. Écrivez k en binaire : il suffit alors d’un doublement par bit, plus une addition par bit à 1. C’est l’idée de toute implémentation d’ECDSA, qui y ajoute ensuite le fenêtrage et un traitement en temps constant.
Le calcul inverse est la partie difficile
La question inverse (trouver k à partir de G et de 1G) est le problème du logarithme discret sur les courbes elliptiques. Sur une courbe aussi petite, ce n’est pas un problème du tout : il suffit de parcourir la suite.
Tout tient dans ce dernier nombre. À raison de 10⁹ opérations sur la courbe par seconde et par machine, 10⁹ machines travaillant en parallèle auraient encore besoin d’environ 10¹³ ans, soit plusieurs centaines de fois l’âge actuel de l’univers. Aucun algorithme général plus rapide contre une courbe bien choisie n’est connu publiquement ; c’est sur cette hypothèse, et non sur un quelconque secret des formules, que repose une clé ECDSA.
From the playground to a real key
Nothing changes between this page and a production key except the size of the numbers. secp256k1 — the curve behind Bitcoin and Ethereum — is y² = x³ + 7, the same equation as the mini-curve above, over a prime just under 2²⁵⁶ instead of 127. P-256, the curve in most TLS certificates and passkeys, is y² = x³ − 3x + b over a different 256-bit prime. Both have a published generator point G and a group order n of about 2²⁵⁶.
A key pair is exactly the two things the Scalar multiplication tab shows. The private key is the scalar k: a random integer in 1 … n − 1. The public key is the point kG: the generator added to itself k times, computed by the same double-and-add ladder, about 256 doublings and a couple of hundred additions. Publishing kG reveals nothing usable about k for the same reason the slider does not — the only known way back is to search, and the search space is the size of the group.
Signing adds one more scalar: a per-signature nonce, multiplied by G to produce r, with s tying the message hash and the private key together. That is why nonce handling is the sharp edge of ECDSA — the arithmetic on this page is unforgiving of a repeated random value. Generate real key pairs and signatures with the Test Vector Generator, or read how this compares with the factoring problem in ECDSA vs RSA.
How it works
The playground enumerates every solution of y² = x³ + ax + b modulo a small prime p by squaring each field element once and matching the results against the right-hand side — a few thousand operations, which is why the plot appears instantly and why the same approach is hopeless for a 256-bit prime. Point addition uses the standard chord-and-tangent formulas with a modular inverse computed by the extended Euclidean algorithm, and kG uses double-and-add, the same ladder a real signing routine walks.
Two sanity checks run on the arithmetic itself: the number of points found always lands inside the interval Hasse's theorem allows around p + 1, and the order of every point divides the group order, as Lagrange requires. The real-number tab draws the identical formulas with ordinary floating-point math, which is only ever a teaching aid — cryptography needs the exactness of integers modulo a prime. Everything is computed locally in your browser; the page makes no network requests and has no inputs worth keeping.