Parameters

The parameters for CSNBKTP.

For the definitions of the return_code, reason_code, exit_data_length, and exit_data parameters, see Parameters common to all verbs.

key_token
Direction: Input
Type: String
The key_token parameter is a pointer to a string variable in application storage containing an external or internal key-token to be disassembled.
Note: You cannot use a key label for a key-token record in key storage. The key token must be in application storage.
key_type
Direction: Output
Type: String
The key_type parameter is a pointer to a string variable containing a keyword defining the key type. The keyword is eight bytes in length and must be left-aligned and padded on the right with space characters. Valid key_type keywords are shown here:

 CIPHER       CVARXCVL     DKYGENKY     MAC
 CIPHERXI     CVARXCVR     ENCIPHER     MACVER
 CIPHERXL     DATA         EXPORTER     OKEYXLAT
 CIPHERXO     DATAC        IKEYXLAT     OPINENC
 CVARDEC      DATAM        IMPORTER     PINGEN
 CVARENC      DATAMV       IPINENC      PINVER
 CVARPINE     DECIPHER     KEYGENKY     SECMSG

Key types are described in Types of keys.

rule_array_count
Direction: Input/Output
Type: Integer
A pointer to an integer variable containing the number of elements in the rule_array variable. This value must be a minimum of 4.

On input, specify the maximum number of usable array elements that are allocated. On output, the verb sets the value to the number of keywords returned to the application.

rule_array
Direction: Output
Type: String array
The rule_array parameter is a pointer to a string variable containing an array of keywords that expresses the contents of the key token. The keywords are eight bytes in length and are left-aligned and padded on the right with space characters. The rule_array keywords are described in Table 1.
Table 1. Keywords for Key Token Parse control information

Keywords for Key Token Parse control information

Keyword Description
Token type (One returned)
INTERNAL Specifies an internal key-token.
EXTERNAL Specifies an external key-token.
Key status (One returned)
KEY Indicates the key token contains a key. The key_value parameter contains the key.
NO-KEY Indicates the key token does not contain a key.
Key-wrapping method (One returned)
WRAP-ECB The wrapping method for this key is legacy.
WRAP-ENH The wrapping method for this key is enhanced.
WRAPENH2 The wrapping method for this key is enhanced. This enhanced method uses the SHA-256 hash algorithm. Only valid for three-key Triple-DES keys.
WRAPENH3 The wrapping method for this key is enhanced. This enhanced method uses the TDES-CMAC and SHA-256 hash algorithms.
Control vector (CV) status (One returned)
CV The key token specifies that a control vector is present. The verb sets the control vector variable with the value of the control vector found in the key token.
NO-CV The key token does not specify the presence of a control vector. The verb sets the control vector variable with the value of the control vector variable found in the key token.
The difference between Key Token Parse (CSNBKTP) and Control Vector Generate (CSNBCVG) is that Key Token Parse returns the rule_array keywords that apply to a parsed token, such as EXTERNAL, INTERNAL, and so forth. These rule_array parameters are returned in addition to key_type parameter. Refer to Key Token Build (CSNBKTB) and Key Token Build2 (CSNBKTB2) for keyword discussion.
AMEX-CSC          DKYL0      EPINGEN       KEYLN16       UKPT
ANSIX9.9          DKYL1      EPINGENA      LMTD-KEK      VISA-PVV
ANY               DKYL2      EPINVER       MIXED         WRAP-ECB
ANY-MAC           DKYL3      EXEX          NO-SPEC       WRAP-ENH
CLR8-ENC          DKYL4      EXPORT        NO-XPORT      XLATE
CPINENC           DKYL5      GBP-PIN       NOOFFSET      XPORT-OK
CPINGEN           DKYL6      GBP-PINO      NOT-KEK
CPINGENA          DKYL7      IBM-PIN       OPEX
CVVKEY-A          DMAC       IBM-PINO      OPIM
CVVKEY-B          DMKEY      IMEX          PIN
DALL              DMPIN      IMIM          REFORMAT
DATA              DMV        IMPORT        SINGLE
DDATA             DOUBLE     INBK-PIN      SMKEY
DEXP              DPVR       KEY-PART      SMPIN
DIMP              ENH-ONLY   KEYLN8        TRANSLAT       
key_value
Direction: Input
Type: String
The key_value parameter is a pointer to a string variable. If the verb returns the KEY keyword in the rule_array, the key_value parameter contains the 16-byte enciphered key.
masterkey_verification_pattern_v03
Direction: Output
Type: Integer
The masterkey_verification_pattern_v03 parameter is a pointer to an integer variable. The verb writes zero into the variable except when parsing a version X'03' internal key-token.
reserved_2/5
Direction: Output
Type: Integer
The reserved_2 and reserved_5 parameters are either null pointers or pointers to integer variables. If the parameter is not a null pointer, the verb writes zero into the reserved variable.
reserved_3/4
Direction: Output
Type: String
The reserved_3 and reserved_4 parameters are either null pointers or pointers to string variables. If the parameter is not a null pointer, the verb writes eight bytes of X'00' into the reserved variable.
reserved_6
Direction: Output
Type: String
The reserved_6 parameter is either a null pointer or a pointer to a string variable. If the parameter is not a null pointer, the verb writes eight space characters into the reserved variable.
control_vector
Direction: Output
Type: String
The control_vector parameter is a pointer to a string variable in application storage. If the verb returns the NO-CV keyword in the rule_array, the key token did not contain a control vector value and the control vector variable is filled with 16 space characters.
master_key_verification_pattern_v00
Direction: Output
Type: String
The master_key_verification_pattern_v00 parameter is a pointer to a string variable in application storage. For version 0 key-tokens that contain a key, the 8-byte master key version number is copied to the variable. Otherwise the variable is filled with eight space characters.