Hi,

This query is not of OCF but of PKCS #11 standards.
I am using Cyberflex Access 00 cards and reflex 72 card reader. I have two
questions, one for digest and other for verification of signature.

1. I want to hash a piece of data with SHA1 algorithm using PKCS #11
cryptoki API. Following is the code I am using for initializing
message-digesting operation.

        CK_MECHANISM    mechanism;
        CK_RV                   status;

        mechanism.mechanism = CKM_SHA_1;
        mechanism.pParameter = NULL_PTR;
        mechanism.ulParameterLen = 0;
        status = (*ckFunc->C_DigestInit)(hSession, &mechanism);

I am getting CKR_MECHANISM_INVALID error in C_DigestInit.
I tried to use other mechanisms as well, but with all others also the error
was same.

Am I doing something wrong here or this card do not support digest
mechanism?
In this case how shall I get the digest of the data?

2. I am using mechanism CKM_RSA_PKCS for initializing signing of data
(C_SignInit) and then signing the data in one step (C_Sign), which works
fine. Now for verifying the signature I am using the same mechanism to
initialize verification (CKM_RSA_PKCS). At this step I am getting error
CKR_MECHANISM_INVALID.
Can anyone suggest me if I am wrong at any place, how can I verify the
signature?

Thank you,

Regards,
Smita



---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/

! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
!                           [EMAIL PROTECTED]
! containing the word
!                           unsubscribe 
! in the body.

Reply via email to