Get encryption counter command, Encrypt bulk data command – MagTek iDynamo MagneSafe V5 User Manual
Page 44

iDynamo MagneSafe V5 Communication Manual
38
Result Code Data Len
Data
00
02
00 00
Get Encryption Counter Command
Command number:
0x1C
Description:
This command is used to Get the Encryption Counter. The Encryption
Counter gives the maximum number of transactions that can be performed
by the reader. A transaction is either an encrypted card swipe or a
correctly completed Activation Sequence (Activate Authenticated Mode
followed by correct Activation Challenge Reply).
The Encryption Counter has three possible states:
1. Disabled – value 0xFFFFFF – In this state there is no limit to the number of
transactions that can be performed.
2. Expired – value 0x000000 – This state indicates that all transactions are prohibited
3. Active – value 1 to 1,000,000 (0x000001 to 0x0F4240) – In this state, each
transaction causes the Encryption Counter to be decremented and allows transactions
to be processed. If an Activation Sequence decrements the Encryption Counter to 0, a
last encrypted card swipe will be permitted.
Request Data: None
Response Data:
Offset Field Name
Description
0
Device Serial #
16 bytes, if DSN is shorter than 15 bytes, left justify
and fill with binary zeroes. At least one byte (usually
the last one) must contain binary zero.
16
Actual Encryption
Counter
This three byte field returns the current value of the
Encryption Counter.
Result codes: 0x00 Success
0x02 Invalid length
Example Get Encryption Counter Request (Hex):
Cmd Num
Data Len
Data
1C
00
Example Get Encryption Counter Response (Hex) - Encryption Counter is 2033:
Result Code Data Len
Data
00
13
54455354205345545550203030303100
0007F1
Encrypt Bulk Data Command
Command number:
0x30
Description:
This command will encrypt up to a maximum of 120 bytes. The Data-
Response variant of the DUKPT key will be used to encrypt data. It will
also compute a MAC for the S/N, Num Bytes Encrypted, KSN and
Cryptogram. Data to be encrypted that are not a multiple of 8 bytes will
be padded with NULLs to be a multiple of 8.