Cryptoki: a cryptographic Token Interface



Download 360.55 Kb.
Page51/196
Date22.12.2023
Size360.55 Kb.
#63026
1   ...   47   48   49   50   51   52   53   54   ...   196
v201-95
pkcs11-base-v2.40-cos01

9.6.3. ECDSA public key objects


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


Download 360.55 Kb.

Share with your friends:
1   ...   47   48   49   50   51   52   53   54   ...   196




The database is protected by copyright ©ininet.org 2024
send message

    Main page