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.
1Make 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.
2Sign a note
Nothing signed yet.
3Check 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.
1Key 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.
Generate a keypair to walk [scalar]·G.
2Sign
64 bytes: R = bytes 0–31 (a curve point), S = bytes 32–63 (a scalar).
Deterministic check: sign the same message twice
Signature #1
Signature #2
Click "Sign Again" (or edit the message and re-sign) to compare.
3Verify
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.
The Math
Ed25519 is built on a twisted Edwards curve of the form −x² + y² = 1 + d·x²y² over a prime field Fp with p = 2²⁵⁵ − 19 (about 255 bits — that "25519" is the prime). The base point G is fixed; your private scalar multiplies G to produce the public point. Scalar multiplication is repeated point addition and doubling.
Note on the picture: unlike the Weierstrass "draw a line, find the third intersection" chord-and-tangent rule you may have seen for secp256k1, twisted Edwards addition uses a single complete algebraic formula that works for every pair of curve points, including doubling, without exceptional input cases. Complete formulas support branch-free addition code, but do not by themselves make an implementation constant-time or side-channel resistant. That is why the geometric slope diagram is the wrong mental model here. The addition is arithmetic on coordinates:
(x₁,y₁) + (x₂,y₂) = (x₃, y₃)
x₁y₂ + x₂y₁ y₁y₂ + x₁x₂
x₃ = ───────────────── y₃ = ─────────────────
1 + d·x₁x₂y₁y₂ 1 − d·x₁x₂y₁y₂
one formula · all inputs · no exceptions
The Key Forge animation follows the clamped SHA-512 prefix as a little-endian integer. Each displayed arithmetic step doubles or adds G; after the leading bit and next 12 bits, a labelled summary skips the remaining operations and jumps to the exact public key. That jump is not an add G. Plot coordinates are approximate; this teaching walk is not the signing library's execution trace.
Pitfalls & ZIP215
In plain terms: a signature is supposed to bind a public key to one exact message. A malicious signer can choose a small-order public key that breaks that promise for some verifier profiles. This is a malicious-key message-binding failure, not an EUF-CMA forgery against an honestly generated Ed25519 key; see Brendel et al. Below, one library, @noble/curves, runs two verification modes on identical bytes and disagrees on whether they are valid.
Implementations can also disagree about canonical S, encodings of R and A, small- and mixed-order components, and cofactored equations. The lab pins those broader classes with the twelve vectors from Taming the many EdDSAs. The live exhibit below isolates the malicious-small-order-key case. Monero was affected by related cofactor ambiguity; ZIP-0215 pins a consensus-safe profile for systems that adopt it.
Torsion point
A special point that loops back to zero after just a few additions (a "small order"). Real public keys don't do this — that is exactly why one can be used to build a fake.
Cofactor 8
The Ed25519 group is 8 times bigger than the prime-order subgroup used for honest signing keys. Those extra components contain the small-order points that can break malicious-key message binding.
[8]·(R + [k]·A − [S]·B) == 0
The cofactored verification check. A is the public key, B the base point, R/S the two halves of the signature. Multiplying by 8 makes a small-order A vanish, so the accepted bytes need not prove control of an honest signing key.
Ed25519's group has cofactor 8, so eight low-order "torsion" points exist. A malicious signer chooses one as the public key and presents a 64-byte string — split into its R and S halves below — that no normal signing execution produced. Setting R = [S]·B makes the cofactored equation pass for any message under the permissive profile. The two library modes then disagree on the identical bytes:
Small-order public key (hex)
Crafted signature (hex)
ZIP215 (noble default)—
Strict mode (noble { zip215: false })—
The same bytes: accepted by one mode, rejected by the other. This is not a forgery against an honest key. Both modes check the cofactored equation above; strict mode rejects because the library adds a small-order-public-key check that RFC 8032 §5.1.7 and FIPS 186-5 §7.7 do not place inside signature verification (NIST places it in SP 800-186 Appendix D.1.3.2 public-key validation). Systems must validate or otherwise constrain public keys before treating acceptance as proof of message ownership.
Where It's Used
Ed25519 appears in Signal, SSH (supported by OpenSSH since 6.5 in 2014, the ssh-keygen default since 9.5 in 2023), TLS 1.3 deployments, and Zcash-related systems. The age encryption tool is a partial exception: its native recipients are X25519, and it accepts ssh-ed25519 keys only as an interoperability path. Ethereum account signatures use secp256k1, while consensus-layer cryptography in adjacent ecosystems often involves BLS-style primitives.