• No results found

PIN Offset Generation

In document Safenet Programmers Guid (Page 126-133)

PIN-OFF

PHW D

SHP D

PSO/PSG D

SHP Toolkit MK2 D

Card Issuance (SHP Toolkit EMV) D

Request Content Length Attribute Description

EE0604 3 h Function Code FM 1 h Function Modifier = 00

ePPK(PIN) 8 x PIN Block encrypted under PPK PPK-Spec Var K-Spec Key specifier for PPK

(Formats: 0 - 3, 10, 11, 13, 20, 90) PF 1 h PIN Block Format

ANB 6 d Account Number Block PVK-Spec Var K-Spec Key specifier for PVK

(Formats: 0 - 3, 11, 12, 13, 14) Validation Data 8 h Validation Data

Response Content Length Attribute Description

EE0604 3 h Function Code rc 1 h Return Code Offset 6 h Offset for the PIN PINLEN 1 h Length of returned PIN

This function calculates an IBM 3624 Offset for a PIN and also provides the length of the PIN. The PIN is supplied in encrypted form, using any of the PIN Block formats specified in Appendix A.

PPK-Spec May be any valid key specifier for a PPK. Consequently, the function supports an encrypted PIN Block encrypted using a single-length or double-length HSM-stored or host-stored key.

PF Supports PIN formats: 01, 03, 08, 09, 10, 11, and 13.

ANB Account Number Block, which is the right most 12 digits of the Primary Account Number (PAN), excluding the check digit.

Validation Data Data, which is usually a part of the PAN, and is used in the calculation of the reference PIN.

The function will fail with Error Code 78 if PF indicates a PIN block format that is disabled.

The function performs a check that the ANB field and the Validation field contain a number of consecutive digits in common. The number of digits to check is in the range 0 to 12, as may be specified using a console operation, and defaults to 8. If the number of digits to check has been set

Mark II Programmers Guide Chapter 11 PIN Management Functions

NOTE

This function includes all the capabilities of the following existing functions, and therefore supercedes the following

PIN-OFF-AS (6A), PIN-OFF-PP (6B) SHP Toolkit MK2

int EFT_EE0604_CalculateIBMOffset_EncPIN(

IN UCHAR FM,

IN UCHAR ePPK_PIN[8],

IN KEYSPEC *PPK,

IN UCHAR PF,

IN UCHAR ANB[6],

IN KEYSPEC *PVK,

IN UCHAR pan[8],

OUT UCHAR offset[6],

OUT UCHAR *PinLen);

Mark II Programmers Guide Chapter 11

Card Issuance (SHP Toolkit EMV) D

Request Content Length Attribute Description

EE0609 3 h Function Code FM 1 h Function Modifier = 00

PVK Var K-Spec Key specifier for PVK/DT used in the regeneration of the reference PIN.

(Formats: 0 - 3, 11, 12, 13, 14) Validation Data 8 h Validation Data

Offset 6 h Offset Data Primary Account Number (PAN), excluding the check digit

Response Content Length Attribute Description

EE0609 3 h Function Code rc 1 h Return Code ePPK(PIN) 8 x Encrypted PIN Block

This function calculates a PIN from a supplied IBM 3624 Offset for a PIN and returns the PIN encrypted using the supplied PPK from the request. The PIN is returned in encrypted form, using the PIN format specified in the request (PFo). The PIN Block format for output is represented in the request using PFo and can be any of the PIN Block formats indicated below.

PVK PVK-Spec may be key specifier formats: HSM-stored (0-3) and stored 13 and 14. When the key specifier format is Host-stored 13 or 14, then PVK is encrypted with KMv7. PVK key specifier represents the PVK and associated Decimalization Table and is used with the IBM offset supplied in the request to

regenerate the PIN.

Validation data Validation Data, which is usually a part of the Primary Account Number (PAN), and is used in the calculation of the reference PIN.

Offset Offset, consists of up to 12 nibbles of offset data. The significant nibbles must be left-justified in the field. For example, if the offset

Mark II Programmers Guide Chapter 11 PIN Management Functions

PPK PPK-Spec may be key specifier formats: HSM-stored (0-3) and stored 11 and 13. When the key specifier format is Host-stored 11 and 13, then PPK is encrypted with KMv1.The function supports HSM-stored single-length and double-length DES keys, host-stored double-length DES keys

