4 - Command Set
DynaPro Go| Handheld PIN Pad Device with MSR/Contact/Contactless | Programmer’s Manual (COMMANDS)
Page 38 of 247 (
D998200136-31
)
AAAA /* 2-byte MSB message length excluding padding and CBC-MAC */
F9<len> /* container for MAC structure and generic data */
DFDF54(MAC KSN)<len><val>
DFDF55(MAC Encryption Type)<len><val>
DFDF25(IFD Serial Number)<len><val>
<Nested TLV data objects specific to the message>
<Padding to force F9 plus padding to be a multiple of 8 bytes>
<Four byte CBC-MAC>
The host and device construct and send the full F9-based message as follows:
The first two bytes of the message are in big-endian order (MSB first) not in TLV format, and
indicate the length of the full F9 object, starting with the F9 byte at the beginning, and ending at the
last byte of the F9 data object’s final nested child. By definition, this excludes any added padding
and the CBC-MAC itself at the end of the message (both described later).
The F9 data object is populated with nested TLV data objects as specified by the command, response,
or data format’s documentation. In general:
o
If the MAC is generated using a DUKPT key, F9 will include nested TLV data object
DFDF54 specifying the KSN for the DUKPT working key used to generate the MAC. If the
MAC is generated using a fixed key, F9 will not include DFDF54.
o
F9 will always include nested TLV data object DFDF55 containing a MAC Encryption Type,
which specifies which key and variant was used to generate the MAC. See the definition of
DFDF55 in
Appendix D MagTek Custom EMV Tags (EMV Only)
valid values.
o
F9 will always include nested TLV data object DFDF25 containing the device’s unique IFD
Serial Number, which the host can read from the device. See
for details about retrieving tags.
The end of the message outside the F9 data object is padded to ensure that the length of data, starting
with the F9 byte at the beginning, and ending with any additional padding, is a multiple of 8 bytes.
This is a requirement of using the CBC-MAC algorithm.
Using the key specified in the message’s documentation, the CBC-MAC is calculated over the block
of data that starts with the message length at the very beginning, through the last byte of any
additional padding. This yields an 8-byte CBC-MAC.
The final 4 bytes of the message are populated with the most significant 32 bits of the 8-byte CBC-
MAC, not in TLV format.
If the host is sending the message, it will send it to the device using
. If the device is sending the message as part of a response or report, it will
Report 0x29 - Send Big Block Data to Host