RSAESOAEP
RSAES-OAEP, or RSA Encryption Scheme with Optimal Asymmetric Encryption Padding, is a padding scheme for RSA encryption that adds randomness and structure to plaintext before RSA is applied. It is defined in the PKCS #1 standard (and in RFC 8017) and is widely used to provide semantic security against adaptive chosen-ciphertext attacks when RSA is used for encryption. The scheme relies on a hash function and a mask generation function (MGF1) to produce an encoded message of the same length as the RSA modulus.
To encode, let k be the modulus length in octets and hLen the hash output length. OAEP
Decryption reverses this process: RSA decrypts to EM, which is split into maskedSeed and maskedDB; the seeds
OAEP is commonly used with RSA for encryption in protocols and libraries, and is generally preferred over