Skip to content

OpenPGP card v3.4: Is it possible to use C_GenerateKeyPair to generate keypair #3118

Closed Answered by dengert
msetina asked this question in Q&A
Discussion options

You must be logged in to vote

CKA_ID is byte array i.e. binary.
I don 't know what language you are writing your template in but Template looks like:

typedef struct CK_ATTRIBUTE { 
    CK_ATTRIBUTE_TYPE type;  
    CK_VOID_PTR pValue;
    CK_ULONG ulValueLen; 
} CK_ATTRIBUTE;

The CKA_ATRIBUTE _TYPE for CKA_ID would be 0x102UL
The pValue is a pointer to a byte array of length ulValureLen = 0x01UL
and  it looks like you set it to a ASCI char "2" which is 0x32.
It should be value 0x02





Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@msetina
Comment options

Comment options

You must be logged in to vote
5 replies
@msetina
Comment options

@msetina
Comment options

@dengert
Comment options

Answer selected by msetina
@msetina
Comment options

@msetina
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants