Cryptoki: a cryptographic Token Interface



Download 360.55 Kb.
Page116/196
Date22.12.2023
Size360.55 Kb.
#63026
1   ...   112   113   114   115   116   117   118   119   ...   196
v201-95
pkcs11-base-v2.40-cos01

C_VerifyRecoverInit


CK_DEFINE_FUNCTION(CK_RV, C_VerifyRecoverInit)(
CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism,
CK_OBJECT_HANDLE hKey
);
C_VerifyRecoverInit initializes a signature verification operation, where the data is recovered from the signature. hSession is the session’s handle; pMechanism points to the structure that specifies the verification mechanism; hKey is the handle of the verification key.
The CKA_VERIFY_RECOVER attribute of the verification key, which indicates whether the key supports verification where the data is recovered from the signature, must be TRUE.
After calling C_VerifyRecoverInit, the application may call C_VerifyRecover to verify a signature on data in a single part. The verification operation is active until the application uses a call to C_VerifyRecover to actually obtain the recovered message.
Return values: CKR_CRYPTOKI_NOT_INITIALIZED, CKR_DEVICE_ERROR, CKR_DEVICE_MEMORY, CKR_DEVICE_REMOVED, CKR_FUNCTION_CANCELED, CKR_FUNCTION_FAILED, CKR_GENERAL_ERROR, CKR_HOST_MEMORY, CKR_KEY_FUNCTION_NOT_PERMITTED, CKR_KEY_HANDLE_INVALID, CKR_KEY_SIZE_RANGE, CKR_KEY_TYPE_INCONSISTENT, CKR_MECHANISM_INVALID, CKR_MECHANISM_PARAM_INVALID, CKR_OK, CKR_OPERATION_ACTIVE, CKR_SESSION_CLOSED, CKR_SESSION_HANDLE_INVALID, CKR_USER_NOT_LOGGED_IN.
Example: see C_VerifyRecover.
  • C_VerifyRecover


CK_DEFINE_FUNCTION(CK_RV, C_VerifyRecover)(
CK_SESSION_HANDLE hSession,
CK_BYTE_PTR pSignature,
CK_ULONG ulSignatureLen,
CK_BYTE_PTR pData,
CK_ULONG_PTR pulDataLen
);
C_VerifyRecover verifies a signature in a single-part operation, where the data is recovered from the signature. hSession is the session’s handle; pSignature points to the signature; ulSignatureLen is the length of the signature; pData points to the location that receives the recovered data; and pulDataLen points to the location that holds the length of the recovered data.

Download 360.55 Kb.

Share with your friends:
1   ...   112   113   114   115   116   117   118   119   ...   196




The database is protected by copyright ©ininet.org 2024
send message

    Main page