Cryptographic Token Interface Standard |
PKCS#11 |
KEA public key objects (object class CKO_PUBLIC_KEY, key type CKK_KEA) hold KEA public keys. The following table defines the KEA public key object attributes, in addition to the common attributes listed in Table 15 , Table 19 , Table 25 , and Table 26 :
Table 33, KEA Public Key Object Attributes
Attribute | Data type | Meaning |
CKA_PRIME1,3 | Big integer | Prime p (512 to 1024 bits, in steps of 64 bits) |
CKA_SUBPRIME1,3 | Big integer | Subprime q (160 bits) |
CKA_BASE1,3 | Big integer | Base g (512 to 1024 bits, in steps of 64 bits) |
CKA_VALUE1,4 | Big integer | Public value y |
The CKA_PRIME, CKA_SUBPRIME and CKA_BASE attribute values are collectively the "KEA domain parameters".
The following is a sample template for creating a KEA public key object:
CK_OBJECT_CLASS class = CKO_PUBLIC_KEY; CK_KEY_TYPE keyType = CKK_KEA; CK_UTF8CHAR label[] = "A KEA public key object"; CK_BYTE prime[] = {...}; CK_BYTE subprime[] = {...}; CK_BYTE base[] = {...}; 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)-1}, {CKA_PRIME, prime, sizeof(prime)}, {CKA_SUBPRIME, subprime, sizeof(subprime)}, {CKA_BASE, base, sizeof(base)}, {CKA_VALUE, value, sizeof(value)} };