Cryptoki: a cryptographic Token Interface



Download 360.55 Kb.
Page32/196
Date22.12.2023
Size360.55 Kb.
#63026
1   ...   28   29   30   31   32   33   34   35   ...   196
v201-95
pkcs11-base-v2.40-cos01
Bit Flag

Mask

Meaning

CKF_RW_SESSION

0x00000002

TRUE if the session is read/write; FALSE if the session is read-only

CKF_SERIAL_SESSION

0x00000004

This flag is provided for backward compatibility, and should always be set to TRUE


CK_SESSION_INFO_PTR is a pointer to a CK_SESSION_INFO.

8.4. Object types


Cryptoki represents object information with the following types:
  • CK_OBJECT_HANDLE; CK_OBJECT_HANDLE_PTR


CK_OBJECT_HANDLE is a token-specific identifier for an object. It is defined as follows:
typedef CK_ULONG CK_OBJECT_HANDLE;

When an object is created or found on a token by an application, Cryptoki assigns it an object handle for that application’s sessions to use to access it. A particular object on a token does not necessarily have a handle which is fixed for the lifetime of the object; however, if a particular session can use a particular handle to access a particular object, then that session will continue to be able to use that handle to access that object as long as the session continues to exist, the object continues to exist, and the object continues to be accessible to the session.


Valid object handles in Cryptoki always have nonzero values. For developers’ convenience, Cryptoki defines the following symbolic value:
#define CK_INVALID_HANDLE 0


CK_OBJECT_HANDLE_PTR is a pointer to a CK_OBJECT_HANDLE.
  • CK_OBJECT_CLASS; CK_OBJECT_CLASS_PTR


CK_OBJECT_CLASS is a value that identifies the classes (or types) of objects that Cryptoki recognizes. It is defined as follows:
typedef CK_ULONG CK_OBJECT_CLASS;

For this version of Cryptoki, the following classes of objects are defined:


#define CKO_DATA 0x00000000
#define CKO_CERTIFICATE 0x00000001
#define CKO_PUBLIC_KEY 0x00000002
#define CKO_PRIVATE_KEY 0x00000003
#define CKO_SECRET_KEY 0x00000004
#define CKO_VENDOR_DEFINED 0x80000000

Object classes CKO_VENDOR_DEFINED and above are permanently reserved for token vendors. For interoperability, vendors should register their object classes through the PKCS process.



Download 360.55 Kb.

Share with your friends:
1   ...   28   29   30   31   32   33   34   35   ...   196




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

    Main page