]> cvs.zerfleddert.de Git - proxmark3-svn/blob - armsrc/emvdataels.c
chg: moved to header file
[proxmark3-svn] / armsrc / emvdataels.c
1 // ICEMAN 2017, this file looks similar to emvdataels.h headerfile.
2
3 //Data elements for EMV transactions.
4
5 #ifndef __EMVDATAELS_H
6 #define __EMVDATAELS_H
7 #include "emvdataels.h"
8 //Known AIDs
9
10 typedef struct{
11 uint8_t tag[2];
12 char description[255];
13 } tagdescription;
14
15 const uint8_t AID_VISA[] = {0xa0,0x00,0x00,0x00,0x03};
16 const uint8_t AID_VISA_DB[] = {0xa0,0x00,0x00,0x00,0x03,0x10,0x10};
17 const uint8_t AID_VISA_C[] = {0xa0,0x00,0x00,0x00,0x03,0x10,0x10,0x01};
18 const uint8_t AID_VISA_D[] = {0xa0,0x00,0x00,0x00,0x03,0x10,0x10,0x02};
19 const uint8_t AID_VISA_E[] = {0xa0,0x00,0x00,0x00,0x03,0x20,0x10};
20 const uint8_t AID_VISA_I[] = {0xa0,0x00,0x00,0x00,0x03,0x30,0x10};
21 const uint8_t AID_VISA_P[] = {0xa0,0x00,0x00,0x00,0x03,0x80,0x10};
22 const uint8_t AID_VISA_ATM[]= {0xa0,0x00,0x00,0x00,0x03,0x99,0x99,0x10};
23 const uint8_t AID_MASTERCARD[]= {0xa0,0x00,0x00,0x00,0x04,0x10,0x10};
24 const uint8_t AID_MAESTRO[] = {0xa0,0x00,0x00,0x00,0x04,0x30,0x60};
25 const uint8_t AID_MAESTRO_UK[]= {0xa0,0x00,0x00,0x00,0x05,0x00,0x01};
26 const uint8_t AID_MAESTRO_TEST[]={0xb0,0x12,0x34,0x56,0x78};
27 const uint8_t AID_SELF_SERVICE[]={0xa0,0x00,0x00,0x00,0x24,0x01};
28 const uint8_t AID_AMEX[] = {0xa0,0x00,0x00,0x00,0x25};
29 const uint8_t AID_EXPRESSPAY[]= {0xa0,0x00,0x00,0x00,0x25,0x01,0x07,0x01};
30 const uint8_t AID_LINK[] = {0xa0,0x00,0x00,0x00,0x29,0x10,0x10};
31 const uint8_t AID_ALIAS[] = {0xa0,0x00,0x00,0x00,0x29,0x10,0x10};
32
33 //Master data file for PSE
34 //const uint8_t DF_PSE[] = {0x32, 0x50, 0x41, 0x59, 0x2E, 0x53, 0x59, 0x53, 0x2E, 0x44, 0x44, 0x46, 0x30, 0x31};
35 const uint8_t DF_PSE[] = {0x32, 0x50, 0x41, 0x59, 0x2E, 0x53, 0x59, 0x53, 0x2E, 0x44, 0x44, 0x46, 0x30, 0x31};
36
37 //TAGS
38
39 //SW1 return values
40 const uint8_t SW1_RESPONSE_BYTES[] = {0x61};
41 const uint8_t SW1_WRONG_LENGTH[] = {0x6c};
42 const uint8_t SW12_OK[] = {0x90,0x00};
43 const uint8_t SW12_NOT_SUPPORTED[] = {0x6a,0x81};
44 const uint8_t SW12_NOT_FOUND[] = {0x6a,0x82};
45 const uint8_t SW12_COND_NOT_SAT[] = {0x69,0x83};
46 const uint8_t PIN_BLOCKED[] = {0x69,0x84};
47 const uint8_t PIN_BLOCKED2[] = {0x69,0x84};
48 const uint8_t PIN_WRONG[] = {0x63};
49
50 const tagdescription EMV_TAG_LIST[] = {
51 {"\x4f\x00","Application Identifier (AID)"},
52 {"\x50\x00","Application Label"},
53 {"\x57\x00","Track 2 Equivalent Data"},
54 {"\x5a\x00","Application Primary Account Number (PAN)"},
55 {"\x6f\x00","File Control Information (FCI) Template"},
56 {"\x70\x00","Record Template"},
57 {"\x77\x00","response message template format 2"},
58 {"\x80\x00","response message template format 1"},
59 {"\x82\x00","application interchange profile"},
60 {"\x83\x00","command template"},
61 {"\x84\x00","df name"},
62 {"\x86\x00","issuer script command"},
63 {"\x87\x00","application priority indicator"},
64 {"\x88\x00","short file identifier"},
65 {"\x8a\x00","authorisation response code"},
66 {"\x8c\x00","card risk management data object list 1 (cdol1)"},
67 {"\x8d\x00","card risk management data object list 2 (cdol2)"},
68 {"\x8e\x00","cardholder verification method (cvm) list"},
69 {"\x8f\x00","certification authority public key index"},
70 {"\x93\x00","signed static application data"},
71 {"\x94\x00","application file locator"},
72 {"\x95\x00","terminal verification results"},
73 {"\x97\x00","transaction certificate data object list (tdol)",},
74 {"\x9c\x00","transaction type"},
75 {"\x9d\x00","directory definition file"},
76 {"\xa5\x00","proprietary information"},
77 {"\x5f\x20","cardholder name"},
78 {"\x5f\x24","application expiration date yymmdd"},
79 {"\x5f\x25","application effective date yymmdd"},
80 {"\x5f\x28","issuer country code"},
81 {"\x5f\x2a","transaction currency code"},
82 {"\x5f\x2d","language preference"},
83 {"\x5f\x30","service code"},
84 {"\x5f\x34","application primary account number (pan) sequence number"},
85 {"\x5f\x50","issuer url"},
86 {"\x92\x00","issuer public key remainder"},
87 {"\x9a\x00","transaction date"},
88 {"\x9f\x02","amount, authorised (numeric)"},
89 {"\x9f\x03","amount, other (numeric)"},
90 {"\x9f\x04","amount, other (binary)"},
91 {"\x9f\x05","application discretionary data"},
92 {"\x9f\x07","application usage control"},
93 {"\x9f\x08","application version number"},
94 {"\x9f\x0d","issuer action code - default"},
95 {"\x9f\x0e","issuer action code - denial"},
96 {"\x9f\x0f","issuer action code - online"},
97 {"\x9f\x11","issuer code table index"},
98 {"\x9f\x12","application preferred name"},
99 {"\x9f\x1a","terminal country code"},
100 {"\x9f\x1f","track 1 discretionary data"},
101 {"\x9f\x20","track 2 discretionary data"},
102 {"\x9f\x26","application cryptogram"},
103 {"\x9f\x32","issuer public key exponent"},
104 {"\x9f\x36","application transaction counter"},
105 {"\x9f\x37","unpredictable number"},
106 {"\x9f\x38","processing options data object list (pdol)"},
107 {"\x9f\x42","application currency code"},
108 {"\x9f\x44","application currency exponent"},
109 {"\x9f\x4a","static data authentication tag list"},
110 {"\x9f\x4d","log entry"},
111 {"\x9f\x66","card production life cycle"},
112 {"\xbf\x0c","file control information (fci) issuer discretionary data"}
113 };
114
115 //AIP bitmasks details
116 #define AIP_CHIP_SUPPORTED 0x80
117 #define AIP_MSR_SUPPORTED 0x40
118
119 #define AIP_SDA_SUPPORTED 0x40
120 #define AIP_DDA_SUPPORTED 0x20
121 #define AIP_CARDHOLDER_VERIFICATION 0x10
122 #define AIP_TERMINAL_RISK 0x08
123 #define AIP_ISSUER_AUTH 0x04
124 #define AIP_CDA_SUPPORTED 0x01
125
126 //human readable error messages
127
128 #endif //__EMVDATAELS_H
Impressum, Datenschutz