Parameters

The parameter definitions for CSNBMKP.

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

rule_array_count
Direction: Input
Type: Integer
A pointer to an integer variable containing the number of elements in the rule_array variable. This value must be 1, 2, or 3.
rule_array
Direction: Input
Type: String array
The rule_array parameter is a pointer to a string variable containing an array of keywords. The keywords are eight bytes in length and must be left-aligned and padded on the right with space characters. The rule_array keywords are described in Table 1.
Table 1. Keywords for Master Key Process control information

Keywords for Master Key Process control information

Keyword Description
Cryptographic component (Optional)
ADAPTER Specifies the coprocessor. This is the default.
Master key register class (One, required)

See Note at the end of this table.

AES-MK Specifies operation with the AES master-key registers.
APKA-MK Specifies operation with the APKA master-key registers.
ASYM-MK Specifies operation with the asymmetric master-key registers.
SYM-MK Specifies operation with the symmetric master-key registers.
Master-key process (One, required)
CLEAR Specifies to clear the NMK register.
FIRST Specifies to load the first key_part.
MIDDLE Specifies to XOR the second, third, or other intermediate key_part into the NMK register.
LAST Specifies to XOR the last key_part into the NMK register.
SET Specifies to advance the CMK to the OMK register, to advance the NMK to the CMK register, and to clear the NMK register.
Master Key Verification Pattern Algorithm (One, optional).

The SET keyword operation takes action inside the CCA host library to obtain a verification pattern over the master key in the New Master Key (NMK) register. The NMK verification pattern is then passed to the CSNBMKP service with the SET keyword. The algorithm used for the verification pattern may be chosen with the keywords below. The use of the other CSNBMKP parameters is not changed by the choice of a keyword from this group and no extra data is returned. Some implementations may choose different methods based on compliance considerations. Valid only with SET.

CMACZERO Specifies to use the CMACZERO algorithm, as described for the Key Test2 (CSNBKYT2) service, for the NMK verification pattern.
ENC-ZERO Specifies to use the ENC-ZERO algorithm, as described for the Key Test2 (CSNBKYT2) service, for the NMK verification pattern. Only valid with SYM-MK and ASYM-MK.
LEGACY Specifies to use the legacy algorithm for the NMK verification pattern. The algorithm used is the default for the Key Test (CSNBKYT) service with the GENERATE keyword for the chosen master key. This is the default.
Note: The Master-key register class is not optional for Linux® on IBM® Z. There is no default for this environment. If a suitable keyword is not specified, return code 8 with reason code 33 is returned.
key_part
Direction: Input
Type: String
A pointer to a string variable containing a 168-bit or 192-bit clear key-part used when you specify one of the keywords FIRST, MIDDLE, or LAST. If you use the CLEAR or SET keywords, the information in the variable is ignored, but you must declare the variable.