A random private key d is generated once, then every signature needs a fresh unpredictable nonce k. Reusingk can expose d.
Crypto Signatures
Use ECDH as shared-secret context, then walk ECDSA, Ed25519 / EdDSA, Schnorr, and BLS through signature verification.
Start with ECDH context, then verify ECDSA, Ed25519 / EdDSA, Schnorr, and BLS.
Type a message, choose or generate the secret numbers, then click each button from left to right. The default message is hello world.
Random keys are not the same thing as signing nonces.
The signature protocols below all start with long-term private material, but they differ on signing nonces. ECDSA needs a fresh random nonce k for each signature, while Ed25519 / EdDSA derives its nonce-like scalar deterministically from private material and the message.
A random 32-byte seed is generated once. For each message, the nonce scalar is r = H(prefix || message), so the signer does not ask the RNG for a new nonce.
The demo exposes k so you can control the one-time nonce. Like ECDSA-style signing, reusing a nonce with the same private key is dangerous.
A random secret key sk is generated once. Basic BLS signs deterministically as sigma = sk * H(message), with no signing nonce.
Shared secret, no signature.
ECDH stays here as setup context because it uses the same scalar-to-point public-key move, but it is not part of the signature comparison below.
Shared secret, no signature.
Alice and Bob publish aG and bG. Each side reaches the same shared point (x_k, y_k). ECDH uses x_k, the x-coordinate, as the raw secret for key derivation.
ECDH context formulas
A = aG; B = bGPrivate scalars stay local. Public curve points can be sent over the network.
S = (x_k, y_k) = aB = bA = abGBoth parties reach the same hidden point. ECDH normally uses x_k, the x-coordinate, as the raw shared secret.
= SHA-256(); K = KDF(x_k) or demo SHA-256(x_k || )Standard ECDH feeds x_k into a KDF. This demo also folds in the message so message changes are visible.
aB == bAECDH verification here means both sides produced the same shared point, so they also have the same x_k.
Click the ECDH buttons to generate shared-secret outputs.ECDSA signs with a long-term key and a fresh one-time nonce.
The signer computes R = kG, sets r = x(R) mod n, then computes s = k^-1(z + r*d) mod n. Reusingk with the same private key can expose d.
ECDSA button formulas
Q = dG; = H()d is the long-term private key. Q is the public verification key.
R = kG; r = x(R) mod nECDSA needs a fresh unpredictable k for every signature. Reusing k can expose d.
s = k^-1( + rd) mod nThe signature is (r, s). It depends on the private key, message hash, and one-time nonce.
verify (r, s) using Q, z, and curve arithmeticThe verifier uses public data only, but the signer must protect both d and each k.
Click the ECDSA buttons to generate outputs.EdDSA signs by deriving the nonce from the seed and message.
The nonce is deterministic: change the message and the signature changes. Verification checks S*B = R + k*A.
Ed25519 / EdDSA button formulas
SHA-512(seed) -> a, prefixThe seed expands into a clamped private scalar and a private prefix for nonce derivation.
A = aBB is the fixed Ed25519 / EdDSA base point. A is the public verification key.
r = H(prefix || ); R = rB; = H(R || A || ); S = r + aThe signature is R || S and is tied to both the private scalar and the exact message.
S*B == R + k*AThe verifier recomputes k from public data and checks the public point equation.
Click the Ed25519 / EdDSA buttons to generate outputs.Schnorr keeps the verification equation linear.
This uses secp256k1 point arithmetic with a teaching challenge hash. The verifier checks sG = R + eP. The nonce kis a one-time signing secret and must not be reused with the same key.
Schnorr button formulas
P = dG; = SHA-256()d is the private signing key. P and the message digest z are public verification inputs.
R = kGThe nonce scalar k must stay secret. Reusing it can reveal the private key.
= H(R || P || ); s = k + dThe signature is R plus s. The challenge binds the nonce point, public key, and message hash.
sG == R + ePSchnorr verification is a direct public linear equation.
Click the Schnorr buttons to generate outputs.BLS verification moves the check into a pairing target group.
This is a small pairing model: e(aP,bQ) = 64^(a*b mod 101) mod 607. It shows the real BLS verification shape without shipping a BLS12-381 library.
BLS button formulas
PK = skQ; in G1The real scheme hashes the message to a curve point. This demo uses a tiny scalar model.
sigma = sk * The signature is the message point scaled by the private key.
e(sigma, Q) and e(, PK)The verifier maps both sides into the pairing target group.
e(sigma, Q) == e(H(m), PK)Both pairings hide the same product: sk times the message hash point.
Click the BLS buttons to generate outputs.Same stages, four different signature shapes.
Read each row left to right. The row name stays the same across protocols; the marker shows where the protocol keeps the shared shape, changes it, or does not have that stage.
Random Number Generator
Start by creating secret material no one else can guess.
d, k = RNG()ECDSA generates a long-term private key, then needs fresh signing randomness for k.
seed = RNG(32 bytes)The random seed is the private root of the Ed25519 / EdDSA key.
d, k = RNG()The signing key and nonce both require strong randomness.
sk = RNG()A single secret scalar controls the BLS public key and signatures.
Use the message and keys above to populate this row for every protocol column.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Private Key
Give the random material a private-key role.
d in [1, n - 1]d is the long-term signing key. It must not be revealed.
SHA-512(seed) gives a and prefixThe seed expands, then the scalar is clamped before use.
d in [1, n - 1]A normal secp256k1 private scalar signs messages.
sk in [1, r - 1]The private key is a scalar modulo the group order.
Use the message and keys above to populate this row for every protocol column.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Public Key
Move from private scalar world into public group elements.
Q = dGECDSA publishes Q and keeps d private.
A = aBThe base point is Ed25519 / EdDSA B rather than secp256k1 G.
P = dGThe public key is the private scalar times the generator.
PK = skQThe public key usually lives in the second pairing group.
Use the message and keys above to populate this row for every protocol column.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Hash Function
Turn the message into fixed-size material the protocol can bind.
= SHA-256()ECDSA signs a message digest z, reduced into the scalar field.
H = SHA-512; input is prefix, R, A, Ed25519 / EdDSA hashes during nonce and challenge derivation.
= SHA-256()The digest z is later mixed into the challenge.
= hash-to-curve()BLS maps the message to a curve point, not just a byte digest.
Use the message and keys above to populate this row for every protocol column.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Nonce / Commitment
Some signature schemes publish a one-time commitment before forming the signature.
R = kG; r = x(R) mod nk must be fresh and unpredictable for each signature.
r = H(prefix || ); R = rBThe nonce is deterministic for the same seed and message.
R = kGThe nonce must never repeat for the same private key.
No nonce pointBasic BLS signing is deterministic once sk and H(m) are fixed.
Use the message and keys above to populate this row for every protocol column.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Protocol Bind
Each protocol ties together public data, private data, and the message differently.
r binds R; s binds , r, and dECDSA binds the nonce point x-coordinate, message digest, and private key through s.
= H(R || A || )The challenge binds nonce point, public key, and message.
= H(R || P || )Same challenge shape, with Schnorr naming and secp256k1 points.
Pairing compares sigma with The message binding is checked through the pairing equation.
Use the message and keys above to populate this row for every protocol column.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Digital Signature
Produce the authorizing signature object.
s = k^-1( + rd) mod n; sig = (r, s)ECDSA outputs two scalars, r and s.
S = r + a; sig = R || SThe output is the nonce point plus the signature scalar.
s = k + d; sig = R || sThe linear scalar equation is the heart of Schnorr.
sigma = sk * The signature is one curve point instead of R plus a scalar.
Use the message and keys above to populate this row for every protocol column.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Verification
Anyone can check the public equation without learning the private key.
x((z*s^-1)G + (r*s^-1)Q) mod n == rThe verifier rebuilds a point from public data and checks its x-coordinate.
S*B == R + k*AThe verifier recomputes k from public data and the message.
sG == R + ePA clean public linear equation checks the signature.
e(sigma, Q) == e(H(m), PK)The verifier checks equality in the pairing target group.
Use the message and keys above to populate this row for every protocol column.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Main Difference
The row where the protocol stops looking like the others.
Fresh random nonce required for each signatureECDSA is fragile if k repeats or is predictable; d can often be recovered.
Deterministic nonce from the private prefixThe nonce is derived from seed material and the message.
Minimal linear signature relationSchnorr exposes the simplest R, challenge, scalar flow.
Pairing check and one-point signatureBLS is shaped around bilinear pairings and compact signatures.
Use the message and keys above to populate this row for every protocol column.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.
Click the row button to show values.