Cryptographic Token Interface Standard

PKCS#11


CK_TOKEN_INFO Reference

CK_TOKEN_INFO

CK_TOKEN_INFO provides information about a token. More...


Data Fields

CK_CHAR label [32]
 application defined label, assigned during token initialization; must be padded with the blank character (' '). More...

CK_CHAR manufacturerID [32]
 ID of the device manufacturer; must be padded with the blank character (' '). More...

CK_CHAR model [16]
 model of the device; must be padded with the blank character (' '). More...

CK_CHAR serialNumber [16]
 character-string serial number of the device; must be padded with the blank character (' '). More...

CK_FLAGS flags
 bit flags indicating capabilities and status of the device as defined below. More...

CK_USHORT usMaxSessionCount
 maximum number of sessions that can be opened with the token at one time. More...

CK_USHORT usSessionCount
 number of sessions that are currently open with the token. More...

CK_USHORT usMaxRwSessionCount
 maximum number of read/write sessions that can be opened with the token at one time. More...

CK_USHORT usRwSessionCount
 number of read/write sessions that are currently open with the token. More...

CK_USHORT usMaxPinLen
 maximum length in bytes of the PIN. More...

CK_USHORT usMinPinLen
 minimum length in bytes of the PIN. More...

CK_ULONG ulTotalPublicMemory
 the total amount of memory in bytes occupied by public objects. More...

CK_ULONG ulFreePublicMemory
 the amount of free (unused) memory in bytes for public objects. More...

CK_ULONG ulTotalPrivateMemory
 the total amount of memory in bytes occupied by private objects. More...

CK_ULONG ulFreePrivateMemory
 the amount of free (unused) memory in bytes for private objects. More...


Detailed Description

CK_TOKEN_INFO

CK_TOKEN_INFO provides information about a token. It is defined as follows:
label application defined label, assigned during token initialization; must be padded with the blank character (' ')
manufacturerID ID of the device manufacturer; must be padded with the blank character (' ')
model model of the device; must be padded with the blank character (' ')
serialNumber character-string serial number of the device; must be padded with the blank character (' ')
flags bit flags indicating capabilities and status of the device as defined below
usMaxSessionCount maximum number of sessions that can be opened with the token at one time
usSessionCount number of sessions that are currently open with the token
usMaxRwSessionCount maximum number of read/write sessions that can be opened with the token at one time
usRwSessionCount number of read/write sessions that are currently open with the token
usMaxPinLen maximum length in bytes of the PIN
usMinPinLen minimum length in bytes of the PIN
ulTotalPublicMemory the total amount of memory in bytes occupied by public objects
ulFreePublicMemory the amount of free (unused) memory in bytes for public objects
ulTotalPrivateMemory the total amount of memory in bytes occupied by private objects
ulFreePrivateMemory the amount of free (unused) memory in bytes for private objects

The flags parameter is defined as follows:

Table 7-2, Token Information Flags
Bit Flag Mask Meaning
CKF_RNG 0x0001 TRUE if the token has its own random number generator
CKF_WRITE_PROTECTED 0x0002 TRUE if the token is write-protected
CKF_LOGIN_REQUIRED 0x0004 TRUE if a user must be logged in to perform cryptographic functions
CKF_USER_PIN_INITIALIZED 0x0008 TRUE if the normal user's PIN has been initialized
CKF_EXCLUSIVE_EXISTS 0x0010 TRUE if an exclusive session exists

CK_TOKEN_INFO_PTR

CK_TOKEN_INFO_PTR points to a CK_TOKEN_INFO structure. It is implementation dependent.

Session types

Cryptoki represents session information with the following types.

CK_SESSION_HANDLE

CK_SESSION_HANDLE is a Cryptoki-assigned value that identifies a session. It is defined as follows:

typedef CK_ULONG CK_SESSION_HANDLE;

CK_SESSION_HANDLE_PTR

CK_SESSION_HANDLE_PTR points to a CK_SESSION_HANDLE. It is implementation dependent.

CK_USER_TYPE

CK_USER_TYPE enumerates the types of Cryptoki users described in Section . It is defined as follows:

typedef enum CK_USER_TYPE {
CKU_SO, /* Security Officer */
CKU_USER /* Normal user */
} CK_USER_TYPE;

CK_STATE

CK_STATE enumerates the session states decribed in Sections and . It is defined as follows:

typedef enum CK_STATE {
CKS_RW_PUBLIC_SESSION,
CKS_RW_USER_FUNCTIONS,
CKS_RO_PUBLIC_SESSION,
CKS_RO_SO_FUNCTIONS,
CKS_RO_USER_FUNCTIONS
} CK_STATE;

CK_SESSION_INFO

CK_SESSION_INFO provides information about a session. It is defined as follows:


Field Documentation

CK_CHAR label[32]
 

application defined label, assigned during token initialization; must be padded with the blank character (' ').

CK_CHAR manufacturerID[32]
 

ID of the device manufacturer; must be padded with the blank character (' ').

CK_CHAR model[16]
 

model of the device; must be padded with the blank character (' ').

CK_CHAR serialNumber[16]
 

character-string serial number of the device; must be padded with the blank character (' ').

CK_FLAGS flags
 

bit flags indicating capabilities and status of the device as defined below.

CK_USHORT usMaxSessionCount
 

maximum number of sessions that can be opened with the token at one time.

CK_USHORT usSessionCount
 

number of sessions that are currently open with the token.

CK_USHORT usMaxRwSessionCount
 

maximum number of read/write sessions that can be opened with the token at one time.

CK_USHORT usRwSessionCount
 

number of read/write sessions that are currently open with the token.

CK_USHORT usMaxPinLen
 

maximum length in bytes of the PIN.

CK_USHORT usMinPinLen
 

minimum length in bytes of the PIN.

CK_ULONG ulTotalPublicMemory
 

the total amount of memory in bytes occupied by public objects.

CK_ULONG ulFreePublicMemory
 

the amount of free (unused) memory in bytes for public objects.

CK_ULONG ulTotalPrivateMemory
 

the total amount of memory in bytes occupied by private objects.

CK_ULONG ulFreePrivateMemory
 

the amount of free (unused) memory in bytes for private objects.


RSA Security Inc. Public-Key Cryptography Standards - PKCS#11 - v100