I am trying to generate an AES KEY using PKCS#11 and Nitrokey HSM
but I get an unsupported function error:
9: C_GenerateKey
2018-09-24 13:03:59.333
[in] hSession = 0xc11dc0
pMechanism->type=CKM_AES_KEY_GEN
[in] pTemplate[13]:
CKA_CLASS CKO_SECRET_KEY
CKA_KEY_TYPE CKK_AES
CKA_VALUE_LEN 00007ffff01c9468 / 8
00000000 20 00 00 00 00 00 00 00 …
CKA_LABEL 00007ffff01c9420 / 21
4F4B5620 31322E32 2048534D 20526F6F 74204B65 79
O K V . 1 2 . 2 . H S M . R o o t . K e y
CKA_ID 00007ffff01c9470 / 4
00000000 00 00 00 01 …
CKA_TOKEN True
CKA_PRIVATE True
CKA_SENSITIVE True
CKA_ENCRYPT True
CKA_DECRYPT True
CKA_WRAP True
CKA_UNWRAP True
CKA_EXTRACTABLE True
Returned: 84 CKR_FUNCTION_NOT_SUPPORTED
Is it unsupported from the PKCS#11 opensc-pkcs11.so library or
from the Nitrokey HSM?
Thanks
Paolo