AI_SET_OAEP_RSAPublic

Key info types for keyObject in B_EncryptInit or B_DecryptInit:

KI_RSAPublic, KI_RSAPublicBER, or KI_RSAPublicBSAFE1.

Input considerations:

The key size in bits must be a multiple of 8; for example, 1024 is a valid key size whereas 1030 is not.

If encrypting, the total number of bytes to encrypt must be 25 fewer than the key size in bytes. For instance, with a 1024-bit key (128 bytes) the input must be 103 bytes

(128 - 25). The SET standard calls for the input data to follow a particular format. The first byte is the block content (BC) and the following bytes are the actual data bytes (ADB). This AI does not check whether those bytes adhere to the SET specifications.

Output considerations:

The output of encryption will be the same size as the key’s modulus. The output of decryption will be 25 bytes fewer than the key size in bytes.

C h a p t e r 2 A l g o r i t h m I n f o Ty p e s

223

Page 233
Image 233
RSA Security 5 manual A p t e r 2 a l g o r i t h m I n f o Ty p e s 223