liveBook · Manning

Rsa-oaep

As explained in Software Security for Developers

OAEP is a randomized RSA encryption padding scheme that uses hash-based encoding to reduce structural leakage and strengthen security against attacks on ciphertexts.

RSA-OAEP is a randomized padding scheme for RSA encryption. It mixes a message with random data using hash functions, reducing structural leakage and providing stronger protection against chosen-ciphertext attacks than older RSAES-PKCS1-v1_5 padding. section 6.3.1 section 6.6

Choose RSA-OAEP when configuring RSA encryption:

  • Prefer RSA-OAEP over RSAES-PKCS1-v1_5, which is older, weaker, and vulnerable to chosen-ciphertext attacks. section 6.3.1 section 6.5
  • Reject PKCS#1 v1.5 where possible so compatibility does not create a downgrade path to a less secure scheme. section 6.3.1
  • Use RSA keys of at least 2,048 bits; 3,072- or 4,096-bit keys are recommended for longer-term security. section 6.3.1 section 6.5

RSA-OAEP in hybrid encryption

Encrypt large content with a fast AES key, then wrap that content-encryption key with the recipient’s RSA public key using RSA-OAEP. The recipient uses the RSA private key to unwrap the AES key and decrypt the content. TLS, IPsec, JWE, and SSH use hybrid encryption patterns. section 6.3.2 section 6.5

Figure 6.5 Hybrid encryption uses a high-performance symmetric algorithm such as AES to encrypt content. Then the AES CEK is encrypted with the recipient’s RSA public key, allowing the recipient to use their private key to first the CEK and then decrypt the content.
figure

Trace the two-stage flow: AES encrypts the content, while RSA-OAEP encrypts the AES content-encryption key for the recipient. section 6.3.2

How Software Security for Developers covers it

How deep it goes
Explains randomized hash-based padding, contrasts attack resistance, and gives configuration guidance without deriving OAEP internals.
Examples
Uses AES-encrypted content and an RSA-OAEP-wrapped AES key as the central hybrid-encryption example.
What it assumes
Assumes basic RSA public-key encryption and distinguishes RSA from AES while treating padding choices as configuration decisions.
What you can do after
Configure RSA encryption with OAEP, reject legacy PKCS#1 v1.5, and wrap AES keys for large-message encryption.
How it connects
Connects RSA-OAEP to RSA, RSAES-PKCS1-v1_5, hybrid encryption, AES, key wrapping, TLS, IPsec, JWE, and SSH.

Also explained in

Compare how 2 books explain rsa-oaep →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Software Security for Developers. The section links point to the parts of the book it draws on.