Ed25519 and Schnorr as Sigma Protocols
Ed25519 is the EdDSA signature scheme over the Edwards25519 curve. Schnorr is the cleaner signature pattern that EdDSA is spiritually close to.
Both are easiest to remember as a non-interactive Sigma protocol:
commitment point R -> binding challenge e -> response scalar s
The old interactive Sigma protocol would have a verifier send a random challenge. A signature replaces that live verifier with a hash function. That Fiat-Shamir hash binds the commitment, public key, and message:
e = H(R || public_key || message)
So the signature is not just "some bytes". It is a transcript proving that the signer knew the private scalar behind the public key when the transcript was made.
The seed/private key and the message are different inputs. The seed is secret wallet-style key material generated once. The message is the data being signed. The staged route also has ETH and BTC buttons for deriving secp256k1 private keys from a BIP39 mnemonic before running the prover/verifier flow.
Open the staged prover / verifier route
Ed25519 and Schnorr as prover/verifier flows.
Choose a protocol, enter real bytes, then run the transcript. The output separates bytes, hashes, scalar arithmetic, curve points, and field parameters so each world stays visible.
Click a run button to show the real transcript values.
The Sigma Protocol Shape
The three-move proof is:
| Move | Sigma protocol meaning | Signature meaning |
|---|---|---|
| Commitment | Prover sends R = rG | Signature contains nonce point R |
| Challenge | Verifier sends random e | Hash creates e = H(R, A, M) |
| Response | Prover sends s = r + e*a | Signature contains response scalar s |
The verifier checks the linear public equation:
sG = R + eA
This works because:
sG
= (r + e*a)G
= rG + e(aG)
= R + eA
The verifier never learns r or a. It only sees that the public points satisfy
the equation that those hidden scalars would create.
Keep The Worlds Separate
Most signature confusion comes from mixing the worlds.
| World | Ed25519 example | Schnorr example |
|---|---|---|
| Byte world | seed, encode(R), encode(A), signature | x-only P, x-only R, 64-byte signature |
| Hash world | SHA-512(seed), `SHA-512(prefix | |
| Scalar world | a, r, e, S modulo L | d, k, e, s modulo n |
| Point world | B, A = aB, R = rB | G, P = dG, R = kG |
| Coordinate field | point coordinates modulo p = 2^255 - 19 | point coordinates modulo secp256k1 p |
Scalar arithmetic and point-coordinate arithmetic use different moduli. For Ed25519:
point coordinates use p = 2^255 - 19
scalars use L = 2^252 + 27742317777372353535851937790883648493
For secp256k1 Schnorr:
point coordinates use p = 2^256 - 2^32 - 977
scalars use n = order(G)
Ed25519 End To End
Ed25519 begins with a 32-byte private seed, not with a raw private scalar.
seed <- 32 random bytes
h = SHA-512(seed)
h = h0 || h1
The first half becomes the private signing scalar after clamping:
h0[0] &= 248
h0[31] &= 63
h0[31] |= 64
a = int_le(clamped h0)
The second half is the secret prefix used for deterministic nonces:
prefix = h1
The public key moves from scalar world into point world:
A = aB
public_key = encode(A)
To sign message M, Ed25519 derives the nonce from private prefix bytes and
the message:
r = int_le(SHA-512(prefix || M)) mod L
R = rB
Then the Fiat-Shamir challenge binds the transcript:
e = int_le(SHA-512(encode(R) || encode(A) || M)) mod L
The response scalar is:
S = r + e*a mod L
The signature is:
signature = encode(R) || encode(S)
The verifier receives M, A, and signature. It recomputes:
e = int_le(SHA-512(encode(R) || encode(A) || M)) mod L
Then checks:
S*B = R + e*A
That is Ed25519 seen as a Sigma protocol transcript:
commitment R
challenge e
response S
Schnorr End To End
Schnorr has the same memory shape, but usually with different curve parameters and serialization rules. In Bitcoin's BIP340 version, the curve is secp256k1 and public keys are x-only.
The private key is a scalar:
1 <= d < n
P = dG
The signer chooses or derives a nonce scalar:
k
R = kG
The challenge binds the nonce point, public key, and message:
e = H(R || P || M) mod n
The response is:
s = k + e*d mod n
The verifier checks:
sG = R + eP
BIP340 adds x-only encoding, tagged hashes, and even-y normalization for P and
R. Those details are serialization and malleability controls around the same
Sigma equation.
One-Row Memory Formula
Ed25519:
A = aB
r = SHA-512(prefix || M) mod L
R = rB
e = SHA-512(R || A || M) mod L
S = r + e*a mod L
verify S*B = R + e*A
Schnorr:
P = dG
R = kG
e = H(R || P || M) mod n
s = k + e*d mod n
verify sG = R + eP
The important part is not the letter names. It is the transcript shape:
commit -> challenge -> response -> public equation