ECDSA public key objects (object class CKO_PUBLIC_KEY, key type CKK_ECDSA) hold ECDSA public keys. See Section for more information about ECDSA. The following table defines the ECDSA public key object attributes, in addition to the common attributes listed in Table 14, Table 19, and Table 20:
Table 23, ECDSA Public Key Object Attributes
Attribute
|
Data type
|
Meaning
|
CKA_ECDSA_PARAMS1,3,6
|
Byte array
|
DER-encoding of an X9.62 ECParameters value
|
CKA_EC_POINT1,4,6
|
Byte array
|
DER-encoding of X9.62 ECPoint value P
|
The CKA_ECDSA_PARAMS attribute value is known as the “ECDSA parameters”.
The following is a sample template for creating an ECDSA public key object:
CK_OBJECT_CLASS class = CKO_PUBLIC_KEY;
CK_KEY_TYPE keyType = CKK_ECDSA;
CK_CHAR label[] = “An ECDSA public key object”;
CK_BYTE ecdsaParams[] = {...};
CK_BYTE ecPoint[] = {...};
CK_BBOOL true = TRUE;
CK_ATTRIBUTE template[] = {
{CKA_CLASS, &class, sizeof(class)},
{CKA_KEY_TYPE, &keyType, sizeof(keyType)},
{CKA_TOKEN, &true, sizeof(true)},
{CKA_LABEL, label, sizeof(label)},
{CKA_ECDSA_PARAMS, ecdsaParams, sizeof(ecdsaParams)},
{CKA_EC_POINT, ecPoint, sizeof(ecPoint)}
};
9.6.4. Diffie-Hellman public key objects
Diffie-Hellman public key objects (object class CKO_PUBLIC_KEY, key type CKK_DH) hold Diffie-Hellman public keys. The following table defines the RSA public key object attributes, in addition to the common attributes listed in Table 14, Table 19, and Table 20:
Table 24, Diffie-Hellman Public Key Object Attributes
Share with your friends: |