Saltar al contenido
uencoder

Implementar ECDSA signatures

ECDSA (Elliptic Curve Digital Firma Algoritmo) provides digital signatures con smaller claves than RSA. Aprender signing y verification.

  1. 1

    ECDSA: to sign message m with private key d, compute e = hash(m), pick random k, compute (x, y) = k*G, r = x mod n, s = k^(-1)(e + r*d) mod n. Signature is (r, s). To verify with public key Q = d*G: compute w = s^(-1) mod n, u1 = e*w, u2 = r*w, (x, y) = u1*G + u2*Q, verify x mod n = r. The random k must never repeat or leak — this broke PlayStation 3 and some Bitcoin wallets.

  2. 2
    Generador de HMAC →

    Generar a deterministic HMAC for the message. ECDSA requires a hash of the message — use SHA-256. For deterministic ECDSA (RFC 6979), derive k from the private key and message hash using HMAC, eliminating the need for random k and preventing nonce reuse vulnerabilities.

  3. 3
    Calculadora de hash →

    Hash the message with SHA-256 before signing. The hash reduces the message to a fixed-size digest that fits in the curve's field. Use SHA-256 for P-256, SHA-384 for P-384. Never use MD5 or SHA-1 — they are broken and allow signature forgery.

Preguntas frecuentes

What happens if the ECDSA nonce k is reused?
Catastrophic key compromise. If two messages are signed with the same k, an attacker can compute the private key d from the two signatures. This broke Sony PlayStation 3 (static k) and some early Bitcoin implementations. Use deterministic ECDSA (RFC 6979) to eliminate this risk.
ECDSA vs EdDSA?
ECDSA requires a random nonce per signature (or deterministic derivation). EdDSA (Ed25519) is deterministic by design, uses Edwards curves (faster, simpler, no special cases), and is strongly unforgeable. Use Ed25519 (EdDSA) for new systems — it is simpler, faster, and avoids the nonce pitfall.

Flujos que resuelven esta tarea

Hash contenido y codificar como Base64
Calcular un hash de la entrada y codificar el resumen como Base64 para transporte compacto.
CANALIZACIÓN
Hash texto y verificar integridad
Calcular un hash del texto de entrada y compararlo con un hash esperado para verificar la integridad.
CANALIZACIÓN
Hash texto y verificar con suma CRC32
Calcular tanto un hash criptográfico SHA-256 como una suma de verificación CRC32 para verificación de integridad de datos.
CANALIZACIÓN
Firmar HMAC y luego codificar en Base64
Generar firma HMAC y luego codificar en Base64 para encabezados de autenticación de API.
CANALIZACIÓN
Firmar HMAC y verificar
Generar una firma HMAC para un mensaje y verificarla contra una firma esperada.
CANALIZACIÓN
Firmar HMAC una cadena de solicitud API
Generar una firma HMAC-SHA256 para un payload de solicitud para autenticar llamadas API.
CANALIZACIÓN
Hash MD5 y luego codificar en Base58
Calcular hash MD5 y luego codificar como Base58 para representación compacta.
CANALIZACIÓN
Comparación de velocidad multi-hash
Hash la entrada y comparar múltiples algoritmos de hash para comparar su velocidad y salida.
CANALIZACIÓN
Generar contraseña y hash
Generar una contraseña aleatoria y luego hash para almacenamiento seguro.
CANALIZACIÓN
Hash SHA3-256 con suma CRC32
Calcular hash SHA3-256 y luego suma CRC32 para verificación dual de integridad.
CANALIZACIÓN
Hash SHA-512 y luego Hex
Calcular hash SHA-512 y luego codificar como Hex para legibilidad.
CANALIZACIÓN
Invertir texto y hash
Invertir texto y luego calcular el hash SHA-256 del resultado invertido.
CANALIZACIÓN
Mezclar texto y hash
Mezclar texto y luego hash del resultado mezclado.
CANALIZACIÓN

Herramientas relacionadas