Cryptographic Token Interface Standard

PKCS#11


PKCS #1 RSA OAEP

The PKCS #1 RSA OAEP mechanism, denoted CKM_RSA_PKCS_OAEP, is a multi-purpose mechanism based on the RSA public-key cryptosystem and the OAEP block format defined in PKCS #1. It supports single-part encryption and decryption; key wrapping; and key unwrapping.

It has a parameter, a CK_RSA_PKCS_OAEP_PARAMS structure.

This mechanism can wrap and unwrap any secret key of appropriate length. Of course, a particular token may not be able to wrap/unwrap every appropriate-length secret key that it supports. For wrapping, the "input" to the encryption operation is the value of the CKA_VALUE attribute of the key that is wrapped; similarly for unwrapping. The mechanism does not wrap the key type or any other information about the key, except the key length; the application must convey these separately. In particular, the mechanism contributes only the CKA_CLASS and CKA_VALUE (and CKA_VALUE_LEN, if the key has it) attributes to the recovered key during unwrapping; other attributes must be specified in the template.

Constraints on key types and the length of the data are summarized in the following table. For encryption and decryption, the input and output data may begin at the same location in memory. In the table, k is the length in bytes of the RSA modulus, and hLen is the output length of the message digest algorithm specified by the hashAlg field of the CK_RSA_PKCS_OAEP_PARAMS structure.

Table 40, PKCS #1 RSA OAEP: Key And Data Length
Function Key type
Input length
Output length
C_Encrypt1 RSA public key
<= k -2-2 hLen
k
C_Decrypt1 RSA private key
k
<= k -2-2 hLen
C_WrapKey RSA public key
<= k -2-2 hLen
k
C_UnwrapKey RSA private key
k
<= k -2-2 hLen

1 Single-part operations only.

For this mechanism, the ulMinKeySize and ulMaxKeySize fields of the CK_MECHANISM_INFO structure specify the supported range of RSA modulus sizes, in bits.


RSA Security Inc. Public-Key Cryptography Standards - PKCS#11 - v220