Cryptoki: a cryptographic Token Interface


CAST128 (CAST5) secret key objects



Download 360.55 Kb.
Page67/196
Date22.12.2023
Size360.55 Kb.
#63026
1   ...   63   64   65   66   67   68   69   70   ...   196
v201-95
pkcs11-base-v2.40-cos01

9.8.10. CAST128 (CAST5) secret key objects


CAST128 (also known as CAST5) secret key objects (object class CKO_SECRET_KEY, key type CKK_CAST128 or CKK_CAST5) hold CAST128 keys. The following table defines the CAST128 secret key object attributes, in addition to the common attributes listed in Table 14, Table 19, and Table 32:
Table 42, CAST128 (CAST5) Secret Key Object Attributes

Attribute

Data type

Meaning

CKA_VALUE1,4,6,7

Byte array

Key value (1 to 16 bytes)

CKA_VALUE_LEN2,3,6

CK_ULONG

Length in bytes of key value

The following is a sample template for creating a CAST128 (CAST5) secret key object:


CK_OBJECT_CLASS class = CKO_SECRET_KEY;
CK_KEY_TYPE keyType = CKK_CAST128;
CK_CHAR label[] = “A CAST128 secret key object”;
CK_BYTE value[] = {...};
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_ENCRYPT, &true, sizeof(true)},
{CKA_VALUE, value, sizeof(value)}
};

9.8.11. IDEA secret key objects


IDEA secret key objects (object class CKO_SECRET_KEY, key type CKK_IDEA) hold IDEA keys. The following table defines the IDEA secret key object attributes, in addition to the common attributes listed in Table 14, Table 19, and Table 32:
Table 43, IDEA Secret Key Object


Download 360.55 Kb.

Share with your friends:
1   ...   63   64   65   66   67   68   69   70   ...   196




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

    Main page