Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This document describes how to communicate with iDynamo 5 Gen III secure card reader (SCR) equipped with the MP application specific integrated circuit (ASIC).
MagTek provides convenient software development kits (SDKs) and corresponding documentation for various programming languages and operating systems. The API libraries included in the SDKs wrap the details of the connection in an interface that conceptually parallels the device’s internal operation, freeing software developers to focus on the business logic, without having to deal with the complexities of platform APIs for connecting to the various available connection types, communicating using the various available protocols, and parsing the various available data formats. Information about using MagTek wrapper APIs is available in separate documentation, including D99875535 Secure Card Reader Authenticator API PROGRAMMING REFERENCE MANUAL.
The SDKs and corresponding documentation include:
Functions for sending the direct commands described in this manual
Wrappers for commonly used commands that further simplify development
Sample source code to demonstrate how to communicate with the device using the direct commands described in this manual
To download the SDKs and documentation, search for “SDK” and select the SDK and documentation for the programming languages and platforms you need, or contact MagTek Support Services for assistance.
Software developers also have the option to revert to direct communication with the device using libraries available in the chosen development framework. For example, custom software written in Visual Basic or visual C++ may make API calls to the standard Windows USB HID driver. This document provides information and support for developing host software using that method.
MagTek has also developed software that demonstrates direct communication with the device, which software developers can use to test the device, and which provides a starting point for developing other software. For more information, see the MagTek web site, or contact your reseller or MagTek Support Services.
The general terms “device” and “host” are used in different, often incompatible ways in a multitude of specifications and contexts. For example, “host” may have different a meaning in the context of USB communication than in the context of networked financial transaction processing. In this document, “device” and “host” are used strictly as follows:
Device refers to the Secure Card Reader Authenticator (SCRA) that receives and responds to the command set specified in this document; device refers to iDynamo 5 Gen III.
Host refers to the piece of general-purpose electronic equipment the device is connected or paired to, which can send data to and receive data from the device. Host types include PC and Mac computers/laptops, tablets, smartphones, teletype terminals, and even test harnesses. In many cases the host may have custom software installed on it that communicates with the device. When “host” must be used differently, it is qualified as something specific, such as “acquirer host” or “USB host.”
Similarly, the word “user” is used in different ways in different contexts. This document separates users into more descriptive categories:
Because some connection types, payment brands, and other vocabulary name spaces (notably Bluetooth® (LE), EMV, smart phones, and more recent versions of Windows) use very specific meanings for the term “Application,” this document favors the term software to refer to software on the host that provides a user interface for the operator.
The combination of device(s), host(s), software, firmware, configuration settings, physical mounting and environment, user experience, and documentation is referred to as the solution.
The cardholder
The operator (such as a cashier, bank teller, customer service representative, or server), and
The developer or the administrator (such as an integrator configuring the device for the first time).
REGISTERED TO ISO 9001:2015
Copyright © 2006 - 2024 MagTek, Inc.
Information in this publication is subject to change without notice and may contain technical inaccuracies or graphical discrepancies. Changes or improvements made to this product will be updated in the next publication release. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of MagTek, Inc.
MagTek® is a registered trademark of MagTek, Inc.
MagnePrint® is a registered trademark of MagTek, Inc.
MagneSafe® is a registered trademark of MagTek, Inc.
Magensa™ is a trademark of MagTek, Inc.
IntelliStripe® is a registered trademark of MagTek, Inc.
AAMVA™ is a trademark of AAMVA.
American Express® and EXPRESSPAY FROM AMERICAN EXPRESS® are registered trademarks of American Express Marketing & Development Corp.
D-PAYMENT APPLICATION SPECIFICATION® is a registered trademark to Discover Financial Services CORPORATION
ANSI®, the ANSI logo, and numerous other identifiers containing "ANSI" are registered trademarks, service marks, and accreditation marks of the American National Standards Institute (ANSI).
ISO® is a registered trademark of the International Organization for Standardization.
UL™ and the UL logo are trademarks of UL LLC.
PCI Security Standards Council® is a registered trademark of the PCI Security Standards Council, LLC.
Apple Pay®, iPhone®, iPod®, and Mac® are registered trademarks of Apple Inc., registered in the U.S. and other countries. App StoreSM is a service mark of Apple Inc., registered in the U.S. and other countries. iPad™ and iPad mini™ are trademarks of Apple, Inc. Apple and MFi are registered trademarks of Apple Inc. IOS is a trademark or registered trademark of Cisco in the U.S. and other countries and is used by Apple Inc. under license.
Google Play™ store and Android™ platform are trademarks of Google Inc.
Microsoft® and Windows® are registered trademarks of Microsoft Corporation.
USB (Universal Serial Bus) Specification is Copyright © 1998 Compaq Computer Corporation, Intel Corporation, Microsoft Corporation, NEC Corporation.
Keyboard Usage Definitions content is taken from Universal Serial Bus HID Usage Tables, Version 1.12, Section 10, Keyboard/Keypad Page (0x07) ©1996-2005 USB Implementers’ Forum
Modifier Byte Definitions content is taken from Section 8.3 Report Format for Array Items, Device Class Definition for Human Interface Devices (HID) Version 1.11, ©1996-2001 USB Implementers’ Forum, .
Some device icons courtesy of , used under the Creative Commons Attribution-NoDerivs 3.0 license.
All other system names and product names are the property of their respective owners.
Table 0‑1 - Revisions
102
June 12, 2024
Add 6.31.1 BYTE Description
103
November, 2024
Add Property 0x15 – MP Options (MAC MREQMK); Add Property 0x54 - Card Data Encryption Variant (MAC MREQMK); Add Property 0x6E - Mask Service Code (Set Mask Service Code Only), add Property 0x81 – Mode of Operation (MAC MREQMK); add Property 0x83 – QWANTUM Secure Data Butter (MAC MREQMK) Property 0x85 Keyset ID; Add: Command 0x788 – Get Certificate, Command 0x789 – Get Device CSR, Command 0x78A – Load Certificate, Command 0x78B – Authenticate Device, Command 0x07E0 – Set Button Mode (MAC Protected).
104
May, 2026
Added missing descriptions - Notification Identifier, Q001/Q002/Q003 message definition.
Added the difference between PCI device PAN masking and Non-PCI device PAN masking.
Updated the description of Property 0x07 and 0x08 for Non-PCI device and PCI device.
Rev Number
Date
Notes
100
March 15, 2024
Initial release.
101
May 05, 2024

