demo · v137

Ed25519

Generate an Ed25519 keypair, sign a message, verify the signature. All in the browser via crypto.subtle. Edit the message after signing — verification flips to FAIL.

probing…
(none)
(none)

the code

const kp = await crypto.subtle.generateKey({ name: "Ed25519" }, true, ["sign", "verify"]);
const data = new TextEncoder().encode(message);
const sig = await crypto.subtle.sign("Ed25519", kp.privateKey, data);
const ok  = await crypto.subtle.verify("Ed25519", kp.publicKey, sig, data);

see also