Appendix C - Cryptography
IPAD, DynaPro, DynaPro Go, and DynaPro Mini| PIN Encryption Devices | Programmer’s Reference (Microsoft Windows Store)
Page 68
Msg[4] = 0;
Msg[5] = 6;
// Set KSN
Msg[6] = (byte)0xDF;
Msg[7] = (byte)0xDF;
Msg[8] = 0x54;
Msg[9] = 10;
Array.Copy(KSN,0,Msg,10,10);
// Set Encryption Type
Msg[20] = (byte)0xDF;
Msg[21] = (byte)0xDF;
Msg[22] = 0x55;
Msg[23] = 0x01;
Msg[24] = (byte)0x82;
// Set Serial Number
Msg[25] = (byte)0xDF;
Msg[26] = (byte)0xDF;
Msg[27] = 0x25;
Msg[28] = 0x08;
Array.Copy(SerialNumber, 0, Msg, 29, 8);
// Set Data
Msg[37] = 0xFA;
Msg[38] = 0x82;
Msg[39] = 0;
Msg[40] = 6;
Array.Copy(approve, 0, Msg, 41, 6);
byte[] OutputMsg;
int OutputMsgLen;
// Use CBC MAC to encrypt message and add MAC, reference to C.4
CBC_MAC(Msg, 47, out OutputMsg, out OutputMsgLen);
ipad.sendAcquirerResponse(OutputMsg, 52);
C.5.4
Device: OnEMVTransactionCompleteEvent
Host will receive callback event OnEMVTransactionCompleteEvent. In the callback, TLV data includes
the transaction result.
C.6
Reference Documents
DUKPT - ANSI x9.24
DES – FIPS 46-3
TDES – ANSI X9.52
MAC – ANSI X9.19