Cryptographic Token Interface Standard

PKCS#11


PKCS #1 RSA OAEP mechanism parameters

CK_RSA_PKCS_MGF_TYPE; CK_RSA_PKCS_MGF_TYPE_PTR

CK_RSA_PKCS_MGF_TYPE is used to indicate the Message Generation Function (MGF) applied to a message block when formatting a message block for the PKCS #1 OAEP encryption scheme. It is defined as follows:

typedef CK_ULONG CK_RSA_PKCS_MGF_TYPE;

The following MGFs are defined in PKCS #1 v2.0. The following table lists the defined functions.

Table 57, PKCS #1 RSA: Message Generation Functions
Source Identifier Value
CKG_MGF1_SHA1 0x00000001

CK_RSA_PKCS_MGF_TYPE_PTR is a pointer to a CK_RSA_PKCS_MGF_TYPE.

CK_RSA_PKCS_OAEP_SOURCE_TYPE; CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR

CK_RSA_PKCS_OAEP_SOURCE_TYPE is used to indicate the source of the encoding parameter when formatting a message block for the PKCS #1 OAEP encryption scheme. It is defined as follows:

typedef CK_ULONG CK_RSA_PKCS_OAEP_SOURCE_TYPE;

The following encoding parameter sources are defined in PKCS #1 v2.0. The following table lists the defined sources along with the corresponding data type for the pSourceData field in the CK_RSA_PKCS_OAEP_PARAMS structure defined below.

Table 58, PKCS #1 RSA OAEP: Encoding parameter sources
Source Identifier Value Data Type
CKZ_DATA_SPECIFIED 0x00000001 Array of CK_BYTE containing the value of the encoding parameter. If the parameter is empty, pSourceData must be NULL and ulSourceDataLen must be zero.

CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR is a pointer to a CK_RSA_PKCS_OAEP_SOURCE_TYPE.

CK_RSA_PKCS_OAEP_PARAMS; CK_RSA_PKCS_OAEP_PARAMS_PTR

CK_RSA_PKCS_OAEP_PARAMS is a structure that provides the parameters to the CKM_RSA_PKCS_OAEP mechanism. The structure is defined as follows:

typedef struct CK_RSA_PKCS_OAEP_PARAMS {
CK_MECHANISM_TYPE hashAlg;
CK_RSA_PKCS_OAEP_MGF_TYPE mgf;
CK_RSA_PKCS_OAEP_SOURCE_TYPE source;
CK_VOID_PTR pSourceData;
CK_ULONG ulSourceDataLen;
} CK_RSA_PKCS_OAEP_PARAMS;

hashAlg mechanism ID of the message digest algorithm used to calculate the digest of the encoding parameter
mgf mask generation function to use on the encoded block
source source of the encoding parameter
pSourceData data used as the input for the encoding parameter source
ulSourceDataLen length of the encoding parameter source input

CK_RSA_PKCS_OAEP_PARAMS_PTR is a pointer to a CK_RSA_PKCS_OAEP_PARAMS.


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