Digital Signature: Sign and Verify
Sign and verify digital signatures with RSA PKCS#1 v1.5, RSA-PSS, ECDSA and Ed25519. Paste a PEM key, certificate or JWK. Runs in your browser; nothing is sent.
How to use Digital Signature
- 1Choose Sign or Verify, then the algorithm and hash, and enter the message or choose a file.
- 2Paste the key: a PKCS#8 private key to sign, or an SPKI public key, certificate or JWK to verify. No key? Press Generate a demo key pair.
- 3Press Sign to get the signature, or paste a signature and press Verify to see Valid or Invalid.
What makes it better
- RSASSA-PKCS1-v1_5, RSA-PSS with a visible salt length, ECDSA (P-256, P-384, P-521) and Ed25519
- Reads PEM private keys, public keys, X.509 certificates and JWK, and detects the type for you
- ECDSA raw (r||s) and ASN.1 DER signatures, so results work with OpenSSL
- Signs and verifies files up to 100 MB with no upload
- Clear Valid or Invalid verdict with a non-leaky reason
About Digital Signature
Digital Signature signs a text message or file with a private key, and verifies a signature with the matching public key or certificate. It supports RSASSA-PKCS1-v1_5, RSA-PSS, ECDSA and Ed25519 with SHA-256, SHA-384 or SHA-512, and shows the signature as Base64, hex or Base64URL. Everything runs through Web Crypto in your browser, and a big Valid or Invalid result tells you whether the signature checks out.
Common uses
- Check that a signature produced by OpenSSL, Node or Java verifies against a public key.
- Produce a test signature to compare against your own signing code.
- Verify a downloaded file or payload when the publisher gives you a signature and a public key.
- Learn how PKCS#1 v1.5 and PSS padding, curves and hashes affect a signature.
Example
Input
RSA / ECDSA / Ed25519 key + message: Pay Alice 100 EUR on 2025-01-31
Result
Valid
Good to know
- Examples here are descriptive: your signature depends on your key. RSA PKCS#1 v1.5 and Ed25519 are deterministic, while ECDSA and RSA-PSS use randomness, so the same input gives different valid signatures.
- A valid signature proves the message is unchanged and was signed by the holder of the private key. It does not prove who that person is unless you trust the public key or certificate.
- Web Crypto cannot read encrypted, PKCS#1 or SEC1 PEM keys; convert them to unencrypted PKCS#8 first. Never paste a production private key into any website; use a throw-away key.
Digital Signature FAQ
What is the difference between signing and encrypting?
Encryption hides a message so only the key holder can read it. A signature leaves the message readable and proves that it came from the private key holder and was not altered. They solve different problems and are often combined.
Why does my ECDSA signature not verify in OpenSSL?
Web Crypto outputs ECDSA signatures as raw r followed by s, while OpenSSL expects an ASN.1 DER sequence. Switch the ECDSA signature layout to DER here, or convert the signature, and the two will agree.
What is the PSS salt length?
RSA-PSS mixes a random salt into each signature, and verification must be told how long it was. 32 bytes with SHA-256 is the usual default; if a signature fails, ask the signer which salt length they used.
Why does the same message give a different ECDSA signature each time?
ECDSA draws a fresh random number for every signature, so repeated signing differs while all of them verify. Ed25519 and RSA PKCS#1 v1.5 are deterministic and return the same bytes for the same message and key.
What does Invalid mean, and why is no more detail given?
Invalid means the signature does not match this message with this key and these settings, because the message changed, the key is different, or the algorithm, hash or salt differs. A malformed signature is flagged separately. Verifiers deliberately give no finer detail.