K037 / Asymmetric encryption, signatures and key exchange
RSA-PSS
RSA-PSS is a signature algorithm using secure padding for RSA signatures, intended to replace RSA-PKCS#1 v1.5 signatures.
CRYPTOGRAPHY LAB / K037
Cryptography Lab · RSA-PSS
Run real computations and inspect intermediate states step by step.
Educational only. Never enter real passwords or secret keys. Computation stays in your browser; input and trace values are not sent to a server. Do not use this implementation in production.
RSA-PSS EMSA-PSS encoding only (SHA-256, emBits=1023; no RSA signature)
See the scope above for fixed examples, reduced parameters and supported variants. Standard operation names and formulas are retained.Output
Previous state
- Definition and overview
- RSA-PSS is a signature algorithm using secure padding for RSA signatures, intended to replace RSA-PKCS#1 v1.5 signatures. Source document ↗
- Classification and reversibility
- Signature-only scheme, not encryption; verify signatures instead of decrypting to recover plaintext. Source document ↗
- Key or secret requirements
- Sign with the signer's RSA private key; verify with the public key. Source document ↗
- Operating principle and structure
- Hash message, add random salt, perform PSS encoding, then sign with RSA private operation; verification needs matching hash/MGF/salt parameters. Source document ↗
- Key size, block size and parameters
- Generally 2048–4096-bit RSA keys; hash, MGF and salt length affect signing and verification. Source document ↗
- Security strength and recommendation
- Recommended RSA signature scheme in NIST FIPS 186-5 (2023), recommended for new applications. Source document ↗
- Known attacks and vulnerabilities
- Implementation vulnerabilities warrant checking library advisories; source excerpt names no specific attack. Source document ↗
- Standards and certification
- Added in PKCS#1 v2.1 (RFC 3447), approved RSA signature padding in FIPS 186-5. Source document ↗
- Typical uses
- Used for signatures such as RSA in TLS 1.3 handshakes; distinguish legacy PKCS#1 v1.5 certificate signatures. Source document ↗
- Implementations, libraries and tools
- Libraries such as OpenSSL EVP_PKEY RSA-PSS support signing, verification and key generation. Source document ↗
- Decryption or decoding
- Verify with public key rather than decrypting. Source document ↗
- Advantages
- Random salt yields different signatures for the same message/key; provably secure padding construction. Source document ↗
- Limitations and cautions
- Verification requires hash/MGF/salt parameters; message digest cannot be recovered from signature. Source document ↗
- Distinguishing encryption, encoding and hashing
- RSA-PSS is signature padding, not RSA encryption/decryption, hashing or ordinary encoding. Source document ↗
Practical examples
Example
Input message and private key; hashing, random salt and PSS encoding generate signature. Receiver verifies using original message, signature, public key and hash/MGF/salt length.
Procedure
Signer PSS-encodes message hash and random salt, signs with private key. Verifier uses original, signature, public key and identical parameters. No decryption or plaintext recovery.
Scenario
Sign with private keys and verify publicly in TLS 1.3, software updates, documents and certificate-based authentication. Maintain consistent parameters/key management and monitor verification failures.
Pitfalls and alternatives
Do not confuse with encryption, encoding or hashing. Beware hash/MGF/salt mismatch, salt too short/long and legacy PKCS#1 v1.5 mixing. Prefer vetted RSA-PSS, ECDSA or EdDSA and current libraries.
References
- RSASSA-PSS Signature Algorithm — TISCI User Guide ↗
- RSA Padding: PKCS#1 v1.5 vs. OAEP vs. PSS Explained ↗
- docs/rsa_signature_pss_string.md ↗
- RSA-PSS – Provable secure RSA Signatures and their Implementation ↗
- rsa - Rust ↗
- RSA-PSS: RSA signatures with randomness and a security proof ↗
- RSA-PSS - OpenSSL Documentation ↗
- PKCS#1 PSS (RSA) - PyCryptodome ↗