How to apply attributes to objects

In openCryptoki, an attribute defines a characteristic of an object, for example, for a generated key. In openCryptoki, there are general attributes, such as whether the object is private or public. There are also attributes that are specific to a particular type of object, such as a modulus or exponent for RSA keys.

Attributes determine the characteristics of an object or how a mechanism is applied to an object.

Attributes are denoted by names starting with the prefix 'CKA_'. Some attributes are valid for one certain object type, others are valid for multiple object types.

The type is specified on an object through the CKA_CLASS attribute of the object. Especially, the CKA_CLASS attribute determines which further attributes are associated with an object. Other typical attributes contain the value of an object or determine whether an object is a token object.