You are here: D - Reference > CKDEMO command code examples > ckdemo menu

ckdemo menu

CKDemo is a utility provided to exercise the cryptoki API - called Chrystoki. CKDemo is a sample or demonstration utility that gives you the ability to perform operations based on the PKCS#11 API (including SafeNet Extensions to the PKCS#11 standard). This section assumes that you are familiar with PKCS#11. This section helps you become familiar with the operation of CKDemo (PKCS#11 functions, as well as Extension functions).

CKDemo is currently provided in console version, only. Below is a view of the CKDemo main menu.

 

TOKEN FUNCTIONS
( 1) Open Session  ( 2) Close Session  ( 3) Login
( 4) Logout        ( 5) Change PIN     ( 6) Init Token
( 7) Init Pin      ( 8) Mechanism List ( 9) Mechanism Info
(10) Get Info      (11) Slot Info      (12) Token Info
(13) Session Info  (14) Get Slot List  (15) Wait for Slot Event
(16) InitToken(ind)(17) InitPin (ind)  (18) Login (ind)
(19) CloneMofN

OBJECT MANAGEMENT FUNCTIONS
(20) Create object (21) Copy object    (22) Destroy object
(23) Object size   (24) Get attribute  (25) Set attribute
(26) Find object   (27) Display Object

SECURITY FUNCTIONS
(40)  Encrypt file (41) Decrypt file   (42)  Sign
(43)  Verify       (44) Hash file      (45)  Simple Generate Key
(46)  Digest Key

HIGH AVAILABILITY RECOVERY FUNCTIONS
(50) HA Init       (51) HA Login        (52) HA Status

KEY FUNCTIONS
(60) Wrap key      (61) Unwrap key     (62) Generate random number
(63) Derive Key    (64) PBE Key Gen    (65) Create known keys 
(66) Seed RNG      (67) EC User Defined Curves

CA FUNCTIONS
(70) Set Domain    (71) Clone Key      (72) Set MofN
(73) Generate MofN (74) Activate MofN  (75) Generate Token Keys
(76) Get Token Cert(77) Sign Token Cert(78) Generate CertCo Cert
(79) Modify MofN   (86) Dup. MofN Keys (87) Deactivate MofN 
(88) Get Token Certificates            (112) Set Legacy Cloning Domain

CCM FUNCTIONS

(80) Module List   (81) Module Info    (82) Load Module
(83) Load Enc Mod  (84) Unload Module  (85) Module function Call

OTHERS
(90) Self Test     (94) Open Access    (95) Close Access
(97) Set App ID    (98) Options       (100) LKM Commands

OFFBOARD KEY STORAGE:
(101) Extract Masked Object   (102) Insert Masked Object
(103) Multisign With Value    (104) Clone Object
(105) SIMExtract              (106) SIMInsert
(107) SimMultiSign            (118) Extract Object
(119) Insert Object

SCRIPT EXECUTION
(108) Execute Script
(109) Execute Asynchronous Script
(110) Execute Single Part Script

CLUSTER EXECUTION  
(111) Get Cluster State

PED INFO:
(120) Set Ped Info   (121) Get Ped Info  (122) Init RPV  
(123) Delete RPV    

SRK FUNCTIONS
(200) SRK Get State (201) SRK Restore (202) SRK Resplit
(203) SRK Zeroize    (204) SRK Enable/Disable

(0) Quit demo

(Shaded functions outdated/superseded, or not available with this product.)

To use ckdemo, start the program (by name), and when the menu appears, type the number of any of the commands and press [ENTER]. In general, if parameters or options are required, you are prompted.

Because most of the commands represent separate functions on an HSM, you may need to use more than one command to accomplish a task. For example, many of the commands require that you open a session on a "token slot" or Partition of the HSM. Other commands require that you first login to the HSM or Partition.

Functions that involve authentication or initialization of the HSM invoke the Luna PED for Trusted Path appliances. If the Luna PED is not connected and ready when a command is issued, the command eventually times out. If the Luna PED is connected and ready, it displays a prompt requesting the appropriate action. If you do not provide the requested PED Key or keypad press, the Luna PED eventually times out and returns an error to the calling application (in this case, ckdemo).

The individual ckdemo commands are described on the next page of this section.