Join our Newsletter — 33% off our NHI Course
Home› Guides› RSA Padding Status: PKCS#1 v1.5, OAEP and PSS
Guide Data Security

RSA Padding Status: PKCS#1 v1.5, OAEP and PSS

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 13 min read
On this page

RSA is only as safe as the padding wrapped around it, and the oldest padding, PKCS#1 v1.5 encryption, has been broken in practice again and again for almost three decades. This page sets out the current status of the three RSA padding schemes in use: PKCS#1 v1.5 (for encryption and for signatures), OAEP for encryption and PSS for signatures. It explains why each exists, what the Bleichenbacher family of attacks does at a conceptual level, where NIST, the IETF and TLS 1.3 stand as of November 2026, and how to migrate. It is for developers, cryptography engineers and architects who review code, libraries, tokens and HSM configurations. Key sizes, key lifecycle and RSA versus elliptic curves are covered elsewhere and linked rather than repeated.

Last reviewed: November 2026. NIST SP 800-131A Rev. 3 is still an initial public draft as checked on 26 November 2026; NIST IR 8547 was published in final form in October 2026.

Key takeaways

  • Retire PKCS#1 v1.5 encryption. RFC 8017 keeps it only for compatibility, NIST disallowed it for key transport after 31 December 2023, and padding oracle attacks against it keep resurfacing (ROBOT in 2017, the Marvin timing attack in 2023).
  • Use OAEP where RSA encryption is unavoidable. It is the only RSA key-transport scheme in NIST SP 800-56B, but error handling and timing must still be uniform.
  • PKCS#1 v1.5 signatures are legacy but still approved. FIPS 186-5 approves both RSASSA-PKCS1-v1_5 and RSASSA-PSS; RFC 8017 says PSS is required in new applications.
  • TLS 1.3 already made the choice for you. Static RSA key exchange is gone, and RSA handshake signatures must use PSS.
  • All RSA is on a quantum clock. NIST IR 8547 (final, October 2026) deprecates quantum-vulnerable signatures after 2030 and disallows them after 2035, so padding migration should be planned alongside ML-KEM and ML-DSA adoption.

Why padding matters

