Parameters
The parameter definitions for CSNBCPE.
For the definitions of the return_code, reason_code, exit_data_length, and exit_data parameters, see Parameters common to all verbs.
- PIN_encrypting_key_identifier
-
Direction: Input/Output Type: String A pointer to a string variable containing an operational fixed-length DES key-token, an operational variable-length CCA AES key token, an operational TR-31 AES or DES key token, or a key label of such a record in key storage. The key token contains the key that encrypts the PIN block.
When the PIN-block format of the PIN_profile variable does not specify ISO-4, identify a fixed-length CCA DES key token or a TR-31 DES key-token. For a CCA DES key token, it must have a key type of OPINENC. In addition, the control vector of the key token must have CV bit 18 = B’1’ (CPINENC).
For a TR-31 token, it must have the following attributes:
- TR-31 key usage: P0
- Algorithm: T
- TR-31 mode of key use: E
When the PIN-block format of the PIN_profile variable specifies ISO-4, identify a variable-length AES or TR-31 symmetric key-token. For a CCA AES key token, it must have a token algorithm of AES and a key type of PINPROT. In addition, the key usage fields must have the encryption operation set so that the key can be used for encryption but not decryption (ENCRYPT), the encryption mode set to Cipher Block Chaining (CBC), the function usage set so that the key can be used to encrypt a clear key (CPINENC), the common control usage set to NOFLDFMT, and the PIN-block format usage set to allow ISO-4.
For a TR-31 token, it must have the following attributes:
- TR-31 key usage: P0
- Algorithm: A
- TR-31 mode of key use: E
- rule_array_count
A pointer to an integer variable containing the number of elements in the rule_array variable. Valid values are 0 and 1.Direction: Input Type: Integer - rule_array
Keywords that provide control information to the verb. The keyword is left-aligned in an 8-byte field and padded on the right with blanks. All keywords must be in contiguous storage. The rule_array keywords are described in Table 1Direction: Input Type: String array Table 1. Keywords for Clear PIN Encrypt control information Keywords for Clear PIN Encrypt control information
Keyword Description Process Rule (Optional) ENCRYPT This is the default. Use of this keyword is optional. RANDOM Causes the verb to generate a random PIN value. The length of the PIN is based on the value in the clear_PIN variable. Set the value of the clear PIN to zero and use as many digits as the desired random PIN. Pad the remainder of the clear PIN variable with space characters. - clear_PIN
A 16-character string with the clear PIN. The value in this variable must be left-aligned and padded on the right with space characters.Direction: Input Type: String - PIN_profile
A 24-byte string containing three 8-byte elements with a PIN block format keyword, the format control keyword, NONE, and a pad digit as required by certain formats. See The PIN profile for additional information.Direction: Input Type: String array - PAN_data
A 12-byte PAN in character format or structure. The verb uses this parameter if the PIN_profile parameter specifies the ISO-0, ISO-3, ISO-4, or VISA-4 keyword for the PIN block format. Otherwise, ensure this parameter is a 12-byte variable in application storage. The information in this variable will be ignored, but the variable must be specified.Direction: Input Type: String When using the ISO-0 or ISO-3 keyword, use the 12 rightmost digits of the PAN data, excluding the check digit. When using the VISA-4 keyword, use the 12 leftmost digits of the PAN data, excluding the check digit.
When using the ISO-4 keyword, the value is a 21 byte structure. The PAN data is 10 – 19 bytes long. The length of the PAN data is a 2-byte integer (not printable characters) and the PAN data is contained in the structure shown in Table 3, which is padded to 21 bytes with characters that will be ignored.
Table 2 shows the length and the format of the PAN_data variable based on the PIN-block format specified in the PIN_profile variable:
Table 2. CSNBCPE PAN_data length and format PIN-block format Length of PAN_data variable Format of PAN_data variable ISO-0 or ISO-3 12 Contains the 12 rightmost digits of the PAN, ranging from 0 – 9 in ASCII character format. ISO-4 21 See Table 3 for the definition of the 21-byte structure for the PAN_data variable when the PIN-block format specifies ISO-4. Not ISO-0, ISO-3, or ISO-4 12 Specify a 12-byte variable that must be declared but is otherwise ignored. PIN-block format ISO-2 generation is not allowed when the Disallow ISO-2 PIN block generate command (offset X'0085') is enabled in the active role (Release 7.5 and 8.2 or later).
Table 3 shows the ISO-4 PAN data structure for CSNBCPE.
Table 3. CSNBCPE ISO-4 PAN data structure Offset (bytes) Length (bytes) Description 0 2 Big-endian length of ISO-4 PAN data, p, ranging from 10 – 19 (X’000A’ – X’0013’). 2 p ISO-4 PAN data (10 – 19 ASCII bytes ranging from '0' – '9'). 2 + p 19 – p Buffer pad characters that must be declared but are otherwise ignored.
For example, for 10-byte PAN data of "1234567890", p = 10 and length of buffer pad characters = 19 – p = 19 – 10 = 9. Assuming pad characters of X'00', the data structure in this example is:X'000A 31323334353637383930000000000000000000'- sequence_number
The 4-byte character integer. The verb currently ignores the value in this variable. For future compatibility, the suggested value is 99999.Direction: Input Type: Integer - encrypted_PIN_block
The field that receives the 8-byte encrypted PIN block.Direction: Output Type: String