BuildDhKeyPair
Synopsis
CK_RV BuildDhKeyPair(
CK_SESSION_HANDLE hSession,
char * txt,
int tok,
int priv,
CK_OBJECT_HANDLE * phPub,
CK_OBJECT_HANDLE * phPri,
char * prime,
char * base,
char * pub,
char * pri);
Description
Create a DH key pair given the required components.
Parameters
hSession |
Open session handle |
txt |
Optional label |
tok |
1 for a Token object, 0 for Session object |
priv |
1 for Private object, 0 for Public object |
phPub |
Reference to object handle to hold created public key |
phPri |
Reference to object handle to hold created private key |
prime |
Prime |
base |
Base |
pub |
Public key value |
pri |
Private key value |
On successful return
*phPub — handle to newly-created public key
*phPri — handle to newly-created private key
In addition to the Public key attributes set via the parameters, the following are set:
CKA_CLASS CKO_PUBLIC_KEY
CKA_KEY_TYPE CKK_DH
CKA_EXTRACTABLE TRUE
In addition to the Private key attributes set via the parameters, the following are set:
CKA_CLASS CKO_PRIVATE_KEY
CKA_KEY_TYPE CKK_DH
CKA_EXTRACTABLE TRUE