Skip to content

Ed25519 Forge

EdDSA · Curve25519 · RFC 8032

Make a pair of keys, sign a note, then change one character and watch the check fail — then go deeper, into signing that is identical every time and the edge cases a verifier has to screen for.

Start here: sign a note, then change it

A signature proves two things at once: that a note came from you, and that nobody has altered it since. You need no mathematics to watch that happen — three buttons, in order. Everything here runs real Ed25519 in your browser; the only thing being hidden is the notation.

  1. Make a pair of keys

    One key stays secret and does the signing. The other is public — you can hand it to anyone, and it only lets them check a signature, never make one.

    No keys yet.

  2. Sign a note

    Nothing signed yet.

  3. Check it — then change one character

    Checking uses only the public key and the note. Then change a single letter and check again: the note still reads the same, and the check no longer passes.

    Sign a note first.

Show the actual bytes

These are the real values the steps above produced. The panels below work with them directly.

Public key -
Signature -

The three panels below are these same three steps with the bytes on show, and after them the lab goes further: deterministic nonces, and the cofactor-8 edge case where two verification profiles disagree about the same signature bytes.

Key Forge

- 32-byte private seed — never fully displayed in UI
- 32-byte seed → SHA-512 and pruning → 32-byte compressed public point
public key = [clamped scalar]·G

The seed's clamped SHA-512 prefix is interpreted little-endian. Watch the leading bit and next 12 bits as real double/add operations, then a labelled summary skips the remaining arithmetic and jumps to the exact public point. The endpoint jump is not an add G; plotted coordinates are approximate.

Your browser does not support canvas.

Generate a keypair to walk [scalar]·G.

Sign

- 64 bytes: R = bytes 0–31 (a curve point), S = bytes 32–63 (a scalar).

Verify

Enter hexadecimal characters. Spaces and separators are ignored.

Try a failure:
Awaiting keypair, signature, and verification input.
Why this matters

Correct Ed25519 signing removes dependence on a fresh random nonce for every signature: in an ordinary, fault-free execution, the nonce is derived from secret key material and the message. That prevents the classic accidental RNG-reuse failure shown by Sony's PlayStation 3 ECDSA implementation. It does not make key exposure structurally impossible. Active faults or leakage during nonce derivation or scalar multiplication can create exploitable transcripts and recover signing material; see Samwel and Batina's EdDSA fault-injection study. The "Ed25519 vs ECDSA" tab runs the ordinary P-256 nonce-reuse break live and states that boundary.

Ed25519 vs ECDSA

In a correct, fault-free execution, Ed25519 signing derives its nonce from secret key material and the message, so it needs no fresh randomness for each signature. Key generation still needs strong randomness. Active faults and leakage in nonce derivation or scalar multiplication can still expose signing material; a practical EdDSA study recovered a private scalar from correct and faulted transcripts. Ed25519 signatures are 64 bytes. Verification speed depends on the implementation, hardware, workload and use of batching; the Ed25519 case study reports materially different timings across implementations and architectures. This lab does not benchmark Ed25519 against P-256.

Live: an ECDSA nonce slip leaks the whole private key

This runs on real NIST P-256 in your browser. A fresh keypair signs two different messages. When the nonce k repeats, the two signatures share the same r, and the private key d falls straight out of the algebra — then a brand-new message is signed with the recovered key and handed to the real @noble/curves P-256 verifier. Correct deterministic nonce derivation avoids reliance on a per-signature random draw in fault-free execution; it is not a fault- or side-channel countermeasure.

Live: Ed25519 signs the same message twice — measured

The claim that Ed25519 is deterministic is checked, not asserted: the same message is signed twice with a fresh key and the two 64-byte signatures are compared byte-for-byte, right here.