globalplatform
globalplatform.h
Go to the documentation of this file.
1 /* Copyright (c) 2013, Karsten Ohme
2  * This file is part of GlobalPlatform.
3  *
4  * GlobalPlatform is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * GlobalPlatform is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with GlobalPlatform. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
22 #ifndef OPGP_GLOBALPLATFORM_H
23 #define OPGP_GLOBALPLATFORM_H
24 
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29 
30 #ifdef WIN32
31 #include "stdafx.h"
32 #endif
33 
34 
35 #ifndef max
36 #define max(a,b) (((a)>(b))?(a):(b))
37 #endif
38 
39 #include <stdio.h>
40 #include "types.h"
41 #include "unicode.h"
42 #include "error.h"
43 #include "errorcodes.h"
44 #include "library.h"
45 #include "connection.h"
46 #include "security.h"
47 #include "stringify.h"
48 
49 #define APDU_COMMAND_LEN 261
50 #define APDU_RESPONSE_LEN 258
51 
52 
53 static const BYTE OPGP_VISA_DEFAULT_KEY[16] = { 0x40, 0x41, 0x42, 0x43, 0x44,
54  0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F };
55 
57 static const BYTE OPGP_GEMXPRESSO_DEFAULT_KEY[16] = { 0x47, 0x45, 0x4d, 0x58,
58  0x50, 0x52, 0x45, 0x53, 0x53, 0x4f, 0x53, 0x41, 0x4d, 0x50, 0x4c, 0x45 };
59 
60 static const BYTE GP211_CARD_MANAGER_AID[7] = { 0xA0, 0x00, 0x00, 0x01, 0x51,
61  0x00, 0x00 };
62 
65 static const BYTE GP231_ISD_AID[8] = { 0xA0, 0x00, 0x00, 0x01, 0x51, 0x00, 0x00,
66  0x00 };
67 
68 static const BYTE GP211_CARD_MANAGER_AID_ALT1[8] = { 0xA0, 0x00, 0x00, 0x00,
69  0x03, 0x00, 0x00, 0x00 };
70 
71 #define GP211_LIFE_CYCLE_LOAD_FILE_LOADED 0x01
72 #define GP211_LIFE_CYCLE_CARD_OP_READY 0x01
73 #define GP211_LIFE_CYCLE_CARD_INITIALIZED 0x07
74 #define GP211_LIFE_CYCLE_CARD_SECURED 0x0f
75 #define GP211_LIFE_CYCLE_CARD_LOCKED 0x7f
76 #define GP211_LIFE_CYCLE_CARD_TERMINATED 0xff
77 #define GP211_LIFE_CYCLE_APPLICATION_INSTALLED 0x03
78 #define GP211_LIFE_CYCLE_APPLICATION_SELECTABLE 0x07
79 #define GP211_LIFE_CYCLE_APPLICATION_LOCKED 0xff
80 #define GP211_LIFE_CYCLE_SECURITY_DOMAIN_INSTALLED 0x03
81 #define GP211_LIFE_CYCLE_SECURITY_DOMAIN_SELECTABLE 0x07
82 #define GP211_LIFE_CYCLE_SECURITY_DOMAIN_PERSONALIZED 0xff
83 #define GP211_LIFE_CYCLE_SECURITY_DOMAIN_LOCKED 0xff
84 
85 /* consts for MANAGE CHANNEL */
86 
87 #define GP211_MANAGE_CHANNEL_OPEN 0x00
88 #define GP211_MANAGE_CHANNEL_CLOSE 0x80
89 
90 
93 typedef enum {
94  GP211_SECURITY_DOMAIN = 1u << (7 + 16),
95  GP211_DAP_VERIFICATION = 0xC0 << 16,
100  GP211_PIN_CHANGE_PRIVILEGE = 1u << (1 + 16),
102 
103  GP211_TRUSTED_PATH = 1u << (7 + 8),
104  GP211_AUTHORIZED_MANAGEMENT = 1u << (6 + 8),
105  GP211_TOKEN_VERIFICATION = 1u << (5 + 8),
106  GP211_GLOBAL_DELETE = 1u << (4 + 8),
107  GP211_GLOBAL_LOCK = 1u << (3 + 8),
108  GP211_GLOBAL_REGISTRY = 1u << (2 + 8),
109  GP211_FINAL_APPLICATION = 1u << (1 + 8),
110  GP211_GLOBAL_SERVICE = 1u << (0 + 8),
111 
117 
118 #define GP211_STATUS_APPLICATIONS 0x40
119 #define GP211_STATUS_ISSUER_SECURITY_DOMAIN 0x80
120 #define GP211_STATUS_LOAD_FILES 0x20
121 #define GP211_STATUS_LOAD_FILES_AND_EXECUTABLE_MODULES 0x10
122 
123 #define GP211_STATUS_FORMAT_NEW 0x02
124 #define GP211_STATUS_FORMAT_DEPRECATED 0x00
125 
126 
127 // Some possible identifiers to retrieve card data with get_data() and put_data().
128 
129 static const BYTE GP211_GET_DATA_ISSUER_IDENTIFICATION_NUMBER[2] = {0x00, 0x42};
130 static const BYTE GP211_GET_DATA_APPLICATION_PROVIDER_IDENTIFICATION_NUMBER[2] = {0x00, 0x42};
131 
132 static const BYTE GP211_GET_DATA_CARD_IMAGE_NUMBER[2] = {0x00, 0x45};
133 static const BYTE GP211_GET_DATA_SECURITY_DOMAIN_IMAGE_NUMBER[2] = {0x00, 0x45};
134 
135 static const BYTE GP211_GET_DATA_ISSUER_SECURITY_DOMAIN_AID[2] = {0x00, 0x4F};
136 static const BYTE GP211_GET_DATA_SECURITY_DOMAIN_AID[2] = {0x00, 0x4F};
137 static const BYTE GP211_GET_DATA_LIST_OF_APPLICATIONS[2] = {0x2F, 0x00};
138 static const BYTE GP211_GET_DATA_EXTENDED_CARD_RESOURCES[2] = {0xFF, 0x21};
139 
140 static const BYTE GP211_GET_DATA_CARD_DATA[2] = {0x00, 0x66};
141 static const BYTE GP211_GET_DATA_SECURITY_DOMAIN_MANAGEMENT_DATA[2] = {0x00, 0x66};
142 static const BYTE GP211_GET_DATA_SEQUENCE_COUNTER_DEFAULT_KEY_VERSION[2] = {0x00, 0xC1};
143 static const BYTE GP211_GET_DATA_CONFIRMATION_COUNTER[2] = {0x00, 0xC2};
144 static const BYTE GP211_GET_DATA_FREE_EEPROM_MEMORY_SPACE[2] = {0x00, 0xC6};
145 static const BYTE GP211_GET_DATA_FREE_COR_RAM[2] = {0x00, 0xC7};
146 static const BYTE GP211_GET_DATA_DIVERSIFICATION_DATA[2] = {0x00, 0xCF};
147 
152 static const BYTE GP211_GET_DATA_KEY_INFORMATION_TEMPLATE[2] = {0x00, 0xE0};
153 
154 static const BYTE GP211_GET_DATA_CPLC_PERSONALIZATION_DATE[2] = {0x9F, 0x66};
155 static const BYTE GP211_GET_DATA_CPLC_PRE_PERSONALIZATION_DATE[2] = {0x9F, 0x67};
156 static const BYTE GP211_GET_DATA_CPLC_ICC_MANUFACTURER_EMBEDDING_DATE[2] = {0x9F, 0x68};
157 static const BYTE GP211_GET_DATA_CPLC_MODULE_FABRICATOR_PACKAGING_DATE[2] = {0x9F, 0x69};
158 static const BYTE GP211_GET_DATA_CPLC_FABRICATION_DATE_SERIAL_NUMBER_BATCH_IDENTIFIER[2] = {0x9F, 0x6A};
159 
183 static const BYTE GP211_GET_DATA_CPLC_WHOLE_CPLC[2] = {0x9F, 0x7F};
184 
185 static const BYTE GP211_GET_DATA_FCI_DATA[2] = {0xBF, 0x0C};
186 
187 static const BYTE GP211_GET_DATA_PROTOCOL[2] = {0xDF, 0x70};
188 static const BYTE GP211_GET_DATA_ATR_HISTRORICAL_BYTES[2] = {0xDF, 0x71};
189 
190 static const BYTE GP211_GET_DATA_EF_PROD_DATA_INITIALIZATION_FINGERPRINT[2] = {0xDF, 0x76};
191 static const BYTE GP211_GET_DATA_EF_PROD_DATA_INITIALIZATION_DATA[2] = {0xDF, 0x77};
192 static const BYTE GP211_GET_DATA_EF_PROD_DATA_PRODUCTION_KEY_INDEX[2] = {0xDF, 0x78};
193 static const BYTE GP211_GET_DATA_EF_PROD_DATA_PROTOCOL_VERSION[2] = {0xDF, 0x79};
194 static const BYTE GP211_GET_DATA_EF_PROD_DATA_CHECKSUM[2] = {0xDF, 0x7A};
195 static const BYTE GP211_GET_DATA_EF_PROD_DATA_SOFTWARE_VERSION[2] = {0xDF, 0x7B};
196 static const BYTE GP211_GET_DATA_EF_PROD_DATA_RFU[2] = {0xDF, 0x7C};
197 static const BYTE GP211_GET_DATA_EF_PROD_DATA_PROFILE_WITH_PROFILE_VERSION[2] = {0xDF, 0x7D};
198 static const BYTE GP211_GET_DATA_EF_PROD_DATA_LOCATION_MACHINE_DATE_TIME[2] = {0xDF, 0x7E};
199 
200 static const BYTE GP211_GET_DATA_WHOLE_EF_PROD[2] = {0xDF, 0x7F};
201 
202 static const BYTE GP211_GET_DATA_KEY_DIVERSIFICATION[2] = {0x00, 0xCF};
203 
204 // OP 2.0.1' specifific
205 
206 static const BYTE OP201_CARD_MANAGER_AID[7] = {0xA0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00};
207 
208 #define OP201_LIFE_CYCLE_LOAD_FILE_LOGICALLY_DELETED 0x00
209 #define OP201_LIFE_CYCLE_LOAD_FILE_LOADED 0x01
210 #define OP201_LIFE_CYCLE_CARD_MANAGER_OP_READY 0x01
211 #define OP201_LIFE_CYCLE_CARD_MANAGER_INITIALIZED 0x07
212 #define OP201_LIFE_CYCLE_CARD_MANAGER_SECURED 0x0f
213 #define OP201_LIFE_CYCLE_CARD_MANAGER_CM_LOCKED 0x7f
214 #define OP201_LIFE_CYCLE_CARD_MANAGER_TERMINATED 0xff
215 #define OP201_LIFE_CYCLE_APPLICATION_LOGICALLY_DELETED 0x00
216 #define OP201_LIFE_CYCLE_APPLICATION_INSTALLED 0x03
217 #define OP201_LIFE_CYCLE_APPLICATION_SELECTABLE 0x07
218 #define OP201_LIFE_CYCLE_APPLICATION_PERSONALIZED 0x0f
219 #define OP201_LIFE_CYCLE_APPLICATION_BLOCKED 0x7f
220 #define OP201_LIFE_CYCLE_APPLICATION_LOCKED 0xff
221 
222 
225 typedef enum {
235 
236 #define OP201_STATUS_APPLICATIONS 0x40
237 #define OP201_STATUS_CARD_MANAGER 0x80
238 #define OP201_STATUS_LOAD_FILES 0x20
239 
240 
241 // Some possible identifiers to retrieve card data with get_data() and put_data().
242 static const BYTE OP201_GET_DATA_ISSUER_BIN[2] = {0x00, 0x42};
243 static const BYTE OP201_GET_DATA_APPLICATION_PROVIDER_IDENTIFICATION_NUMBER[2] = {0x00, 0x42};
244 
245 static const BYTE OP201_GET_DATA_ISSUER_DATA[2] = {0x00, 0x45};
246 static const BYTE OP201_GET_DATA_SECURITY_DOMAIN_IMAGE_NUMBER[2] = {0x00, 0x45};
247 
248 static const BYTE OP201_GET_DATA_CARD_MANAGER_AID[2] = {0x00, 0x4F};
249 static const BYTE OP201_GET_DATA_SECURITY_DOMAIN_AID[2] = {0x00, 0x4F};
250 
251 static const BYTE OP201_GET_DATA_CARD_RECOGNITION_DATA[2] = {0x00, 0x66};
252 static const BYTE OP201_GET_DATA_SEQUENCE_COUNTER_DEFAULT_KEY_VERSION[2] = {0x00, 0xC1};
253 static const BYTE OP201_GET_DATA_CONFIRMATION_COUNTER[2] = {0x00, 0xC2};
254 static const BYTE OP201_GET_DATA_FREE_EEPROM_MEMORY_SPACE[2] = {0x00, 0xC6};
255 static const BYTE OP201_GET_DATA_FREE_COR_RAM[2] = {0x00, 0xC7};
256 static const BYTE OP201_GET_DATA_DIVERSIFICATION_DATA[2] = {0x00, 0xCF};
257 
262 static const BYTE OP201_GET_DATA_KEY_INFORMATION_TEMPLATE[2] = {0x00, 0xE0};
263 
264 static const BYTE OP201_GET_DATA_CPLC_PERSONALIZATION_DATE[2] = {0x9F, 0x66};
265 static const BYTE OP201_GET_DATA_CPLC_PRE_PERSONALIZATION_DATE[2] = {0x9F, 0x67};
266 static const BYTE OP201_GET_DATA_CPLC_ICC_MANUFACTURER_EMBEDDING_DATE[2] = {0x9F, 0x68};
267 static const BYTE OP201_GET_DATA_CPLC_MODULE_FABRICATOR_PACKAGING_DATE[2] = {0x9F, 0x69};
268 static const BYTE OP201_GET_DATA_CPLC_FABRICATION_DATE_SERIAL_NUMBER_BATCH_IDENTIFIER[2] = {0x9F, 0x6A};
269 static const BYTE OP201_GET_DATA_CPLC_WHOLE_CPLC[2] = {0x9F, 0x7F};
270 
271 static const BYTE OP201_GET_DATA_FCI_DATA[2] = {0xBF, 0x0C};
272 
273 static const BYTE OP201_GET_DATA_PROTOCOL[2] = {0xDF, 0x70};
274 static const BYTE OP201_GET_DATA_ATR_HISTRORICAL_BYTES[2] = {0xDF, 0x71};
275 
276 static const BYTE OP201_GET_DATA_EF_PROD_DATA_INITIALIZATION_FINGERPRINT[2] = {0xDF, 0x76};
277 static const BYTE OP201_GET_DATA_EF_PROD_DATA_INITIALIZATION_DATA[2] = {0xDF, 0x77};
278 static const BYTE OP201_GET_DATA_EF_PROD_DATA_PRODUCTION_KEY_INDEX[2] = {0xDF, 0x78};
279 static const BYTE OP201_GET_DATA_EF_PROD_DATA_PROTOCOL_VERSION[2] = {0xDF, 0x79};
280 static const BYTE OP201_GET_DATA_EF_PROD_DATA_CHECKSUM[2] = {0xDF, 0x7A};
281 static const BYTE OP201_GET_DATA_EF_PROD_DATA_SOFTWARE_VERSION[2] = {0xDF, 0x7B};
282 static const BYTE OP201_GET_DATA_EF_PROD_DATA_RFU[2] = {0xDF, 0x7C};
283 static const BYTE OP201_GET_DATA_EF_PROD_DATA_PROFILE_WITH_PROFILE_VERSION[2] = {0xDF, 0x7D};
284 static const BYTE OP201_GET_DATA_EF_PROD_DATA_LOCATION_MACHINE_DATE_TIME[2] = {0xDF, 0x7E};
285 
286 static const BYTE OP201_GET_DATA_WHOLE_EF_PROD[2] = {0xDF, 0x7F};
287 
288 #define OPGP_DERIVATION_METHOD_NONE 0
289 #define OPGP_DERIVATION_METHOD_VISA2 1
290 #define OPGP_DERIVATION_METHOD_EMV_CPS11 2
291 #define OPGP_DERIVATION_METHOD_VISA1 3
292 
293 #define OPGP_WORK_UNKNOWN -1
294 #define OPGP_TASK_FINISHED 1
295 
296 #define INIT_PROGRESS_CALLBACK_PARAMETERS(callbackParameters, callback) if (callback != NULL) {callbackParameters.parameters = callback->parameters; \
297  callbackParameters.finished = !OPGP_TASK_FINISHED;}
298 
302 typedef struct {
308 
312 typedef struct {
316 
320 typedef struct {
322  BYTE AID[16];
323 } OPGP_AID;
324 
325 
329 typedef struct {
334 
339 typedef struct {
343  OPGP_AID appletAIDs[32];
345 
346 
351 typedef struct {
355  BYTE versionNumber[2];
358 
362 typedef struct {
365  BYTE versionNumber[2];
367  OPGP_AID executableModules[64];
370 
374 typedef struct {
379 
381 OPGP_API
383 
385 OPGP_API
387  OPGP_EXTENDED_CARD_RESOURCE_INFORMATION *extendedCardResourceInformation);
388 
393 OPGP_API
395  BYTE cardElement, BYTE format, GP211_APPLICATION_DATA *applData,
396  GP211_EXECUTABLE_MODULES_DATA *executableData, PDWORD dataLength);
397 
399 OPGP_API
400 OPGP_ERROR_STATUS GP211_set_status(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE cardElement, PBYTE AID, DWORD AIDLength, BYTE lifeCycleState);
401 
403 OPGP_API
405  BYTE baseKey[16], BYTE S_ENC[16], BYTE S_MAC[16],
406  BYTE DEK[16], BYTE keySetVersion,
407  BYTE keyIndex, BYTE secureChannelProtocol,
408  BYTE secureChannelProtocolImpl,
409  BYTE securityLevel, BYTE derivationMethod, GP211_SECURITY_INFO *secInfo);
410 
412 OPGP_API
414  BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16],
415  BYTE secureChannelProtocolImpl, BYTE sequenceCounter[2],
416  GP211_SECURITY_INFO *secInfo);
417 
419 OPGP_API
421 
423 OPGP_API
425  BYTE identifier[2], PBYTE recvBuffer, PDWORD recvBufferLength);
426 
428 OPGP_API
429 OPGP_ERROR_STATUS GP211_get_data_iso7816_4(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, BYTE identifier[2], PBYTE recvBuffer, PDWORD recvBufferLength);
430 
432 OPGP_API
434  BYTE *secureChannelProtocol, BYTE *secureChannelProtocolImpl);
435 
437 OPGP_API
439  BYTE sequenceCounter[2]);
440 
442 OPGP_API
444  BYTE identifier[2], PBYTE dataObject, DWORD dataObjectLength);
445 
447 OPGP_API
449  BYTE tryLimit, PBYTE newPIN, DWORD newPINLength);
450 
452 OPGP_API
454  BYTE keySetVersion, BYTE keyIndex, BYTE newKeySetVersion, BYTE key[16], BYTE keyType);
455 
457 OPGP_API
459  BYTE keySetVersion, BYTE keyIndex, BYTE newKeySetVersion, BYTE aesKey[16]);
460 
462 OPGP_API
464  BYTE keySetVersion, BYTE keyIndex, BYTE newKeySetVersion, BYTE _3DESKey[16]);
465 
467 OPGP_API
469  BYTE keySetVersion, BYTE keyIndex, BYTE newKeySetVersion, OPGP_STRING PEMKeyFileName, char *passPhrase);
470 
472 OPGP_API
474  BYTE keySetVersion, BYTE newKeySetVersion, BYTE baseKey[16],
475  BYTE newS_ENC[16], BYTE newS_MAC[16], BYTE newDEK[16]);
476 
478 OPGP_API
480  BYTE keySetVersion, BYTE keyIndex);
481 
483 OPGP_API
485  BYTE keyInformationTemplate,
486  GP211_KEY_INFORMATION *keyInformation, PDWORD keyInformationLength);
487 
489 OPGP_API
491  OPGP_AID *AIDs, DWORD AIDsLength,
492  GP211_RECEIPT_DATA *receiptData, PDWORD receiptDataLength);
493 
495 OPGP_API
497  PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength,
498  PBYTE securityDomainAID,
499  DWORD securityDomainAIDLength, BYTE loadFileDataBlockHash[20], BYTE loadToken[128],
500  DWORD nonVolatileCodeSpaceLimit, DWORD volatileDataSpaceLimit,
501  DWORD nonVolatileDataSpaceLimit);
502 
504 OPGP_API
506  DWORD securityDomainAIDLength,
507  PBYTE applicationAID, DWORD applicationAIDLength,
508  PBYTE extraditionTokenSignatureData,
509  PDWORD extraditionTokenSignatureDataLength);
510 
512 OPGP_API
513 OPGP_ERROR_STATUS GP211_get_load_token_signature_data(PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength,
514  PBYTE securityDomainAID,
515  DWORD securityDomainAIDLength, BYTE loadFileDataBlockHash[20],
516  DWORD nonVolatileCodeSpaceLimit, DWORD volatileDataSpaceLimit,
517  DWORD nonVolatileDataSpaceLimit, PBYTE loadTokenSignatureData,
518  PDWORD loadTokenSignatureDataLength);
519 
521 OPGP_API
523  DWORD executableLoadFileAIDLength,
524  PBYTE executableModuleAID, DWORD executableModuleAIDLength,
525  PBYTE applicationAID, DWORD applicationAIDLength,
526  BYTE applicationPrivileges, DWORD volatileDataSpaceLimit,
527  DWORD nonVolatileDataSpaceLimit, PBYTE installParameters,
528  DWORD installParametersLength, PBYTE installTokenSignatureData,
529  PDWORD installTokenSignatureDataLength);
530 
532 OPGP_API
533 OPGP_ERROR_STATUS GP211_calculate_load_token(PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength,
534  PBYTE securityDomainAID,
535  DWORD securityDomainAIDLength, BYTE loadFileDataBlockHash[20],
536  DWORD nonVolatileCodeSpaceLimit, DWORD volatileDataSpaceLimit,
537  DWORD nonVolatileDataSpaceLimit, BYTE loadToken[128],
538  OPGP_STRING PEMKeyFileName, char *passPhrase);
539 
541 OPGP_API
542 OPGP_ERROR_STATUS GP211_calculate_install_token(BYTE P1, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength,
543  PBYTE executableModuleAID,
544  DWORD executableModuleAIDLength, PBYTE applicationAID,
545  DWORD applicationAIDLength, BYTE applicationPrivileges,
546  DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit,
547  PBYTE installParameters, DWORD installParametersLength,
548  BYTE installToken[128], OPGP_STRING PEMKeyFileName, char *passPhrase);
549 
551 OPGP_API
553  BYTE hash[32], BYTE secureChannelProtocol);
554 
556 OPGP_API
558  GP211_DAP_BLOCK *dapBlock, DWORD dapBlockLength, OPGP_STRING executableLoadFileName,
559  GP211_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable, OPGP_PROGRESS_CALLBACK *callback);
560 
562 OPGP_API
564  GP211_DAP_BLOCK *dapBlock, DWORD dapBlockLength,
565  PBYTE loadFileBuffer, DWORD loadFileBufSize,
566  GP211_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable, OPGP_PROGRESS_CALLBACK *callback);
567 
569 OPGP_API
571  PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE executableModuleAID,
572  DWORD executableModuleAIDLength, PBYTE applicationAID, DWORD applicationAIDLength,
573  BYTE applicationPrivileges, DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit,
574  PBYTE installParameters, DWORD installParametersLength,
575  BYTE installToken[128], GP211_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable);
576 
578 OPGP_API
580  PBYTE applicationAID, DWORD applicationAIDLength,
581  BYTE applicationPrivileges, BYTE installToken[128],
582  GP211_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable);
583 
585 OPGP_API
587  PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE executableModuleAID,
588  DWORD executableModuleAIDLength, PBYTE applicationAID,
589  DWORD applicationAIDLength, BYTE applicationPrivileges,
590  DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit,
591  PBYTE installParameters, DWORD installParametersLength,
592  BYTE installToken[128], GP211_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable);
593 
595 OPGP_API
597  GP211_SECURITY_INFO *secInfo,
598  PBYTE applicationAID,
599  DWORD applicationAIDLength);
600 
602 OPGP_API
604  PBYTE securityDomainAID,
605  DWORD securityDomainAIDLength, PBYTE applicationAID,
606  DWORD applicationAIDLength,
607  BYTE extraditionToken[128], GP211_RECEIPT_DATA *receiptData,
608  PDWORD receiptDataAvailable);
609 
611 OPGP_API
613  BYTE keySetVersion,
614  BYTE newKeySetVersion,
615  OPGP_STRING PEMKeyFileName, char *passPhrase,
616  BYTE receiptKey[16]);
617 
619 OPGP_API
621  PBYTE capdu, DWORD capduLength, PBYTE rapdu,
622  PDWORD rapduLength);
623 
625 OPGP_API
626 OPGP_ERROR_STATUS GP211_calculate_3des_DAP(BYTE loadFileDataBlockHash[20],
627  PBYTE securityDomainAID,
628  DWORD securityDomainAIDLength,
629  BYTE DAPVerificationKey[16], GP211_DAP_BLOCK *loadFileDataBlockSignature);
630 
632 OPGP_API
633 OPGP_ERROR_STATUS GP211_calculate_rsa_DAP(BYTE loadFileDataBlockHash[20], PBYTE securityDomainAID,
634  DWORD securityDomainAIDLength, OPGP_STRING PEMKeyFileName,
635  char *passPhrase, GP211_DAP_BLOCK *loadFileDataBlockSignature);
636 
638 OPGP_API
639 OPGP_ERROR_STATUS GP211_validate_delete_receipt(DWORD confirmationCounter, PBYTE cardUniqueData,
640  DWORD cardUniqueDataLength,
641  BYTE receiptKey[16], GP211_RECEIPT_DATA receiptData,
642  PBYTE AID, DWORD AIDLength, BYTE secureChannelProtocol);
643 
645 OPGP_API
646 OPGP_ERROR_STATUS GP211_validate_install_receipt(DWORD confirmationCounter, PBYTE cardUniqueData,
647  DWORD cardUniqueDataLength,
648  BYTE receiptKey[16], GP211_RECEIPT_DATA receiptData,
649  PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength,
650  PBYTE applicationAID, DWORD applicationAIDLength, BYTE secureChannelProtocol);
651 
653 OPGP_API
654 OPGP_ERROR_STATUS GP211_validate_load_receipt(DWORD confirmationCounter, PBYTE cardUniqueData,
655  DWORD cardUniqueDataLength,
656  BYTE receiptKey[16], GP211_RECEIPT_DATA receiptData,
657  PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength,
658  PBYTE securityDomainAID, DWORD securityDomainAIDLength, BYTE secureChannelProtocol);
659 
661 OPGP_ERROR_STATUS GP211_validate_extradition_receipt(DWORD confirmationCounter, PBYTE cardUniqueData,
662  DWORD cardUniqueDataLength,
663  BYTE receiptKey[16], GP211_RECEIPT_DATA receiptData,
664  PBYTE oldSecurityDomainAID, DWORD oldSecurityDomainAIDLength,
665  PBYTE newSecurityDomainAID, DWORD newSecurityDomainAIDLength,
666  PBYTE applicationOrExecutableLoadFileAID,
667  DWORD applicationOrExecutableLoadFileAIDLength, BYTE secureChannelProtocol);
668 
670 OPGP_API
672  BYTE openClose, BYTE channelNumberToClose,
673  BYTE *channelNumberOpened);
674 
676 OPGP_API
677 OPGP_ERROR_STATUS OPGP_select_channel(OPGP_CARD_INFO *cardInfo, BYTE channelNumber);
678 
680 OPGP_API
682  PBYTE data, DWORD dataLength);
683 
685 OPGP_API
686 OPGP_ERROR_STATUS OP201_get_status(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, BYTE cardElement, OP201_APPLICATION_DATA *applData, PDWORD applDataLength);
687 
689 OPGP_API
690 OPGP_ERROR_STATUS OP201_set_status(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, BYTE cardElement, PBYTE AID, DWORD AIDLength, BYTE lifeCycleState);
691 
692 
694 OPGP_API
695 OPGP_ERROR_STATUS OP201_mutual_authentication(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, BYTE baseKey[16], BYTE encKey[16], BYTE macKey[16],
696  BYTE kekKey[16], BYTE keySetVersion,
697  BYTE keyIndex, BYTE securityLevel, BYTE derivationMethod,
698  OP201_SECURITY_INFO *secInfo);
699 
701 OPGP_API
703  BYTE identifier[2], PBYTE recvBuffer, PDWORD recvBufferLength);
704 
706 OPGP_API
708  BYTE identifier[2], PBYTE dataObject, DWORD dataObjectLength);
709 
711 OPGP_API
713  BYTE tryLimit, PBYTE newPIN, DWORD newPINLength, BYTE KEK[16]);
714 
716 OPGP_API
718  BYTE keySetVersion, BYTE keyIndex, BYTE newKeySetVersion, BYTE _3desKey[16]);
719 
721 OPGP_API
723  BYTE keySetVersion, BYTE keyIndex, BYTE newKeySetVersion, OPGP_STRING PEMKeyFileName, char *passPhrase);
724 
726 OPGP_API
728  BYTE keySetVersion, BYTE newKeySetVersion,
729  BYTE new_encKey[16], BYTE new_macKey[16], BYTE new_KEK[16]);
730 
732 OPGP_API
734  BYTE keySetVersion, BYTE keyIndex);
735 
737 OPGP_API
739  BYTE keyInformationTemplate,
740  OP201_KEY_INFORMATION *keyInformation, PDWORD keyInformationLength);
741 
743 OPGP_API
745  OPGP_AID *AIDs, DWORD AIDsLength,
746  OP201_RECEIPT_DATA *receiptData, PDWORD receiptDataLength);
747 
749 OPGP_API
751  PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE securityDomainAID,
752  DWORD securityDomainAIDLength, BYTE loadFileDAP[20], BYTE loadToken[128],
753  DWORD nonVolatileCodeSpaceLimit, DWORD volatileDataSpaceLimit,
754  DWORD nonVolatileDataSpaceLimit);
755 
757 OPGP_API
758 OPGP_ERROR_STATUS OP201_get_load_token_signature_data(PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength,
759  PBYTE securityDomainAID, DWORD securityDomainAIDLength,
760  BYTE loadFileDAP[20], DWORD nonVolatileCodeSpaceLimit,
761  DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit,
762  PBYTE loadTokenSignatureData, PDWORD loadTokenSignatureDataLength);
763 
765 OPGP_API
766 OPGP_ERROR_STATUS OP201_get_install_token_signature_data(BYTE P1, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength,
767  PBYTE AIDWithinLoadFileAID, DWORD AIDWithinLoadFileAIDLength,
768  PBYTE applicationInstanceAID, DWORD applicationInstanceAIDLength,
769  BYTE applicationPrivileges, DWORD volatileDataSpaceLimit,
770  DWORD nonVolatileDataSpaceLimit, PBYTE applicationInstallParameters,
771  DWORD applicationInstallParametersLength, PBYTE installTokenSignatureData,
772  PDWORD installTokenSignatureDataLength);
773 
775 OPGP_API
776 OPGP_ERROR_STATUS OP201_calculate_load_token(PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE securityDomainAID,
777  DWORD securityDomainAIDLength, BYTE loadFileDAP[20],
778  DWORD nonVolatileCodeSpaceLimit, DWORD volatileDataSpaceLimit,
779  DWORD nonVolatileDataSpaceLimit, BYTE loadToken[128],
780  OPGP_STRING PEMKeyFileName, char *passPhrase);
781 
783 OPGP_API
784 OPGP_ERROR_STATUS OP201_calculate_install_token(BYTE P1, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE AIDWithinLoadFileAID,
785  DWORD AIDWithinLoadFileAIDLength, PBYTE applicationInstanceAID,
786  DWORD applicationInstanceAIDLength, BYTE applicationPrivileges,
787  DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit,
788  PBYTE applicationInstallParameters, DWORD applicationInstallParametersLength,
789  BYTE installToken[128], OPGP_STRING PEMKeyFileName, char *passPhrase);
790 
792 OPGP_API
794  OPGP_STRING executableLoadFileName, unsigned char hash[20]);
795 
797 OPGP_API
799  OP201_DAP_BLOCK *dapBlock, DWORD dapBlockLength, OPGP_STRING executableLoadFileName,
800  OP201_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable, OPGP_PROGRESS_CALLBACK *callback);
801 
803 OPGP_API
805  OP201_DAP_BLOCK *dapBlock, DWORD dapBlockLength,
806  PBYTE loadFilebuf, DWORD loadFileBufSize,
807  OP201_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable, OPGP_PROGRESS_CALLBACK *callback);
808 
810 OPGP_API
812  PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE AIDWithinLoadFileAID,
813  DWORD AIDWithinLoadFileAIDLength, PBYTE applicationInstanceAID, DWORD applicationInstanceAIDLength,
814  BYTE applicationPrivileges, DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit,
815  PBYTE applicationInstallParameters, DWORD applicationInstallParametersLength,
816  BYTE installToken[128], OP201_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable);
817 
819 OPGP_API
821  PBYTE applicationInstanceAID, DWORD applicationInstanceAIDLength,
822  BYTE applicationPrivileges, BYTE installToken[128],
823  OP201_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable);
824 
826 OPGP_API
827 OPGP_ERROR_STATUS OP201_install_for_install_and_make_selectable(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE AIDWithinLoadFileAID,
828  DWORD AIDWithinLoadFileAIDLength, PBYTE applicationInstanceAID,
829  DWORD applicationInstanceAIDLength, BYTE applicationPrivileges,
830  DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit,
831  PBYTE applicationInstallParameters, DWORD applicationInstallParametersLength,
832  BYTE installToken[128], OP201_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable);
833 
835 OPGP_API
837  BYTE keySetVersion,
838  BYTE newKeySetVersion,
839  OPGP_STRING PEMKeyFileName, char *passPhrase,
840  BYTE receiptGenerationKey[16]);
841 
843 OPGP_API
845  PBYTE capdu, DWORD capduLength, PBYTE rapdu,
846  PDWORD rapduLength);
847 
849 OPGP_API
850 OPGP_ERROR_STATUS OP201_calculate_3des_DAP(PBYTE securityDomainAID, DWORD securityDomainAIDLength, OPGP_STRING executableLoadFileName,
851  BYTE DAP_verification_key[16], OP201_DAP_BLOCK *dapBlock);
852 
854 OPGP_API
855 OPGP_ERROR_STATUS OP201_calculate_rsa_DAP(PBYTE securityDomainAID, DWORD securityDomainAIDLength, OPGP_STRING executableLoadFileName,
856  OPGP_STRING PEMKeyFileName, char *passPhrase, OP201_DAP_BLOCK *dapBlock);
857 
859 OPGP_API
860 OPGP_ERROR_STATUS OP201_validate_delete_receipt(DWORD confirmationCounter, BYTE cardUniqueData[10],
861  BYTE receiptGenerationKey[16], OP201_RECEIPT_DATA receiptData,
862  PBYTE AID, DWORD AIDLength);
863 
865 OPGP_API
866 OPGP_ERROR_STATUS OP201_validate_install_receipt(DWORD confirmationCounter, BYTE cardUniqueData[10],
867  BYTE receiptGenerationKey[16], OP201_RECEIPT_DATA receiptData,
868  PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength,
869  PBYTE applicationInstanceAID, DWORD applicationInstanceAIDLength);
870 
872 OPGP_API
873 OPGP_ERROR_STATUS OP201_validate_load_receipt(DWORD confirmationCounter, BYTE cardUniqueData[10],
874  BYTE receiptGenerationKey[16], OP201_RECEIPT_DATA receiptData,
875  PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength,
876  PBYTE securityDomainAID, DWORD securityDomainAIDLength);
877 
878 
880 OPGP_API
881 OPGP_ERROR_STATUS GP211_begin_R_MAC(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE securityLevel, PBYTE data, DWORD dataLength);
882 
884 OPGP_API
885 OPGP_ERROR_STATUS GP211_end_R_MAC(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE secureChannelProtocol);
886 
888 OPGP_API
890 
892 OPGP_API
894 
896 OPGP_API
897 OPGP_ERROR_STATUS OPGP_extract_cap_file(OPGP_CSTRING fileName, PBYTE loadFileBuf, PDWORD loadFileBufSize);
898 
900 OPGP_API
902 
904 OPGP_API
906  BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16]);
907 
909 OPGP_API
910 OPGP_ERROR_STATUS GP211_VISA2_derive_keys(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, PBYTE AID, DWORD AIDLength, BYTE masterKey[16],
911  BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16]);
912 
914 OPGP_API
916  BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16]);
917 
919 OPGP_API
921  BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16]);
922 
924 OPGP_API
925 OPGP_ERROR_STATUS OP201_VISA2_derive_keys(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, PBYTE AID, DWORD AIDLength, BYTE masterKey[16],
926  BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16]);
927 
929 OPGP_API
931  BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16]);
932 
934 OPGP_API
935 OPGP_ERROR_STATUS VISA2_derive_keys(BYTE baseKeyDiversificationData[10], BYTE masterKey[16],
936  BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16]);
937 
939 OPGP_API
940 OPGP_ERROR_STATUS VISA1_derive_keys(BYTE cardSerialNumber[8], BYTE masterKey[16],
941  BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16]);
942 
944 OPGP_API
945 OPGP_ERROR_STATUS EMV_CPS11_derive_keys(BYTE baseKeyDiversificationData[10], BYTE masterKey[16],
946  BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16]);
947 
948 #ifdef __cplusplus
949 }
950 #endif
951 #endif
OPGP_select_application
OPGP_API OPGP_ERROR_STATUS OPGP_select_application(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, PBYTE AID, DWORD AIDLength)
GlobalPlatform2.1.1: Selects an application on a card by AID.
Definition: globalplatform.c:646
PDWORD
unsigned long * PDWORD
A Microsoft LPDWORD/Muscle pointer to a DWORD.
Definition: types.h:50
GP211_APPLICATION_DATA
Definition: globalplatform.h:351
OP201_validate_delete_receipt
OPGP_API OPGP_ERROR_STATUS OP201_validate_delete_receipt(DWORD confirmationCounter, BYTE cardUniqueData[10], BYTE receiptGenerationKey[16], OP201_RECEIPT_DATA receiptData, PBYTE AID, DWORD AIDLength)
Open Platform: Validates a Load Receipt.
Definition: globalplatform.c:6064
errorcodes.h
PBYTE
unsigned char * PBYTE
A Microsoft/Muscle LPBYTE, pointer to unsigned char.
Definition: types.h:48
OP201_calculate_install_token
OPGP_API OPGP_ERROR_STATUS OP201_calculate_install_token(BYTE P1, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE AIDWithinLoadFileAID, DWORD AIDWithinLoadFileAIDLength, PBYTE applicationInstanceAID, DWORD applicationInstanceAIDLength, BYTE applicationPrivileges, DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit, PBYTE applicationInstallParameters, DWORD applicationInstallParametersLength, BYTE installToken[128], OPGP_STRING PEMKeyFileName, char *passPhrase)
Open Platform: Calculates an Install Token using PKCS#1.
Definition: globalplatform.c:5599
GP211_CONTACTLESS_SELF_ACTIVATION
@ GP211_CONTACTLESS_SELF_ACTIVATION
Application is capable of activating itself on the contactless interface without a prior request to t...
Definition: globalplatform.h:115
OP201_mutual_authentication
OPGP_API OPGP_ERROR_STATUS OP201_mutual_authentication(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, BYTE baseKey[16], BYTE encKey[16], BYTE macKey[16], BYTE kekKey[16], BYTE keySetVersion, BYTE keyIndex, BYTE securityLevel, BYTE derivationMethod, OP201_SECURITY_INFO *secInfo)
Open Platform: Mutual authentication.
Definition: globalplatform.c:6116
OPGP_CARD_CONTEXT
Definition: connection.h:69
GP211_validate_extradition_receipt
OPGP_ERROR_STATUS GP211_validate_extradition_receipt(DWORD confirmationCounter, PBYTE cardUniqueData, DWORD cardUniqueDataLength, BYTE receiptKey[16], GP211_RECEIPT_DATA receiptData, PBYTE oldSecurityDomainAID, DWORD oldSecurityDomainAIDLength, PBYTE newSecurityDomainAID, DWORD newSecurityDomainAIDLength, PBYTE applicationOrExecutableLoadFileAID, DWORD applicationOrExecutableLoadFileAIDLength, BYTE secureChannelProtocol)
GlobalPlatform2.1.1: Validates an Extradition Receipt.
Definition: globalplatform.c:3557
GP211_init_implicit_secure_channel
OPGP_API OPGP_ERROR_STATUS GP211_init_implicit_secure_channel(PBYTE AID, DWORD AIDLength, BYTE baseKey[16], BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16], BYTE secureChannelProtocolImpl, BYTE sequenceCounter[2], GP211_SECURITY_INFO *secInfo)
GlobalPlatform2.1.1: Inits a Secure Channel implicitly.
Definition: globalplatform.c:4567
GP211_put_3des_key
OPGP_API OPGP_ERROR_STATUS GP211_put_3des_key(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE keySetVersion, BYTE keyIndex, BYTE newKeySetVersion, BYTE _3DESKey[16])
GlobalPlatform2.1.1: replaces a single 3DES key in a key set or adds a new 3DES key.
Definition: globalplatform.c:801
OPGP_PROGRESS_CALLBACK_PARAMETERS::currentWork
DWORD currentWork
The current work which is done. If not known this contains OPGP_WORK_UNKNOWN.
Definition: globalplatform.h:303
GP211_GLOBAL_SERVICE
@ GP211_GLOBAL_SERVICE
Application provides services to other Applications on the card.
Definition: globalplatform.h:110
GP211_load_from_buffer
OPGP_API OPGP_ERROR_STATUS GP211_load_from_buffer(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, GP211_DAP_BLOCK *dapBlock, DWORD dapBlockLength, PBYTE loadFileBuffer, DWORD loadFileBufSize, GP211_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable, OPGP_PROGRESS_CALLBACK *callback)
GlobalPlatform2.1.1: Loads a Executable Load File (containing an application) from a buffer to the ca...
Definition: globalplatform.c:2100
GP211_delete_key
OPGP_API OPGP_ERROR_STATUS GP211_delete_key(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE keySetVersion, BYTE keyIndex)
GlobalPlatform2.1.1: deletes a key or multiple keys.
Definition: globalplatform.c:1172
close_implicit_secure_channel
OPGP_API OPGP_ERROR_STATUS close_implicit_secure_channel(GP211_SECURITY_INFO *secInfo)
GlobalPlatform2.1.1: Closes a Secure Channel implicitly.
VISA2_derive_keys
OPGP_API OPGP_ERROR_STATUS VISA2_derive_keys(BYTE baseKeyDiversificationData[10], BYTE masterKey[16], BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16])
Derives the static keys from a master key according the VISA 2 key derivation scheme.
Definition: globalplatform.c:3701
GP211_put_symmetric_key
OPGP_API OPGP_ERROR_STATUS GP211_put_symmetric_key(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE keySetVersion, BYTE keyIndex, BYTE newKeySetVersion, BYTE key[16], BYTE keyType)
GlobalPlatform2.1.1: replaces a single symmetric key in a key set or adds a new key.
Definition: globalplatform.c:851
OPGP_LOAD_FILE_PARAMETERS::numAppletAIDs
BYTE numAppletAIDs
The number of applets contained in the Load File.
Definition: globalplatform.h:342
types.h
OP201_send_APDU
OPGP_API OPGP_ERROR_STATUS OP201_send_APDU(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, PBYTE capdu, DWORD capduLength, PBYTE rapdu, PDWORD rapduLength)
Sends an application protocol data unit.
Definition: globalplatform.c:4902
GP211_CONTACTLESS_ACTIVATION
@ GP211_CONTACTLESS_ACTIVATION
Application is capable of activating and deactivating any Application on the contactless interface.
Definition: globalplatform.h:114
GP211_delete_application
OPGP_API OPGP_ERROR_STATUS GP211_delete_application(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, OPGP_AID *AIDs, DWORD AIDsLength, GP211_RECEIPT_DATA *receiptData, PDWORD receiptDataLength)
GlobalPlatform2.1.1: Deletes a Executable Load File or an application.
Definition: globalplatform.c:1243
OPGP_LOAD_FILE_PARAMETERS::loadFileAID
OPGP_AID loadFileAID
The AID of the Load File.
Definition: globalplatform.h:341
OPGP_read_executable_load_file_parameters
OPGP_API OPGP_ERROR_STATUS OPGP_read_executable_load_file_parameters(OPGP_STRING loadFileName, OPGP_LOAD_FILE_PARAMETERS *loadFileParams)
Reads the parameters of an Executable Load File.
Definition: globalplatform.c:2041
OP201_MANDATED_DAP_VERIFICATION
@ OP201_MANDATED_DAP_VERIFICATION
Security domain requires DAP verification for loading and installing applications.
Definition: globalplatform.h:233
OP201_calculate_load_token
OPGP_API OPGP_ERROR_STATUS OP201_calculate_load_token(PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE securityDomainAID, DWORD securityDomainAIDLength, BYTE loadFileDAP[20], DWORD nonVolatileCodeSpaceLimit, DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit, BYTE loadToken[128], OPGP_STRING PEMKeyFileName, char *passPhrase)
Open Platform: Calculates a Load Token using PKCS#1.
Definition: globalplatform.c:5752
GP211_GLOBAL_REGISTRY
@ GP211_GLOBAL_REGISTRY
Application may access any entry in the GlobalPlatform Registry.
Definition: globalplatform.h:108
BYTE
unsigned char BYTE
A Microsoft/Muscle BYTE definition.
Definition: types.h:51
GP211_calculate_install_token
OPGP_API OPGP_ERROR_STATUS GP211_calculate_install_token(BYTE P1, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE executableModuleAID, DWORD executableModuleAIDLength, PBYTE applicationAID, DWORD applicationAIDLength, BYTE applicationPrivileges, DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit, PBYTE installParameters, DWORD installParametersLength, BYTE installToken[128], OPGP_STRING PEMKeyFileName, char *passPhrase)
GlobalPlatform2.1.1: Calculates an Install Token using PKCS#1.
Definition: globalplatform.c:3133
GP211_end_R_MAC
OPGP_API OPGP_ERROR_STATUS GP211_end_R_MAC(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE secureChannelProtocol)
Terminates a R-MAC session.
Definition: globalplatform.c:1442
OPGP_PROGRESS_CALLBACK::callback
PVOID callback
The callback function. The must accept a OPGP_PROGRESS_CALLBACK_PARAMETERS parameter and return void,...
Definition: globalplatform.h:313
GP211_calculate_3des_DAP
OPGP_API OPGP_ERROR_STATUS GP211_calculate_3des_DAP(BYTE loadFileDataBlockHash[20], PBYTE securityDomainAID, DWORD securityDomainAIDLength, BYTE DAPVerificationKey[16], GP211_DAP_BLOCK *loadFileDataBlockSignature)
GlobalPlatform2.1.1: Calculates a Load File Data Block Signature using 3DES.
Definition: globalplatform.c:3377
GP211_install_for_extradition
OPGP_API OPGP_ERROR_STATUS GP211_install_for_extradition(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, PBYTE securityDomainAID, DWORD securityDomainAIDLength, PBYTE applicationAID, DWORD applicationAIDLength, BYTE extraditionToken[128], GP211_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable)
GlobalPlatform2.1.1: Associates an application with another Security Domain.
Definition: globalplatform.c:2744
OP201_install_for_install
OPGP_API OPGP_ERROR_STATUS OP201_install_for_install(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE AIDWithinLoadFileAID, DWORD AIDWithinLoadFileAIDLength, PBYTE applicationInstanceAID, DWORD applicationInstanceAIDLength, BYTE applicationPrivileges, DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit, PBYTE applicationInstallParameters, DWORD applicationInstallParametersLength, BYTE installToken[128], OP201_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable)
Open Platform: Installs an application on the card.
Definition: globalplatform.c:5426
GP211_validate_load_receipt
OPGP_API OPGP_ERROR_STATUS GP211_validate_load_receipt(DWORD confirmationCounter, PBYTE cardUniqueData, DWORD cardUniqueDataLength, BYTE receiptKey[16], GP211_RECEIPT_DATA receiptData, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE securityDomainAID, DWORD securityDomainAIDLength, BYTE secureChannelProtocol)
GlobalPlatform2.1.1: Validates a Load Receipt.
Definition: globalplatform.c:3473
GP211_install_for_install_and_make_selectable
OPGP_API OPGP_ERROR_STATUS GP211_install_for_install_and_make_selectable(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE executableModuleAID, DWORD executableModuleAIDLength, PBYTE applicationAID, DWORD applicationAIDLength, BYTE applicationPrivileges, DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit, PBYTE installParameters, DWORD installParametersLength, BYTE installToken[128], GP211_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable)
GlobalPlatform2.1.1: Installs and makes an installed application selectable.
Definition: globalplatform.c:2647
OP201_DELEGATED_MANAGEMENT
@ OP201_DELEGATED_MANAGEMENT
Security domain has delegated management right.
Definition: globalplatform.h:228
GP211_put_rsa_key
OPGP_API OPGP_ERROR_STATUS GP211_put_rsa_key(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE keySetVersion, BYTE keyIndex, BYTE newKeySetVersion, OPGP_STRING PEMKeyFileName, char *passPhrase)
GlobalPlatform2.1.1: replaces a single public RSA key in a key set or adds a new public RSA key.
Definition: globalplatform.c:703
GP211_SECURITY_INFO
Definition: security.h:203
OPGP_LOAD_FILE_PARAMETERS
Definition: globalplatform.h:339
OP201_put_secure_channel_keys
OPGP_API OPGP_ERROR_STATUS OP201_put_secure_channel_keys(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, BYTE keySetVersion, BYTE newKeySetVersion, BYTE new_encKey[16], BYTE new_macKey[16], BYTE new_KEK[16])
Open Platform: replaces or adds a secure channel key set consisting of encryption key,...
Definition: globalplatform.c:4986
OPGP_LOAD_FILE_PARAMETERS::loadFileSize
DWORD loadFileSize
The size of the Load File.
Definition: globalplatform.h:340
security.h
GP211_mutual_authentication
OPGP_API OPGP_ERROR_STATUS GP211_mutual_authentication(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, BYTE baseKey[16], BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16], BYTE keySetVersion, BYTE keyIndex, BYTE secureChannelProtocol, BYTE secureChannelProtocolImpl, BYTE securityLevel, BYTE derivationMethod, GP211_SECURITY_INFO *secInfo)
GlobalPlatform2.1.1: Mutual authentication.
Definition: globalplatform.c:4109
OPGP_manage_channel
OPGP_API OPGP_ERROR_STATUS OPGP_manage_channel(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO *cardInfo, GP211_SECURITY_INFO *secInfo, BYTE openClose, BYTE channelNumberToClose, BYTE *channelNumberOpened)
ISO 7816-4 / GlobalPlatform2.1.1: Opens or closes a Logical Channel.
Definition: globalplatform.c:4845
OP201_DAP_BLOCK
Definition: security.h:231
GP211_CARD_MANAGER_LOCK_PRIVILEGE
@ GP211_CARD_MANAGER_LOCK_PRIVILEGE
Application can lock the Card Manager.
Definition: globalplatform.h:97
GP211_get_install_token_signature_data
OPGP_API OPGP_ERROR_STATUS GP211_get_install_token_signature_data(BYTE P1, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE executableModuleAID, DWORD executableModuleAIDLength, PBYTE applicationAID, DWORD applicationAIDLength, BYTE applicationPrivileges, DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit, PBYTE installParameters, DWORD installParametersLength, PBYTE installTokenSignatureData, PDWORD installTokenSignatureDataLength)
GlobalPlatform2.1.1: Function to retrieve the data to sign by the Card Issuer in an Install Token.
Definition: globalplatform.c:2965
OPGP_select_channel
OPGP_API OPGP_ERROR_STATUS OPGP_select_channel(OPGP_CARD_INFO *cardInfo, BYTE channelNumber)
ISO 7816-4 / GlobalPlatform2.1.1: If multiple Logical Channels are open or a new Logical Channel is o...
Definition: globalplatform.c:4823
OPGP_PROGRESS_CALLBACK
Definition: globalplatform.h:312
GP211_calculate_load_token
OPGP_API OPGP_ERROR_STATUS GP211_calculate_load_token(PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE securityDomainAID, DWORD securityDomainAIDLength, BYTE loadFileDataBlockHash[20], DWORD nonVolatileCodeSpaceLimit, DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit, BYTE loadToken[128], OPGP_STRING PEMKeyFileName, char *passPhrase)
GlobalPlatform2.1.1: Calculates a Load Token using PKCS#1.
Definition: globalplatform.c:3291
GP211_put_aes_key
OPGP_API OPGP_ERROR_STATUS GP211_put_aes_key(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE keySetVersion, BYTE keyIndex, BYTE newKeySetVersion, BYTE aesKey[16])
GlobalPlatform2.1.1: replaces a single AES key in a key set or adds a new AES key.
Definition: globalplatform.c:842
OP201_get_status
OPGP_API OPGP_ERROR_STATUS OP201_get_status(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, BYTE cardElement, OP201_APPLICATION_DATA *applData, PDWORD applDataLength)
Open Platform: Gets the life cycle status of Applications, the Card Manager and Executable Load Files...
Definition: globalplatform.c:5214
GP211_DEFAULT_SELECTED_CARD_RESET_PRIVILEGE
@ GP211_DEFAULT_SELECTED_CARD_RESET_PRIVILEGE
Application is default selected. In GlobalPlatform 2.3.1 this was redefined as Card Reset privilege.
Definition: globalplatform.h:99
OP201_SECURITY_DOMAIN
@ OP201_SECURITY_DOMAIN
Application is security domain.
Definition: globalplatform.h:226
OPGP_EXTENDED_CARD_RESOURCE_INFORMATION::freeNonVolatileMemory
DWORD freeNonVolatileMemory
Free non volatile memory.
Definition: globalplatform.h:377
OP201_put_delegated_management_keys
OPGP_API OPGP_ERROR_STATUS OP201_put_delegated_management_keys(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, BYTE keySetVersion, BYTE newKeySetVersion, OPGP_STRING PEMKeyFileName, char *passPhrase, BYTE receiptGenerationKey[16])
Open Platform: Adds a key set for Delegated Management.
Definition: globalplatform.c:5012
GP211_EXECUTABLE_MODULES_DATA::associatedSecurityDomainAID
OPGP_AID associatedSecurityDomainAID
The associated Security Domain's AID.
Definition: globalplatform.h:368
OP201_delete_key
OPGP_API OPGP_ERROR_STATUS OP201_delete_key(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, BYTE keySetVersion, BYTE keyIndex)
Open Platform: deletes a key or multiple keys.
Definition: globalplatform.c:5035
GP211_put_secure_channel_keys
OPGP_API OPGP_ERROR_STATUS GP211_put_secure_channel_keys(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE keySetVersion, BYTE newKeySetVersion, BYTE baseKey[16], BYTE newS_ENC[16], BYTE newS_MAC[16], BYTE newDEK[16])
GlobalPlatform2.1.1: replaces or adds a secure channel key set consisting of S-ENC,...
Definition: globalplatform.c:1024
OP201_APPLICATION_DATA
Definition: globalplatform.h:329
GP211_EXECUTABLE_MODULES_DATA::aid
OPGP_AID aid
The Executable Load File AID.
Definition: globalplatform.h:363
OPGP_ERROR_STATUS
Definition: error.h:45
GP211_PIN_CHANGE_PRIVILEGE
@ GP211_PIN_CHANGE_PRIVILEGE
Application can change global PIN.
Definition: globalplatform.h:100
OP201_CARD_MANAGER_LOCK_PRIVILEGE
@ OP201_CARD_MANAGER_LOCK_PRIVILEGE
Application can lock the Card Manager.
Definition: globalplatform.h:229
PVOID
void * PVOID
Pointer definition.
Definition: types.h:36
OPGP_EXTENDED_CARD_RESOURCE_INFORMATION::freeVolatileMemory
DWORD freeVolatileMemory
Free volatile memory.
Definition: globalplatform.h:376
OP201_put_rsa_key
OPGP_API OPGP_ERROR_STATUS OP201_put_rsa_key(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, BYTE keySetVersion, BYTE keyIndex, BYTE newKeySetVersion, OPGP_STRING PEMKeyFileName, char *passPhrase)
Open Platform: replaces a single public RSA key in a key set or adds a new public RSA key.
Definition: globalplatform.c:4933
OPGP_extract_cap_file
OPGP_API OPGP_ERROR_STATUS OPGP_extract_cap_file(OPGP_CSTRING fileName, PBYTE loadFileBuf, PDWORD loadFileBufSize)
Extracts a CAP file into a buffer.
Definition: globalplatform.c:2023
DWORD
unsigned long DWORD
A Microsoft/Muscle DWORD definition.
Definition: types.h:52
stringify.h
OP201_install_for_load
OPGP_API OPGP_ERROR_STATUS OP201_install_for_load(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE securityDomainAID, DWORD securityDomainAIDLength, BYTE loadFileDAP[20], BYTE loadToken[128], DWORD nonVolatileCodeSpaceLimit, DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit)
Open Platform: Prepares the card for loading an application.
Definition: globalplatform.c:5382
OPGP_PROGRESS_CALLBACK_PARAMETERS::totalWork
DWORD totalWork
The total work which needs to be done. If not known this contains OPGP_WORK_UNKNOWN.
Definition: globalplatform.h:304
OP201_EMV_CPS11_derive_keys
OPGP_API OPGP_ERROR_STATUS OP201_EMV_CPS11_derive_keys(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, BYTE masterKey[16], BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16])
Derives the static keys from a master key according the EMV CPS 1.1 key derivation scheme.
Definition: globalplatform.c:3930
OP201_install_for_install_and_make_selectable
OPGP_API OPGP_ERROR_STATUS OP201_install_for_install_and_make_selectable(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE AIDWithinLoadFileAID, DWORD AIDWithinLoadFileAIDLength, PBYTE applicationInstanceAID, DWORD applicationInstanceAIDLength, BYTE applicationPrivileges, DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit, PBYTE applicationInstallParameters, DWORD applicationInstallParametersLength, BYTE installToken[128], OP201_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable)
Open Platform: Installs and makes an installed application selectable.
Definition: globalplatform.c:5477
GP211_EXECUTABLE_MODULES_DATA::numExecutableModules
BYTE numExecutableModules
Number of associated Executable Modules.
Definition: globalplatform.h:366
GP211_VISA1_derive_keys
OPGP_API OPGP_ERROR_STATUS GP211_VISA1_derive_keys(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE masterKey[16], BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16])
Derives the static keys from a master key according the VISA 1 key derivation scheme.
Definition: globalplatform.c:3815
OPGP_PROGRESS_CALLBACK::parameters
PVOID parameters
Proprietary parameters for the callback function. Passed in when the function is called.
Definition: globalplatform.h:314
GP211_load
OPGP_API OPGP_ERROR_STATUS GP211_load(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, GP211_DAP_BLOCK *dapBlock, DWORD dapBlockLength, OPGP_STRING executableLoadFileName, GP211_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable, OPGP_PROGRESS_CALLBACK *callback)
GlobalPlatform2.1.1: Loads a Executable Load File (containing an application) to the card.
Definition: globalplatform.c:2072
OP201_get_key_information_templates
OPGP_API OPGP_ERROR_STATUS OP201_get_key_information_templates(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, BYTE keyInformationTemplate, OP201_KEY_INFORMATION *keyInformation, PDWORD keyInformationLength)
Open Platform: Retrieves key information of keys on the card.
Definition: globalplatform.c:5154
OP201_put_data
OPGP_API OPGP_ERROR_STATUS OP201_put_data(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, BYTE identifier[2], PBYTE dataObject, DWORD dataObjectLength)
Open Platform: Put card data.
Definition: globalplatform.c:5102
OPGP_PROGRESS_CALLBACK_PARAMETERS::parameters
PVOID parameters
Proprietary parameters for the function passed in with OPGP_PROGRESS_CALLBACK.
Definition: globalplatform.h:306
GP211_get_data_iso7816_4
OPGP_API OPGP_ERROR_STATUS GP211_get_data_iso7816_4(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, BYTE identifier[2], PBYTE recvBuffer, PDWORD recvBufferLength)
Retrieve card data according ISO/IEC 7816-4 command not within a secure channel.
Definition: globalplatform.c:1521
OPGP_EXTENDED_CARD_RESOURCE_INFORMATION::numInstalledApplications
DWORD numInstalledApplications
The number of the installed applications.
Definition: globalplatform.h:375
OP201_DEFAULT_SELECTED
@ OP201_DEFAULT_SELECTED
Application is default selected.
Definition: globalplatform.h:231
OP201_pin_change
OPGP_API OPGP_ERROR_STATUS OP201_pin_change(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, BYTE tryLimit, PBYTE newPIN, DWORD newPINLength, BYTE KEK[16])
Open Platform: Changes or unblocks the global PIN.
Definition: globalplatform.c:6089
VISA1_derive_keys
OPGP_API OPGP_ERROR_STATUS VISA1_derive_keys(BYTE cardSerialNumber[8], BYTE masterKey[16], BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16])
Derives the static keys from a master key according the VISA 1 key derivation scheme.
Definition: globalplatform.c:3858
OPGP_read_executable_load_file_parameters_from_buffer
OPGP_API OPGP_ERROR_STATUS OPGP_read_executable_load_file_parameters_from_buffer(PBYTE loadFileBuf, DWORD loadFileBufSize, OPGP_LOAD_FILE_PARAMETERS *loadFileParams)
Receives Executable Load File as a buffer instead of a FILE.
Definition: globalplatform.c:2051
OPGP_AID
Definition: globalplatform.h:320
OP201_get_data
OPGP_API OPGP_ERROR_STATUS OP201_get_data(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, BYTE identifier[2], PBYTE recvBuffer, PDWORD recvBufferLength)
Open Platform: Retrieve card data.
Definition: globalplatform.c:5127
GP211_pin_change
OPGP_API OPGP_ERROR_STATUS GP211_pin_change(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE tryLimit, PBYTE newPIN, DWORD newPINLength)
GlobalPlatform2.1.1: Changes or unblocks the global PIN.
Definition: globalplatform.c:4699
GP211_RECEIPT_DATA
Definition: security.h:280
error.h
library.h
GP211_GLOBAL_DELETE
@ GP211_GLOBAL_DELETE
Application may delete any Card Content.
Definition: globalplatform.h:106
OPGP_CSTRING
const typedef char * OPGP_CSTRING
A Microsoft/Muscle LPCTSTR.
Definition: types.h:47
OP201_calculate_rsa_DAP
OPGP_API OPGP_ERROR_STATUS OP201_calculate_rsa_DAP(PBYTE securityDomainAID, DWORD securityDomainAIDLength, OPGP_STRING executableLoadFileName, OPGP_STRING PEMKeyFileName, char *passPhrase, OP201_DAP_BLOCK *dapBlock)
Open Platform: Calculates a Load File Data Block DAP using SHA-1 and PKCS#1 (RSA).
Definition: globalplatform.c:5957
GP211_APPLICATION_DATA::aid
OPGP_AID aid
The AID.
Definition: globalplatform.h:352
OPGP_PROGRESS_CALLBACK_PARAMETERS
Definition: globalplatform.h:302
OP201_PIN_CHANGE_PRIVILEGE
@ OP201_PIN_CHANGE_PRIVILEGE
Application can change global PIN.
Definition: globalplatform.h:232
GP211_TOKEN_VERIFICATION
@ GP211_TOKEN_VERIFICATION
Application is capable of verifying a token for Delegated Card Content Management.
Definition: globalplatform.h:105
OP201_load
OPGP_API OPGP_ERROR_STATUS OP201_load(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, OP201_DAP_BLOCK *dapBlock, DWORD dapBlockLength, OPGP_STRING executableLoadFileName, OP201_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable, OPGP_PROGRESS_CALLBACK *callback)
Open Platform: Loads a Executable Load File (containing an application) to the card.
Definition: globalplatform.c:5280
OP201_CARD_MANAGER_TERMINATE_PRIVILEGE
@ OP201_CARD_MANAGER_TERMINATE_PRIVILEGE
Application can terminate the card.
Definition: globalplatform.h:230
GP211_calculate_rsa_DAP
OPGP_API OPGP_ERROR_STATUS GP211_calculate_rsa_DAP(BYTE loadFileDataBlockHash[20], PBYTE securityDomainAID, DWORD securityDomainAIDLength, OPGP_STRING PEMKeyFileName, char *passPhrase, GP211_DAP_BLOCK *loadFileDataBlockSignature)
GlobalPlatform2.1.1: Calculates a Load File Data Block Signature using SHA-1 and PKCS#1 (RSA).
Definition: globalplatform.c:3436
GP211_put_delegated_management_keys
OPGP_API OPGP_ERROR_STATUS GP211_put_delegated_management_keys(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE keySetVersion, BYTE newKeySetVersion, OPGP_STRING PEMKeyFileName, char *passPhrase, BYTE receiptKey[16])
GlobalPlatform2.1.1: Adds a key set for Delegated Management.
Definition: globalplatform.c:1152
OPGP_cap_to_ijc
OPGP_API OPGP_ERROR_STATUS OPGP_cap_to_ijc(OPGP_CSTRING capFileName, OPGP_STRING ijcFileName)
Converts a CAP file to an IJC file (Executable Load File).
Definition: globalplatform.c:2032
GP211_get_secure_channel_protocol_details
OPGP_API OPGP_ERROR_STATUS GP211_get_secure_channel_protocol_details(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, BYTE *secureChannelProtocol, BYTE *secureChannelProtocolImpl)
GlobalPlatform2.1.1: This returns the Secure Channel Protocol and the Secure Channel Protocol impleme...
Definition: globalplatform.c:1561
GP211_install_for_load
OPGP_API OPGP_ERROR_STATUS GP211_install_for_load(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE securityDomainAID, DWORD securityDomainAIDLength, BYTE loadFileDataBlockHash[20], BYTE loadToken[128], DWORD nonVolatileCodeSpaceLimit, DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit)
GlobalPlatform2.1.1: Prepares the card for loading an application.
Definition: globalplatform.c:2453
OP201_SECURITY_INFO
Definition: security.h:188
EMV_CPS11_derive_keys
OPGP_API OPGP_ERROR_STATUS EMV_CPS11_derive_keys(BYTE baseKeyDiversificationData[10], BYTE masterKey[16], BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16])
Derives the static keys from a master key according the EMV CPS11 derivation scheme.
Definition: globalplatform.c:3987
OPGP_STRING
char * OPGP_STRING
A Microsoft/Muscle LPTSTR.
Definition: types.h:46
GP211_GLOBAL_LOCK
@ GP211_GLOBAL_LOCK
Application may lock or unlock any Application.
Definition: globalplatform.h:107
OP201_VISA1_derive_keys
OPGP_API OPGP_ERROR_STATUS OP201_VISA1_derive_keys(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, BYTE masterKey[16], BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16])
Derives the static keys from a master key according the VISA 1 key derivation scheme.
Definition: globalplatform.c:3788
OPGP_AID::AIDLength
BYTE AIDLength
The length of the AID.
Definition: globalplatform.h:321
GP211_CIPHERED_LOAD_FILE_DATA_BLOCK
@ GP211_CIPHERED_LOAD_FILE_DATA_BLOCK
The Security Domain requires that the Load File being associated to it is to be loaded ciphered.
Definition: globalplatform.h:113
OP201_validate_load_receipt
OPGP_API OPGP_ERROR_STATUS OP201_validate_load_receipt(DWORD confirmationCounter, BYTE cardUniqueData[10], BYTE receiptGenerationKey[16], OP201_RECEIPT_DATA receiptData, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE securityDomainAID, DWORD securityDomainAIDLength)
Open Platform: Validates a Load Receipt.
Definition: globalplatform.c:6012
GP211_AUTHORIZED_MANAGEMENT
@ GP211_AUTHORIZED_MANAGEMENT
Application is capable of Card Content Management; Security Domain privilege shall also be set.
Definition: globalplatform.h:104
OP201_VISA2_derive_keys
OPGP_API OPGP_ERROR_STATUS OP201_VISA2_derive_keys(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, PBYTE AID, DWORD AIDLength, BYTE masterKey[16], BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16])
Derives the static keys from a master key according the VISA 2 key derivation scheme.
Definition: globalplatform.c:3619
GP211_CARD_MANAGER_TERMINATE_PRIVILEGE
@ GP211_CARD_MANAGER_TERMINATE_PRIVILEGE
Application can terminate the card.
Definition: globalplatform.h:98
OP201_validate_install_receipt
OPGP_API OPGP_ERROR_STATUS OP201_validate_install_receipt(DWORD confirmationCounter, BYTE cardUniqueData[10], BYTE receiptGenerationKey[16], OP201_RECEIPT_DATA receiptData, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE applicationInstanceAID, DWORD applicationInstanceAIDLength)
Open Platform: Validates an Install Receipt.
Definition: globalplatform.c:6039
GP211_calculate_load_file_data_block_hash
OPGP_API OPGP_ERROR_STATUS GP211_calculate_load_file_data_block_hash(OPGP_STRING executableLoadFileName, BYTE hash[32], BYTE secureChannelProtocol)
GlobalPlatform2.1.1: Calculates a Load File Data Block Hash.
Definition: globalplatform.c:3324
connection.h
GP211_TRUSTED_PATH
@ GP211_TRUSTED_PATH
Application is a Trusted Path for inter-application communication.
Definition: globalplatform.h:103
OP201_load_from_buffer
OPGP_API OPGP_ERROR_STATUS OP201_load_from_buffer(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, OP201_DAP_BLOCK *dapBlock, DWORD dapBlockLength, PBYTE loadFilebuf, DWORD loadFileBufSize, OP201_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable, OPGP_PROGRESS_CALLBACK *callback)
Open Platform: Loads a Executable Load File (containing an application) from a buffer to the card.
Definition: globalplatform.c:5328
OP201_RECEIPT_DATA
Definition: security.h:243
GP211_get_extradition_token_signature_data
OPGP_API OPGP_ERROR_STATUS GP211_get_extradition_token_signature_data(PBYTE securityDomainAID, DWORD securityDomainAIDLength, PBYTE applicationAID, DWORD applicationAIDLength, PBYTE extraditionTokenSignatureData, PDWORD extraditionTokenSignatureDataLength)
GlobalPlatform2.1.1: Function to retrieve the data to sign by the Card Issuer in an Extradition Token...
Definition: globalplatform.c:3073
OPGP_EXTENDED_CARD_RESOURCE_INFORMATION
Definition: globalplatform.h:374
OP201_delete_application
OPGP_API OPGP_ERROR_STATUS OP201_delete_application(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, OPGP_AID *AIDs, DWORD AIDsLength, OP201_RECEIPT_DATA *receiptData, PDWORD receiptDataLength)
Open Platform: Deletes a Executable Load File or an application.
Definition: globalplatform.c:5057
OP201_APPLICATION_DATA::privileges
OP201_APPLICATION_PRIVILEGES privileges
The Card Manager or application privileges.
Definition: globalplatform.h:332
OP201_APPLICATION_PRIVILEGES
OP201_APPLICATION_PRIVILEGES
Application privileges.
Definition: globalplatform.h:225
GP211_set_status
OPGP_API OPGP_ERROR_STATUS GP211_set_status(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE cardElement, PBYTE AID, DWORD AIDLength, BYTE lifeCycleState)
GlobalPlatform2.1.1: Sets the life cycle status of Applications, Security Domains or the Card Manager...
Definition: globalplatform.c:1908
GP211_get_key_information_templates
OPGP_API OPGP_ERROR_STATUS GP211_get_key_information_templates(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE keyInformationTemplate, GP211_KEY_INFORMATION *keyInformation, PDWORD keyInformationLength)
GlobalPlatform2.1.1: Retrieves key information of keys on the card.
Definition: globalplatform.c:1733
GP211_EXECUTABLE_MODULES_DATA
Definition: globalplatform.h:362
OPGP_get_extended_card_resources_information
OPGP_API OPGP_ERROR_STATUS OPGP_get_extended_card_resources_information(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, OPGP_EXTENDED_CARD_RESOURCE_INFORMATION *extendedCardResourceInformation)
Reads the extended card resource information (number of applications + free memory).
Definition: globalplatform.c:1836
unicode.h
OPGP_CARD_INFO
Definition: connection.h:80
GP211_begin_R_MAC
OPGP_API OPGP_ERROR_STATUS GP211_begin_R_MAC(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE securityLevel, PBYTE data, DWORD dataLength)
Initiates a R-MAC session.
Definition: globalplatform.c:1400
OP201_calculate_3des_DAP
OPGP_API OPGP_ERROR_STATUS OP201_calculate_3des_DAP(PBYTE securityDomainAID, DWORD securityDomainAIDLength, OPGP_STRING executableLoadFileName, BYTE DAP_verification_key[16], OP201_DAP_BLOCK *dapBlock)
Open Platform: Calculates a Load File Data Block DAP using 3DES.
Definition: globalplatform.c:5905
GP211_get_sequence_counter
OPGP_API OPGP_ERROR_STATUS GP211_get_sequence_counter(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, BYTE sequenceCounter[2])
GlobalPlatform2.1.1: This returns the current Sequence Counter.
Definition: globalplatform.c:4654
GP211_DELEGATED_MANAGEMENT
@ GP211_DELEGATED_MANAGEMENT
Security domain has delegated management right.
Definition: globalplatform.h:96
GP211_install_for_make_selectable
OPGP_API OPGP_ERROR_STATUS GP211_install_for_make_selectable(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, PBYTE applicationAID, DWORD applicationAIDLength, BYTE applicationPrivileges, BYTE installToken[128], GP211_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable)
GlobalPlatform2.1.1: Makes an installed application selectable.
Definition: globalplatform.c:2866
GP211_APPLICATION_DATA::lifeCycleState
BYTE lifeCycleState
The Issuer Security Domain, Security Domains, Executable Load Files and Application life cycle state.
Definition: globalplatform.h:353
GP211_DAP_BLOCK
Definition: security.h:269
GP211_send_APDU
OPGP_API OPGP_ERROR_STATUS GP211_send_APDU(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, PBYTE capdu, DWORD capduLength, PBYTE rapdu, PDWORD rapduLength)
Sends an application protocol data unit.
Definition: globalplatform.c:635
GP211_EXECUTABLE_MODULES_DATA::lifeCycleState
BYTE lifeCycleState
The Executable Load File life cycle state.
Definition: globalplatform.h:364
OP201_install_for_make_selectable
OPGP_API OPGP_ERROR_STATUS OP201_install_for_make_selectable(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, PBYTE applicationInstanceAID, DWORD applicationInstanceAIDLength, BYTE applicationPrivileges, BYTE installToken[128], OP201_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable)
Open Platform: Makes an installed application selectable.
Definition: globalplatform.c:5517
GP211_get_status
OPGP_API OPGP_ERROR_STATUS GP211_get_status(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE cardElement, BYTE format, GP211_APPLICATION_DATA *applData, GP211_EXECUTABLE_MODULES_DATA *executableData, PDWORD dataLength)
GlobalPlatform2.1.1: Gets the life cycle status of Applications, the Issuer Security Domains,...
Definition: globalplatform.c:1956
GP211_put_data
OPGP_API OPGP_ERROR_STATUS GP211_put_data(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE identifier[2], PBYTE dataObject, DWORD dataObjectLength)
GlobalPlatform2.1.1: Put card data.
Definition: globalplatform.c:1331
GP211_validate_delete_receipt
OPGP_API OPGP_ERROR_STATUS GP211_validate_delete_receipt(DWORD confirmationCounter, PBYTE cardUniqueData, DWORD cardUniqueDataLength, BYTE receiptKey[16], GP211_RECEIPT_DATA receiptData, PBYTE AID, DWORD AIDLength, BYTE secureChannelProtocol)
GlobalPlatform2.1.1: Validates a Load Receipt.
Definition: globalplatform.c:3529
GP211_SECURITY_DOMAIN
@ GP211_SECURITY_DOMAIN
Application is security domain.
Definition: globalplatform.h:94
GP211_APPLICATION_PRIVILEGES
GP211_APPLICATION_PRIVILEGES
Application privileges.
Definition: globalplatform.h:93
GP211_store_data
OPGP_API OPGP_ERROR_STATUS GP211_store_data(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, PBYTE data, DWORD dataLength)
GlobalPlatform2.1.1: The STORE DATA command is used to transfer data to an Application or the Securit...
Definition: globalplatform.c:4769
GP211_get_data
OPGP_API OPGP_ERROR_STATUS GP211_get_data(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE identifier[2], PBYTE recvBuffer, PDWORD recvBufferLength)
GlobalPlatform2.1.1: Retrieve card data.
Definition: globalplatform.c:1379
OP201_get_load_token_signature_data
OPGP_API OPGP_ERROR_STATUS OP201_get_load_token_signature_data(PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE securityDomainAID, DWORD securityDomainAIDLength, BYTE loadFileDAP[20], DWORD nonVolatileCodeSpaceLimit, DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit, PBYTE loadTokenSignatureData, PDWORD loadTokenSignatureDataLength)
Open Platform: Function to retrieve the data to sign by the Card Issuer in a Load Token.
Definition: globalplatform.c:5630
GP211_APPLICATION_DATA::privileges
GP211_APPLICATION_PRIVILEGES privileges
The Issuer Security Domain, Security Domains or Application privileges. Has no meaning for Executable...
Definition: globalplatform.h:354
OP201_get_install_token_signature_data
OPGP_API OPGP_ERROR_STATUS OP201_get_install_token_signature_data(BYTE P1, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE AIDWithinLoadFileAID, DWORD AIDWithinLoadFileAIDLength, PBYTE applicationInstanceAID, DWORD applicationInstanceAIDLength, BYTE applicationPrivileges, DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit, PBYTE applicationInstallParameters, DWORD applicationInstallParametersLength, PBYTE installTokenSignatureData, PDWORD installTokenSignatureDataLength)
Open Platform: Function to retrieve the data to sign by the Card Issuer in an Install Token.
Definition: globalplatform.c:5560
GP211_validate_install_receipt
OPGP_API OPGP_ERROR_STATUS GP211_validate_install_receipt(DWORD confirmationCounter, PBYTE cardUniqueData, DWORD cardUniqueDataLength, BYTE receiptKey[16], GP211_RECEIPT_DATA receiptData, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE applicationAID, DWORD applicationAIDLength, BYTE secureChannelProtocol)
GlobalPlatform2.1.1: Validates an Install Receipt.
Definition: globalplatform.c:3502
GP211_FINAL_APPLICATION
@ GP211_FINAL_APPLICATION
The only Application selectable in card Life Cycle State CARD_LOCKED and TERMINATED.
Definition: globalplatform.h:109
GP211_install_for_personalization
OPGP_API OPGP_ERROR_STATUS GP211_install_for_personalization(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, PBYTE applicationAID, DWORD applicationAIDLength)
GlobalPlatform2.1.1: Informs a Security Domain that a associated application will retrieve personaliz...
Definition: globalplatform.c:2807
OP201_calculate_load_file_DAP
OPGP_API OPGP_ERROR_STATUS OP201_calculate_load_file_DAP(OP201_DAP_BLOCK *dapBlock, DWORD dapBlockLength, OPGP_STRING executableLoadFileName, unsigned char hash[20])
Open Platform: Calculates a Load File DAP.
Definition: globalplatform.c:5792
OP201_APPLICATION_DATA::lifeCycleState
BYTE lifeCycleState
The Card Manager, Executable Load File or application life cycle state.
Definition: globalplatform.h:331
GP211_get_load_token_signature_data
OPGP_API OPGP_ERROR_STATUS GP211_get_load_token_signature_data(PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE securityDomainAID, DWORD securityDomainAIDLength, BYTE loadFileDataBlockHash[20], DWORD nonVolatileCodeSpaceLimit, DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit, PBYTE loadTokenSignatureData, PDWORD loadTokenSignatureDataLength)
GlobalPlatform2.1.1: Function to retrieve the data to sign by the Card Issuer in a Load Token.
Definition: globalplatform.c:3164
OPGP_PROGRESS_CALLBACK_PARAMETERS::finished
DWORD finished
Task is finished. If finished contains OPGP_TASK_FINISHED.
Definition: globalplatform.h:305
GP211_DAP_VERIFICATION
@ GP211_DAP_VERIFICATION
Application can require DAP verification for loading and installing applications.
Definition: globalplatform.h:95
OP201_APPLICATION_DATA::aid
OPGP_AID aid
The AID.
Definition: globalplatform.h:330
OP201_DAP_VERIFICATION
@ OP201_DAP_VERIFICATION
Application can require DAP verification for loading and installing applications.
Definition: globalplatform.h:227
GP211_install_for_install
OPGP_API OPGP_ERROR_STATUS GP211_install_for_install(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, PBYTE executableLoadFileAID, DWORD executableLoadFileAIDLength, PBYTE executableModuleAID, DWORD executableModuleAIDLength, PBYTE applicationAID, DWORD applicationAIDLength, BYTE applicationPrivileges, DWORD volatileDataSpaceLimit, DWORD nonVolatileDataSpaceLimit, PBYTE installParameters, DWORD installParametersLength, BYTE installToken[128], GP211_RECEIPT_DATA *receiptData, PDWORD receiptDataAvailable)
GlobalPlatform2.1.1: Installs an application on the card.
Definition: globalplatform.c:2543
OP201_KEY_INFORMATION
Definition: security.h:258
GP211_VISA2_derive_keys
OPGP_API OPGP_ERROR_STATUS GP211_VISA2_derive_keys(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, PBYTE AID, DWORD AIDLength, BYTE masterKey[16], BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16])
Derives the static keys from a master key according the VISA 2 key derivation scheme.
Definition: globalplatform.c:3648
GP211_RECEIPT_GENERATION
@ GP211_RECEIPT_GENERATION
Application is capable of generating a receipt for Delegated Card Content Management.
Definition: globalplatform.h:112
OP201_put_3desKey
OPGP_API OPGP_ERROR_STATUS OP201_put_3desKey(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, BYTE keySetVersion, BYTE keyIndex, BYTE newKeySetVersion, BYTE _3desKey[16])
Open Platform: replaces a single 3DES key in a key set or adds a new 3DES key.
Definition: globalplatform.c:4959
GP211_EMV_CPS11_derive_keys
OPGP_API OPGP_ERROR_STATUS GP211_EMV_CPS11_derive_keys(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, GP211_SECURITY_INFO *secInfo, BYTE masterKey[16], BYTE S_ENC[16], BYTE S_MAC[16], BYTE DEK[16])
Derives the static keys from a master key according the EMV CPS 1.1 key derivation scheme.
Definition: globalplatform.c:3957
OP201_set_status
OPGP_API OPGP_ERROR_STATUS OP201_set_status(OPGP_CARD_CONTEXT cardContext, OPGP_CARD_INFO cardInfo, OP201_SECURITY_INFO *secInfo, BYTE cardElement, PBYTE AID, DWORD AIDLength, BYTE lifeCycleState)
Open Platform: Sets the life cycle status of Applications, Security Domains or the Card Manager.
Definition: globalplatform.c:5196
GP211_KEY_INFORMATION
Definition: security.h:293
GP211_MANDATED_DAP_VERIFICATION
@ GP211_MANDATED_DAP_VERIFICATION
Security domain requires DAP verification for loading and installing applications.
Definition: globalplatform.h:101
GP211_APPLICATION_DATA::associatedSecurityDomainAID
OPGP_AID associatedSecurityDomainAID
The associated Security Domain's AID.
Definition: globalplatform.h:356