Elliptic Curve Cryptography (ECC) Calculator
Explore the mathematics behind Elliptic Curve Cryptography. This interactive tool lets you define custom curves over finite fields, perform point addition, scalar multiplication, and visualize the curve and its points. Supports secp256k1, P-256, and custom curves.
What Is Elliptic Curve Cryptography?
Elliptic Curve Cryptography (ECC) is a public-key cryptosystem based on the algebraic structure of elliptic curves over finite fields. ECC provides the same level of security as RSA but with significantly smaller key sizes — a 256-bit ECC key offers comparable security to a 3072-bit RSA key.
The security of ECC relies on the Elliptic Curve Discrete Logarithm Problem (ECDLP): given two points P and Q on a curve where Q = k·P, it is computationally infeasible to find the scalar k.
Group Law on Elliptic Curves
Points on an elliptic curve form an abelian group under the "chord-and-tangent" rule. The group operations are:
Point Addition (P + Q)
To add two points P and Q:
- Draw a line through P and Q.
- Find the third point R' where the line intersects the curve.
- Reflect R' across the x-axis to get R = P + Q.
If P = Q (point doubling), the line is the tangent at P.
Scalar Multiplication (k·P)
Scalar multiplication is the repeated addition of a point to itself:
k·P = P + P + ... + P (k times). This operation is the
foundation of ECC key generation and the ECDLP.
Standard Curves
- secp256k1: Used in Bitcoin and Ethereum for ECDSA signatures. Parameters: y² = x³ + 7 over Fp where p = 2²⁵⁶ − 2³² − 977.
- P-256 (secp256r1): NIST-approved curve used in TLS, FIPS environments, and hardware authenticators.
- Curve25519: Used in TLS 1.3 (X25519) and Signal protocol for forward secrecy.
How to Use This Calculator
- Configure the Curve: Set coefficients a, b, and prime modulus p. Use presets to load standard curves.
- Define Points: Enter points as (x,y) pairs. The generator G is used for scalar multiplication and order calculation.
- Perform Operations: Use the addition and multiplication panels to compute point operations.
- Visualize: The chart shows all valid points on the curve over the finite field. Switch between display modes to explore the generator's orbit.
Important Disclaimer
This calculator is for educational purposes only. It implements elliptic curve arithmetic over small finite fields and is not suitable for production cryptographic use. Always use audited libraries for real-world cryptography.
❓ ECC Calculator FAQ
What is an elliptic curve?
An elliptic curve is a set of points satisfying y² = x³ + ax + b, where the curve has no singular points (4a³ + 27b² ≠ 0). In cryptography, we use curves over finite fields.
What is the discrete logarithm problem on elliptic curves?
The ECDLP is: given points P and Q on an elliptic curve where Q = k·P, find the integer k. This problem is believed to be computationally hard, which forms the basis of ECC security.
What is the difference between secp256k1 and P-256?
secp256k1 (Koblitz curve) is used in Bitcoin and Ethereum. P-256 (NIST curve) is FIPS-approved and used in government and enterprise applications. Both provide 128-bit security.
What is a generator point?
A generator G is a point on the curve whose repeated addition (scalar multiplication) generates all points in the subgroup. The order of G is the number of points in this subgroup.
Why are finite fields used in ECC?
Finite fields (modular arithmetic) allow us to work with discrete points and avoid the continuous nature of real numbers, making the discrete logarithm problem hard.
Is this calculator secure for real use?
No. This calculator is for educational purposes only and uses small finite fields. Real cryptographic applications require large primes (e.g., 256-bit) and audited implementations.
What is scalar multiplication used for?
Scalar multiplication is used in ECC key generation (private key × generator = public key), encryption, digital signatures (ECDSA), and key exchange (ECDH).
What is point at infinity (O)?
The point at infinity is the identity element of the elliptic curve group. For any point P, P + O = P. It represents the result of adding a point to its inverse.
How do I interpret the chart?
The chart plots all valid points (x,y) on the curve over the finite field. Points are colored based on their order. The generator orbit shows the sequence G, 2G, 3G, ... until returning to O.
Is this calculator free?
Yes, this calculator is completely free to use. No registration or personal data storage is required. All calculations are performed in your browser.