IDTech Augusta S
The Augusta S from IDTech is a secure Europay, MasterCard and Visa (EMV) chip and magnetic stripe reader (MSR). It is available in USB-HID or USB-KB configuration and uses common Human Interface Devices (HID) drivers. It supports Triple Data Encryption Standard (TDES) and Advanced Encryption Standard (AES) encryption of sensitive data with Derived Unique Key Per Transaction (DUKPT) key management. ID Tech provides .NET SDK, that facilitates interface between Windows Form applications, the device and payment application.
Magnetic Stripe Read
MSR data is returned as byte stream.
023201801F4F2800A39B252A353431332A2A2A2A2A2A2A2A343131315E444920544553542F4341524420303420202020202020202020205E2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A3F2A3B353431332A2A2A2A2A2A2A2A343131313D2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A3F2A6F0F25415970287199A844F416AE153B45F3838F6FA0FEDA6399AF0DB5E23880335FA51120A7EC89CA3D946AD27FF773C32D1D90F462EEDD17173E2E373895FAB6C4CCEB83ACEF900B81FAFBC25E87291BAB6D5740844AC8AF35B88EBA06BDC359DC6128B2F0867556C5CDA29CCBD1B86BD8835E2796531E00000000000000000000000000000000000000000000000000000000000000000000000000000000373136543439343031306299490000000A0000022B2303
This data is parsed as follows:
Chars | Value | Description |
---|---|---|
1-2 | 02 | Start of transmission (STX) |
3-6 | 3201 | Total Data Length (low, high byte) of card data. It is 0x0132 or 306 characters in decimal. |
7-8 | 80 | Card Encoding type (ISO/ABA, new format) |
9-10 | 1F | Track status (Track 1 and Track 2 are good). Binary 0001 1111 is interpreted as follow: Bit 7: 0=reserved for future use Bit 6: 0=no “optional bytes length” is present Bit 5: 0=no Track 3 sampling data Bit 4: 1=Track 2 sampling data exists Bit 3: 1=Track 1 sampling data exists Bit 2: 1=Track 3 decode succeeded Bit 1: 1=Track 2 decode succeeded Bit 0: 1=Track 1 decode succeeded |
11-12 | 4F | Unencrypted Track 1 length (79 bytes) |
13-14 | 28 | Unencrypted Track 2 length (40 bytes) |
15-16 | 00 | Unencrypted Track 3 length (not present) |
17-18 | A3 | Clear/masked data sent status. Binary 1010 0011 is interpreted as follow: Bits 0,1,2: 011 = Track 1 and 2 are sent, Track 3 is not; Bit 3: 1 = fixed key, 0 = DUKPT key management; Bit 4: 0=TDES; 1, if AES Bit 5: 1=Chip present on card (Card service code starts with ‘2’ or ‘6’) Bit 6: 0= Data Encryption Key was used; 1, if PIN Encryption Key was used Bit 7: 1=Device Serial Number is included; 0= is not |
19-20 | 9B | Encrypted data sent status. Binary 1001 1011 is interpreted as follows: Bits 0,1,2 = Track 1 and 2 are sent, Track 3 is not; Bits 3,4,5 = Track 1 and 2 dummy hashes are sent, Track 3 is not; Bit 6: 0 = session ID is not included Bit 7: 1=Key Sequence Number (KSN) is included |
21-178 | 252A35...2A3F2A | Hex string of masked Track 1 data. As a text string:
|
179-258 | 3B3534...2A3F2A | Hex string of masked Track 2 data. As a text string:
|
259-418 | 6F0F25...5E8729 | Track 1 encrypted data. Total length is 80 bytes: real length 79 is rounded up to 8 bytes = 80 bytes. Decrypted Data in ASCII (1 zero byte padded at the end):
|
419-498 | 1BAB6D...96531E | Track 2 encrypted data. Total length is 40 bytes: real length 40 is rounded up to 8 bytes = 40 bytes. Decrypted Data in ASCII (no zero bytes padded at the end):
|
499-538 | 000000...000000 | Track 1 dummy hash data (20 zero bytes) |
539-578 | 000000...000000 | Track 2 dummy hash data (20 zero bytes) |
579-598 | 373136...303130 | 10 bytes of device serial number. As a text string: 716T494010 |
599-618 | 629949...000002 | 10 bytes of Key Sequence Number (KSN) |
619-620 | 2B | CheckLRC - one byte Exclusive-OR sum calculated for all data bytes |
621-622 | 23 | CheckSum - one byte Sum calculated for all data bytes |
623-624 | 03 | End of transmission (ETX) |
EMV Data
Transaction data from chip-card interactions (EMV data) is returned primarily as tag length value (TLV) triplets.
ID Tech transaction data consists of mix industry-standard EMV tags and proprietary ID Tech tags. Tag value is encoded as follows:
- Byte 1: First (and possibly the only) value of the Tag. If the bottom 5 bits are ON, then next byte is also part of the tag. In other words:
(1stByte & 0x1F == 0x1F) // TRUE means more tag bytes follow
- Byte 2..n (if necessary): If the most significant bit is ON, then next byte is also part of the tag. In other words:
(Byte & 0x80 == 0x80) // TRUE means more tag bytes follow
The top bits of the tag length byte have special meaning:
- If the most significant bit of the length byte is OFF, then byte represent the byte length of data to follow. Otherwise, if the bit is ON, then the lower nibble specifies how many following bytes specifies the length of the data to follow. For example, if the length byte is 84, the most significant bit is 1, the lower nibble is 4. Thus, the number of data length bytes is 4.
- If bit 7 is set, bits 5 and 6 of the tag length byte are used in a special way:
- Bit 6 will be set, if data is encrypted.
- Bit 5 will be set, if data is masked (i.e. track data)
The following table lists IDTech proprietary tags for encrypted and/or masked data:
Tag | Data |
---|---|
5A | Masked or encrypted packed PAN |
56 | Masked or encrypted packed Track 1 data |
57 | Masked or encrypted packed Track 2 data |
5F20 | Hex string of cardholder name |
5F24 | Packed card expiration Date (YYMMDD) |
5F30 | Card service code |
9F1F | Hex string of encrypted Track 1 discretionary data |
9F20 | Hex string of encrypted Track 2 discretionary data |
9F6B | Packed encrypted Track 2 data |
FFEE13 | Packed encrypted Track 1 data |
FFEE14 | Packed encrypted Track 2 data |
DFEE12 | 10 bytes hex string of Key Sequence Number (KSN) |
DFEE26 | Encryption Status Info |
Example
02b70006001000dfee26022000dfee120a6299490000000000000657a1124147cccccccc6611d2007201cccccccccccc57c118e8e8b8c318cee547e6bf4529d23056c74bd49b8451a10daa5aa1084147cccccccc66115ac11073314e66ec187ad0b27bd6006efa361e5f3401015f20134b415341544b494e2f414c4558414e444552205f24032007319f20005f25031607015f2d02656e500b56495341204352454449544f07a00000000310108407a0000000031010dfee230020d003
This data is parsed as follows:
Chars | Value | Description |
---|---|---|
1-2 | 02 | Start of transmission (STX) |
3-14 | b70006001000 | Ignore. |
15-20 | dfee26 | Encryption Status Info Tag |
21-22 | 02 | The tag data length (two byes) |
23-26 | 2000 | The tag data |
27-32 | dfee12 | KSN tag |
33-34 | 0a | The tag data length (0x0A or 10 decimal) |
35-54 | 629949...000006 | KSN value |
55-56 | 57 | Track 2 data tag |
57-58 | a1 | The tag length. Bit 7 is 1, bit 6 is 0, bit 5 is 1, lower nibble is 1. Next byte represents byte length of masked data to follow. |
59-60 | 12 | Actual data length (Hex 12 or 18 bytes) |
61-96 | 4147cc...cccccc | Masked packed Track 2 data. ‘C’ is masking character |
97-98 | 57 | Track 2 data tag |
99-100 | c1 | The tag length. Bit 7 is 1, bit 6 is 1, bit 5 is 0, lower nibble is 1. Next byte represents byte length of encrypted data to follow. |
101-102 | 18 | Actual data length of tags data. Hex 18 is 24 decimal. |
103-150 | e8e8b8...a10daa | Encrypted Track 2. If decrypted, it gives as the following string:
Data represents tag 57 with length byte 12 (18 bytes). Data starts with byte 41:
Replacing ‘d’ with ‘=’ and removing ‘f’:
|
151-152 | 5a | Card PAN tag |
153-154 | a1 | The tag length. Bit 7 is 1, bit 6 is 0, bit 5 is 1, lower nibble is 1 Next byte represents byte length of masked data to follow |
155-156 | 08 | Byte length of masked PAN data |
157-172 | 4147cc...cc6611 | Masked packed PAN data. ‘C’ is the masking character |
173-174 | 5a | Card PAN tag |
175-176 | c1 | The tag length. Bit 7 is 1, bit 6 is 1, bit 5 is 0, lower nibble is 1. Next byte represents byte length of encrypted data to follow. |
177-178 | 10 | Actual data length of tags data. Hex 10 is 16 decimal. |
179-210 | 73314e...fa361e | Encrypted PAN. If decrypted, it gives as the following string:
Data represents tag 57 with length byte 08 (8 bytes). Data starts with byte 41:
|
211-214 | 5f34 | EMV tag – Application PAN Sequence Number |
215-216 | 01 | The tag length |
217-218 | 01 | The tag value |
219-222 | 5f20 | EMV tag – Cardholder Name |
223-224 | 13 | The tag length |
225-262 | 4b4153...455220 | The tag value: KASATKIN/ALEXANDER |
263-266 | 5f24 | EMV tag – Application Expiration Date |
267-268 | 03 | The tag length |
269-274 | 200731 | The tag value |
275-278 | 9f20 | EMV tag – Track 2 discretionary data |
279-280 | 00 | The tag length. No value follows |
281-284 | 5f25 | EMV tag – Application Effective Date |
285-286 | 03 | The tag length |
287-292 | 160701 | The tag value |
293-296 | 5f2d | EMV tag – Language Preference |
297-298 | 02 | The tag length |
299-302 | 656e | The tag value |
303-304 | 50 | EMV tag – Application Label |
305-306 | 0b | The tag length |
307-328 | 564953...444954 | The tag value (VISA CREDIT) |
329-330 | 4f | EMV tag – Application Identifier |
331-332 | 07 | The tag length |
333-346 | a00000...031010 | The tag value |
347-348 | 84 | EMV tag – Dedicated File Name |
349-350 | 07 | The tag length |
351-364 | a00000...031010 | The tag value |
365-372 | dfee2300 | Ignore |
373-374 | 20 | CheckLRC - one byte Exclusive-OR sum calculated for all data bytes |
375-376 | d0 | CheckSum - one byte Sum calculated for all data bytes |
377-378 | 03 | End of transmission (ETX) |
Updated over 2 years ago