Optimal Asymmetric Encryption Padding (OAEP) is a method for encoding messages
developed by Mihir Bellare and Phil Rogaway [BR94]. The technique of encoding
a message with OAEP and then encrypting it with RSA is provably secure in the
random oracle model. Informally, this means that if hash functions are truly
random, then an adversary who can recover such a message must be able to break RSA.

An OAEP encoded message consists of a ``masked data'' string concatenated
with a ``masked random number''. In the simplest form of OAEP, the masked data
is formed by taking the XOR of the plaintext message M and the hash G of a random
string r. The masked random number is the XOR of r with the hash H of the masked
data. The input to the RSA encryption function is then
[M XOR G(r)] || [r XOR H(M XOR G(r))]

Often, OAEP is used to encode small items such as keys. There are other
variations on OAEP (differing only slightly from the above) that include a
feature called ``plaintext-awareness''. This means that to construct a valid
OAEP encoded message, an adversary must know the original plaintext. To accomplish
this, the plaintext message M is first padded (for example, with a string of zeroes)
before the masked data is formed. OAEP is supported in the ANSI X9.44, IEEE P1363
and SET standards.

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

formatAndEncrypt(byte[] input,
int inputOffset,
int inputLength,
byte[] output,
int outputOffset)
Formats the input into the proper format and then encrypts it, assuming
this is not the last block to be encrypted.

OAEPFormatterEngine

Creates an OAEPFormatterEngine object based on the given encryptor engine, as well as the
SHA-1 digest algorithm.

Parameters:

engine - The PublicKeyEncryptorEngine object used to encrypt the formatted message.

Since:

JDE 3.6.0

Category:

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

OAEPFormatterEngine

Creates an OAEPFormatterEngine object based on the given encryptor engine, as well as the
SHA-1 digest algorithm, and the given parameters.

Parameters:

engine - The PublicKeyEncryptorEngine used to encrypt the formatted message.

parameters - A byte array containing the parameters to be incorporated into the formatted message.

Since:

JDE 3.6.0

Category:

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

OAEPFormatterEngine

Creates an OAEPFormatterEngine object based on the given encryptor engine and digest
algorithm.

Parameters:

engine - The PublicKeyEncryptorEngine object used to encrypt the formatted message.

digest - The digest to be used during the formatting process.

Since:

JDE 3.6.0

Category:

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

OAEPFormatterEngine

Creates an OAEPFormatterEngine object based on the given encryptor engine, digest
algorithm and parameters.

Parameters:

engine - The PublicKeyEncryptorEngine object used to encrypt the formatted message.

digest - The digest to be used during the formatting process.

parameters - A byte array containing the parameters to be incorporated into the formatted message.

Since:

JDE 3.6.0

Category:

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

CryptoTokenException - Thrown when a problem occurs with a crypto token or the crypto token is invalid.

Category:

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

CryptoTokenException - Thrown when a problem occurs with a crypto token or the crypto token is invalid.

Category:

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.