RSA sign
Sign a message with your RSA private key — PKCS#1 v1.5 or PSS, SHA-256/384/512 — and get a base64 signature. Runs in your browser; the key never leaves your device.
About this tool
RSA sign creates a cryptographic signature over a message using your RSA private key, and returns it as base64. Anyone with your matching public key can then verify that the message came from you and wasn't altered.
- Schemes:
pkcs1v15(RSASSA-PKCS#1 v1.5 — deterministic, the classic scheme) orpss(RSASSA-PSS — randomized, recommended for new systems). - Hashes: SHA-256 (default), SHA-384, or SHA-512.
- Key formats: PEM, either PKCS#8 (
-----BEGIN PRIVATE KEY-----) or PKCS#1 (-----BEGIN RSA PRIVATE KEY-----).
Privacy
Everything runs in your browser via WebAssembly — your private key and the message are never uploaded to a server. You can also run it from the gizza CLI or inside a gizza chat.
Notes
- This signs the message (it is hashed with the chosen algorithm first). The output is the raw signature, base64-encoded.
- Verify with any standard RSA library using the same scheme and hash and your public key. Need a key pair? See the RSA key-pair generator tool.
FAQ
Why do I get a different signature every time with PSS?
That's PSS working as designed: RSASSA-PSS mixes in a fresh random salt on
every signing, so repeated runs over the same message produce different
signatures — and every one of them verifies. If you need a reproducible
signature (e.g. for a test fixture), use pkcs1v15, which is deterministic.
My key says "BEGIN ENCRYPTED PRIVATE KEY" — why won't it load?
Passphrase-protected keys aren't supported; the tool parses plain PKCS#8 or
PKCS#1 PEM only. Decrypt a copy first, e.g.
openssl pkcs8 -in enc.pem -out plain.pem (or openssl rsa -in key.pem -out plain.pem for traditional keys), then paste the decrypted PEM.
How do I verify the signature with OpenSSL?
Base64-decode the output to a binary file, then run
openssl dgst -sha256 -verify public.pem -signature sig.bin message.txt,
matching the hash you chose here. For PSS add
-sigopt rsa_padding_mode:pss. The scheme and hash must match on both sides
or verification fails.
How long will the signature be?
Exactly the key's modulus size, regardless of message length: a 2048-bit key yields a 256-byte signature (344 base64 characters), a 4096-bit key 512 bytes. The message itself is hashed first, so signing a long text costs no more than a short one.
Developer & Automation Access
Run it from the terminal
Same engine as this page, headless — via the gizza CLI:
gizza tool rsa-sign "The message to sign" 'private_key=-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----'New to the CLI? Get gizza →
Open it by URL
Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:
https://gizza.ai/tools/rsa-sign/?message=The%20message%20to%20sign&private_key=-----BEGIN%20PRIVATE%20KEY-----%0A...%0A-----END%20PRIVATE%20KEY-----&scheme=pkcs1v15&hash=sha256Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.
