You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could generate aes key. But can't export/extract it as Key from HSM.
Can you help me to export aes key?
long aeskey = CE.GenerateKey(session, new CKM(CKM.AES_KEY_GEN),
new CKA(CKA.VALUE_LEN, 32),
new CKA(CKA.LABEL, "labelencaes"),
new CKA(CKA.ID, "labelencaes"),
new CKA(CKA.TOKEN, false),
new CKA(CKA.SENSITIVE, false),
new CKA(CKA.ENCRYPT, true),
new CKA(CKA.DECRYPT, true),
new CKA(CKA.DERIVE, true));
Regards
Paul V
The text was updated successfully, but these errors were encountered:
If you managed to create the key with CKA.SENSITIVE=false, you should be able to get the key in the plaintext form by calling CE.GetAttributeValue to get the CKA.VALUE attribute.
If that fails you might try setting the key as extractable (CKA.EXTRACTABLE) and create another wrapping key to wrap and then decrypt the wrapped original key.
Hi @primetomas ,
I could generate aes key. But can't export/extract it as Key from HSM.
Can you help me to export aes key?
long aeskey = CE.GenerateKey(session, new CKM(CKM.AES_KEY_GEN),
new CKA(CKA.VALUE_LEN, 32),
new CKA(CKA.LABEL, "labelencaes"),
new CKA(CKA.ID, "labelencaes"),
new CKA(CKA.TOKEN, false),
new CKA(CKA.SENSITIVE, false),
new CKA(CKA.ENCRYPT, true),
new CKA(CKA.DECRYPT, true),
new CKA(CKA.DERIVE, true));
Regards
Paul V
The text was updated successfully, but these errors were encountered: