Hi guys,
pkcs11 documentation , says that C_CreateObject could be used to create a
key object. In the documention example, the key template is
CK_BYTE modulus[] = {...};
CK_ATTRIBUTE keyTemplate[] = {
{CKA_CLASS, keyClass, sizeof(keyClass)},
{CKA_KEY_TYPE, keyType, sizeof(keyType)},
erbalibera erbalibera wrote:
Hi guys,
pkcs11 documentation , says that C_CreateObject could be used to
create a key object. In the documention example, the key template is
CK_BYTE modulus[] = {...};
CK_ATTRIBUTE keyTemplate[] = {
{CKA_CLASS, keyClass, sizeof(keyClass)},
Hi, thanks for you reply.
What I do is:
1. generate a RSA key pair using C_GenerateKeyPair with the following
template:
64 CK_ATTRIBUTE publicKeyAttr[] = {
65
66 {CKA_TOKEN, true_, sizeof(true_)},
67 {CKA_ENCRYPT, true_, sizeof (true_)},
68 {CKA_VERIFY, true_,
You can check out src/tools/pkcs11-tool.c in opensc source to see how
pkcs11-tool uses the call with opensc.
On 7/10/09, erbalibera erbalibera eerbalib...@gmail.com wrote:
Hi, thanks for you reply.
What I do is:
1. generate a RSA key pair using C_GenerateKeyPair with the following
template:
The real question is, are you using PKCS#11 to create a private key on
a token such that it can not be read of the token? Sounds like no, as
you want to read the private key. So then is it important to use
PKCS#11 with some token behind it?
If you are just trying to generate a key pair, you could