Dear. hi, I use a DES key to Wrap another DES key like this: Mechanism mech = new Mechanism(Mechanism.CKM_DES_ECB, null); try { byte[] wrapped_key = session.WrapKey(mech, des_k2, des_k1); } catch (CryptokiException e) { string error = e.ErrorString; int errorcode = e.ErrorCode; Console.WriteLine("ErrorCode: 0x{0:X8} "+error,errorcode); } but I get MECHANISM_INVALID error, what's the problem?
Are you sure that you underlying PKCS#11 dll supports the mechanism CKM_DES_ECB?
Yes,sure.Because I can use CKM_DES_ECB to Encrypt data.Is there any example to use Wrap key and Unwrap Key?
Thanks !
Above all,how do i know my token support the wrap/unwrap funciton or any other function?
Thanks!
Above all,how do i know my token support the wrap/unwrap funciton or any other function? Thanks!
This should be in your token documentation.