]>
cvs.zerfleddert.de Git - proxmark3-svn/blob - common/emvtags.h
1 //-----------------------------------------------------------------------------
3 // code derived off merloks mifare code
6 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
7 // at your option, any later version. See the LICENSE.txt file for the text of
9 //-----------------------------------------------------------------------------
10 // structure to hold EMV card and terminal parameters
11 //-----------------------------------------------------------------------------
18 //structure to hold received/set tag values
19 //variable data inputs have length specifiers
21 //ISO14443-A card stuff
22 uint8_t ATQA
[2]; //Answer to Request
25 uint8_t SAK1
; //SAK for UID 1
26 uint8_t SAK2
; //SAK for UID 2
27 uint8_t ATS_len
; //Answer to select
35 uint8_t* historicalbytes
;
39 uint8_t tag_4F_len
; //length of AID
40 uint8_t tag_4F
[16]; //Application Identifier (AID)
41 uint8_t tag_50_len
; //length of application label
42 uint8_t tag_50
[16]; //Application Label
43 uint8_t tag_56_len
; //track1 length
44 uint8_t tag_56
[76]; //Track 1 Data
45 uint8_t tag_57_len
; //track2 equiv len
46 uint8_t tag_57
[19]; //Track 2 Equivalent Data
47 uint8_t tag_5A_len
; //PAN length
48 uint8_t tag_5A
[10]; //Application Primary Account Number (PAN)
49 //uint8_t tag_6F[]; //File Control Information (FCI) Template
50 //uint8_t tag_70[255]; //Record Template
51 //uint8_t tag_77[]; //Response Message Template Format 2
52 //uint8_t tag_80[]; //Response Message Template Format 1
53 uint8_t tag_82
[2]; //Application Interchange Profile AIP
54 //uint8_t tag_83[]; //Command Template
56 uint8_t tag_84
[16]; //DF Name
58 uint8_t tag_86
[261]; //Issuer Script Command
59 uint8_t tag_87
[1]; //Application Priority Indicator
60 uint8_t tag_88
[1]; //Short File Identifier
61 uint8_t tag_8A
[2]; //Authorisation Response Code
63 uint8_t tag_8C
[252]; //CDOL1
65 uint8_t tag_8D
[252]; //CDOL2
67 uint8_t tag_8E
[252]; //Cardholder Verification Method (CVM) List
68 uint8_t tag_8F
[1]; //Certification Authority Public Key Index
70 uint8_t tag_90
[255]; //ssuer Public Key Certificate
72 uint8_t tag_92
[255]; //Issuer Public Key Remainder
74 uint8_t tag_93
[255]; //Signed Static Application Data
76 uint8_t tag_94
[252]; //Application File Locator AFL
77 uint8_t tag_95
[5]; //Terminal Verification Results
79 uint8_t tag_97
[252]; //Transaction Certificate Data Object List (TDOL)
80 uint8_t tag_98
[20]; //Transaction Certificate (TC) Hash Value
81 //assume 20 bytes, change after testing
83 uint8_t tag_99
[20]; //Transaction Personal Identification Number (PIN) Data
84 uint8_t tag_9A
[3]; //Transaction Date
85 uint8_t tag_9B
[2]; //Transaction Status Information
86 uint8_t tag_9C
[1]; //Transaction Type
88 uint8_t tag_9D
[16]; //Directory Definition File
90 uint8_t tag_CD
[3]; //Card Issuer Action Codes Paypass
94 uint8_t tag_D7
[3]; //Application Control (PayPass)
95 uint8_t tag_D8
[2]; //Application Interchange Profile (PayPass)
96 uint8_t tag_D9_len
; //Application File Locator (PayPass)
98 uint8_t tag_DA
[2]; //Static CVC3track1
99 uint8_t tag_DB
[2]; //Static CVC3track2
100 uint8_t tag_DC
[2]; //IVCVC3 CVC3track1
101 uint8_t tag_DD
[2]; //IVCVC3 CVC3track2
104 uint8_t tag_AF
[255]; //Proprietary Information
106 uint8_t tag_5F20_len
;
107 uint8_t tag_5F20
[26]; //Cardholder Name
108 uint8_t tag_5F24
[3]; //Application Expiry Date
109 uint8_t tag_5F25
[3]; //Application Effective Date YYMMDD
110 uint8_t tag_5F28
[2]; //Issuer Country Code
111 uint8_t tag_5F2A
[2]; //Transaction Currency Code
112 uint8_t tag_5F2D_len
;
113 uint8_t tag_5F2D
[8]; //Language Preference
114 uint8_t tag_5F30
[2]; //Service Code
115 uint8_t tag_5F34
[1]; //Application Primary Account Number (PAN) Sequence Number
116 uint8_t tag_5F36
[2]; //ATC
117 uint8_t tag_5F50_len
;
118 uint8_t tag_5F50
[255]; //Issuer URL
119 uint8_t tag_5F54_len
;
120 uint8_t tag_5F54
[11]; //Bank Identifier Code (BIC)
121 uint8_t tag_9F01
[6]; //Acquirer Identifier
122 uint8_t tag_9F02
[6]; // Amount, Authorised (Numeric)
123 uint8_t tag_9F03
[6]; //Amount, Other (Numeric)
124 uint8_t tag_9F04
[4]; //Amount, Other (Binary)
125 uint8_t tag_9F05_len
;
126 uint8_t tag_9F05
[32]; //Application Discretionary Data
127 uint8_t tag_9F06_len
;
128 uint8_t tag_9F06
[16]; //AID terminal
129 uint8_t tag_9F07
[2]; //Application Usage Control
130 uint8_t tag_9F08
[2]; //Application Version Number
131 uint8_t tag_9F09
[2]; //Application Version Number
132 //uint8_t tag_9F0A[2]
133 uint8_t tag_9F0B_len
;
134 uint8_t tag_9F0B
[45]; //Cardholder Name Extended
135 uint8_t tag_9F0D
[5]; //Issuer Action Code - Default
136 uint8_t tag_9F0E
[5]; //Issuer Action Code - Denial
137 uint8_t tag_9F0F
[5]; //Issuer Action Code - Online
138 uint8_t tag_9F10_len
; //Issuer Application Data
139 uint8_t tag_9F10
[32];
140 uint8_t tag_9F11
[1]; //Issuer Code Table Index
141 uint8_t tag_9F12_len
;
142 uint8_t tag_9F12
[255]; //Application Preferred Name
143 uint8_t tag_9F13
[2]; //Last Online Application Transaction Counter (ATC) Registerjk
144 uint8_t tag_9F14
[1]; //Lower Consecutive Offline Limit
145 uint8_t tag_9F15
[2]; //Merchant Category Code
146 uint8_t tag_9F16
[15]; //Merchant Identifier
147 uint8_t tag_9F17
[1]; //Personal Identification Number (PIN) Try Counter
148 uint8_t tag_9F18
[4]; //Issuer Script Identifier
150 uint8_t tag_9F1A
[2]; //Terminal Country Code
151 uint8_t tag_9F1B
[4]; //Terminal Floor Limit
152 uint8_t tag_9F1C
[8]; //Terminal Identification
153 uint8_t tag_9F1D_len
;
154 uint8_t tag_9F1D
[8]; //Terminal Risk Management Data
155 uint8_t tag_9F1E
[8]; //Interface Device (IFD) Serial Number
156 uint8_t tag_9F1F_len
;
157 uint8_t tag_9F1F
[255]; //Track 1 Discretionary Data
158 uint8_t tag_9F20_len
;
159 uint8_t tag_9F20
[255]; //Track 2 DD
160 uint8_t tag_9F21
[3]; //Transaction Time
161 uint8_t tag_9F22
[1]; //Certification Authority Public Key Index
162 uint8_t tag_9F23
[1]; //Upper Consecutive Offline Limit
165 uint8_t tag_9F26
[8]; //Application Cryptogram
166 uint8_t tag_9F27
[1]; //Cryptogram Information Data
172 uint8_t tag_9F2D_len
;
173 uint8_t tag_9F2D
[255]; //Integrated Circuit Card (ICC) PIN Encipherment Public Key Certificate
174 uint8_t tag_9F2E
[3]; //Integrated Circuit Card (ICC) PIN Encipherment Public Key Exponent
175 uint8_t tag_9F2F_len
;
176 uint8_t tag_9F2F
[255]; //Integrated Circuit Card (ICC) PIN Encipherment Public Key Remainder
179 uint8_t tag_9F32_len
;
180 uint8_t tag_9F32
[3]; //Issuer Public Key Exponent
181 uint8_t tag_9F33
[3]; //Terminal Capabilities
182 uint8_t tag_9F34
[3]; //Cardholder Verification Method (CVM) Results
183 uint8_t tag_9F35
[1]; //Terminal Type
184 uint8_t tag_9F36
[2]; //Application Transaction Counter (ATC)
185 uint8_t tag_9F37
[4]; //Unpredictable Number
186 uint8_t tag_9F38_len
;
187 uint8_t tag_9F38
[255]; //PDOL
188 uint8_t tag_9F39
[1]; //Point-of-Service (POS) Entry Mode
189 uint8_t tag_9F40
[5]; //Additional Terminal Capabilities
190 uint8_t tag_9F41
[4]; //Transaction Sequence Counter
191 uint8_t tag_9F42
[2]; //Application Currency Code
192 uint8_t tag_9F43
[4]; //Application Reference Currency Exponent
193 uint8_t tag_9F44
[1]; //Application Currency Exponent
194 uint8_t tag_9F45
[2]; //Data Authentication Code
195 uint8_t tag_9F46_len
;
196 uint8_t tag_9F46
[255]; //ICC Public Key Certificate
197 uint8_t tag_9F47_len
;
198 uint8_t tag_9F47
[3]; //ICC Public Key Exponent
199 uint8_t tag_9F48_len
;
200 uint8_t tag_9F48
[255]; //ICC Public Key Remainder
201 uint8_t tag_9F49_len
;
202 uint8_t tag_9F49
[252];
203 uint8_t tag_9F4A
[1]; //SDA Tag list
204 uint8_t tag_9F4B_len
;
205 uint8_t tag_9F4B
[255]; //Signed Dynamic Application Data
206 uint8_t tag_9F4C
[8]; //ICC Dynamic Number
207 uint8_t tag_9F4D
[2]; //Log Entry
208 uint8_t tag_9F4E
[255]; //Merchant Name and Location
209 //9F50-9F7F are payment system specific
210 uint8_t tag_9F60
[2]; //CVC3 track1
211 uint8_t tag_9F61
[2]; //CVC3 track2
212 uint8_t tag_9F62
[6]; //Track 1 Bit Map for CVC3 (PCVC3TRACK1)
213 uint8_t tag_9F63
[6]; //Track 1 Bit Map for UN and ATC (PUNATCTRACK1)
214 uint8_t tag_9F64
[1]; //Track 1 Number of ATC Digits (NATCTRACK1)
215 uint8_t tag_9F65
[2]; //rack 2 Bit Map for CVC3 (PCVC3TRACK2)
216 uint8_t tag_9F66
[2]; //Track 2 Bit Map for UN and ATC (PUNATCTRACK2), or VISA card type
217 uint8_t tag_9F67
[1]; //Track 2 Number of ATC Digits (NATCTRACK2)
218 uint8_t tag_9F68_len
;
219 uint8_t tag_9F68
[252]; //Mag Stripe CVM List
220 uint8_t tag_9F69_len
;
221 uint8_t tag_9F69
[255]; //Unpredictable Number Data Object List (UDOL)
222 uint8_t tag_9F6A
[8]; //Unpredictable Number (Numeric)
223 uint8_t tag_9F6B_len
;
224 uint8_t tag_9F6B
[19]; //track 2 data
225 uint8_t tag_9F6C
[2]; //Mag Stripe Application Version Number(Card)
228 uint8_t tag_61
[255]; //Application template
230 uint8_t tag_6F
[255]; //6F template
232 uint8_t tag_A5
[255]; //A5 template
233 uint8_t tag_DFNAME_len
;
234 uint8_t tag_DFNAME
[255]; //A5 template
236 uint8_t tag_70
[255]; //70 template
238 uint8_t tag_77
[255]; //77 template
240 uint8_t tag_80
[255]; //80 template
241 uint8_t tag_91_len
; //Issuer Authentication Data
243 uint8_t tag_BF0C_len
;
244 uint8_t tag_BF0C
[222]; //File Control Information (FCI) Issuer Discretionary Data
245 uint8_t tag_DFName
[16];
246 uint8_t tag_DFName_len
;