Laboratorio de curvas elípticas online
Toda clave ECDSA es un escalar y una suma de puntos repetida. Aquí, la misma aritmética se ejecuta sobre un campo lo bastante pequeño para dibujarlo: elige una curva, suma puntos, mueve k con el control deslizante y observa cómo salta kG; después, descubre por qué recorrer ese camino hacia atrás es lo difícil.
100 % local: todo se ejecuta en tu navegador y nada se envía a ningún servidor
Lo bastante grande para que la nube de puntos deje de parecer un patrón, y lo bastante pequeña para que una búsqueda completa lleve unas pocas decenas de pasos. Sus 100 puntos no forman un único ciclo: el recorrido más largo que produce un generador aquí es de 50.
y² = x³ + 2x + 3 sobre F₉₇: gráfico de todos sus puntos
Haz clic en cualquier punto para convertirlo en el generador G. La línea discontinua es y = p/2: cada punto tiene un compañero reflejado respecto a ella, y ese compañero es su opuesto −P. Los puntos con y = 0, en la fila inferior, no tienen compañero: cada uno es su propio opuesto.
Generador y escalar
1G = 1 × (0, 10)
(0, 10)
Hacia adelante es barato: duplicar y sumar
Nadie calcula 1G sumando G consigo mismo 0 veces. Escribe k en binario y solo necesitas una duplicación por bit, más una suma por cada bit a 1: es la idea en la que se basa toda implementación de ECDSA, que después añade ventanas (windowing) y un tratamiento en tiempo constante.
Hacia atrás es lo difícil
La pregunta inversa —dados G y 1G, hallar k— es el problema del logaritmo discreto en curvas elípticas. En una curva tan pequeña no es ningún problema: basta con recorrer la secuencia.
Ese último número es lo esencial. Con 10⁹ máquinas en paralelo, cada una capaz de hacer 10⁹ operaciones de curva por segundo, harían falta aun así unos 10¹³ años: varios cientos de veces la edad actual del universo. No se conoce públicamente ningún algoritmo general más rápido contra una curva bien elegida; ese supuesto, y no ningún secreto en las fórmulas, es lo que sustenta una clave 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.