Raw ("textbook") RSA is deterministic and malleable: the same message always gives the same ciphertext, and an attacker can multiply a ciphertext by a chosen value and predict how the plaintext changes. Padding adds structure and randomness so that the operation becomes a secure encryption or signature scheme. RFC 8017 (PKCS #1 v2.2, an Informational RFC published in November 2016) defines four schemes on top of the RSA primitive:

SchemePurposeEncodingRFC 8017 position
RSAES-PKCS1-v1_5Encryption, key transport0x00 0x02, at least eight random non-zero bytes, 0x00, messageIncluded only for compatibility with existing applications
RSAES-OAEPEncryption, key transportHash and mask generation function (MGF1) mixing a random seed with the message and an optional labelRequired to be supported for new applications
RSASSA-PKCS1-v1_5SignaturesDeterministic: 0x00 0x01, 0xFF bytes, 0x00, DigestInfo (hash algorithm identifier and digest)Included only for compatibility with existing applications
RSASSA-PSSSignaturesRandomised: hash, salt and MGF1, with a security proofRequired in new applications

The weakness that matters most is not the mathematics of RSA but what a decrypting system reveals when it meets badly padded input. That is why the same key can be safe in one implementation and exploitable in another. For a broader treatment of how such protocol and implementation failures arise, see the Cryptographic Protocol Failures and Misuse Guide.

PKCS#1 v1.5 encryption and signatures

Encryption: the Bleichenbacher class, conceptually

In 1998 Daniel Bleichenbacher showed that if a server tells an attacker, directly or indirectly, whether a submitted ciphertext decrypts to something that starts with the correct 0x00 0x02 bytes, the attacker can use that yes or no answer as an oracle. By sending many related ciphertexts and watching the answers, the attacker narrows down the plaintext of a target ciphertext, such as a recorded TLS premaster secret, and can also produce a signature with the server's key. The private key is never recovered; the damage is decryption of captured traffic and signing as the server.

The oracle does not need to be an explicit error message. It can be a different alert, a different response time, a closed connection, a log line or a cache effect. That is why the attack keeps returning:

  • ROBOT (2017): the researchers describe it as the return of the 19-year-old flaw in servers using TLS RSA encryption key exchange. Their advice is to disable cipher suites starting TLS_RSA; cipher suites that use RSA only for signatures with ECDHE or DHE are not affected, and certificates do not need to be revoked.
  • Marvin (2023): a timing variant presented at ESORICS 2023 showing that measuring how long the private-key operation takes is enough. The author's headline advice is to stop using RSA PKCS#1 v1.5 encryption, and he notes that OAEP-only use is not automatically safe if the shared numeric code leaks timing.

RFC 8017 itself warns, for both PKCS#1 v1.5 and OAEP decryption, that an opponent must not be able to distinguish the different error conditions. In practice, making v1.5 decryption fully constant-time across every library, HSM and network path is hard enough that the realistic fix is to stop accepting it.

Signatures: legacy but not broken

RSASSA-PKCS1-v1_5 signatures do not have the oracle problem, because verification uses only the public key. The recurring risk is lax verification code: parsers that accept extra bytes after the DigestInfo or do not check the full encoding have allowed signature forgery with small public exponents. Verifiers should rebuild the expected encoding and compare it byte for byte, rather than parse the decrypted block. PKCS#1 v1.5 signatures remain everywhere: most X.509 certificates, JWT RS256 tokens and code signing, so they cannot be switched off overnight.

OAEP

Optimal Asymmetric Encryption Padding combines a random seed and the message through a hash and MGF1 so that decryption either recovers a well-formed block or fails as a whole. NIST's draft SP 800-131A Rev. 3 notes that RSA-OAEP is the only key-transport scheme specified in SP 800-56B.

  • Parameters must match on both sides: hash function, MGF1 hash and label. Library defaults differ (some still default to SHA-1 for OAEP and MGF1), which causes interoperability failures that teams sometimes "fix" by falling back to v1.5. Set every parameter explicitly.
  • Error handling still matters: RFC 8017 warns that distinguishable OAEP errors enable a chosen-ciphertext attack of the kind observed by Manger. Return one generic error and avoid branching on decrypted content.
  • JOSE names: in RFC 7518, RSA-OAEP (default parameters, SHA-1) is Recommended+, RSA-OAEP-256 is Optional and RSA1_5 is Recommended-, signalling a future downgrade. Prefer RSA-OAEP-256 for new JWE, or an elliptic curve key agreement mode.
  • Consider not encrypting with RSA at all: for new designs, ephemeral key agreement (ECDHE today, ML-KEM for post-quantum) usually replaces RSA key transport, as TLS 1.3 did.

PSS

The Probabilistic Signature Scheme adds a random salt and MGF1 masking, which gives a tighter security proof than v1.5 and removes the rigid encoding that lax verifiers mishandled. FIPS 186-5 (February 2023) approves PSS with constraints: the hash must be approved (SHAKE128 and SHAKE256 are allowed as hash or mask generation functions), the salt length must satisfy 0 ≤ sLen ≤ hLen and verifiers must check that bound, and RSA moduli must be an even bit length of at least 2048 bits.

  • TLS 1.3: RFC 8446 states that RSA signatures in CertificateVerify must use an RSASSA-PSS algorithm, even if PKCS#1 v1.5 algorithms are offered; v1.5 values remain for signatures inside certificates. RFC 8446 has since been obsoleted by RFC 9846 (July 2026), which is now the TLS 1.3 specification; check it for the current text.
  • Certificates: an ordinary rsaEncryption key can produce PSS signatures (TLS rsa_pss_rsae schemes), so you do not need special PSS-only certificates to adopt PSS in protocols.
  • JWT: RFC 7518 lists RS256 as Recommended and PS256 as Optional, with a 2048-bit minimum for both. Moving issuers to PS256 is straightforward where all relying parties support it; see the JWT Security Guide.
  • Determinism trade-off: PSS signatures differ each time; systems that compare signatures for equality or cache them by value need adjusting.

Current status in standards

Scheme and useRFC 8017NIST positionTLS 1.3 (RFC 8446)Status in practice
PKCS#1 v1.5 encryption (key transport)Compatibility onlySP 800-131A Rev. 2 (March 2019): deprecated through 2023, disallowed after 31 December 2023. Rev. 3 draft: initiating non-SP 800-56B key establishment is disallowed; processing kept for legacy use with moduli of 1024 bits or moreRemoved (no static RSA key exchange)Retire. Decrypt-only legacy at most, behind uniform errors
OAEP encryptionRequired to be supported for new applicationsSP 800-56B key transport. Rev. 3 draft: 2048 to 3072-bit moduli acceptable through 2030 then deprecated; 3072 bits and above acceptableNot usedUse where RSA encryption is required; plan move to ML-KEM
PKCS#1 v1.5 signaturesCompatibility onlyFIPS 186-5: approved. Rev. 3 draft: 112-bit strength acceptable through 2030 then deprecatedCertificates only; not in handshake signaturesAcceptable legacy; do not choose for new protocols
PSS signaturesRequired in new applicationsFIPS 186-5: approved with salt and hash constraints; same strength scheduleMandatory for RSA handshake signaturesPreferred RSA signature scheme
All RSA (quantum)Predates post-quantum standardsIR 8547 final (October 2026): quantum-vulnerable signatures deprecated after 2030, disallowed after 2035Hybrid and ML-KEM groups being adoptedPlan migration to ML-DSA, SLH-DSA and ML-KEM

Rev. 3 also proposes deprecating the 112-bit security strength (RSA 2048) after 2030. Because it is a draft, its tables may change before publication; treat Rev. 2 as the current approved text and Rev. 3 as the direction of travel. For key sizes and RSA against elliptic curves, see RSA vs ECC; for the full post-quantum plan, see the Post-Quantum Cryptography Migration Guide.

Migration guidance

Decide by use case

SituationRecommended choiceNotes
New protocol needing key exchangeECDHE, or hybrid with ML-KEMAvoid RSA key transport entirely
Wrapping data keys to an RSA public key (HSM, KMS, JWE)RSA-OAEP with SHA-256 and MGF1-SHA-256Set label and hashes explicitly on both ends
New RSA signing (tokens, documents, firmware)RSASSA-PSS, salt length equal to hash length3072-bit keys for long-lived signers
Existing PKCS#1 v1.5 signatures in certificates and RS256 tokensKeep while relying parties need themStrict byte-for-byte verification; plan PS256 or ML-DSA
Legacy system that only speaks v1.5 encryptionIsolate, decrypt-only, uniform failureSet a retirement date; never expose it as a network oracle

Phased approach

  1. Inventory: find every RSA encrypt, decrypt, sign and verify call and its padding: library calls (for example padding constants in OpenSSL, Java Cipher strings such as RSA/ECB/PKCS1Padding, .NET RSAEncryptionPadding), TLS cipher suites, JWE and JWS alg values, HSM mechanisms (CKM_RSA_PKCS versus CKM_RSA_PKCS_OAEP and CKM_RSA_PKCS_PSS in PKCS #11). See the Cryptographic Inventory and CBOM Guide.
  2. Close network oracles first: remove TLS_RSA cipher suites from servers and load balancers and confirm with a TLS scanner; this removes the most exposed v1.5 decryption.
  3. Switch encryption to OAEP or key agreement: change both producer and consumer together, with explicit parameters; where data was stored under v1.5, re-wrap keys rather than re-encrypt bulk data.
  4. Move new signing to PSS: start with internal tokens and artefacts you control end to end; publish both algorithms in JWKS during transition.
  5. Restrict HSM mechanisms: where the HSM or KMS allows it, disable CKM_RSA_PKCS decryption for keys that no longer need it.
  6. Test and roll back: run interoperability tests in a pilot environment, keep the old path behind a flag for one release, and remove it once logs show no use.

Detection and measurement

  • Count of endpoints still offering TLS_RSA cipher suites (target zero).
  • Share of RSA decryption calls using OAEP, from code scanning and HSM audit logs.
  • Share of tokens issued with PS256 or newer algorithms versus RS256.
  • Number of keys with CKM_RSA_PKCS decryption still enabled.
  • Bursts of RSA decryption failures from one client, which can indicate oracle probing.

Framework mapping

FrameworkReferenceRelevance
NIST SP 800-53 Rev. 5SC-13 Cryptographic ProtectionUse approved schemes (FIPS 186-5, SP 800-56B)
NIST SP 800-53 Rev. 5SC-12 Cryptographic Key Establishment and ManagementKey transport scheme choice and HSM mechanism policy
NIST SP 800-53 Rev. 5SC-8 Transmission Confidentiality and IntegrityRemoving TLS RSA key exchange
NIST CSF 2.0PR.DS-01, PR.DS-02Data at rest and in transit protected with current cryptography

Common failure patterns

  • Falling back to v1.5 to fix OAEP errors: mismatched OAEP hash or label defaults are resolved by switching padding instead of aligning parameters.
  • Leaky error paths: different exceptions, HTTP codes or timings for padding failures in APIs that decrypt client-supplied data.
  • Forgotten TLS_RSA suites: left enabled on load balancers or appliances for old clients.
  • Lax signature parsing: custom verifiers that parse the v1.5 block instead of comparing the full expected encoding.
  • Treating "approved" as "recommended": FIPS 186-5 approval of v1.5 signatures is read as a reason to choose them for new systems.
  • Ignoring the quantum timeline: migrating from v1.5 to OAEP or PSS without a plan for the 2030 and 2035 milestones.

Practitioner checklist

  • Disable TLS_RSA cipher suites everywhere and verify with a scan.
  • Replace RSAES-PKCS1-v1_5 with OAEP (SHA-256, MGF1-SHA-256) or key agreement.
  • Return one generic error, in constant time, for any RSA decryption failure.
  • Use RSASSA-PSS for new RSA signatures, with sLen equal to the hash length.
  • Verify PKCS#1 v1.5 signatures by full encoding comparison only.
  • Disable CKM_RSA_PKCS decryption on HSM keys that no longer need it.
  • Track SP 800-131A Rev. 3 to final and align internal standards when it publishes.
  • Map every RSA use to an ML-KEM or ML-DSA replacement on the IR 8547 timeline.

Standards and references

Related NHI Mgmt Group resources: Cryptographic Key Management Guide · Digital Signatures Guide · Machine Identity, PKI and Certificate Lifecycle Guide · Crypto-Agility Guide · TLS Server Configuration Baseline Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.