Elliptic Curve Cryptography  |  P-256 • P-384 • P-521  |  Key generation  |  Encrypt & Decrypt

ECC Encryption

Generate Elliptic Curve key pairs, encrypt messages with a public key and decrypt with the private key. ECC provides equivalent security to RSA with much smaller key sizes — a 256-bit ECC key matches a 3072-bit RSA key.

1
Generate ECC Key Pair
Choose an elliptic curve and generate a public / private key pair

2
Encrypt with Public Key
Encrypt a message using the ECC public key (ECIES hybrid encryption)
Public key auto-filled from Step 1. Enter your message and click Encrypt.

3
Decrypt with Private Key
Recover the original message using the ECC private key
Cipher text and private key auto-filled. Click Decrypt to recover your message.

Elliptic Curve Cryptography (ECC): Complete Guide

Elliptic Curve Cryptography (ECC) is a public-key cryptosystem that offers the same security as RSA or ElGamal with much smaller key sizes. Introduced by Neal Koblitz and Victor Miller in 1985, ECC is based on the Elliptic Curve Discrete Logarithm Problem (ECDLP) which is significantly harder to solve than integer factorization for equivalent key sizes.

Standard Curves

CurveBit sizeSecurityUse case
secp256r1 (P-256)256-bit128-bitTLS, HTTPS, JWT ES256
secp384r1 (P-384)384-bit192-bitFIPS compliance, high security
secp521r1 (P-521)521-bit260-bitMaximum security applications
Curve25519256-bit128-bitSignal, WireGuard, SSH

ECC vs RSA Key Sizes

ECC key sizeRSA equivalentSecurity level
256-bit3072-bit RSA128-bit
384-bit7680-bit RSA192-bit
521-bit15360-bit RSA260-bit

Core ECC Algorithms

  • ECDH — Elliptic Curve Diffie-Hellman: key exchange
  • ECDSA — Elliptic Curve Digital Signature Algorithm: signing
  • ECIES — Elliptic Curve Integrated Encryption Scheme: hybrid encryption (used here)

References

  1. Koblitz, N. (1987). "Elliptic Curve Cryptosystems"
  2. NIST FIPS 186-4: Digital Signature Standard
  3. SafeCurves — safe elliptic curves for cryptography
  4. ECC on Wikipedia