Get Track Binary From Card_Data; Get Key From Ksn; Use Triple Des Cbc To Decrypt Track Data - Magtek IPAD Programmer's Reference Manual

Pin encryption devices
Table of Contents

Advertisement

Appendix C - Cryptography
public byte Track1Status;
public byte Track2Status;
public byte Track3Status;
public byte EncTrack1Status;
public byte EncTrack2Status;
public byte EncTrack3Status;
public byte EncMPStatus;
public byte MSStatus;
public string MPSTS;
public string Track1;
public string Track2;
public string Track3;
public string EncTrack1;
public string EncTrack2;
public string EncTrack3;
public string EncMP;
public string KSN;
public string CBCMAC;
public string SerialNumber;
public byte PANInfoLength;
public string PANInfo;
public UInt32 reserved;
}
C.2.1 Get Track binary from CARD_DATA
First, convert EncTrack1, EncTrack2, EncTrack3 and KSN from hex string to byte array for further
calculation.
byte[] bKSN = ConvertHexStringToByteArray(CardData.KSN);
byte[] bEncTrack1 = ConvertHexStringToByteArray(CardData.EncTrack1);
byte[] bEncTrack2 = ConvertHexStringToByteArray(CardData.EncTrack2);
byte[] bEncTrack3 = ConvertHexStringToByteArray(CardData.EncTrack3);
C.2.2 Get Key from KSN
byte[] bDataKey;
// To get the bDataKey, reference to ANSI X9.24
C.2.3 Use Triple DES CBC to decrypt track data
Decrypt track data, use empty initial vector.
byte[] iv = new byte[8];
byte[] bDecTrack1 = new byte[bEncTrack1.Length];
TDES_Decrypt_CBC(bPinKey, iv, bEncTrack1, bEncTrack1.Length,
bDecTrack1, bDecTrack2);
IPAD, DynaPro, DynaPro Go, and DynaPro Mini| PIN Encryption Devices | Programmer's Reference (Microsoft Windows Store)
Page 65

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the IPAD and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

DynaproDynapro goDynapro mini

Table of Contents