Calculating...

Menu

Elliptic Curve

Sign in
Access your elliptic curve workspace.
Or
Curve over Fp
Curve over ℝ
Initialization
Diffie-Hellman
Discrete Logarithm

About

Every UI panel, canvas, and API call here is focused on making elliptic-curve cryptography approachable without sacrificing rigor. You explore curves, run demonstrations, encrypt/decrypt data, and inspect the full history from a single dashboard.

y² = x³ + ax + b (mod p)

Curve Exploration Workflow

  • Initialization: Select a preset curve or enter custom a, b, and prime p. The system calculates the full finite field group (including the point at infinity) so you can map the geometry.
  • Visualization: Two synchronized canvases plot all points with optional labels, color-coded highlights, and click-to-select behaviour so you can interrogate the group law visually.
  • Point Operations: The addition and scalar multiplication panels guide you through the algebraic steps, show animated point movement, and keep transcripts ready to copy as JSON/LaTeX.
  • Real/Finite Comparison: The ℝ tab mirrors the workflow over the reals, while the finite field tab stays true to modular arithmetic, letting you contrast the geometry.

Demonstrations & Learning

  • Diffie-Hellman: Run a live handshake using the current curve, watch Alice/Bob compute shared secrets, and scrub through animated steps with the slider, auto-scroll, and canvas highlights.
  • Discrete Logarithm: Select a scalar k, optionally prefer Baby-step Giant-step, and the demo exhausts attempts with metadata, time estimates, and a human-friendly summary.
  • Tutorial player: Contextual tutorials are available from the menu, each explaining curve initialization, point addition, and other core concepts with inline animations.
  • Interactive explanations: Expandable cards describe associativity, identity, inverses, smoothness, and why ECC is hard—each tied to animations inside the visualization area.

Encryption & History

  • Encryption workflow: Generate ephemeral keys, encrypt text or uploaded files, and follow the step-by-step animation that draws R/S points, ciphertext batches, and shared secrets.
  • Decryption workflow: Paste or drop ciphertext, decrypt with the stored private key, and see how the shared secret reassembles the plaintext; a guided "show steps" view mirrors the same animation.
  • History database: Every curve initialization, parameter change, point addition/multiplication, encryption, and decryption is logged into the SQLite history table. You can export operations, replay demonstrations, and copy JSON summaries directly from the sliding history panel.

Advanced Utilities

  • Point classification: Use the advanced API to identify generators, torsion points, and their orders—perfect for understanding subgroup structure.
  • Preset management: The dropdown keeps curated educational curves and lets you save custom presets with descriptions for future work.
  • Exports: Generate test vectors, download point lists as CSV/JSON, or copy curve parameters/test results with a single click.
  • Theme & shortcuts: Toggle dark/light mode with the floating menu icon, use keyboard helpers, and watch toasts confirm actions.

Why Elliptic Curves?

These curves form a compact, high-security group where the discrete logarithm problem remains hard. This interface makes every layer—from the algebra to encrypted messages and tutorials—visible so you can both experiment and explain ECC confidently.

Define Curve

Operations

Visualization

Smooth curve plot over real numbers

Point Addition (ℝ)

Geometric chord/tangent visualization

Enter both coordinates
Enter both coordinates

Visualization

Click on the curve to set P or Q

Scalar Multiplication (ℝ)

Follow k × P along the curve

Enter both coordinates

Visualization

Visualization

Define Curve

Operations

Points

Point Addition

Add two points: P + Q = R

Visualization

Points on the elliptic curve (mod p)

Scalar Multiplication

Multiply a point by a scalar: k × P

Visualization

Visualization

Diffie-Hellman Key Exchange

Watch how Alice and Bob establish a shared secret over a public channel using elliptic curve cryptography

How it works: Both parties compute a shared secret without ever transmitting it. An eavesdropper can see the public keys but cannot determine the shared secret.
Curve equation: y² ≡ x³ + ax + b (mod p)

Interactive Visualization

Follow along as the key exchange happens step by step

Click "Start Key Exchange Demo" above to begin the visualization
0/0

Step-by-Step Breakdown

Elliptic Curve Discrete Logarithm Problem

This interactive demo shows why elliptic curve cryptography is secure.
Computing Q = k×G is easy, but finding k from Q is hard!

Setup Curve
Compute Q
Attack

Setup Elliptic Curve

Choose curve parameters and find a base point G

Curve equation: y² ≡ x³ + ax + b (mod p)

Compute Public Key

Pick a secret k and compute Q = k × G

🔑 What's happening: In real crypto, k is your private key (kept secret) and Q is your public key (shared with others). Computing Q from k is easy and fast.

💡 Tip: Start with small values (5-20) to see the brute-force clearly!

Attack: Find the Private Key

Try to recover k by testing all possibilities

⚠️ The Challenge: Given only G and Q, an attacker must try k' = 1, 2, 3... until they find k' where k'×G = Q. This is the hard problem that makes ECC secure!

BSGS reduces complexity from O(n) to O(√n), but still shows key attempts. Automatically used for k > 100.

Attack Progress

Watch the algorithm test each value of k' in real-time as it tries to crack the key

No Attack in Progress

Complete Steps 1 & 2, then launch the brute-force attack to see attempts here.

Setup Encryption

Use a value between 1 and p-1. Leave empty to generate a random key.

Operations

Key Information

Encrypt Message

Secure your messages using elliptic curve cryptography

Choose your input method: Type a message, paste text, or upload any file type to encrypt.
0 characters Will be encrypted with ECC

Click to browse or drag & drop

Any file type • Max size recommended: 10MB

Encryption Visualization

Watch the encryption process step by step

Decrypt Message

Reveal encrypted messages using your private key

Auto-format detection: Paste JSON or compact ciphertext. The system will automatically detect and decode your format.
Waiting for input 0 chars

Click to browse or drag & drop

Supports JSON and ciphertext files

Decryption Visualization

Watch the decryption process step by step

ECC Expert
Ask about curves, keys, or crypto flow
Ready
Hi! I’m your elliptic-curve guide. Ask me how to pick base points, verify group laws, or troubleshoot key exchange.