This service can be used to decrypt one or all of the following fields: the primary account number (PAN), the cardholder name, the track 1 discretionary data, or the track 2 discretionary data.
The callable service name for AMODE(64) invocation is CSNEFPED.
CALL CSNBFPED(
return_code,
reason_code,
exit_data_length,
exit_data,
rule_array_count,
rule_array,
enc_PAN_length,
enc_PAN,
enc_CH_name_length,
enc_CH_name,
enc_dtrack1_data_length,
enc_dtrack1_data,
enc_dtrack2_data_length,
enc_dtrack2_data,
key_identifier_length,
key_identifier,
derivation_data_length,
derivation_data,
clear_PAN_length,
clear_PAN,
clear_CH_name_length,
clear_CH_name,
clear_dtrack1_data_length,
clear_dtrack1_data,
clear_dtrack2_data_length,
clear_dtrack2_data,
DUKPT_PIN_key_identifier_length,
DUKPT_PIN_key_identifier,
reserved1_length,
reserved1,
reserved2_length,
reserved2)
| Direction | Type |
|---|---|
| Output | Integer |
The return code specifies the general result of the callable service. ICSF and cryptographic coprocessor return and reason codes lists the return codes.
| Direction | Type |
|---|---|
| Output | Integer |
The reason code specifies the result of the callable service that is returned to the application program. Each return code has different reason codes assigned to it that indicate specific processing problems. ICSF and cryptographic coprocessor return and reason codes lists the reason codes.
| Direction | Type |
|---|---|
| Input/Output | Integer |
The length of the data that is passed to the installation exit. The data is identified in the exit_data parameter.
| Direction | Type |
|---|---|
| Input/Output | String |
The data that is passed to the installation exit.
| Direction | Type |
|---|---|
| Input | Integer |
The number of keywords you supplied in the rule_array parameter. The minimum value is 5. The maximum value is 10.
| Direction | Type |
|---|---|
| Input | String |
| Keyword | Meaning |
|---|---|
| Processing method (required) | |
| VMDS | Specifies that the Visa DSP method (formally known as the Visa Merchant Data Secure method) is to be used for processing. |
| Key management method (one required) | |
| STATIC | Specifies the use of double length (2-key) triple-DES symmetric keys. This is a non-DUKPT key. |
| DUKPT | Specifies the use of the transaction unique general purpose Data Encryption Keys generated by the DUKPT process at the point of service for data encryption. This is required if VFPE mode is specified. Otherwise, this is optional. |
| Algorithm (required) | |
| TDES | Specifies the use of CBC mode triple-DES encryption. |
| Mode (one required) | |
| CBC | Specifies the user of CBC mode. This is the mode for the standard encryption option. |
| VFPE | Specifies the use of Visa format preserving encryption. |
| PAN input output character set (one required if the clear_PAN_length variable is greater than 0. Otherwise, it is not allowed.) | |
| PAN8BITA | Specifies that the PAN data character set is ASCII represented in binary form. Valid ASCII values are '0' through '9' (X'30' through X'39'). |
| PAN4BITX | Specifies that the PAN data character set is 4-bit hex. Two digits per byte. Valid 4-bit hexadecimal values are X'0' through X'9'. |
| Cardholder name input output character set (required if the clear_CH_name_length variable is greater than 0. Otherwise, it is not allowed.) | |
| CN8BITA | Specifies that the cardholder name character set is ASCII represented in binary format, one character per byte. See Table 3 for valid characters. |
| Track_1 input output character set (required if the clear_dtrack1_data_length variable is greater than 0. Otherwise, it is not valid.) | |
| TK18BITA | Specifies that the track 1 discretionary data character set is ASCII represented in binary format, one character per byte. See Table 3 for valid characters. |
| Track_2 input output character set (required if the clear_dtrack2_data_length variable is greater than 0. Otherwise, it is not valid.) | |
| TK28BITA | Specifies that the track 2 discretionary data character set is ASCII represented in binary format, one character per byte. Valid ASCII values are '0' - '9' (X'30' - X'39') and 'A' - 'F' (X'41' - X'46'. |
| PIN encryption key output selection (one, optional, if DUKPT is specified. Otherwise, it is not valid.) | |
| NOPINKEY | Do not return a DUKPT PIN encryption key. This is the default. |
| PINKEY | Return a DUKPT PIN encryption key. |
| PAN check digit compliance (one required if mode VFPE and the pan character set keyword is present. Otherwise, it is not allowed.) | |
| CMPCKDGT | Last digit of the PAN contains a compliant check digit per ISO/IEC 7812-1. |
| NONCKDGT | Last digit of the PAN does not contain a compliant check digit per ISO/IEC 7812-1. |
| Direction | Type |
|---|---|
| Input | Integer |
Specifies the number of bytes of data in the enc_PAN parameter if the mode is CBC or the number of PAN digits if the mode is VFPE. The value is 0 or 15 through 19 for VFPE. The value must be 0 or 16 if the standard option with CBC mode is selected. The value is zero when the PAN has not been presented for decryption.
| Direction | Type |
|---|---|
| Input | String |
The enciphered primary account number (PAN) that is to be decrypted. For VFPE mode, if the PAN contains an odd number of 4-bit digits, the data is left justified in the PAN variable and the right-most 4 bits are ignored.
| Direction | Type |
|---|---|
| Input | Integer |
Specifies the length in bytes of the enc_CH_name parameter. The input value is 0 or between 1 and 32, inclusive for VFPE. For the standard method, the input value is 0 or 2 through 32 for VFPE. For CBC mode, the input value is 0, 16, 24, 32, or 40. The value is zero when the cardholder name has not been presented for decryption.
| Direction | Type |
|---|---|
| Input | String |
The enciphered cardholder full name that is to be decrypted. Only characters in Table 3 are valid.
| Direction | Type |
|---|---|
| Input | Integer |
Specifies the length in bytes of the enc_dtrack1_data parameter. The input value is 0 or between 1 and 56 inclusive for VFPE. For the standard method, the input value is 0 or 1 through 56 for VFPE. For CBC mode, the input value is 0 or 16, 24, 32, 40, 48, 56, or 64. The value is zero when the track 1 discretionary data has not been presented for decryption.
| Direction | Type |
|---|---|
| Input | String |
The encrypted track 1 data that is to be decrypted. Only characters in Table 3 are valid.
| Direction | Type |
|---|---|
| Input | Integer |
Specifies the length in bytes of the enc_dtrack2_data parameter. The input value is 0 or 1 through 19 for VFPE. For mode CBC, the input value is 0, 8, or 16. The value is zero when the track 2 discretionary data is not been presented for decryption.
| Direction | Type |
|---|---|
| Input | String |
The encrypted track 2 data that is to be decrypted.
| Direction | Type |
|---|---|
| Input | Integer |
Specifies the length in bytes of the key_identifier parameter. The value must be 64 because only fixed length DES tokens are supported as the key identifier.
| Direction | Type |
|---|---|
| Input/Output | String |
The identifier of the key that is used to either decrypt the card data (key management STATIC) or derive the DUKPT_PIN_key_identifer (key management DUKPT). The key identifier is an operational token or the key label of an operational token in key storage.
If the token supplied was encrypted under the old master key, the token is returned encrypted under the current master key.
| Direction | Type |
|---|---|
| Input | Integer |
Specifies the length in bytes of the derivation_data parameter. The value must be 10 if a DUKPT key is specified in the key_identifier parameter. If a data encryption key is specified in the key_identifier parameter, this value must be set to zero.
| Direction | Type |
|---|---|
| Input | String |
Contains the 80 bit (10 byte) derivation data that is used as input to the DUKPT derivation process. The derivation data contains the current key serial number (CKSN), which is composed of the 59 bit initial key serial number value concatenated with the 21 bit value of the current encryption counter, which the device increments for each new transaction. This field is in binary format.
| Direction | Type |
|---|---|
| Input/Output | Integer |
Specifies the number of PAN digits in the clear_PAN parameter. This value must be 0 or between 15 and 19, inclusive on output.
| Direction | Type |
|---|---|
| Output | String |
The field where the deciphered primary account number is returned. The full account number, including check digit, is recovered. The data for this parameter is returned in binary format. It is the binary representation of 4-bit hex (keyword PAN4BITX) or ASCII (keyword PAN8BITA) as indicated by the supplied rule array keyword. The clear PAN is left justified in this field.
| Direction | Type |
|---|---|
| Input/Output | Integer |
Specifies the length in bytes of the clear_CH_name parameter. This output value is 0 or 2 through 32 on output. The variable can be larger on input. However, on output, this field is updated to indicate the actual number of bytes returned by the service.
| Direction | Type |
|---|---|
| Output | String |
The field where the deciphered cardholder full name is returned. The output data for this parameter is in binary format. It is the binary representation of ASCII as indicated by the supplied rule array keyword.
| Direction | Type |
|---|---|
| Input/Output | Integer |
Specifies the length in bytes of the clear_dtrack1_data parameter. The output value is 0 or 1 through 56. The value can be larger on input. However, on output, this field is updated to indicate the actual number of bytes returned by the service.
| Direction | Type |
|---|---|
| Output | String |
The field where the deciphered discretionary track 1 data is returned.
| Direction | Type |
|---|---|
| Input/Output | Integer |
Specifies the length in bytes of the clear_dtrack2_data parameter. The output value is 0 or 1 through 19. The value can be larger on input. However, on output, this field is updated to indicate the actual number of bytes returned by the service.
| Direction | Type |
|---|---|
| Output | String |
The field where the deciphered discretionary track 2 data is returned.
| Direction | Type |
|---|---|
| Input/Output | Integer |
Specifies the length in bytes of the DUKPT_PIN_key_identifier parameter. If the PINKEY rule-array keyword is specified, set this value to 64. Otherwise, set this value to 0. On output, the variable is updated with the length of the data returned in the DUKPT_PIN_key_identifier variable.
| Direction | Type |
|---|---|
| Input/Output | String |
On input, must contain a DES OPINENC or IPINENC skeleton token. On output, DUKPT_PIN_key_identifier contains the DES token with the derived DES OPINENC or IPINENC key.
| Direction | Type |
|---|---|
| Input | Integer |
Length in bytes of the reserved1 parameter. The value must be 0.
| Direction | Type |
|---|---|
| Input | String |
This field is ignored.
| Direction | Type |
|---|---|
| Input | Integer |
Length in bytes of the reserved2 parameter. The value must be 0.
| Direction | Type |
|---|---|
| Input | String |
This field is ignored.
SAF may be invoked to verify the caller is authorized to use this callable service, the key label, or internal secure key tokens that are stored in the CKDS.
The FPE decipher access control point in the domain role controls the function of this service.
This table lists the required cryptographic hardware for each server type and describes restrictions for this callable service.
| Server | Required cryptographic hardware | Restrictions |
|---|---|---|
IBM eServer zSeries |
This service is not supported. | |
IBM System z9 EC |
This service is not supported. | |
IBM System z10 EC |
This service is not supported. | |
IBM zEnterprise 196 |
This service is not supported. | |
IBM zEnterprise EC12 |
This service is not supported. | |
IBM z13 |
Crypto Express5 CCA Coprocessor |