Cryptographic Signatures Explained
An interactive playground to understand how signing and verifying messages works.
System Parameters
These are public values everyone agrees to use.
Your Identity
Public Key (pk) (Public)
(g × s) mod n
Sign Message
Digital Signature (sig)
(m × s) mod n
Verify Signature
(pk × m) mod n
71
=?
(sig × g) mod n
71
✓ Valid Signature
How It Works: The Math Behind the Magic
Try it! Change any of the values above. Notice how changing the secret key or message invalidates the signature, but changing them back makes it valid again.