Track 1 encrypted data, Track 2 encrypted data, Track 3 encrypted data – MagTek MagneSafe V5 User Manual

Page 20: Card status

Advertising
background image

MagneSafe V5

12

may vary. Therefore, the Input Report always contains the maximum amount of bytes that can
be encoded on the card and the number of valid bytes in each track is indicated by the Encrypted
Data Length
field.

The encrypted data from each track is decoded and converted to ASCII, and then is encrypted.
The encrypted track data includes all data starting with the start sentinel and ending with the end
sentinel. The encryption begins with the first 8 bytes of the clear text track data. The 8-byte
result of this encryption is placed in the Encrypted Data buffer for the corresponding track. The
process continues using the CBC (Cipher Block Chaining) method with the encrypted 8 bytes
XORed with the next 8 bytes of clear text. That result is placed in next 8 bytes of the Encrypted
Data
buffer and the process continues until all clear text bytes have been encrypted. If the final
block of clear text contains fewer than 8 bytes, it is padded with binary zeros to fill up the 8
bytes. After this final clear text block is XORed with the prior 8 bytes of encrypted data, it is
encrypted and placed in the Encrypted Data buffer. No Initial Vector is used in the process.

Decrypting the data must be done in 8 byte blocks, ignoring any final unused bytes in the last
block. See Appendix C. Guide on Decrypting Data for more information.

Track 1 Encrypted Data

This field contains the encrypted track data for track 1.

Track 2 Encrypted Data

This field contains the encrypted track data for track 2.

Track 3 Encrypted Data

This field contains the encrypted track data for track 3.

Card Status

For the swipe reader, this one byte field is reserved for future use. It is currently not used on the
swipe reader.

For the insert reader this field is defined as follows:

Bits

7-1

0

Value

Reserved

Card Inserted

This is a one-byte value, which indicates the card status. Bit position zero indicates that the card
was swiped in the insertion direction if it is set to 1. If it is set to 0, then the card was swiped in
the withdrawal direction. All other bit positions are reserved.

Advertising