Public-key encryption

RSA-PKCS#1 v1.5-ENC-3072

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

broken Root API only
Broken tier.

Practical attacks exist. Present for compatibility and research only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.

About RSA-PKCS#1 v1.5-ENC-3072

RSA-PKCS#1 v1.5-ENC-3072 is one of 3 RSA PKCS #1 v1.5 encryption variants in the NextSSL registry, a public-key encryption scheme. It uses a 0–373-byte output, a 392–416-byte public key, a 1,152–1,984-byte secret key and a 384-byte ciphertext. Its registry entry cites RFC 8017. NextSSL lists it in the broken tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).

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

Sizes

FieldBytesMeaning
out0 – 373Output
pk392 – 416Public key
sk1,152 – 1,984Secret key
ct384Ciphertext
ctx0Context string

Use it

from nextssl_demo import NextSSL

root = NextSSL(root=True)   # tier 'broken' is reachable from the root API only
pk, sk = root.call("pke_keygen", "rsa-pkcs1v15-enc-3072", None, outs=2)
ct = root.call("pke_encrypt", "rsa-pkcs1v15-enc-3072", None, pk, b"secret", b"")[0]

Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.

Other RSA PKCS #1 v1.5 encryption variants

2

Frequently asked questions

What is RSA-PKCS#1 v1.5-ENC-3072?

RSA-PKCS#1 v1.5-ENC-3072 is a PKE in the RSA PKCS #1 v1.5 encryption family. PKCS #1 v1.5 encryption is the original padding format for RSA encryption, still found in older TLS, CMS and smart-card systems.

What are the RSA-PKCS#1 v1.5-ENC-3072 sizes?

In NextSSL, RSA-PKCS#1 v1.5-ENC-3072 uses: public key 392 to 416 bytes, ciphertext 384 bytes, output 0 to 373 bytes.

Who designed RSA-PKCS#1 v1.5-ENC-3072 and when?

RSA-PKCS#1 v1.5-ENC-3072 belongs to the RSA PKCS #1 v1.5 encryption family, first published in 1993 by RSA Laboratories (PKCS #1). Its origin: PKCS #1 (RFC 8017, retained for compatibility).

Which standards define RSA-PKCS#1 v1.5-ENC-3072?

RSA-PKCS#1 v1.5-ENC-3072 is referenced by RFC 8017.

Is RSA-PKCS#1 v1.5-ENC-3072 safe to use?

RSA-PKCS#1 v1.5-ENC-3072 is in the broken tier. Practical attacks exist. Present for compatibility and research only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).

What other RSA PKCS #1 v1.5 encryption variants are there?

NextSSL also registers rsa-pkcs1v15-enc-2048, rsa-pkcs1v15-enc-4096 in the RSA PKCS #1 v1.5 encryption family.