Add Property 0x88 USB Packet Delay
Added a missing property (0x51).
Removed factory-only commands.
Fixed typos and formats.
This command lets the host retrieve a property (see section on properties) from the device using the 1-byte Property ID.
Command
Parameter Data Len
Parameter Data
0x0000
0x0001
Property ID (1-byte)
Legacy (if needed) for simple & short properties.
This command sets a property in the device. For secure properties, this command should be the payload for the Send Secured Command.
This command is used to reset the device.
The host uses this command to get the date / time from the device’s internal clock. The value returned is set to Coordinated Universal Time (UTC). The host is responsible for converting the response to local time.
This command returns the information about the specified key to the host.
This command is used to activate or deactivate the button. The command is rejected if the device is not in Qwantum mode. The button always defaults to disabled after reset or when switching modes.
1
Hour
Value from 0x00...0x17 (0-23)
1
Minute
Value from 0x00...0x3B (0-59)
1
Second
Value from 0x00...0x3B (0-59)
1
Unused
0x00
1
Year
Value from 0x00 (2008) ...0xFF (2263)
2
TK ID
(2 byte)
The Key ID used to transport this key (a parent key ID)
9
Key Algorithm
(1 byte)
1 = DES 4 = AES128
2 = 2TDES 5 = AES192
3 = 3TDES 6 = AES256
10
KCV
(5 or 3 bytes)
5 bytes for AES-CMAC or 3 bytes for TDES-CBCMAC including the KCV algorithm info as defined in X9.143 ‘KP’/’KC’ format (A.5.8 of X9.143 spec)
15 or 13
Length of KSI
(1 bytes)
Length of Key Set Identifier
16 or 14
Key Set Identifier
(n bytes)
Encoded in Hex-ASCII refer to Table 11 in X9.143 specification.
(16 + n) or
(14 + n)
Key Restriction
(2 bytes)
16-bit Key Restriction Bitmask (for TK and DKPT keys)
(16 + n + 3) or
(14 + n + 3)
Key Configuration
(2 bytes)
16-bit Key Configuration Bitmask
Currently supports Data Type Configuration only.
(16 + n + 4) or
(14 + n + 4)
Timestamp
(24 bytes)
Time and date in UTC time format that indicates when the key block was formed.
Return Code
Response Data Len
Response Data
0x0000
varies
Property Value
Command
Parameter Data Len
Parameter Data
0x00
0x01
Property ID (1-byte)
Return Code
Response Data Len
Response Data
0x00
varies
0 to 58 bytes
Command
Parameter Data Len
Parameter Data
0x0001
varies
Property ID (1 byte)
Property Value (varies)
Return Code
Response Data Len
Response Data
0x0001
0x0001
0=Property in effect
1=Needs reset
Command
Parameter Data Len
Parameter Data
0x0002
0x0000
None
Command
Parameter Data Len
Parameter Data
0x030D
0x0000
None
Return Code
Response Data Len
Response Data
0x0000
0x0007
See Table
Length
Field Name
Value
1
Month
Value from 0x01...0x0C (1-12)
1
Day
Command
Parameter Data Len
Parameter Data
0703
0x0002
Key ID
Offset
Field Name
Description
0
Key Slot Status
(1 byte)
0 = Empty
1 = Loaded (Purpose not assigned)
2 = Loaded & active
3 = Exhausted (End of DUKPT key sequence)
4 = Expired (RFU, cert status?)
0xFF = Not supported in this device
1
Slot Type
(1 byte)
Offset
Field Name
Description
4
Key Environment
(1 byte)
‘T’ for test or ‘P’ for production
5
X9.143 Attributes
(4 bytes)
Command
Parameter Data Len
Parameter Data
0x07E0
0x0001
0x00 – Disable button
The push-button functionality is disabled.
0x01 – Enable button
The push-button functionality is enabled, allowing the operator to output buffer data by pressing the button. The functionality remains active until a command is issued to disable it or the device is power cycled.
0x02 – Enable button for single press
The push-button functionality is enabled, allowing the operator to output buffer data by pressing the button once. The functionality will be disabled automatically afterward or upon power cycling.
0x03 – Enable Button Persistently
The push-button functionality is enabled, allowing the operator to output buffer data by pressing the button. The push-button activation persists even after a power cycle. The functionality remains active until a command is issued to disable it.
Value from 0x01...0x1F (1-31, depends on the month)
First byte of Slot ID (Slot ID = Key ID)
‘Key Usage || Algorithm || Mode of Use’ from X9.143 Key Block Header.
Yes
Set Property:
Yes
Default Value:
0x7C (‘|’)
If the value is 0, the device does not send a delimiter which is not recommended.
Property ID:
0x24
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
The device uses this character for the Track 1 start sentinel when it recognizes the track is encoded in the standard ISO format for Track 1.
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
Set Property:
Yes
The device uses this character for the Track 2 start sentinel when it recognizes the track is encoded in the standard ISO format for Track 2.
Property ID:
0x26
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
The device uses this character for the Track 3 start sentinel when it recognizes the track is encoded in the standard ISO format for Track 3.
Property ID:
0x27
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
The device uses this character for the Track 3 start sentinel when it recognizes the track is encoded in the standard Track 3 AAMVA format.
Property ID:
0x28
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
The device uses this character for the Track 2 start sentinel when it recognizes the track is encoded in the 7-bit ISO format, normally used for Track 1.
Property ID:
0x29
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
The device uses this character for the Track 3 start sentinel when it recognizes the track is encoded in the 7-bit ISO format, normally used for Track 1.
Property ID:
0x2B
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
The device uses this character for all track end sentinels.
Property ID:
0x31
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
This property designates whether cards which do not decode as either ISO/ABA (Financial) or AAMVA (Driver License) format should be sent with their data masked or unmasked. The default value (0x00) is to send the data unmasked. If this property is set to 0x01, the device sends the track(s) to the host using a “0” for each byte of track data the device reads from the card.
If a card is encoded according to ISO/ABA rules (Track 1 in 7-bit format, Tracks 2 and Track 3 in 5-bit format), and it’s not a QWANTUM card, and Track 1 does not begin with the character ‘B’, the device always sends the Track 1 Masked Data value unmasked, regardless of the value of this property.
An AAMVA card is typically used for Drivers Licenses and ID cards.
Property ID:
0x34
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
0 = Sends masked AAMVA card data.
1 = Sends clear AAMVA card data.
Property ID:
0x3A
Property Type:
String
Length:
varies
Get Property:
Yes
This read-only property returns the boot firmware part number, a dash, the major and minor revision number, followed by a dash and the firmware type.
Property ID:
0x51
Property Type:
String
Length:
0..51 byte
Get Property:
Yes
The device and host software use this value as part of the iAP2 connection process. The value of this property is generally the device purchaser’s or host software developer’s reverse DNS name in all uppercase and must be specified by the purchaser and set by the manufacturer during manufacturing configuration. For further details about the requirements, purpose, and use of this property, see ExternalAccessoryProtocolName in Apple’s software developer documentation.
Property ID:
0x53
Property Type:
Binary
Length:
1 byte
Get Property:
Yes
This property controls how long the device pauses between each key report. This delay can be adjusted between 0 and 250 milliseconds. Some host devices cannot handle full speed keyboard input without dropping key presses, so delays can be added. The time needed to send the entire message also increases.
Property ID:
0x54
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
This property specifies which variant of the current TDES DUKPT Key the device uses to encrypt card data.
0x00 = Use PIN Encryption variant (Ignored when using an AES DUKPT key)
0x01 = Use Data Encryption, request or both ways variant
Property ID:
0x23
Property Type:
Character
Length:
1 byte
Get Property:
{boot fw pn}-{rev}-PCI
Example: 1000004854-AA0-PCISet Property:
Yes
Default Value:
0x25 (‘%’)
Default Value:
0x3B (‘;’)
Set Property:
Yes
Default Value:
0x2B (‘+’)
Set Property:
Yes
Default Value:
0x23 (‘#’)
Set Property:
Yes
Default Value:
0x40 (‘@’)
Set Property:
Yes
Default Value:
0x26 (‘&’)
Set Property:
Yes
Default Value:
0x3F (‘?’)
Set Property:
Yes
Default Value:
0x00 (Don’t Mask Other cards)
Set Property:
Yes
Default Value:
0x00
Set Property:
No
Default Value:
N/A
Set Property:
Yes (secure MAC)
Default Value:
com.magtek.idynamo
Set Property:
Yes
Default Value:
0x04 (4 ms)
Set Property:
Yes (Secure MAC)
Default Value:
0x01 (Data Variant)
iDynamo 5 Gen III connects to iOS products via a USB-C or Lighting to USB-C cable.
This section provides information about developing an iOS app that interfaces with the device via the Lightning or USB connector using iPod Accessory Protocol 2 (iAP2). For sample code and other supporting materials, see DYNAMAX / EDYNAMO / UDYNAMO / ADYNAMO / IDYNAMO / KDYNAMO / SDYNAMO / TDYNAMO SDK FOR IOS (WEB), available from MagTek.
To develop host software for an iOS host that connects to the device, you must know the following device properties, which are specified by the purchaser when ordering, and loaded by the manufacturer:
protocolString, also known as the SDK Protocol, usually in the form of a reverse DNS string unique to the host software developer or the device purchaser.
The host software project must include the protocolString in its .plist file before compiling. Spelling, including punctuation and capitalization, must exactly match the protocolString of the device.
The host software should initiate a connection to the device using the iOS SDK’s External Accessory Framework (for sample code, see Apple’s EADemo app). Upon establishing the connection, the host can begin exchanging data with the device.
This USB device conforms to the USB specification revision 2.0 and Human Interface Device (HID) class specification version 1.11. The device is set up as a full-speed, high-powered USB device that draws power from the USB bus. iDynamo5 Gen III identifies itself to the USB host with MagTek’s vendor ID 0x0801 and Product ID (PID) of 0x0020. All USB enumeration will include the device serial number.
HID reports used by the host can be divided into two types:
Feature Reports, which the host uses to send commands to the device and receive responses using Get Feature and Set Feature.
Input Reports are used by the device to send unsolicited notifications to the host when the device’s state changes, or to send asynchronous responses to the host when a command completes. The device commonly uses input reports when reporting card swipes, device events, or when a command takes more time for the device to process than is reasonable for the host to wait on a blocking call for the device to acknowledge completion.
A device in KB mode identifies itself to the USB host as a keyboard and transmits data to the host as ASCII as though it is being typed by a person on an actual keyboard. It does this by mapping each of the possible ASCII characters in the stream to keystrokes. To send an ASCII character to the host, the device looks up the ASCII character in the key and retrieves a combination of a single Key Usage which is a unique value assigned to every keyboard key, and a Key Modifier Byte and sends them to the host. The key modifier byte modifies the meaning of the key usage ID, by indicating whether any combination of the right or left Ctrl, Shift, Alt or GUI keys [as defined by Universal Serial Bus (USB) Device Class Definition for Human Interface Devices (HID)] are pressed at the same time as the key usage ID.
The device transmits ASCII 0 to 31 and 127 as their equivalent control code combinations. For example, for a carriage return value 13 (0x0D), the device appears to the host as a keyboard where a person very quickly presses and holds the Ctrl key, then presses the M key, then releases both keys.
When the keymap contains a Key Usage ID and Key Modifier Byte of 0xFF for the ASCII value the device wants to send, the device uses Alt ASCII code keystrokes instead of key map values, meaning it simulates holding down the Alt key on a keyboard and typing the three-digit decimal value of the ASCII character it wants to send. For example, to transmit the ASCII character ‘?’ (063 decimal in the ASCII table), the device sends keypad ‘0’ combined with the Left Alt key modifier, then keypad ‘6’ combined with the Left Alt key modifier, then keypad ‘3’ combined with the Left Alt key modifier.
Commands and Responses
Feature reports are used to send commands and receive responses, even when KB mode is active.
Notifications (RFU)
This section defines how the device communicates with the host over the USB HID interface.
The data transmitted in commands, responses, and notifications can be substantial, with a size limit of 64 kilobytes (64K bytes). However, the USB HID interface utilized by V5 restricts messages to 64 bytes. Therefore, to accommodate larger messages, we employ specific methods to segment them into multiple 64-byte packets. The segmentation approach varies depending on the message type to ensure compatibility with legacy V5. Below is the core structure of a USB HID packet.
The device makes data available to the host using one or more Input Reports over a USB Interrupt IN pipe. The host will poll the device at the configured Polling Interval to see if Input Reports are ready. The device must respond to polls with a USB NAK when no Input Reports are available.
Data Messages sent by the device use Input Report ID 0x01.
Notification Messages sent by the device use Input Report ID 0x02.
The host sends commands using a Set Feature Report and sends a Get Feature Report to the device to retrieve a synchronous response when appropriate. Feature reports use report ID 0x01.
The host should send both Feature Report types using the default Control pipe using a blocking call to the operating system’s native USB libraries. The device NAKs the Status page of a Set Feature Report until it finishes the requested operation, and if it does not respond, the operating system will generally time out and report failure. This method ensures that as soon as the device has fulfilled the command request embedded in the Set Feature Report, the host software can immediately call a follow-up Get Feature Report to retrieve the command.
In very rare cases, the host may simply send a Get Feature Report directly without a preceding Set Feature Report. The Commands documentation specifies these special cases if they exist.
Commands are sent to the device using USB Set Feature Reports using Report ID 1.
Sending commands to the device over a packeted interface (maximum parameter size is 64k (0xFFFF). Standard command format gets broken down into packets for interfaces that do not support unlimited length messages. This is compatible with the V5 extended command protocol.
The number ranges shown in packets assume the interface is USB with a maximum message size of 64 bytes.
The Command and Parameter Data length fields stay the same for all packets. Each packet will contain one segment of parameter data up to 52 bytes. The data offset indicates which portion of the parameter data is contained within this packet.
If the required Parameter Data is 52 bytes or shorter, the host can send the entire command using a single command packet. If the Parameter Data is longer than 52 bytes, the host should split the data into multiple packets of 52 or fewer bytes and send multiple command packets. Assuming 52-byte packets, the first packet the host sends should specify Data Offset = 0, the next packet should specify Data Offset = 52, and so on, until the host has sent all the Parameter Data. The device’s response to each packet contains either an extended command result code or a standard result code for the command that was sent:
A packet with Data Offset = 0 is considered the start of a new command. If there are still packets pending from a previous command, then that command is cleared, and all data received is erased.
The device will respond to packets with a 0x0B,0x00 when it expects additional packets (i.e., the length of parameter data received is less than the full parameter data length). When all data has been received, then the device will respond with a packet starting with 0x0A and include the response message for the command.
ACK Packet … Send next packet.
Result Code 0x0B - Protocol Request Pending indicates the device is buffering the incoming data and expects the host to send subsequent packets.
Error due to invalid or missing data or due to a timeout while the device is waiting for more packets.
Response messages are generated after executing a command and made available to the host as a feature report with the report ID set to 1. The host uses the USB Get Feature Report to receive the response or a portion. The following should be compatible with V5 extended responses.
After the host receives the initial response packet, it’s up to the host to collect the data and send 0x4A commands to get more response packets until all data has been received.
Notification messages with a data size longer than 52 bytes will need to be split into multiple packets to accommodate the USB HID interface. Notifications are made available to the host as one or more USB Input Reports with the report ID set to 2.
Data messages are another type of asynchronous communication and handled in the same manner as a notification, except the report ID is set to 1.
When connected to an iOS host, the device communicates over what appears to be a simple bidirectional serial line transferring binary data. To manage serial communications, we utilize an old method called SLIP (Serial Line Internet Protocol). This allows the addition of message control characters and a method to distinguish between control and data.
Each message is prefixed by a one-byte message type followed by a two-byte message length. The possible types are:
00 - Data (Data is ASCII text to be compatible with KB emulation output)
02 - Notification
04 - Response
05 – Command
Messages are framed before and after with a byte value of 0xC0. Because this value can also appear as part of the data message, a few 2-byte sequences are added to distinguish between control and data bytes. The sender modifies the outgoing data, and the receiver translates the incoming data back to the original message. Conversion can be done on the fly during the sending and receiving processes.
Assemble message.
Add message type and length to the beginning of the message.
Replace any bytes with value 0xDB with bytes 0xDB 0xDD.
All result codes must be both universal and functional. The code 0x0396 signifies invalid date or time data, indicating that the date or time has not been set. Subsequent attempts to set the property will fail with result code 0x07, indicating a sequence error. The response may be delayed.
Value
Result Code
Description
0x0000
Success
The command completed successfully.
0x0001
Failure
The command failed.
0x0002
Bad Parameter
The command failed due to a bad parameter or command syntax error.
0x0003
Redundant
The command is redundant.
0x0004
Bad Cryptography
A bad cryptography operation occurred.
*0x0005
Delayed
The request is refused because the device is delaying requests as a defense against brute-force hacking.
0x0006
No Keys
No keys are loaded.
0x0007
Invalid Operation
Depends on the context of the command.
0x0008
Response not available
The response is not available.
0x0009
Not enough power
The battery is too low to operate reliably.
0x000D
Not implemented
The command is not implemented.
0x000E
Unarmed tamper, device not ready
(Tamper Only)
The tamper device is not ready to be armed.
0x000F
Unarmed tamper, bad signature
(Tamper Only)
The tamper is not armed because of a bad signature.
0x0396
0x0080
DSN not found (in the device)
0x0081
Incorrect DSN
0x0082
Max token count reached
0x0083
Response data length error
0x0084
Incorrect DSN
0x0085
Challenge token timed out
0x0086
Invalid challenge token
0x0087
Message verification failed
0x0088
Invalid ECC key format
0x0089
ECC key format not supported
0x0085
Challenge token timed out
0x0086
Invalid challenge token
0x0087
Message verification failed
0x0088
Invalid ECC key format
0x0089
ECC key format not supported
0x0085
Challenge token timed out
0x0086
Invalid challenge token
0x008A
Invalid key block version ID
0x008B
Key block version not supported
0x008C
Invalid key usage
0x008D
Key usage not supported
0x008E
Invalid algorithm
0x008F
Algorithm not supported
0x0090
Invalid mode use
0x0091
Mode use not supported
0x0092
Key version not supported
0x0093
Invalid export
0x0094
Export not supported
0x0095
Invalid optional block ID
0x0096
Optional block ID not supported
0x0097
Invalid KCV algorithm
0x0098
KCV algorithm not supported
0x0099
Invalid HIMAC hash algorithm
0x009A
HMAC Hash algorithm not supported
0x009B
TR-31 format error
0x009C
MagTek custom optional block not found
0x009D
Key Environment not found in Opt Blk
0x009E
Key Environment not supported
0x009F
Key ID not found in Opt BlIk
0x00A0
Key ID not supported
0x00A1
Key ID of TK not found in Opt Blk
0x00A2
Transport key not found in key slot
0x00A3
Wrong transport key (relationship)
0x00A4
Key Restriction not found in Opt BIk
0x00A5
Invalid key type restriction
0x00A6
Invalid data type restriction
0x00A7
DSN not found in Opt BIk
0x00A8
Challenge token not found in Opt BIk
0x00A9
Expiration date/time not found in Opt BIk
0x00AA
KCV verification failed
0x00AB
MAC verification failed
0x00AE
Establish Ephemeral KBPK command is required
0x00AF
Temporary KBPK not found
0x00BO
Key ID doesn't match with Cipher Encryption Algorithm property setting.
0x00B1
Key already exists in the device
0x00B2
MTK deletion not allowed
0x00B3
Key doesn't match with the existing key
0x00B4
Incorrect key environment
0x00A0
Key ID not supported
0x00AC
Key ID not found (in the device)
0x00A0
Key ID not supported
0x00AC
Key ID not found (in the device)
0x00AB
MAC verification failed
0x00Ad
Invalid key configuration
0x00C0
Error from UCL library
0x00C1
Failed to save key in NVS
0x00C2
Key self-check failure
0x0010
ERR_SequenceNumber
Wrong firmware SequenceNumber
0x0011
ERR_FileID
Wrong firmware FileID
0x0012
ERR_ProductType
Wrong firmware ProductType
0x0013
ERR_OperationType
Wrong firmware OperationType
0x0014
ERR_SignatureLength
Wrong firmware SignatureLength
0x0015
ERR_SignatureMethod
Wrong firmware SignatureMethod
0x0016
ERR_CommType
Wrong Interface type
0x0017
TamperTrig
Device tamper triggered while downloading firmware
0x0018
ERR_FwCompareHash
Firmware hash comparison failed
0x0019
Invalid_iAP2offsetadd
iAP2 mode update firmware without downloading firmware, error
0x0020
ERR_FlashWrite
Failed to write flash
Notification Length
Clear
HEX
4
Notification Length
Notification
Clear
Hex
var
Notification in ASCII-Hex
2 bytes
0-52 bytes
2 bytes
0-52 bytes
4..5
Notification Identifier
The type of notification being sent. This field is in big endian format. In many cases, two-byte notification identifiers are assigned such that the high byte indicates a group of related commands, and the low byte specifies a command within that group.
6..7
Complete Data Length
The total length of data for the entire notification message, summing all Partial Data Lengths for multiple packets. This field is in big endian format. If this value is not equal to the Partial Data Length of the current packet, the device is sending the data using multiple packets.
8..n
Data
May contain part or all the notification data. The size of this field is contained in the Partial Data Length field.
2
Reserved
Set to 0000
2
Complete Data Length
The total length of data for the entire data message, summing all Partial Data Lengths for multiple packets. This field is in big endian format. If this value is not equal to the Partial Data Length of the current packet, the device is sending the data using multiple packets.
Varies
Data
May contain part or all the data. The size of this field is contained in the Partial Data Length field.
Start and end the message with bytes 0xC0.
Description
Type
Txt Len
Notes
Message ID = “N001”
Clear
ASCII
4
Data Offset
ID
Complete Data Len
Data Segment
2 bytes
2 bytes
2 bytes
varies
Command
Parameter Data Len
Parameter Data
2 bytes
2 bytes
0-64k bytes
Header
Packet Data Len
(Includes all subsequent field lengths)
Data Offset
Command
Full Parameter Data Len
Partial Parameter Data
0x49
1 Byte (6-58)
2 bytes
Packet Result
Data Len
0x0B
0x00
Pkt Response
Data Len
Response
0x0A
1 byte
First portion of response
Packet Result
Data Len
0x02
0x00
Return Code
Response Data Len
Response Data
2-bytes
2-bytes
0...n bytes
Header
Packet Data Len
(Includes all subsequent field lengths)
Data Offset
Response Code
Full Response Data Len
Partial Response Data
0x0A
1 Byte (6-58)
2 bytes
Send Next Packet Command
Data Len
0x4A
0x00
Length
Field Name
Description
0..1
Partial Data Length
The length of the Data field contained in the current message. This field is in big endian format. If this value is not equal to the Complete Data Length, the device is sending the notification using multiple packets.
2..3
Data Offset
Length
Field Name
Description
1
Partial Data Length
The length of the Data field contained in the current message. This field is in big endian format. If this value is not equal to the Complete Data Length, the device is sending the data using multiple packets.
2
Data Offset
Message Type
Message Len
Message
1 byte
2 bytes
Length varies
Start
Message Type
Message Len
Message
End
0xC0
1 byte
2 bytes
Length varies
Notification Msg ID in KB mode
2 bytes
2 bytes
The offset position in bytes within the entire assembled notification where the first byte of the current packet’s Data field is located. This field is in big endian format. The first byte of the entire notification’s Data is at offset zero.
The offset position in bytes within the entire assembled notification where the first byte of the current packet’s Data field is located. This field is in big endian format. The first byte of the entire Data message is at offset zero.
0xC0
SLIP example
Message 01 DB C0 05 S
LIP C0 01 DB DD DB DC 05 C0Properties are used to provide information about the device and how to configure it. Secured properties are set at the factory or by an administrator using software tools supplied by MagTek. Property values take effect immediately unless specified otherwise.
Property Type:
String
Length:
Varies
Get Property:
This read-only property returns the main firmware part number, a dash, the major and minor revision number, followed by a dash and the firmware type. {main firmware part number}-{3 character rev}-{type}
This one-byte value (1-255) sets the device’s polling interval in milliseconds for the Interrupt in Endpoint. The device sends the value of this property as part of USB device enumeration to the host.
This value is also found on the product label. The property contains the 7-character MagTek device serial number. This value is used for USB device enumeration, data messages, and message security.
This is a maximum 7-byte read-only property that identifies the MagneSafe Feature Level supported on this device.
This property is defined as follows:
id = 0: Decodes standard ISO/ABA cards only
id = 1: Decodes AAMVA and 7-bit cards also
If the id flag is set to 0, only tracks that conform to the ISO card data format allowed for that track are decoded. If the track cannot be decoded by the ISO method, the device reports a decode error.
For each pair of track bits, valid values are as follows:
T# = 00: Track Disabled
T# = 01: Track Enabled
T# = 10: Track Enabled and Required (Generates error if track is blank)
This property specifies how the device should mask data on ISO/ABA type cards: Each byte in the sequence has the following meaning:
This property specifies the factors for masking data on AAMVA type cards. Each byte in the property has the following meaning:
This property represents the device’s current connection type.
Valid values for this property are:
0x00 = USB HID (HID Only)
0x01 = USB Keyboard Emulation (KB) (USB KB Only)
0x02 = iAP2
0xFF = One-Time Automatic (HID Only | iAP2 Only). When the property is set to this value and the device connects to a host, the device attempts to determine which interface type the host is using. After it successfully detects the interface type, it automatically sets this property to the value that corresponds to that interface type.
Configures Magneprint options.
The device sends the value of this property to the host before all other card data. For example, if the host software requires a set of keystrokes to begin the process of receiving card data, this property could be set to transmit that keystroke sequence.
The device sends the value of this property to the host at the end of the data message. For example, if the host software requires a set of keystrokes to end the process of receiving card data, this property could be set to transmit that keystroke sequence. If the value is 0, the device does not send a termination string.
Set Property:
Yes
Default Value:
0x01
Set Property:
No
Default Value:
N/A
Set Property:
No
Standard Value:
PCIV01
Set Property:
Yes
Default Value:
0x95
id
0
T3
T3
T2
T2
T1
T1
Set Property:
Yes
Default Value:
04040Y
1
This byte specifies whether the device applies Mod 10 Correction to the PAN. “Y” means Yes, “N” means No. This option is only effective if the Masking Character specified by this command is “0”.
1
This byte specifies whether the device applies Mod 10 Correction to the PAN. “Y” means Yes, “N” means No. This option is only effective if the Masking Character specified by this command is “0”.
Set Property:
Yes
Default Value:
04040Y
1
This byte specifies whether the device applies Mod 10 Correction to the DL/ID#. “Y” means Yes, “N” means No. This option is only effective if the masking character specified in this command is “0”.
1
This byte specifies whether the device applies Mod 10 Correction to the DL/ID#. “Y” means Yes, “N” means No. This option is only effective if the masking character specified in this command is “0”.
Set Property:
Yes (No for devices that switch connections automatically)
Default Value:
Dependent on device type:
Set Property:
Yes (Secure MAC)
Default Value:
0x00
0
0
0
0=Use SRED encrypt key
1=Use MP encrypt key
0=Normal Length MP
1=Extended Length MP
0
Set Property:
Yes
Default Value:
Null String
Set Property:
Yes
Default Value:
0x0D (carriage return)
Yes
Set Property:
No
Default Value:
Part number of installed firmware
Example
1000004854-AD9-PCI
Property ID:
0x02
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
Property ID:
0x03
Property Type:
String
Length:
7
Get Property:
Yes
Property ID:
0x04
Property Type:
String
Length:
0 - 7 bytes
Get Property:
Yes
Property ID:
0x05
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
Bit Position
7
6
5
4
3
2
1
0
Property ID:
0x07
Property Type:
String
Length:
6 bytes
Get Property:
Yes
Length
Description
2
These bytes are an ASCII representation of a decimal value that specifies how many of the leading characters of the PAN the device sends unmasked. The range is from “00” to “99”.
2
These bytes are an ASCII representation of a decimal value that specifies how many of the trailing characters of the PAN the device sends unmasked. The range is from “00” to “99”.
1
Masking Character. This byte specifies which character the device uses for masking. If this byte contains the uppercase letter ‘V’, the following rules apply:
The device masks the PAN using character ‘0’
The device leaves all data after the PAN unmasked, leaving Discretionary Data (“DD”) and other non-PAN data available for the host to read.
0x00 (NULL character) is not allowed.
Length
Description
2
These bytes are an ASCII representation of a decimal value that specifies how many of the leading characters of the PAN the device sends unmasked.
The leading character range is from “00” to “08” when the PAN length is greater than 15.
The leading character range is from “00” to “06” when the PAN length is 15 or less.
2
These bytes are an ASCII representation of a decimal value that specifies how many of the trailing characters of the PAN the device sends unmasked. The range is from “00” to “04”.
1
Masking Character. This byte specifies which character the device uses for masking.
The uppercase letter ‘V’ is not supported.
0x00 (NULL character) is not allowed.
Property ID:
0x08
Property Type:
String
Length:
6 bytes
Get Property:
Yes
Length
Description
2
These bytes are an ASCII representation of a decimal value that specifies how many of the leading characters of the Driver’s License/ID Number (DL/ID#) the device sends unmasked. The range is from “00” to “99”.
2
These bytes are an ASCII representation of a decimal value that specifies how many of the trailing characters of the DL/ID# sends unmasked. The range is from “00” to “99”.
1
Masking Character. This byte specifies which character the device uses for masking. If this byte contains the uppercase letter ‘V’, the following rules apply:
The device masks the PAN according to the rules of this property (Property 0x34 - Send AAMVA Card Data is ignored).
The device uses ‘0’ for masking the PAN.
The device sends all data after the PAN without masking.
0x00 (NULL character) is not allowed.
Length
Description
2
These bytes are an ASCII representation of a decimal value that specifies how many of the leading characters of the Driver’s License/ID Number (DL/ID#) the device sends unmasked. The range is from “00” to “99”.
2
These bytes are an ASCII representation of a decimal value that specifies how many of the trailing characters of the DL/ID# sends unmasked. The range is from “00” to “99”.
1
Masking Character. This byte specifies which character the device uses for masking.
The uppercase letter ‘V’ is not supported.
0x00 (NULL character) is not allowed.
Property ID:
0x10
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
Property ID:
0x15
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
7
6
5
4
3
Bit 2
Bit 1
Bit 0
0
Property ID:
0x1E
Property Type:
String
Length:
0-7 bytes
Get Property:
Yes
Property ID:
0x22
Property Type:
String
Length:
0-7 bytes
Get Property:
Yes
0
Property ID:
0x6E
Property Type:
Byte
Length:
1 byte
This property controls the masking of the service code on ISO card tracks 1 and 2. If this property is set to 1, the device masks the service code. If this property is set to 0, the device does not mask the service code.
The host can use this property to enable Selectable Card Data Encryption. Any of the bits in this property enables the SCDE with the corresponding data field included in the encrypted SCDE.
The M002 message is transmitted to the host instead of the M001 message when the following four conditions are met when a financial card is swiped.
Any of the defined property 0x78 bits are set to 1 (enabled)
Card Encode Type of the swiped card is ISO
Initial SCDE DUKPT Key was injected into the device
For security purposes, the reader will reset itself once a day. You can choose what time this reset will occur by changing this property. Set the value to HHMM in Coordinated Universal Time (UTC). HH is one byte with a value of 0-23. MM is one byte with a value of 0-59 The new value takes effect after the next device reset or power cycle.
This data is stored securely (encrypted by DDEK). The data gets sent out in encrypted form using DUKPT when the device is in QWANTUM Mode, the button is enabled, and the button is pressed.
For PCI certified devices, this value will match the one found on the PCI website and the product label.
This property indicates whether the firmware was built to use production device keys (005454) or test device keys (000101).
The primary functions of device states are to inform production software about completed steps and pending tasks. It serves as a checklist and can also assist with remote services and RMAs.
If a key has been loaded into the device, then it’s bit indicator should be set to 1.
A fully loaded reader would return a keymap of: 7E 00 07 00 8C 00 00 00.
The host can use this property to adjust the device’s USB packet delay. The property can be set to 0 to have no delay, or it can be set to a specific value in the range of 1 to 255 ms.
Adjusting this value does not require security when the device is fully configured.
Adjusting this value does not affect the USB HOST POLL TIMEOUT, PROPERTY 0x52. In fact, it is mostly independent from the polling interval.
MagTek recommends the following values for various platforms:
Windows = 0x00 (0 ms)
Android = 0x19 (25 ms)
Linux = 0x32 (50 ms)
Set Property:
Yes (Secure MAC)
Default Value:
0x00
Bit 3
Service Code
0 = Disable (Default)
1 = Enable
Bit 4
T1 Discretionary Data
0 = Disable (Default)
1 = Enable
Bit 5
T2 Discretionary Data
0 = Disable (Default)
1 = Enable
Bit 6
Reserved
Bit 7
Reserved
Set Property:
No
Default Value:
N/A
Set Property:
Yes (Secure MAC)
Default Value:
0
• 0 = Normal Operation
• 1 = QWANTUM Mode
Set Property:
Yes (New value takes effect after reset)
Default Value:
0000 (UTC Midnight)
Set Property:
Yes (Secure MAC)
Default Value:
Length = 0
Set Property:
No
Standard Value:
'iDynamo 5 Gen III'
Set Property:
No (Value depends on firmware build type)
Default Value:
005454 (for PCI), 000101 (for Non-PCI)
Set Property:
No – values come from self-test and security status.
Default Value:
N/A
1
System State
Offline
0
0
Device Keys missing
RTC not active/set
Not Initialized
Security Inactive
Tampered
2
Self-Test failure
Data Integrity
Key Integrity
0
0
0
Registers
Crypto
RNG
3
PCI Info
0
0
0
0
0
HW ID Missing
Model Name Missing
Serial # Missing
4
Unmapped Data Types
0
0
0
0
0
0
0
0
Bit 6
Reserved
Always 0
Bit 5
Bit 4
Device Keys Missing
0 = Device keys present
1 = Device keys missing
NOTE: “Device Keys” refer to the keys that are injected during MfgCfg such as Transport Keys and MAC Keys. “Device Keys” do not include DUKPT keys (2007, 2002 and 2003). The DUKPT keys are “Financial Keys”.
Bit 3
RTC not Active/Set
0 = RTC active
1 = RTC inactive (not enabled)
Bit 2
Not Initialized
0 = Non-volatile storage initialized
1= Non-volatile storage not initialized
NOTE: “Initialized” means:
a. the master keys are generated internally.
b. the data & key storage area is initialized with an initialization indicator such as 0xAA55 and its integrity is known good.
Bit 1
Security Inactive
0 = Security activated
1= Security not activated
NOTE: “Security” means Tamper.
Bit 0
Tampered
0 = Device not tampered
1 = Device tampered
BYTE 2 – Self-Test Failure
Bit 7
Data Integrity
0 = Configuration data in NVS not corrupted
1 = Found data corruption in the configuration data
Bit 6
Key Integrity
0 = All fixed keys and injected keys are not corrupted
1 = Found key data for one or more keys is corrupted
Bit 5
Reserved
Always 0
Bit 4
Bit 3
Bit 2
Registers
0 = All hardware registers in uC required for normal operation of the device are initialized/ enabled/configured/ functional;
1 = Any one or more of those registers are not operating correctly
Bit 1
Crypto
0 = Passed test
1 = Failed test
NOTE: Enable Crypto engine in uC and test crypto functions and make sure it returns the expected results. (e.g. KAT – Known Answer Test)
Bit 0
RNG
0 = Passed test
1 = Failed test
NOTE: Enable RNG in uC and read RNG value a few times and make sure RNG returns different values for each read.
BYTE 3 – PCI Info
Bit 7
Reserved
Always 0
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
PCI HW ID Missing
0 = Found a valid PCI HW ID in Property 0x80
1 = PCI HW ID missing
Bit 1
Model Name Missing
0 = Found a valid model name in Property 0x84
1 = Model name missing
Bit 0
Serial # Missing
0 = Found a valid DSN in Property 0x03
1 = DSN missing
BYTE 4 – Unmapped Data Types
Bit 7
Reserved
Always 0
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Set Property:
No – values come from key injection.
Starting Value:
0 – if no keys loaded
0
MKIFTK
MFGTK
PRODTK
FINTK
DEVTK
MTK
TMPTK
2 – TK2
0
0
0
0
0
0
0
0
3 – MK1
0
0
0
0
0
MFRQMK
MREQMK
FREQMK
4 – MK2
0
0
0
0
0
0
0
0
5 – DK1
DKPTM7
0
0
0
DKPTM3
DKPTM2
0
0
6 – DK2
0
0
0
0
0
0
0
0
7 – DK3
0
0
0
0
0
0
0
0
8 – DK4
DKPTM1F
0
0
0
0
0
0
0
Set Property:
Yes
Starting Value:
0x00 (0 ms)
Get Property:
Yes
Set Property:
Yes
Default Value:
0x01
Property ID:
0x78
Property Type:
Binary
Length:
1 byte
Get Property:
Yes
Bit Number
Description of Bit
Bit 0
Card Holder Name
0 = Disable (Default)
1 = Enable
Bit 1
PAN
0 = Disable (Default)
1 = Enable
Bit 2
Expiration Date
0 = Disable (Default)
1 = Enable
Property ID:
0x80
Property Type:
String
Length:
varies
Get Property:
Yes
Example
10PCI50U0BA
Property ID:
0x81
Property Type:
Byte
Length:
1 byte
Get Property:
Yes
Property ID:
0x82
Property Type:
Byte
Length:
2 bytes
Get Property:
Yes
Length
Field Name
Value
1
Hour
Value from 0x00...0x17 (0-23)
1
Minute
Property ID:
0x83
Property Type:
Bytes
Length:
0-1023 bytes
Get Property:
Yes (Secure MAC)
Property ID:
0x84
Property Type:
String
Length:
varies
Get Property:
Yes
Property ID:
0x85
Property Type:
Binary
Length:
3 bytes
Get Property:
Yes
Property ID:
0x86
Property Type:
Binary
Length:
4 bytes
Get Property:
Yes
Byte
Type
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bytes
Bits
Name
Settings
BYTE 1 – System State
Bit 7
Offline
0 = All bits in this property are set to 0
1 = Not all bits in this property are 0
Property ID:
0x87
Property Type:
Binary
Length:
8 bytes
Get Property:
Yes
Byte
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Property ID:
0x88
Property Type:
Binary
Length:
1 byte
Get Property:
Yes
Note – Test firmware can only allow test keys to be injected.
Note that the device is considered offline (no card reading) until all 4 bytes are zero.
Value from 0x00...0x3B (0-59)
Bit 0
1 – TK1
Multi-byte values like command and data lengths are always big-endian.
Data Messages are formed in response to a cardholder event such as swiping a card or pressing a button. These messages are formatted as a block of ASCII text and compatible with all interfaces.
Commands consist of a 2-byte command, a 2-byte Parameter Data Length, and Parameter Data as needed.
Command
Parameter Data Len
Parameter Data
Responses consist of a 2-byte return code, a 2-byte response data length, and response data as needed.
Notifications consist of a 2-byte notification code, a 2-byte notification data length, and notification data when needed. They are sent asynchronously due to device events. They can also be used as delayed responses for commands that take longer to process.
Sentinels
Data for each card track is typically bracketed by a start and end sentinel. The sentinel characters can be changed by setting properties. The start sentinel can also indicate what format was used to encode the track.
[SS] Track Data [ES]
If a property value is set to 0, then no character will be sent.
Masking
The PAN field must always be partially masked. The device can be configured to expose the 0-8 leading characters and 0-4 trailing characters. The 8-digit limit for leading characters automatically drops to 6 for cards where the PAN length is less than 16 (e.g. American Express).
Properties 0x07 and 0x08 are used to configure PAN masking.
Data messages include DUKPT KEY information fields so the host can derive the correct decryption or MAC key.
Example:
Data messages will always be made up of ASCII text characters regardless of the interface for compatibility purposes. Text is used to address limitations when using keyboard emulation.
Any Field with no value will be empty between separator characters.
The device transmits an M002 message with three new data fields: Encrypted SCDE, KSN (SCDE) and DUKPT Key Info (SCDE) to the host instead of an M001 message when the following four conditions are satisfied. Selectable Card Data Encryption is enabled through Property 0x78.
Any of the defined property 0x78 bits are set to 1 (enabled),
Card Encode Type is ISO (a.k.a. financial card),
SCDE DUKPT key is injected or present in the device, and
If any one of the four conditions is not met, an M001 message will be returned to the host instead of an M002 message.
The encrypted SCDE field in the M002 message, [Encrypted SCDE], includes six data fields, field_1 ~ field_6. The six data fields are placed in a buffer prior to encryption. The selectable card data element starts with a field separator (FS) followed by a data field, and the last field separator is appended following the sixth data field (field_6) as shown below (total seven FS characters). The field separator used in the SCDE is the same FS used in the M001 or M002 message, which may be changed using Property 0x23.
Each data field in the SCDE is defined as follows.
The SCDE DUKPT key (DKPTM1F) is used to encrypt the six data fields (| field_1 | field_2 | field_3 | field_4 | field_5 | field_6 |)only. No other keys should be used for the SCDE.
The encrypted SCDE field in the M002 message is an encrypted blob holding six card data fields selected with Property 0x78 bits. If a defined bit is set to zero, the corresponding data field will be empty in the clear-text SCDE. The clear-text SCDE including enabled data fields will be encrypted with an SCDE DUKPT future key.
When all defined bits in the property 0x78 are set to zeros, the encrypted SCDE is disabled. As a result, the M001 message should be transmitted to the host instead of the M002 message.
Encrypt( | field_1 | field_2 | field_3 | field_4 | field_5 | field_6 | )
Field Separation
This device uses configurable properties to define characters that get inserted into the message for parsing purposes. The simplest option is to have characters for start of message (SOM), end of message (EOM), and field separation (FS) only.
This is the message format for Qwantum cards, or for any card when Qwantum Mode is on.
This message is used when the device sends out encrypted data from the Secure Buffer.
This message is used when the device sends out when Qwantum Secure Data is empty.
T2ISO
Tk2 SS if ISO
1
0x25
0x3B ‘;’
T3ISO
Tk3 SS if ISO
1
0x26
0x2B ‘+’
T3AMV
Tk3 SS if AAMVA
1
0x27
0x23 ‘#’
T27BT
Tk2 SS if 7bit
1
0x28
0x40 ‘@’
T37BT
Tk3 SS if 7bit
1
0x29
0x26 ‘&’
ES
End sentinel
1
0x2B
0x3F ‘?’
ISO Only:
Expiration Date masking
Always fully unmasked (4 digits).
Always masked with 5th character from Property 0x07.
ISO Only:
Service Code masking
Can be enabled or disabled using Property 0x6E (3 digits).
Always masked with 5th character from Property 0x07.
AAMVA Only:
Expiration Date and Birth Date
Always fully unmasked (12 digits).
Always masked with 5th character from Property 0x08.
Discretionary Data masking
Unmasked if error. Otherwise, masked with 5th character from Property 0x07 or 0x08.
Unmasked if error. Otherwise, masked with 5th character from Property 0x07 or 0x08.
2
1
For Data Item
0x01 – RFU
0x01 – Message MAC
0x02 – MSR Data
0x03 – MP Token
0x04 – Qwantum Token
0x05 – Qwantum Data
3
1
Using Mode/Operation
0x00 – RFU
0x01 – ENC-CBC-0
0x02 – ENC-CBC-SECURE
0x03 – ENC-CTR
0x10 – MAC-CBC-0
0x11 – CMAC
0x12 – HMAC
0x13 – GMAC
4
1
Derived Key Algorithm
0x00 – 2-key TDEA
0x01 – 3-key TDEA
0x02 – AES 128-bit
0x03 – AES 192 bit
0x04 – AES 256 bit
0x05 – HMAC
5-6
2
Generated Key Length (bits)
0x0100 – 256 bits
0x0080 – 128 bits
7-8
2
Derived Key Usage
0x2002 – MAC, both ways
0x3002 – Data Encryption, both ways
0xFF00 – Legacy PIN Variant
0xFF01 – Legacy MAC, both ways
0xFF02 – Legacy Data Encryption
AES DUKPT: Use “Legacy: FFnn”, which means “shift FF left nn bytes”.
Track 1 Masked Data
Clear
ASCII
var
Per masking configuration
Track 2 Masked Data
Clear
ASCII
var
Per masking configuration
Track 3 Masked Data
Clear
ASCII
var
Per masking configuration
Track 1 Data
Encrypt
HEX
var
Encrypted with MSR key.
Track 2 Data
Encrypt
HEX
var
Encrypted with MSR key.
Track 3 Data
Encrypt
HEX
var
Encrypted with MSR key.
MP Status Code
Clear
HEX
8
MP Token
Encrypt
HEX
var
Encrypted with MSR or MP key as configured (see Property 0x15).
Session ID
Encrypt
HEX
16/32
Encrypted with MSR key. Session ID = RTC value.
KSN (MSR)
Clear
HEX
20/24
DUKPT Key Info (MSR)
Clear
HEX
16
KSN (MP)
Clear
HEX
0/20/24
Empty when MSR key is used
DUKPT Key Info (MP)
Clear
HEX
16
Empty when MSR key is used
Device Serial Number
Clear
ASCII
7
Indicates valid range of each hex digit –
‘0’ ~ ‘9’ (0x30 ~ 0x39),
’A’ ~ ‘F’ (0x41 ~ 0x46)
DUKPT Key Info (MAC)
Clear
HEX
16
Using MSR Key
Message Length
Clear
HEX
4
Include all of message except for MAC. Length required for MAC security. High byte first.
MAC
Clear
HEX
16/32
MAC variant of MSR encryption key is used to calculate MAC.
CBC MAC if MSR DUKPT key is TDES
CMAC if MSR DUKPT key is AES
Track 1 Masked Data
Clear
ASCII
var
Per masking configuration
Track 2 Masked Data
Clear
ASCII
var
Per masking configuration
Track 3 Masked Data
Clear
ASCII
var
Per masking configuration
Track 1 Data
Encrypt
HEX
var
Encrypted with MSR key.
Track 2 Data
Encrypt
HEX
var
Encrypted with MSR key.
Track 3 Data
Encrypt
HEX
var
Encrypted with MSR key.
MP Status Code
Clear
HEX
8
MP Token
Encrypt
HEX
var
Encrypted with MSR or MP key as configured (see Property 0x15).
Session ID
Encrypt
HEX
16/32
Encrypted with MSR key. Session ID = RTC value.
KSN (MSR)
Clear
HEX
20/24
DUKPT Key Info (MSR)
Clear
HEX
16
KSN (MP)
Clear
HEX
0/20/24
Empty when MSR key is used
DUKPT Key Info (MP)
Clear
HEX
0/16
Empty when MSR key is used
Device Serial Number
Clear
ASCII
7
Indicates valid range of each hex digit – ‘0’ ~ ‘9’ (0x30 ~ 0x39), ‘A’ ~ ‘F’ (0x41 ~ 0x46)
DUKPT Key Info (MAC)
Clear
HEX
16
Using MSR Key
Message Length
Clear
HEX
4
Include all of message except for MAC. Length required for MAC security. High byte first.
MAC
Clear
HEX
16/32
MAC variant of MSR encryption key is used to calculate MAC.
CBC MAC if MSR DUKPT key is TDES
CMAC if MSR DUKPT key is AES
Encrypted SCDE
Encrypt
HEX
var
KSN (SCDE)
Clear
HEX
20/24
DUKPT Key Info (SCDE)
Clear
HEX
16
field_2
PAN from Track 1or Track 2 (padding nibble=F)
CN
var (max 19)
bit 1
field_3
Expiration Date from Track 1 or Track 2
4N
2
bit 2
field_4
Service Code from Track 1 or Track 2
3N
2
bit 3
field_5
T1 discretionary data
AN
var
bit 4
field_6
T2 discretionary data (padding nibble=F)
CN
var
bit 5
0
0
EOM
End of Message
0-7
0x22
‘\r’ (0x0D)
0
FS
Field Separator
1
0x23
‘|’ (0x7C)
0
KSN (Token)
Clear
HEX
20/24
TDES or AES
DUKPT Key Info (Token)
Clear
HEX
16
Qwantum Status
Clear
HEX
8
from ASIC
Qwantum Token
Encrypt
HEX
var
Encrypted with Qwantum Token Key
Padded with zeros
Session ID
Encrypt
HEX
16/32
Encrypted with MSR key. Session ID = RTC value
Qwantum Card ID
Clear
HEX
64
32-byte SHA256 hash of TK1 name, TK2 PAN and TK2 Expiration Date
Device Serial Number
Clear
ASCII
7
Indicates valid range of each hex digit – ‘0’ ~ ‘9’ (0x30 ~ 0x39), ‘A’ ~ ‘F’ (0x41 ~ 0x46)
DUKPT Key Info (MAC)
Clear
HEX
16
for Qwantum Token Key
Message Length
Clear
HEX
4
Includes all of message fields except for MAC (High byte first)
MAC
Clear
HEX
16/32
MAC variant of MSR encryption key is used to calculate MAC.
CBC MAC if MSR DUKPT key is TDES
CMAC if MSR DUKPT key is AES
KSN (Token)
Clear
HEX
20/24
TDES or AES
DUKPT Key Info (Token)
Clear
HEX
16
Session ID
Encrypt
HEX
16/32
Encrypted with MSR key. Session ID = RTC value
Qwantum Buffer
Encrypt
HEX
1-2K
Encrypted with Qwantum Token Key
Padded with pad length
Device Serial Number
Clear
ASCII
7
Indicates valid range of each hex digit – ‘0’ ~ ‘9’ (0x30 ~ 0x39), ‘A’ ~ ‘F’ (0x41 ~ 0x46)
DUKPT Key Info (MAC)
Clear
HEX
16
for Qwantum Token Key
Message Length
Clear
HEX
4
Includes all of message fields except for MAC (High byte first)
MAC
Clear
HEX
16/32
MAC variant of MSR encryption key is used to calculate MAC.
CBC MAC if MSR DUKPT key is TDES
CMAC if MSR DUKPT key is AES
Message Code
Clear
ASCII
2
Text characters indicating message code
Message
Clear
ASCII
36
Message for empty buffer
2-bytes
2-bytes
0…n bytes
Return Code
Response Data Len
Response Data
2-bytes
2-bytes
0...n bytes
Notification ID
Notification Data Len
Notification Data
2-bytes
2-bytes
0...n bytes
Name
Description
Length
Property
Default
T1ISO
Tk1 SS if ISO
1
0x24
M001/M002 Message
Non-PCI
PCI
PAN masking
Can be configured using Property 0x07 and 0x08.
Can be configured using Property 0x07 or 0x08 with the following exceptions.
· Masking Character, ‘V’, is not supported in Property 0x07/0x08.
· Not allowed to unmask leading PAN digits more than 6 digits when PAN length is 15 digits.
Name masking
Always fully unmasked.
Byte
Len
Description
Values
Notes
1
1
DUKPT Key Info Version
0x00 – Legacy DUKPT
0x01 – Current (AES) DUKPT
Field Description
Prot
Type
Txt Len
Notes
Message ID = “M001”
Clear
ASCII
4
Field Description
Prot
Type
Txt Len
Notes
Message ID = “M002”
Clear
ASCII
4
Description
Type
Length (bytes)
Property 0x78
field_1
Cardholder Name from Track 1
AN
var (max 26)
Name
Description
Length
Property
Default
To Disable
SOM
Start of Message
0-7
Description
Prot
Type
Txt Len
Notes
Message ID = “Q001”
Clear
ASCII
4
Description
Prot
Type
Txt Len
Notes
Message ID = “Q002”
Clear
ASCII
4
Description
Prot
Type
Txt Len
Notes
Message ID = “Q003”
Clear
ASCII
4
Note: PCI Requirement – SCR devices that can be used with consumer devices must fully mask cardholder name, expiration date, and service code with no exceptions.
Note: The description in this section is for non-PCI device case. The following table shows the difference between non-PCI device and PCI device masking rule.
Note: Derived key algorithm, length, and usage information will be needed to generate the correct AES-DUKPT decryption key.
Note: Text length may vary depending on the key type that is being used.
Note:
Text length may vary depending on the key type that is being used.
The three SCDE fields at the bottom of the message are not part of the MAC calculation.
Note: Portion in bold shows the data included in the output MAC calculations.
0x25 ‘%’
Always fully masked with ‘*’.
MSR Data Message
MSR Data Message
bit 0
0x1E
Qwantum Card message
Qwantum Buffer Message
Qwantum Buffer Message
00 02 01 00 0080 FF02 MSR encrypt CBC zero pad with legacy DUKPT 128-bit TDEA data variant.[SOM] M001
[FS] [Track 1 Masked Data]
[FS] [Track 2 Masked Data]
[FS] [Track 3 Masked Data]
[FS] [Track 1 Encrypted Data]
[FS] [Track 2 Encrypted Data]
[FS] [Track 3 Encrypted Data]
[FS] [MP Status]
[FS] [Encrypted MP Data]
[FS] [Encrypted Session ID]
[FS] [MSR DUKPT Key Serial Number]
[FS] [MSR DUKPT Key Info]
[FS] [MP DUKPT Key Serial Number]
[FS] [MP DUKPT Key Info]
[FS] [Device Serial Number]
[FS] [MAC DUKPT Key Info]
[FS] [MAC message length]
[FS] [MAC]
[EOM]
[FS] [MAC][EOM]
[SOM] M002
[FS] [Track 1 Masked Data]
[FS] [Track 2 Masked Data]
[FS] [Track 3 Masked Data]
[FS] [Track 1 Encrypted Data]
[FS] [Track 2 Encrypted Data]
[FS] [Track 3 Encrypted Data]
[FS] [MP Status]
[FS] [Encrypted MP Data]
[FS] [Encrypted Session ID]
[FS] [MSR DUKPT Key Serial Number]
[FS] [MSR DUKPT Key Info]
[FS] [MP DUKPT Key Serial Number]
[FS] [MP DUKPT Key Info]
[FS] [Device Serial Number]
[FS] [MAC DUKPT Key Info]
[FS] [MAC message length]
[FS] [MAC]
[FS] [Encrypted SCDE]
[FS] [SCDE DUKPT Key Serial Number]
[FS] [SCDE DUKPT Key Info]
[EOM]
[SOM] Q001
[FS] [Token DUKPT Key Serial Number]
[FS] [Token DUKPT Key Info]
[FS] [QWANTUM Status]
[FS] [QWANTUM Token]
[FS] [Encrypted Session ID]
[FS] [QWANTUM Card ID]
[FS] [Device Serial Number]
[FS] [MAC DUKPT Key Info]
[FS] [MAC message length]
[FS] [MAC]
[EOM]
[SOM] Q002
[FS] [Token DUKPT Key Serial Number]
[FS] [Token DUKPT Key Info]
[FS] [Encrypted Session ID]
[FS] [Encrypted Qwantum Data Buffer]
[FS] [Device Serial Number]
[FS] [MAC DUKPT Key Info]
[FS] [MAC message length]
[FS] [MAC]
[EOM]
[SOM] Q003
[FS] [Message Code]
[FS] [Message]
[EOM]Q003|01|No Data Stored. Nothing to Transmit.|