AM_RSA_CRT_DECRYPT

AI_SET_OAEP_RSAPrivate

protect against timing attacks, whereas AM_RSA_CRT_ENCRYPT and do not.

Key info types for keyObject in B_EncryptInit or B_DecryptInit:

KI_RSA_CRT, KI_PKCS_RSAPrivate, KI_PKCS_RSAPrivateBER, or KI_RSAPrivateBSAFE1.

Input considerations:

The key size, in bits, must be a multiple of 8. For example, 1024 is a valid key size; 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

221

Page 231
Image 231
RSA Security 5 manual Input considerations