PKE family

RSA PKCS #1 v1.5 encryption

Legacy RSA encryption padding, exposed to Bleichenbacher padding-oracle attacks

broken 3 variants PKCS #1 (RFC 8017, retained for compatibility)

Overview

PKCS #1 v1.5 encryption is the original padding format for RSA encryption, still found in older TLS, CMS and smart-card systems. Its structure enables padding-oracle attacks that have repeatedly broken real implementations, so it is classed as broken.

The format pads a message as 00 02, followed by at least eight nonzero random bytes, a zero byte and the message, then applies RSA. In 1998 Daniel Bleichenbacher showed that if a server reveals whether a decrypted ciphertext has this valid structure, an attacker can decrypt arbitrary ciphertexts or forge signatures through adaptive queries. Even the error messages or timing of a single server can be enough.

Mitigations require the decryptor to behave identically in every observable way for valid and invalid padding, which has proven extremely difficult. Variants of the attack, such as ROBOT in 2017 and the Marvin timing attack in 2023, found exploitable oracles in many major libraries and products years after the original paper. TLS 1.3 removed RSA key transport entirely. Three key sizes are present: 2048, 3072 and 4096-bit moduli, retained only for interoperability and testing.

History

1977–2016
  1. RSA published by Rivest, Shamir and Adleman

  2. PKCS #1 v1.5 published

  3. Bleichenbacher's padding-oracle attack on PKCS #1 v1.5

  4. PKCS #1 v2.2 published as RFC 8017

How it works

  1. The message is padded as 0x00 0x02 || nonzero random bytes || 0x00 || M.
  2. The padded block is encrypted as c = m^e mod n.
  3. Decryption computes c^d mod n and checks the padding structure.
  4. Any observable difference in handling invalid padding creates a decryption oracle.

Security notes

Practically broken in deployed settings due to Bleichenbacher-style padding oracles (including ROBOT and Marvin). Do not use for new designs; use RSA-OAEP only for legacy interoperability, or preferably HPKE or ML-KEM.

Typical uses

Decrypting legacy data and messages that already use itTesting systems for padding-oracle vulnerabilitiesInteroperating with old smart cards and TLS 1.2 RSA key exchange

Variants in NextSSL

3
AlgorithmTierSizes (bytes)StandardsAPI
RSA-PKCS#1 v1.5-ENC-2048
rsa-pkcs1v15-enc-2048
broken out 0–245 · pk 264–288 · sk 768–1344 · ct 256 · ctx 0 RFC 8017 root
RSA-PKCS#1 v1.5-ENC-3072
rsa-pkcs1v15-enc-3072
broken out 0–373 · pk 392–416 · sk 1152–1984 · ct 384 · ctx 0 RFC 8017 root
RSA-PKCS#1 v1.5-ENC-4096
rsa-pkcs1v15-enc-4096
broken out 0–501 · pk 520–544 · sk 1536–2624 · ct 512 · ctx 0 RFC 8017 root

Frequently asked questions

Which RSA PKCS #1 v1.5 encryption variants does NextSSL include?

NextSSL registers 3 RSA PKCS #1 v1.5 encryption variants: rsa-pkcs1v15-enc-2048, rsa-pkcs1v15-enc-3072, rsa-pkcs1v15-enc-4096.