✍️ Digital Signature Demo (ECDSA)
Use the browser's built-in Web Crypto API to try the full workflow of ECDSA (Elliptic Curve Digital Signature Algorithm, P-256 curve): generating a key pair, signing a message, and verifying the signature. Everything runs entirely in your browser — the private key is never sent externally.
How to use
- Click "Generate key pair" to create a public/private key pair.
- Enter a message to sign and click "Sign".
- Enter a message to verify (the same one, or a deliberately changed one) and click "Verify" to see the result.
FAQ
What are digital signatures used for?
They let anyone with the public key confirm that a message was genuinely created by the holder of the private key and hasn't been tampered with since. They're widely used for software distribution, TLS certificates, and more.
What happens if I change the message before verifying?
Verification will report "invalid" — since a signature is mathematically tied to the exact message content, changing even one character breaks the match. Try it to see for yourself.
Is the private key stored anywhere?
No — the key pair only exists in memory while the page is open and disappears on reload. It's never sent externally or persisted.