Get dukpt ksn and counter, Set session id command – MagTek Bluetooth MagneSafe V5 Swipe Reader User Manual

Page 49

Advertising
background image

Section 5. Communications

41


Get DUKPT KSN and Counter

Command number:

0x09

Description:

This command is used to report the Key Serial Number and Encryption
Counter.


Data structure:

No data is sent with this command.
Response Data:

Offset

Field Name

Description

0

Current Key
Serial Number

This eighty-bit field includes the Initial Key Serial
Number in the leftmost 59 bits and a value for the
Encryption Counter in the rightmost 21 bits.

Result codes:

0x00 (Success)
0x02 (Bad Parameters – the Request Data is not a correct length)


Example Get DUKPT KSN and Counter Request (Hex):

Cmd Num

Data Len

Data

09

00

none


Example Get DUKPT KSN and Counter Response (Hex):

Result Code Data Len

Data

00

0A

FFFF 9876 5432 10E0 0001


SET SESSION ID COMMAND

Command number:

0x0A

Description:

This command is used to set the current Session ID. The new Session ID
stays in effect until one of the following occurs:
1. Another Set Session ID command is received.
2. The reader is powered down.
3. The reader is put into Suspend mode.

The Session ID is used by the host to uniquely identify the present
transaction. Its primary purpose is to prevent replays. After a card is read,
the Session ID will be encrypted, along with the card data, a supplied as
part of the transaction message. The clear text version of this will never
be transmitted.


Data structure:

Request Data:

Offset

Field Name

Description

0

New Session ID

This eight-byte field may contain any value the
application wishes.

Response Data: None

Result codes:

0x00 (Success)
0x02 (Bad Parameters – the Request Data is not a correct length)

Advertising