PFo PFo Supports PIN formats: 01, 10, 11 and 13.

ANB Account Number Block, which is the right-most 12 digits of the Primary Account Number (PAN), excluding the check digit.

The function will fail with Error Code 78 if PFo indicates a PIN block format that is disabled.

NOTES

• Calculation of an IBM offset is unrelated to PIN Block formats.

• A Derived PIN may also be generated by this method if an Offset of all zeros is used.

SHP Toolkit MK2

int EFT_EE0609_CalculatePINFromOffset(

IN UCHAR FM,

IN KEYSPEC *PVK,

IN UCHAR Validation_Data[8],

IN UCHAR Offset[6],

IN UCHAR Pin_Length,

IN KEYSPEC *PPK,

IN UCHAR PFo,

IN UCHAR ANB[6],

OUT UCHAR ePPK_PIN[8]);

Mark II Programmers Guide Chapter 11 PIN Management Functions

Generate KM-encrypted PIN

PHW D

SHP D

PSO/PSG D

SHP Toolkit MK2 D

Card Issuance (SHP Toolkit EMV) D

Request Content Length Attribute Description

EE0640 3 h Function Code FM 1 h Function Modifier = 00 PIN Len 1 h Length of PIN ( 04 - 12)

ANB 6 h Account Number Block:

Response Content Length Attribute Description

EE0640 3 h Function Code rc 1 h Return Code

PIN-Spec Var K-Spec KM-encrypted PIN Block (Format: 1A)

This function generates a random PIN of the specified length and creates a format 1A key specifier, as defined in Chapter 2.

The function will fail with Error Code 78 if PIN block format ISO-3 is disabled.

SHP Toolkit MK2

int EFT_EE0640_GEN_KM_ENC_PIN(

IN UCHAR FM,

IN UCHAR PINLen,

IN UCHAR ANB[6],

OUT KEYSPEC *eKM_PIN);

Mark II Programmers Guide Chapter 11 PIN Management Functions

Print a KM-encrypted PIN

PHW D

SHP D

PSO/PSG U

SHP Toolkit MK2 D

Card Issuance (SHP Toolkit EMV) D

Request Content Length Attribute Description

EE0641 3 h Function Code FM 1 h Function Modifier = 00 PIN-Spec Var K-Spec KM-encrypted PIN Block

(Format: 1A)

ANB 6 h Account Number Block PAN 8 h Primary Account Number.

Content is significant only if PAN print is selected in PIN Mail control screen.

Data Sets 1 h Repeat count for the following data sets.

Line No 1 h Column No 1 h

This set of fields specifies data to be printed at a given line and column.

Data Var h The set of fields is optional and may be repeated multiple times, as specified by the Data sets field, causing 0, 1 or more data fields to be printed

Response Content Length Attribute Description

EE0641 3 h Function Code rc 1 h Return Code

This function prints a KM-encrypted PIN.

NOTE

The function performs the same process as PIN-PRINT (EE0E05). The only difference is the form of the encrypted PIN input to the function.

The function will fail with Error Code 78 if PIN block format ISO-3 is disabled.

SHP Toolkit MK2

Mark II Programmers Guide Chapter 11 PIN Management Functions

_IN EFTBUFFER *Data2,

_IN UCHAR *LineNo3,

_IN UCHAR *ColumnNo3,

_IN EFTBUFFER *Data3,

_IN UCHAR *LineNo4,

_IN UCHAR *ColumnNo4,

_IN EFTBUFFER *Data4,

_IN UCHAR *LineNo5,

_IN UCHAR *ColumnNo5,

_IN EFTBUFFER *Data5,

_IN UCHAR *LineNo6,

_IN UCHAR *ColumnNo6,

_IN EFTBUFFER *Data6,

_IN UCHAR *LineNo7,

_IN UCHAR *ColumnNo7,

_IN EFTBUFFER *Data7,

_IN UCHAR *LineNo8,

_IN UCHAR *ColumnNo8,

_IN EFTBUFFER *Data8,

_IN UCHAR *LineNo9,

_IN UCHAR *ColumnNo9,

_IN EFTBUFFER *Data9,

_IN UCHAR *LineNo10,

_IN UCHAR *ColumnNo10,

_IN EFTBUFFER *Data10);

Mark II Programmers Guide Chapter 11

In document Safenet Programmers Guid (Page 126-133)