CAKP

 avatar
unknown
c_cpp
5 months ago
87 kB
3
Indexable
#ifdef EMV_TEST_VERSION
int CheckCAPK_Test(char* RID, int KeyIndex)
{
	int i, iRet;
	char RIDAscii[10+1];
#ifdef LOG_SERIAL_CLSS
	char bufftemp[240];
#endif
	/************************************************
	Belows are EMV test data
	************************************************/
	//DPAS  Live Key 5C
	EMV_CAPK capk_VISA_t92 = {
		{0xA0, 0x00, 0x00, 0x00, 0x03}, //Registered Application Provider Identifier
		0x92,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		176,							//Length of Module
										//Module
		{0x99, 0x6A, 0xF5, 0x6F, 0x56, 0x91, 0x87, 0xD0, 0x92, 0x93, 0xC1, 0x48, 0x10, 0x45, 0x0E, 0xD8,
		0xEE, 0x33, 0x57, 0x39, 0x7B, 0x18, 0xA2, 0x45, 0x8E, 0xFA, 0xA9, 0x2D, 0xA3, 0xB6, 0xDF, 0x65,
		0x14, 0xEC, 0x06, 0x01, 0x95, 0x31, 0x8F, 0xD4, 0x3B, 0xE9, 0xB8, 0xF0, 0xCC, 0x66, 0x9E, 0x3F,
		0x84, 0x40, 0x57, 0xCB, 0xDD, 0xF8, 0xBD, 0xA1, 0x91, 0xBB, 0x64, 0x47, 0x3B, 0xC8, 0xDC, 0x9A,
		0x73, 0x0D, 0xB8, 0xF6, 0xB4, 0xED, 0xE3, 0x92, 0x41, 0x86, 0xFF, 0xD9, 0xB8, 0xC7, 0x73, 0x57,
		0x89, 0xC2, 0x3A, 0x36, 0xBA, 0x0B, 0x8A, 0xF6, 0x53, 0x72, 0xEB, 0x57, 0xEA, 0x5D, 0x89, 0xE7,
		0xD1, 0x4E, 0x9C, 0x7B, 0x6B, 0x55, 0x74, 0x60, 0xF1, 0x08, 0x85, 0xDA, 0x16, 0xAC, 0x92, 0x3F,
		0x15, 0xAF, 0x37, 0x58, 0xF0, 0xF0, 0x3E, 0xBD, 0x3C, 0x5C, 0x2C, 0x94, 0x9C, 0xBA, 0x30, 0x6D,
		0xB4, 0x4E, 0x6A, 0x2C, 0x07, 0x6C, 0x5F, 0x67, 0xE2, 0x81, 0xD7, 0xEF, 0x56, 0x78, 0x5D, 0xC4,
		0xD7, 0x59, 0x45, 0xE4, 0x91, 0xF0, 0x19, 0x18, 0x80, 0x0A, 0x9E, 0x2D, 0xC6, 0x6F, 0x60, 0x08,
		0x05, 0x66, 0xCE, 0x0D, 0xAF, 0x8D, 0x17, 0xEA, 0xD4, 0x6A, 0xD8, 0xE3, 0x0A, 0x24, 0x7C, 0x9F},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0x42, 0x9C, 0x95, 0x4A, 0x38, 0x59, 0xCE, 0xF9, 0x12, 0x95, 0xF6, 0x63, 0xC9, 0x63, 0xE5, 0x82,
		0xED, 0x6E, 0xB2, 0x53}
	};

	EMV_CAPK capk_VISA_t94 = {
		{0xA0, 0x00, 0x00, 0x00, 0x03}, //Registered Application Provider Identifier
		0x94,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		248,							//Length of Module
										//Module
		{0xAC, 0xD2, 0xB1, 0x23, 0x02, 0xEE, 0x64, 0x4F, 0x3F, 0x83, 0x5A, 0xBD, 0x1F, 0xC7, 0xA6, 0xF6,
		0x2C, 0xCE, 0x48, 0xFF, 0xEC, 0x62, 0x2A, 0xA8, 0xEF, 0x06, 0x2B, 0xEF, 0x6F, 0xB8, 0xBA, 0x8B,
		0xC6, 0x8B, 0xBF, 0x6A, 0xB5, 0x87, 0x0E, 0xED, 0x57, 0x9B, 0xC3, 0x97, 0x3E, 0x12, 0x13, 0x03,
		0xD3, 0x48, 0x41, 0xA7, 0x96, 0xD6, 0xDC, 0xBC, 0x41, 0xDB, 0xF9, 0xE5, 0x2C, 0x46, 0x09, 0x79,
		0x5C, 0x0C, 0xCF, 0x7E, 0xE8, 0x6F, 0xA1, 0xD5, 0xCB, 0x04, 0x10, 0x71, 0xED, 0x2C, 0x51, 0xD2,
		0x20, 0x2F, 0x63, 0xF1, 0x15, 0x6C, 0x58, 0xA9, 0x2D, 0x38, 0xBC, 0x60, 0xBD, 0xF4, 0x24, 0xE1,
		0x77, 0x6E, 0x2B, 0xC9, 0x64, 0x80, 0x78, 0xA0, 0x3B, 0x36, 0xFB, 0x55, 0x43, 0x75, 0xFC, 0x53,
		0xD5, 0x7C, 0x73, 0xF5, 0x16, 0x0E, 0xA5, 0x9F, 0x3A, 0xFC, 0x53, 0x98, 0xEC, 0x7B, 0x67, 0x75,
		0x8D, 0x65, 0xC9, 0xBF, 0xF7, 0x82, 0x8B, 0x6B, 0x82, 0xD4, 0xBE, 0x12, 0x4A, 0x41, 0x6A, 0xB7,
		0x30, 0x19, 0x14, 0x31, 0x1E, 0xA4, 0x62, 0xC1, 0x9F, 0x77, 0x1F, 0x31, 0xB3, 0xB5, 0x73, 0x36,
		0x00, 0x0D, 0xFF, 0x73, 0x2D, 0x3B, 0x83, 0xDE, 0x07, 0x05, 0x2D, 0x73, 0x03, 0x54, 0xD2, 0x97,
		0xBE, 0xC7, 0x28, 0x71, 0xDC, 0xCF, 0x0E, 0x19, 0x3F, 0x17, 0x1A, 0xBA, 0x27, 0xEE, 0x46, 0x4C,
		0x6A, 0x97, 0x69, 0x09, 0x43, 0xD5, 0x9B, 0xDA, 0xBB, 0x2A, 0x27, 0xEB, 0x71, 0xCE, 0xEB, 0xDA,
		0xFA, 0x11, 0x76, 0x04, 0x64, 0x78, 0xFD, 0x62, 0xFE, 0xC4, 0x52, 0xD5, 0xCA, 0x39, 0x32, 0x96,
		0x53, 0x0A, 0xA3, 0xF4, 0x19, 0x27, 0xAD, 0xFE, 0x43, 0x4A, 0x2D, 0xF2, 0xAE, 0x30, 0x54, 0xF8,
		0x84, 0x06, 0x57, 0xA2, 0x6E, 0x0F, 0xC6, 0x17},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0xC4, 0xA3, 0xC4, 0x3C, 0xCF, 0x87, 0x32, 0x7D, 0x13, 0x6B, 0x80, 0x41, 0x60, 0xE4, 0x7D, 0x43,
		0xB6, 0x0E, 0x6E, 0x0F}
	};

	EMV_CAPK capk_VISA_t95 = {
		{0xA0, 0x00, 0x00, 0x00, 0x03}, //Registered Application Provider Identifier
		0x95,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		144,							//Length of Module
										//Module
		{0xBE, 0x9E, 0x1F, 0xA5, 0xE9, 0xA8, 0x03, 0x85, 0x29, 0x99, 0xC4, 0xAB, 0x43, 0x2D, 0xB2, 0x86,
		0x00, 0xDC, 0xD9, 0xDA, 0xB7, 0x6D, 0xFA, 0xAA, 0x47, 0x35, 0x5A, 0x0F, 0xE3, 0x7B, 0x15, 0x08,
		0xAC, 0x6B, 0xF3, 0x88, 0x60, 0xD3, 0xC6, 0xC2, 0xE5, 0xB1, 0x2A, 0x3C, 0xAA, 0xF2, 0xA7, 0x00,
		0x5A, 0x72, 0x41, 0xEB, 0xAA, 0x77, 0x71, 0x11, 0x2C, 0x74, 0xCF, 0x9A, 0x06, 0x34, 0x65, 0x2F,
		0xBC, 0xA0, 0xE5, 0x98, 0x0C, 0x54, 0xA6, 0x47, 0x61, 0xEA, 0x10, 0x1A, 0x11, 0x4E, 0x0F, 0x0B,
		0x55, 0x72, 0xAD, 0xD5, 0x7D, 0x01, 0x0B, 0x7C, 0x9C, 0x88, 0x7E, 0x10, 0x4C, 0xA4, 0xEE, 0x12,
		0x72, 0xDA, 0x66, 0xD9, 0x97, 0xB9, 0xA9, 0x0B, 0x5A, 0x6D, 0x62, 0x4A, 0xB6, 0xC5, 0x7E, 0x73,
		0xC8, 0xF9, 0x19, 0x00, 0x0E, 0xB5, 0xF6, 0x84, 0x89, 0x8E, 0xF8, 0xC3, 0xDB, 0xEF, 0xB3, 0x30,
		0xC6, 0x26, 0x60, 0xBE, 0xD8, 0x8E, 0xA7, 0x8E, 0x90, 0x9A, 0xFF, 0x05, 0xF6, 0xDA, 0x62, 0x7B},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0xEE, 0x15, 0x11, 0xCE, 0xC7, 0x10, 0x20, 0xA9, 0xB9, 0x04, 0x43, 0xB3, 0x7B, 0x1D, 0x5F, 0x6E,
		0x70, 0x30, 0x30, 0xF6}
	};

	EMV_CAPK capk_VISA_t98 = {
		{0xA0, 0x00, 0x00, 0x00, 0x03}, //Registered Application Provider Identifier
		0x98,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		112,							//Length of Module
										//Module
		{0xCA, 0x02, 0x6E, 0x52, 0xA6, 0x95, 0xE7, 0x2B, 0xD3, 0x0A, 0xF9, 0x28, 0x19, 0x6E, 0xED, 0xC9,
		0xFA, 0xF4, 0xA6, 0x19, 0xF2, 0x49, 0x2E, 0x3F, 0xB3, 0x11, 0x69, 0x78, 0x9C, 0x27, 0x6F, 0xFB,
		0xB7, 0xD4, 0x31, 0x16, 0x64, 0x7B, 0xA9, 0xE0, 0xD1, 0x06, 0xA3, 0x54, 0x2E, 0x39, 0x65, 0x29,
		0x2C, 0xF7, 0x78, 0x23, 0xDD, 0x34, 0xCA, 0x8E, 0xEC, 0x7D, 0xE3, 0x67, 0xE0, 0x80, 0x70, 0x89,
		0x50, 0x77, 0xC7, 0xEF, 0xAD, 0x93, 0x99, 0x24, 0xCB, 0x18, 0x70, 0x67, 0xDB, 0xF9, 0x2C, 0xB1,
		0xE7, 0x85, 0x91, 0x7B, 0xD3, 0x8B, 0xAC, 0xE0, 0xC1, 0x94, 0xCA, 0x12, 0xDF, 0x0C, 0xE5, 0xB7,
		0xA5, 0x02, 0x75, 0xAC, 0x61, 0xBE, 0x7C, 0x3B, 0x43, 0x68, 0x87, 0xCA, 0x98, 0xC9, 0xFD, 0x39},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0xE7, 0xAC, 0x9A, 0xA8, 0xEE, 0xD1, 0xB5, 0xFF, 0x1B, 0xD5, 0x32, 0xCF, 0x14, 0x89, 0xA3, 0xE5,
		0x55, 0x75, 0x72, 0xC1}
	};

	EMV_CAPK capk_VISA_t99 = {
		{0xA0, 0x00, 0x00, 0x00, 0x03}, //Registered Application Provider Identifier
		0x99,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		128,							//Length of Module
										//Module
		{0xAB, 0x79, 0xFC, 0xC9, 0x52, 0x08, 0x96, 0x96, 0x7E, 0x77, 0x6E, 0x64, 0x44, 0x4E, 0x5D, 0xCD,
		0xD6, 0xE1, 0x36, 0x11, 0x87, 0x4F, 0x39, 0x85, 0x72, 0x25, 0x20, 0x42, 0x52, 0x95, 0xEE, 0xA4,
		0xBD, 0x0C, 0x27, 0x81, 0xDE, 0x7F, 0x31, 0xCD, 0x3D, 0x04, 0x1F, 0x56, 0x5F, 0x74, 0x73, 0x06,
		0xEE, 0xD6, 0x29, 0x54, 0xB1, 0x7E, 0xDA, 0xBA, 0x3A, 0x6C, 0x5B, 0x85, 0xA1, 0xDE, 0x1B, 0xEB,
		0x9A, 0x34, 0x14, 0x1A, 0xF3, 0x8F, 0xCF, 0x82, 0x79, 0xC9, 0xDE, 0xA0, 0xD5, 0xA6, 0x71, 0x0D,
		0x08, 0xDB, 0x41, 0x24, 0xF0, 0x41, 0x94, 0x55, 0x87, 0xE2, 0x03, 0x59, 0xBA, 0xB4, 0x7B, 0x75,
		0x75, 0xAD, 0x94, 0x26, 0x2D, 0x4B, 0x25, 0xF2, 0x64, 0xAF, 0x33, 0xDE, 0xDC, 0xF2, 0x8E, 0x09,
		0x61, 0x5E, 0x93, 0x7D, 0xE3, 0x2E, 0xDC, 0x03, 0xC5, 0x44, 0x45, 0xFE, 0x7E, 0x38, 0x27, 0x77},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0x4A, 0xBF, 0xFD, 0x6B, 0x1C, 0x51, 0x21, 0x2D, 0x05, 0x55, 0x2E, 0x43, 0x1C, 0x5B, 0x17, 0x00,
		0x7D, 0x2F, 0x5E, 0x6D}
	};

	EMV_CAPK capk_MASTER_tEF = {
		{0xA0, 0x00, 0x00, 0x00, 0x04}, //Registered Application Provider Identifier
		0xEF,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		248,							//Length of Module
										//Module
		{0xA1, 0x91, 0xCB, 0x87, 0x47, 0x3F, 0x29, 0x34, 0x9B, 0x5D, 0x60, 0xA8, 0x8B, 0x3E, 0xAE, 0xE0,
		0x97, 0x3A, 0xA6, 0xF1, 0xA0, 0x82, 0xF3, 0x58, 0xD8, 0x49, 0xFD, 0xDF, 0xF9, 0xC0, 0x91, 0xF8,
		0x99, 0xED, 0xA9, 0x79, 0x2C, 0xAF, 0x09, 0xEF, 0x28, 0xF5, 0xD2, 0x24, 0x04, 0xB8, 0x8A, 0x22,
		0x93, 0xEE, 0xBB, 0xC1, 0x94, 0x9C, 0x43, 0xBE, 0xA4, 0xD6, 0x0C, 0xFD, 0x87, 0x9A, 0x15, 0x39,
		0x54, 0x4E, 0x09, 0xE0, 0xF0, 0x9F, 0x60, 0xF0, 0x65, 0xB2, 0xBF, 0x2A, 0x13, 0xEC, 0xC7, 0x05,
		0xF3, 0xD4, 0x68, 0xB9, 0xD3, 0x3A, 0xE7, 0x7A, 0xD9, 0xD3, 0xF1, 0x9C, 0xA4, 0x0F, 0x23, 0xDC,
		0xF5, 0xEB, 0x7C, 0x04, 0xDC, 0x8F, 0x69, 0xEB, 0xA5, 0x65, 0xB1, 0xEB, 0xCB, 0x46, 0x86, 0xCD,
		0x27, 0x47, 0x85, 0x53, 0x0F, 0xF6, 0xF6, 0xE9, 0xEE, 0x43, 0xAA, 0x43, 0xFD, 0xB0, 0x2C, 0xE0,
		0x0D, 0xAE, 0xC1, 0x5C, 0x7B, 0x8F, 0xD6, 0xA9, 0xB3, 0x94, 0xBA, 0xBA, 0x41, 0x9D, 0x3F, 0x6D,
		0xC8, 0x5E, 0x16, 0x56, 0x9B, 0xE8, 0xE7, 0x69, 0x89, 0x68, 0x8E, 0xFE, 0xA2, 0xDF, 0x22, 0xFF,
		0x7D, 0x35, 0xC0, 0x43, 0x33, 0x8D, 0xEA, 0xA9, 0x82, 0xA0, 0x2B, 0x86, 0x6D, 0xE5, 0x32, 0x85,
		0x19, 0xEB, 0xBC, 0xD6, 0xF0, 0x3C, 0xDD, 0x68, 0x66, 0x73, 0x84, 0x7F, 0x84, 0xDB, 0x65, 0x1A,
		0xB8, 0x6C, 0x28, 0xCF, 0x14, 0x62, 0x56, 0x2C, 0x57, 0x7B, 0x85, 0x35, 0x64, 0xA2, 0x90, 0xC8,
		0x55, 0x6D, 0x81, 0x85, 0x31, 0x26, 0x8D, 0x25, 0xCC, 0x98, 0xA4, 0xCC, 0x6A, 0x0B, 0xDF, 0xFF,
		0xDA, 0x2D, 0xCC, 0xA3, 0xA9, 0x4C, 0x99, 0x85, 0x59, 0xE3, 0x07, 0xFD, 0xDF, 0x91, 0x50, 0x06,
		0xD9, 0xA9, 0x87, 0xB0, 0x7D, 0xDA, 0xEB, 0x3B},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0x21, 0x76, 0x6E, 0xBB, 0x0E, 0xE1, 0x22, 0xAF, 0xB6, 0x5D, 0x78, 0x45, 0xB7, 0x3D, 0xB4, 0x6B,
		0xAB, 0x65, 0x42, 0x7A}
	};

	EMV_CAPK capk_MASTER_tF1 = {
		{0xA0, 0x00, 0x00, 0x00, 0x04}, //Registered Application Provider Identifier
		0xF1,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		176,							//Length of Module
										//Module
		{0xA0, 0xDC, 0xF4, 0xBD, 0xE1, 0x9C, 0x35, 0x46, 0xB4, 0xB6, 0xF0, 0x41, 0x4D, 0x17, 0x4D, 0xDE,
		0x29, 0x4A, 0xAB, 0xBB, 0x82, 0x8C, 0x5A, 0x83, 0x4D, 0x73, 0xAA, 0xE2, 0x7C, 0x99, 0xB0, 0xB0,
		0x53, 0xA9, 0x02, 0x78, 0x00, 0x72, 0x39, 0xB6, 0x45, 0x9F, 0xF0, 0xBB, 0xCD, 0x7B, 0x4B, 0x9C,
		0x6C, 0x50, 0xAC, 0x02, 0xCE, 0x91, 0x36, 0x8D, 0xA1, 0xBD, 0x21, 0xAA, 0xEA, 0xDB, 0xC6, 0x53,
		0x47, 0x33, 0x7D, 0x89, 0xB6, 0x8F, 0x5C, 0x99, 0xA0, 0x9D, 0x05, 0xBE, 0x02, 0xDD, 0x1F, 0x8C,
		0x5B, 0xA2, 0x0E, 0x2F, 0x13, 0xFB, 0x2A, 0x27, 0xC4, 0x1D, 0x3F, 0x85, 0xCA, 0xD5, 0xCF, 0x66,
		0x68, 0xE7, 0x58, 0x51, 0xEC, 0x66, 0xED, 0xBF, 0x98, 0x85, 0x1F, 0xD4, 0xE4, 0x2C, 0x44, 0xC1,
		0xD5, 0x9F, 0x59, 0x84, 0x70, 0x3B, 0x27, 0xD5, 0xB9, 0xF2, 0x1B, 0x8F, 0xA0, 0xD9, 0x32, 0x79,
		0xFB, 0xBF, 0x69, 0xE0, 0x90, 0x64, 0x29, 0x09, 0xC9, 0xEA, 0x27, 0xF8, 0x98, 0x95, 0x95, 0x41,
		0xAA, 0x67, 0x57, 0xF5, 0xF6, 0x24, 0x10, 0x4F, 0x6E, 0x1D, 0x3A, 0x95, 0x32, 0xF2, 0xA6, 0xE5,
		0x15, 0x15, 0xAE, 0xAD, 0x1B, 0x43, 0xB3, 0xD7, 0x83, 0x50, 0x88, 0xA2, 0xFA, 0xFA, 0x7B, 0xE7},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0xD8, 0xE6, 0x8D, 0xA1, 0x67, 0xAB, 0x5A, 0x85, 0xD8, 0xC3, 0xD5, 0x5E, 0xCB, 0x9B, 0x05, 0x17,
		0xA1, 0xA5, 0xB4, 0xBB}
	};

	EMV_CAPK capk_MASTER_tF3 = {
		{0xA0, 0x00, 0x00, 0x00, 0x04}, //Registered Application Provider Identifier
		0xF3,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		144,							//Length of Module
										//Module
		{0x98, 0xF0, 0xC7, 0x70, 0xF2, 0x38, 0x64, 0xC2, 0xE7, 0x66, 0xDF, 0x02, 0xD1, 0xE8, 0x33, 0xDF,
		0xF4, 0xFF, 0xE9, 0x2D, 0x69, 0x6E, 0x16, 0x42, 0xF0, 0xA8, 0x8C, 0x56, 0x94, 0xC6, 0x47, 0x9D,
		0x16, 0xDB, 0x15, 0x37, 0xBF, 0xE2, 0x9E, 0x4F, 0xDC, 0x6E, 0x6E, 0x8A, 0xFD, 0x1B, 0x0E, 0xB7,
		0xEA, 0x01, 0x24, 0x72, 0x3C, 0x33, 0x31, 0x79, 0xBF, 0x19, 0xE9, 0x3F, 0x10, 0x65, 0x8B, 0x2F,
		0x77, 0x6E, 0x82, 0x9E, 0x87, 0xDA, 0xED, 0xA9, 0xC9, 0x4A, 0x8B, 0x33, 0x82, 0x19, 0x9A, 0x35,
		0x0C, 0x07, 0x79, 0x77, 0xC9, 0x7A, 0xFF, 0x08, 0xFD, 0x11, 0x31, 0x0A, 0xC9, 0x50, 0xA7, 0x2C,
		0x3C, 0xA5, 0x00, 0x2E, 0xF5, 0x13, 0xFC, 0xCC, 0x28, 0x6E, 0x64, 0x6E, 0x3C, 0x53, 0x87, 0x53,
		0x5D, 0x50, 0x95, 0x14, 0xB3, 0xB3, 0x26, 0xE1, 0x23, 0x4F, 0x9C, 0xB4, 0x8C, 0x36, 0xDD, 0xD4,
		0x4B, 0x41, 0x6D, 0x23, 0x65, 0x40, 0x34, 0xA6, 0x6F, 0x40, 0x3B, 0xA5, 0x11, 0xC5, 0xEF, 0xA3},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0xA6, 0x9A, 0xC7, 0x60, 0x3D, 0xAF, 0x56, 0x6E, 0x97, 0x2D, 0xED, 0xC2, 0xCB, 0x43, 0x3E, 0x07,
		0xE8, 0xB0, 0x1A, 0x9A}
	};

	EMV_CAPK capk_MASTER_tF8 = {
		{0xA0, 0x00, 0x00, 0x00, 0x04}, //Registered Application Provider Identifier
		0xF8,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		128,							//Length of Module
										//Module
		{0xA1, 0xF5, 0xE1, 0xC9, 0xBD, 0x86, 0x50, 0xBD, 0x43, 0xAB, 0x6E, 0xE5, 0x6B, 0x89, 0x1E, 0xF7,
		0x45, 0x9C, 0x0A, 0x24, 0xFA, 0x84, 0xF9, 0x12, 0x7D, 0x1A, 0x6C, 0x79, 0xD4, 0x93, 0x0F, 0x6D,
		0xB1, 0x85, 0x2E, 0x25, 0x10, 0xF1, 0x8B, 0x61, 0xCD, 0x35, 0x4D, 0xB8, 0x3A, 0x35, 0x6B, 0xD1,
		0x90, 0xB8, 0x8A, 0xB8, 0xDF, 0x04, 0x28, 0x4D, 0x02, 0xA4, 0x20, 0x4A, 0x7B, 0x6C, 0xB7, 0xC5,
		0x55, 0x19, 0x77, 0xA9, 0xB3, 0x63, 0x79, 0xCA, 0x3D, 0xE1, 0xA0, 0x8E, 0x69, 0xF3, 0x01, 0xC9,
		0x5C, 0xC1, 0xC2, 0x05, 0x06, 0x95, 0x92, 0x75, 0xF4, 0x17, 0x23, 0xDD, 0x5D, 0x29, 0x25, 0x29,
		0x05, 0x79, 0xE5, 0xA9, 0x5B, 0x0D, 0xF6, 0x32, 0x3F, 0xC8, 0xE9, 0x27, 0x3D, 0x6F, 0x84, 0x91,
		0x98, 0xC4, 0x99, 0x62, 0x09, 0x16, 0x6D, 0x9B, 0xFC, 0x97, 0x3C, 0x36, 0x1C, 0xC8, 0x26, 0xE1},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0xF0, 0x6E, 0xCC, 0x6D, 0x2A, 0xAE, 0xBF, 0x25, 0x9B, 0x7E, 0x75, 0x5A, 0x38, 0xD9, 0xA9, 0xB2,
		0x4E, 0x2F, 0xF3, 0xDD}
	};

	EMV_CAPK capk_MASTER_tFA = {
		{0xA0, 0x00, 0x00, 0x00, 0x04}, //Registered Application Provider Identifier
		0xFA,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		144,							//Length of Module
										//Module
		{0xA9, 0x0F, 0xCD, 0x55, 0xAA, 0x2D, 0x5D, 0x99, 0x63, 0xE3, 0x5E, 0xD0, 0xF4, 0x40, 0x17, 0x76,
		0x99, 0x83, 0x2F, 0x49, 0xC6, 0xBA, 0xB1, 0x5C, 0xDA, 0xE5, 0x79, 0x4B, 0xE9, 0x3F, 0x93, 0x4D,
		0x44, 0x62, 0xD5, 0xD1, 0x27, 0x62, 0xE4, 0x8C, 0x38, 0xBA, 0x83, 0xD8, 0x44, 0x5D, 0xEA, 0xA7,
		0x41, 0x95, 0xA3, 0x01, 0xA1, 0x02, 0xB2, 0xF1, 0x14, 0xEA, 0xDA, 0x0D, 0x18, 0x0E, 0xE5, 0xE7,
		0xA5, 0xC7, 0x3E, 0x0C, 0x4E, 0x11, 0xF6, 0x7A, 0x43, 0xDD, 0xAB, 0x5D, 0x55, 0x68, 0x3B, 0x14,
		0x74, 0xCC, 0x06, 0x27, 0xF4, 0x4B, 0x8D, 0x30, 0x88, 0xA4, 0x92, 0xFF, 0xAA, 0xDA, 0xD4, 0xF4,
		0x24, 0x22, 0xD0, 0xE7, 0x01, 0x35, 0x36, 0xC3, 0xC4, 0x9A, 0xD3, 0xD0, 0xFA, 0xE9, 0x64, 0x59,
		0xB0, 0xF6, 0xB1, 0xB6, 0x05, 0x65, 0x38, 0xA3, 0xD6, 0xD4, 0x46, 0x40, 0xF9, 0x44, 0x67, 0xB1,
		0x08, 0x86, 0x7D, 0xEC, 0x40, 0xFA, 0xAE, 0xCD, 0x74, 0x0C, 0x00, 0xE2, 0xB7, 0xA8, 0x85, 0x2D},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0x5B, 0xED, 0x40, 0x68, 0xD9, 0x6E, 0xA1, 0x6D, 0x2D, 0x77, 0xE0, 0x3D, 0x60, 0x36, 0xFC, 0x7A,
		0x16, 0x0E, 0xA9, 0x9C}
	};

	EMV_CAPK capk_MASTER_tFE = {
		{0xA0, 0x00, 0x00, 0x00, 0x04}, //Registered Application Provider Identifier
		0xFE,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		128,							//Length of Module
										//Module
		{0xA6, 0x53, 0xEA, 0xC1, 0xC0, 0xF7, 0x86, 0xC8, 0x72, 0x4F, 0x73, 0x7F, 0x17, 0x29, 0x97, 0xD6,
		0x3D, 0x1C, 0x32, 0x51, 0xC4, 0x44, 0x02, 0x04, 0x9B, 0x86, 0x5B, 0xAE, 0x87, 0x7D, 0x0F, 0x39,
		0x8C, 0xBF, 0xBE, 0x8A, 0x60, 0x35, 0xE2, 0x4A, 0xFA, 0x08, 0x6B, 0xEF, 0xDE, 0x93, 0x51, 0xE5,
		0x4B, 0x95, 0x70, 0x8E, 0xE6, 0x72, 0xF0, 0x96, 0x8B, 0xCD, 0x50, 0xDC, 0xE4, 0x0F, 0x78, 0x33,
		0x22, 0xB2, 0xAB, 0xA0, 0x4E, 0xF1, 0x37, 0xEF, 0x18, 0xAB, 0xF0, 0x3C, 0x7D, 0xBC, 0x58, 0x13,
		0xAE, 0xAE, 0xF3, 0xAA, 0x77, 0x97, 0xBA, 0x15, 0xDF, 0x7D, 0x5B, 0xA1, 0xCB, 0xAF, 0x7F, 0xD5,
		0x20, 0xB5, 0xA4, 0x82, 0xD8, 0xD3, 0xFE, 0xE1, 0x05, 0x07, 0x78, 0x71, 0x11, 0x3E, 0x23, 0xA4,
		0x9A, 0xF3, 0x92, 0x65, 0x54, 0xA7, 0x0F, 0xE1, 0x0E, 0xD7, 0x28, 0xCF, 0x79, 0x3B, 0x62, 0xA1},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0x9A, 0x29, 0x5B, 0x05, 0xFB, 0x39, 0x0E, 0xF7, 0x92, 0x3F, 0x57, 0x61, 0x8A, 0x9F, 0xDA, 0x29,
		0x41, 0xFC, 0x34, 0xE0}
	};

	EMV_CAPK capk_amex_live03 = { {0xA0, 0x00, 0x00, 0x00, 0x25}, 0x03,
	0x01, 0x01, 0x80,
	{0xB0, 0xC2, 0xC6, 0xE2, 0xA6, 0x38, 0x69, 0x33, 0xCD, 0x17, 0xC2, 0x39, 0x49, 0x6B, 0xF4, 0x8C,
	0x57, 0xE3, 0x89, 0x16, 0x4F, 0x2A, 0x96, 0xBF, 0xF1, 0x33, 0x43, 0x9A, 0xE8, 0xA7, 0x7B, 0x20,
	0x49, 0x8B, 0xD4, 0xDC, 0x69, 0x59, 0xAB, 0x0C, 0x2D, 0x05, 0xD0, 0x72, 0x3A, 0xF3, 0x66, 0x89,
	0x01, 0x93, 0x7B, 0x67, 0x4E, 0x5A, 0x2F, 0xA9, 0x2D, 0xDD, 0x5E, 0x78, 0xEA, 0x9D, 0x75, 0xD7,
	0x96, 0x20, 0x17, 0x3C, 0xC2, 0x69, 0xB3, 0x5F, 0x46, 0x3B, 0x3D, 0x4A, 0xAF, 0xF2, 0x79, 0x4F,
	0x92, 0xE6, 0xC7, 0xA3, 0xFB, 0x95, 0x32, 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0xB0, 0xDB, 0x55, 0xEA, 0x35, 0x14, 0x68, 0x6C, 0x6A, 0x73,
	0x2C, 0xEF, 0x55, 0xEE, 0x27, 0xCF, 0x87, 0x7F, 0x11, 0x06, 0x52, 0x69, 0x4A, 0x0E, 0x34, 0x84,
	0xC8, 0x55, 0xD8, 0x82, 0xAE, 0x19, 0x16, 0x74, 0xE2, 0x5C, 0x29, 0x62, 0x05, 0xBB, 0xB5, 0x99,
	0x45, 0x51, 0x76, 0xFD, 0xD7, 0xBB, 0xC5, 0x49, 0xF2, 0x7B, 0xA5, 0xFE, 0x35, 0x33, 0x6F, 0x7E,
	0x29, 0xE6, 0x8D, 0x78, 0x39, 0x73, 0x19, 0x94, 0x36, 0x63, 0x3C, 0x67, 0xEE, 0x5A, 0x68, 0x0F,
	0x05, 0x16, 0x0E, 0xD1, 0x2D, 0x16, 0x65, 0xEC, 0x83, 0xD1, 0x99, 0x7F, 0x10, 0xFD, 0x05, 0xBB,
	0xDB, 0xF9, 0x43, 0x3E, 0x8F, 0x79, 0x7A, 0xEE, 0x3E, 0x9F, 0x02, 0xA3, 0x42, 0x28, 0xAC, 0xE9,
	0x27, 0xAB, 0xE6, 0x2B, 0x8B, 0x92, 0x81, 0xAD, 0x08, 0xD3, 0xDF, 0x5C, 0x73, 0x79, 0x68, 0x50,
	0x45, 0xD7, 0xBA, 0x5F, 0xCD, 0xE5, 0x86, 0x37},
	1,{0x03},{0x16, 0x12, 0x31},
	{0xC7, 0x29, 0xCF, 0x2F, 0xD2, 0x62, 0x39, 0x4A, 0xBC, 0x4C, 0xC1, 0x73, 0x50, 0x65, 0x02, 0x44,
	0x6A, 0xA9, 0xB9, 0xFD}
	};

	EMV_CAPK capk_amex_live62 = { {0xA0, 0x00, 0x00, 0x00, 0x25}, 0x62,
	0x01, 0x01,0x60,
	{0xBA, 0x29, 0xDE, 0x83, 0x09, 0x0D, 0x8D, 0x5F, 0x4D, 0xFF, 0xCE, 0xB9, 0x89, 0x18, 0x99, 0x5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,{0x03},{0x22, 0x12, 0x31},
	{0x6B, 0xDA, 0x32, 0xB1, 0xAA, 0x17, 0x14, 0x44, 0xC7, 0xE8, 0xF8, 0x80, 0x75, 0xA7, 0x4F, 0xBF,
	0xE8, 0x45, 0x76, 0x5F}
	};

	EMV_CAPK capk_DPAS_t5A = {
		{0xA0, 0x00, 0x00, 0x01, 0x52}, //Registered Application Provider Identifier
		0x5A,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		128,							//Length of Module
										//Module
		{0xED, 0xD8, 0x25, 0x24, 0x68, 0xA7, 0x05, 0x61, 0x4B, 0x4D, 0x07, 0xDE, 0x32, 0x11, 0xB3, 0x00,
		0x31, 0xAE, 0xDB, 0x6D, 0x33, 0xA4, 0x31, 0x5F, 0x2C, 0xFF, 0x7C, 0x97, 0xDB, 0x91, 0x89, 0x93,
		0xC2, 0xDC, 0x02, 0xE7, 0x9E, 0x2F, 0xF8, 0xA2, 0x68, 0x3D, 0x5B, 0xBD, 0x0F, 0x61, 0x4B, 0xC9,
		0xAB, 0x36, 0x0A, 0x44, 0x82, 0x83, 0xEF, 0x8B, 0x9C, 0xF6, 0x73, 0x1D, 0x71, 0xD6, 0xBE, 0x93,
		0x9B, 0x7C, 0x5D, 0x0B, 0x04, 0x52, 0xD6, 0x60, 0xCF, 0x24, 0xC2, 0x1C, 0x47, 0xCA, 0xC8, 0xE2,
		0x69, 0x48, 0xC8, 0xEE, 0xD8, 0xE3, 0xD0, 0x0C, 0x01, 0x68, 0x28, 0xD6, 0x42, 0x81, 0x6E, 0x65,
		0x8D, 0xC2, 0xCF, 0xC6, 0x1E, 0x7E, 0x7D, 0x77, 0x40, 0x63, 0x3B, 0xEF, 0xE3, 0x41, 0x07, 0xC1,
		0xFB, 0x55, 0xDE, 0xA7, 0xFA, 0xAE, 0xA2, 0xB2, 0x5E, 0x85, 0xBE, 0xD9, 0x48, 0x89, 0x3D, 0x07},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0xCC, 0x95, 0x85, 0xE8, 0xE6, 0x37, 0x19, 0x1C, 0x10, 0xFC, 0xEC, 0xB3, 0x2B, 0x5A, 0xE1, 0xB9,
		0xD4, 0x10, 0xB5, 0x2D}
	};

	EMV_CAPK capk_DPAS_t5B = {
		{0xA0, 0x00, 0x00, 0x01, 0x52}, //Registered Application Provider Identifier
		0x5B,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		144,							//Length of Module
										//Module
		{0xD3, 0xF4, 0x5D, 0x06, 0x5D, 0x4D, 0x90, 0x0F, 0x68, 0xB2, 0x12, 0x9A, 0xFA, 0x38, 0xF5, 0x49,
		0xAB, 0x9A, 0xE4, 0x61, 0x9E, 0x55, 0x45, 0x81, 0x4E, 0x46, 0x8F, 0x38, 0x20, 0x49, 0xA0, 0xB9,
		0x77, 0x66, 0x20, 0xDA, 0x60, 0xD6, 0x25, 0x37, 0xF0, 0x70, 0x5A, 0x2C, 0x92, 0x6D, 0xBE, 0xAD,
		0x4C, 0xA7, 0xCB, 0x43, 0xF0, 0xF0, 0xDD, 0x80, 0x95, 0x84, 0xE9, 0xF7, 0xEF, 0xBD, 0xA3, 0x77,
		0x87, 0x47, 0xBC, 0x9E, 0x25, 0xC5, 0x60, 0x65, 0x26, 0xFA, 0xB5, 0xE4, 0x91, 0x64, 0x6D, 0x4D,
		0xD2, 0x82, 0x78, 0x69, 0x1C, 0x25, 0x95, 0x6C, 0x8F, 0xED, 0x5E, 0x45, 0x2F, 0x24, 0x42, 0xE2,
		0x5E, 0xDC, 0x6B, 0x0C, 0x1A, 0xA4, 0xB2, 0xE9, 0xEC, 0x4A, 0xD9, 0xB2, 0x5A, 0x1B, 0x83, 0x62,
		0x95, 0xB8, 0x23, 0xED, 0xDC, 0x5E, 0xB6, 0xE1, 0xE0, 0xA3, 0xF4, 0x1B, 0x28, 0xDB, 0x8C, 0x3B,
		0x7E, 0x3E, 0x9B, 0x59, 0x79, 0xCD, 0x7E, 0x07, 0x9E, 0xF0, 0x24, 0x09, 0x5A, 0x1D, 0x19, 0xDD},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0x4D, 0xC5, 0xC6, 0xCA, 0xB6, 0xAE, 0x96, 0x97, 0x4D, 0x9D, 0xC8, 0xB2, 0x43, 0x5E, 0x21, 0xF5,
		0x26, 0xBC, 0x7A, 0x60}
	};


	EMV_CAPK capk_DPAS_t5C = {
		{0xA0, 0x00, 0x00, 0x01, 0x52}, //Registered Application Provider Identifier
		0x5C,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		176,							//Length of Module
										//Module
		{0x83, 0x3F, 0x27, 0x5F, 0xCF, 0x5C, 0xA4, 0xCB, 0x6F, 0x1B, 0xF8, 0x80, 0xE5, 0x4D, 0xCF, 0xEB,
		0x72, 0x1A, 0x31, 0x66, 0x92, 0xCA, 0xFE, 0xB2, 0x8B, 0x69, 0x8C, 0xAE, 0xCA, 0xFA, 0x2B, 0x2D,
		0x2A, 0xD8, 0x51, 0x7B, 0x1E, 0xFB, 0x59, 0xDD, 0xEF, 0xC3, 0x9F, 0x9C, 0x3B, 0x33, 0xDD, 0xEE,
		0x40, 0xE7, 0xA6, 0x3C, 0x03, 0xE9, 0x0A, 0x4D, 0xD2, 0x61, 0xBC, 0x0F, 0x28, 0xB4, 0x2E, 0xA6,
		0xE7, 0xA1, 0xF3, 0x07, 0x17, 0x8E, 0x2D, 0x63, 0xFA, 0x16, 0x49, 0x15, 0x5C, 0x3A, 0x5F, 0x92,
		0x6B, 0x4C, 0x7D, 0x7C, 0x25, 0x8B, 0xCA, 0x98, 0xEF, 0x90, 0xC7, 0xF4, 0x11, 0x7C, 0x20, 0x5E,
		0x8E, 0x32, 0xC4, 0x5D, 0x10, 0xE3, 0xD4, 0x94, 0x05, 0x9D, 0x2F, 0x29, 0x33, 0x89, 0x1B, 0x97,
		0x9C, 0xE4, 0xA8, 0x31, 0xB3, 0x01, 0xB0, 0x55, 0x0C, 0xDA, 0xE9, 0xB6, 0x70, 0x64, 0xB3, 0x1D,
		0x8B, 0x48, 0x1B, 0x85, 0xA5, 0xB0, 0x46, 0xBE, 0x8F, 0xFA, 0x7B, 0xDB, 0x58, 0xDC, 0x0D, 0x70,
		0x32, 0x52, 0x52, 0x97, 0xF2, 0x6F, 0xF6, 0x19, 0xAF, 0x7F, 0x15, 0xBC, 0xEC, 0x0C, 0x92, 0xBC,
		0xDC, 0xBC, 0x4F, 0xB2, 0x07, 0xD1, 0x15, 0xAA, 0x65, 0xCD, 0x04, 0xC1, 0xCF, 0x98, 0x21, 0x91},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0x60, 0x15, 0x40, 0x98, 0xCB, 0xBA, 0x35, 0x0F, 0x5F, 0x48, 0x6C, 0xA3, 0x10, 0x83, 0xD1, 0xFC,
		0x47, 0x4E, 0x31, 0xF8}
	};

	EMV_CAPK capk_DPAS_t5D = {
		{0xA0, 0x00, 0x00, 0x01, 0x52}, //Registered Application Provider Identifier
		0x5D,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		248,							//Length of Module
										//Module
		{0xAD, 0x93, 0x8E, 0xA9, 0x88, 0x8E, 0x51, 0x55, 0xF8, 0xCD, 0x27, 0x27, 0x49, 0x17, 0x2B, 0x3A,
		0x8C, 0x50, 0x4C, 0x17, 0x46, 0x0E, 0xFA, 0x0B, 0xED, 0x7C, 0xBC, 0x5F, 0xD3, 0x2C, 0x4A, 0x80,
		0xFD, 0x81, 0x03, 0x12, 0x28, 0x1B, 0x5A, 0x35, 0x56, 0x28, 0x00, 0xCD, 0xC3, 0x25, 0x35, 0x8A,
		0x96, 0x39, 0xC5, 0x01, 0xA5, 0x37, 0xB7, 0xA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0xB0, 0x32, 0xB8, 0x86,
		0xC7, 0xA6, 0xAB, 0x12, 0x6E, 0x20, 0x3B, 0xE7},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0xB5, 0x1E, 0xC5, 0xF7, 0xDE, 0x9B, 0xB6, 0xD8, 0xBC, 0xE8, 0xFB, 0x5F, 0x69, 0xBA, 0x57, 0xA0,
		0x42, 0x21, 0xF3, 0x9B}
	};

	EMV_CAPK capk_CARNET_tC1 = {
		{0xA0, 0x00, 0x00, 0x07, 0x24}, //Registered Application Provider Identifier
		0xC1,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		176,							//Length of Module
										//Module
		{0xC7, 0x1B, 0x64, 0x53, 0x81, 0x63, 0x5A, 0x88, 0x87, 0xE4, 0xFF, 0x56, 0xC8, 0x66, 0xEA, 0x5F,
		0x6E, 0x4B, 0xBE, 0x1C, 0x1C, 0xA0, 0xA5, 0x20, 0xEB, 0x1D, 0xFB, 0x94, 0x15, 0x0B, 0x50, 0xEA,
		0x36, 0x68, 0x85, 0x93, 0xF7, 0xF6, 0xF5, 0x18, 0x9E, 0x74, 0x7F, 0x22, 0x45, 0x4C, 0xA6, 0x42,
		0x1E, 0xE8, 0x3B, 0x33, 0x4F, 0x39, 0xC9, 0x9F, 0x59, 0x80, 0x53, 0x19, 0x4A, 0xE5, 0xB1, 0x55,
		0xCD, 0x8D, 0xB5, 0xFE, 0x9B, 0x3A, 0x86, 0xDE, 0x5F, 0x41, 0x62, 0xA2, 0x73, 0xBD, 0xB8, 0xFD,
		0x1A, 0x03, 0x14, 0xDD, 0xD3, 0x15, 0x66, 0x5B, 0x3D, 0xAD, 0x51, 0xF2, 0x4F, 0xDF, 0xDA, 0xA6,
		0x6F, 0xF4, 0x9B, 0x30, 0x81, 0x90, 0x6C, 0xDC, 0x1C, 0x5A, 0xF7, 0xAF, 0xE7, 0xC4, 0xD0, 0xF0,
		0x21, 0x22, 0x50, 0xC5, 0xC6, 0xFA, 0x41, 0x59, 0xB2, 0xC9, 0x37, 0xB3, 0xED, 0x00, 0xB5, 0xE5,
		0x52, 0x47, 0x96, 0xF0, 0x6C, 0xF7, 0x9C, 0xE1, 0x91, 0xFF, 0xDC, 0x0A, 0x6E, 0x6D, 0x70, 0x04,
		0xCA, 0xFD, 0xCA, 0x1B, 0x8B, 0xDA, 0xF2, 0xDF, 0x32, 0xDB, 0x86, 0xDE, 0x45, 0xCD, 0x7F, 0xB4,
		0x77, 0x60, 0x74, 0x19, 0xE9, 0xC1, 0x2E, 0x29, 0xBA, 0xDC, 0xA9, 0xFB, 0x70, 0x11, 0xDA, 0xFF},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0x65, 0x50, 0x56, 0xA4, 0x91, 0x91, 0xFA, 0x5B, 0xE0, 0x42, 0x0D, 0x40, 0x98, 0x5C, 0xAD, 0x67,
		0x31, 0x9F, 0xEE, 0x24}
	};

	EMV_CAPK capk_CARNET_tC2 = {
		{0xA0, 0x00, 0x00, 0x07, 0x24}, //Registered Application Provider Identifier
		0xC2,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		248,							//Length of Module
										//Module
		{0x91, 0xE3, 0x21, 0x5B, 0x11, 0x7D, 0x30, 0x01, 0x96, 0xF5, 0xA1, 0x69, 0xF6, 0x51, 0x1B, 0x63,
		0x69, 0x69, 0x91, 0xEA, 0xA6, 0xE2, 0xA6, 0x24, 0x3C, 0x60, 0xE5, 0x11, 0xA5, 0xCA, 0xCF, 0x6C,
		0xBB, 0xE0, 0x20, 0x69, 0xAD, 0x4B, 0xF5, 0x10, 0x37, 0xF8, 0x9A, 0x02, 0x79, 0x3D, 0xB5, 0xEC,
		0x5F, 0xBA, 0xC5, 0x13, 0x3A, 0xFF, 0x2A, 0x80, 0x4E, 0xDA, 0x69,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
		0x1E, 0x6B, 0xF0, 0x3A, 0xC6, 0xF8, 0xC5, 0xDF},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0xA6, 0x64, 0xB9, 0x2A, 0xCD, 0xA5, 0x13, 0x0F, 0x44, 0x4A, 0x58, 0x4A, 0xF7, 0x22, 0x01, 0x66,
		0x4E, 0xFB, 0xC9, 0xF6}
	};

#define SIZE_EMVKEYS_TEST 38
	EMVKEY_STRUCT AllTestEmvKey[SIZE_EMVKEYS_TEST] = {
		{0x92,&capk_VISA_t92},
		{0x94,&capk_VISA_t94},
		{0x95,&capk_VISA_t95},
		{0x98,&capk_VISA_t98},
		{0x99,&capk_VISA_t99},
		{0xEF,&capk_MASTER_tEF},
		{0xF1,&capk_MASTER_tF1},
		{0xF3,&capk_MASTER_tF3},
		{0xF8,&capk_MASTER_tF8},
		{0xFA,&capk_MASTER_tFA},
		{0xFE,&capk_MASTER_tFE},
		{0xC9,&capk_amex_liveC9},
		{0x03,&capk_amex_live03},
		{0x04,&capk_amex_live04},
		{0x0E,&capk_amex_live0E},
		{0x15,&capk_amex_live15},
		{0x16,&capk_amex_live16},
		{0x62,&capk_amex_live62},
		{0x64,&capk_amex_live64},
		{0x65,&capk_amex_live65},
		{0x66,&capk_amex_live66},
		{0x67,&capk_amex_live67},
		{0x97,&capk_amex_live97},
		{0x98,&capk_amex_live98},
		{0x99,&capk_amex_live99},
		{0xA1,&capk_amex_liveA1},
		{0xC1,&capk_amex_liveC1},
		{0xC2,&capk_amex_liveC2},
		{0xC3,&capk_amex_liveC3},
		{0xC7,&capk_amex_liveC7},
		{0xC8,&capk_amex_liveC8},
		{0xCA,&capk_amex_liveCA},
		{0x5A,&capk_DPAS_t5A},
		{0x5B,&capk_DPAS_t5B},
		{0x5C,&capk_DPAS_t5C},
		{0x5D,&capk_DPAS_t5D},
		{0xC1,&capk_CARNET_tC1},
		{0xC2,&capk_CARNET_tC2},
	};

	for (i = 0; (i < SIZE_EMVKEYS_TEST); i++)
	{
		//SOLO CARGA LAS QUE CORRESPONDA A glProcInfo.stTranLog.sAID
		memset(RIDAscii, 0, sizeof(RIDAscii));
		PubBcd2Asc0(AllTestEmvKey[i].KeyValue->RID, 5, (uchar *)RIDAscii);
#ifdef LOG_SERIAL_CLSS
		/*memset(bufftemp, 0, sizeof(bufftemp));
		sprintf(bufftemp, "RIDAscii [%s] index [%02x]", RIDAscii, AllTestEmvKey[i].KeyValue->KeyID);
		sendMessageNoACK((uchar*)bufftemp, strlen(bufftemp));*/
#endif

		if (RID == NULL || memcmp((char*)RID, (char*)RIDAscii, 10) == 0)
		{
			if (KeyIndex == -1)
			{
#ifdef LOG_SERIAL_CLSS
				/*memset(bufftemp, 0, sizeof(bufftemp));
				sprintf(bufftemp, "EMVAddCAPK  Index(%02X) RID [%02x%02x%02x%02x%02x] ", AllTestEmvKey[i].KeyValue->KeyID, 
					AllTestEmvKey[i].KeyValue->RID[0], AllTestEmvKey[i].KeyValue->RID[1], AllTestEmvKey[i].KeyValue->RID[2], 
					AllTestEmvKey[i].KeyValue->RID[3], AllTestEmvKey[i].KeyValue->RID[4] );
				sendMessageNoACK((uchar*)bufftemp, strlen(bufftemp));*/
#endif
				iRet = EMVAddCAPK(AllTestEmvKey[i].KeyValue);
#ifdef LOG_SERIAL_CLSS
				/*memset(bufftemp, 0, sizeof(bufftemp));
				sprintf(bufftemp, "Return %d", iRet);
				sendMessageNoACK((uchar*)bufftemp, strlen(bufftemp));*/
#endif
				if (iRet != EMV_OK)
				{
					continue;
				}
			}
			else if (AllTestEmvKey[i].KeyValue->KeyID == KeyIndex)
			{
				if (glProcInfo.stTranLog.uiEntryMode == MODE_CHIP_INPUT)
				{
#ifdef LOG_SERIAL_CLSS
					/*memset(bufftemp, 0, sizeof(bufftemp));
					sprintf(bufftemp, "EMVAddCAPK  Index(%02X) RID [%02x%02x%02x%02x%02x] ", AllTestEmvKey[i].KeyValue->KeyID,
						AllTestEmvKey[i].KeyValue->RID[0], AllTestEmvKey[i].KeyValue->RID[1], AllTestEmvKey[i].KeyValue->RID[2],
						AllTestEmvKey[i].KeyValue->RID[3], AllTestEmvKey[i].KeyValue->RID[4]);
					sendMessageNoACK((uchar*)bufftemp, strlen(bufftemp));*/
#endif
					iRet = EMVAddCAPK(AllTestEmvKey[i].KeyValue);
#ifdef LOG_SERIAL_CLSS
					/*memset(bufftemp, 0, sizeof(bufftemp));
					sprintf(bufftemp, "Return %d", iRet);
					sendMessageNoACK((uchar*)bufftemp, strlen(bufftemp));*/
#endif
					if (iRet == EMV_OK)
					{
						return RET_OK;
					}
				}
				else
				{
					memcpy(&CapkKey, AllTestEmvKey[i].KeyValue, sizeof(EMV_CAPK));
#ifdef LOG_SERIAL_CLSS
					/*memset(bufftemp, 0, sizeof(bufftemp));
					sprintf(bufftemp, "CheckCAPK_Test Index(%02x)", CapkKey.KeyID);
					sendMessageNoACK((uchar*)bufftemp, strlen(bufftemp));*/
#endif
					return RET_OK;
				}
			}
		}
	}
	return RET_ERR;
}
#endif

#ifdef EMV_PROD_VERSION
int CheckCAPK_Live(char *RID, int KeyIndex)
{
	int i, iRet;
	char RIDAscii[10+1];
#ifdef LOG_SERIAL_CLSS
	char bufftemp[240];
#endif

#ifdef LOG_SERIAL_CLSS
	memset(bufftemp, 0, sizeof(bufftemp));
	sprintf(bufftemp, "CheckCAPK_Live Init");
	sendMessageNoACK((uchar*)bufftemp, strlen(bufftemp));
#endif
	/************************************************
	Belows are EMV prod data
	************************************************/
	EMV_CAPK capk_VISA_v08 = {
		{0xA0, 0x00, 0x00, 0x00, 0x03}, //Registered Application Provider Identifier
		0x08,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		176,							//Length of Module
										//Module
		{0xD9, 0xFD, 0x6E, 0xD7, 0x5D, 0x51, 0xD0, 0xE3, 0x06, 0x64, 0xBD, 0x15, 0x70, 0x23, 0xEA, 0xA1,
		0xFF, 0xA8, 0x71, 0xE4, 0xDA, 0x65, 0x67, 0x2B, 0x86, 0x3D, 0x25, 0x5E, 0x81, 0xE1, 0x37, 0xA5,
		0x1D, 0xE4, 0xF7, 0x2B, 0xCC, 0x9E, 0x44, 0xAC, 0xE1, 0x21, 0x27, 0xF8, 0x7E, 0x26, 0x3D, 0x3A,
		0xF9, 0xDD, 0x9C, 0xF3, 0x5C, 0xA4, 0xA7, 0xB0, 0x1E, 0x90, 0x70, 0x00, 0xBA, 0x85, 0xD2, 0x49,
		0x54, 0xC2, 0xFC, 0xA3, 0x07, 0x48, 0x25, 0xDD, 0xD4, 0xC0, 0xC8, 0xF1, 0x86, 0xCB, 0x02, 0x0F,
		0x68, 0x3E, 0x02, 0xF2, 0xDE, 0xAD, 0x39, 0x69, 0x13, 0x3F, 0x06, 0xF7, 0x84, 0x51, 0x66, 0xAC,
		0xEB, 0x57, 0xCA, 0x0F, 0xC2, 0x60, 0x34, 0x45, 0x46, 0x98, 0x11, 0xD2, 0x93, 0xBF, 0xEF, 0xBA,
		0xFA, 0xB5, 0x76, 0x31, 0xB3, 0xDD, 0x91, 0xE7, 0x96, 0xBF, 0x85, 0x0A, 0x25, 0x01, 0x2F, 0x1A,
		0xE3, 0x8F, 0x05, 0xAA, 0x5C, 0x4D, 0x6D, 0x03, 0xB1, 0xDC, 0x2E, 0x56, 0x86, 0x12, 0x78, 0x59,
		0x38, 0xBB, 0xC9, 0xB3, 0xCD, 0x3A, 0x91, 0x0C, 0x1D, 0xA5, 0x5A, 0x5A, 0x92, 0x18, 0xAC, 0xE0,
		0xF7, 0xA2, 0x12, 0x87, 0x75, 0x26, 0x82, 0xF1, 0x58, 0x32, 0xA6, 0x78, 0xD6, 0xE1, 0xED, 0x0B},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0x20, 0xD2, 0x13, 0x12, 0x69, 0x55, 0xDE, 0x20, 0x5A, 0xDC, 0x2F, 0xD2, 0x82, 0x2B, 0xD2, 0x2D,
		0xE2, 0x1C, 0xF9, 0xA8}
	};

	EMV_CAPK capk_VISA_v09 = {
		{0xA0, 0x00, 0x00, 0x00, 0x03}, //Registered Application Provider Identifier
		0x09,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		248,							//Length of Module
										//Module
		{0x9D, 0x91, 0x22, 0x48, 0xDE, 0x0A, 0x4E, 0x39, 0xC1, 0xA7, 0xDD, 0xE3, 0xF6, 0xD2, 0x58, 0x89,
		0x92, 0xC1, 0xA4, 0x09, 0x5A, 0xFB, 0xD1, 0x82, 0x4D, 0x1B, 0xA7, 0x48, 0x47, 0xF2, 0xBC, 0x49,
		0x26, 0xD2, 0xEF, 0xD9, 0x04, 0xB4, 0xB5, 0x49, 0x54, 0xCD, 0x18, 0x9A, 0x54, 0xC5, 0xD1, 0x17,
		0x96, 0x54, 0xF8, 0xF9, 0xB0, 0xD2, 0xAB, 0x5F, 0x03, 0x57, 0xEB, 0x64, 0x2F, 0xED, 0xA9, 0x5D,
		0x39, 0x12, 0xC6, 0x57, 0x69, 0x45, 0xFA, 0xB8, 0x97, 0xE7, 0x06, 0x2C, 0xAA, 0x44, 0xA4, 0xAA,
		0x06, 0xB8, 0xFE, 0x6E, 0x3D, 0xBA, 0x18, 0xAF, 0x6A, 0xE3, 0x73, 0x8E, 0x30, 0x42, 0x9E, 0xE9,
		0xBE, 0x03, 0x42, 0x7C, 0x9D, 0x64, 0xF6, 0x95, 0xFA, 0x8C, 0xAB, 0x4B, 0xFE, 0x37, 0x68, 0x53,
		0xEA, 0x34, 0xAD, 0x1D, 0x76, 0xBF, 0xCA, 0xD1, 0x59, 0x08, 0xC0, 0x77, 0xFF, 0xE6, 0xDC, 0x55,
		0x21, 0xEC, 0xEF, 0x5D, 0x27, 0x8A, 0x96, 0xE2, 0x6F, 0x57, 0x35, 0x9F, 0xFA, 0xED, 0xA1, 0x94,
		0x34, 0xB9, 0x37, 0xF1, 0xAD, 0x99, 0x9D, 0xC5, 0xC4, 0x1E, 0xB1, 0x19, 0x35, 0xB4, 0x4C, 0x18,
		0x10, 0x0E, 0x85, 0x7F, 0x43, 0x1A, 0x4A, 0x5A, 0x6B, 0xB6, 0x51, 0x14, 0xF1, 0x74, 0xC2, 0xD7,
		0xB5, 0x9F, 0xDF, 0x23, 0x7D, 0x6B, 0xB1, 0xDD, 0x09, 0x16, 0xE6, 0x44, 0xD7, 0x09, 0xDE, 0xD5,
		0x64, 0x81, 0x47, 0x7C, 0x75, 0xD9, 0x5C, 0xDD, 0x68, 0x25, 0x46, 0x15, 0xF7, 0x74, 0x0E, 0xC0,
		0x7F, 0x33, 0x0A, 0xC5, 0xD6, 0x7B, 0xCD, 0x75, 0xBF, 0x23, 0xD2, 0x8A, 0x14, 0x08, 0x26, 0xC0,
		0x26, 0xDB, 0xDE, 0x97, 0x1A, 0x37, 0xCD, 0x3E, 0xF9, 0xB8, 0xDF, 0x64, 0x4A, 0xC3, 0x85, 0x01,
		0x05, 0x01, 0xEF, 0xC6, 0x50, 0x9D, 0x7A, 0x41},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0x1F, 0xF8, 0x0A, 0x40, 0x17, 0x3F, 0x52, 0xD7, 0xD2, 0x7E, 0x0F, 0x26, 0xA1, 0x46, 0xA1, 0xC8,
		0xCC, 0xB2, 0x90, 0x46}
	};

	EMV_CAPK capk_VISA_v50 = {
		{0xA0, 0x00, 0x00, 0x00, 0x03}, //Registered Application Provider Identifier
		0x09,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		128,							//Length of Module
										//Module
		{0xD1, 0x11, 0x97, 0x59, 0x00, 0x57, 0xB8, 0x41, 0x96, 0xC2, 0xF4, 0xD1, 0x1A, 0x8F, 0x3C, 0x05,
		0x40, 0x8F, 0x42, 0x2A, 0x35, 0xD7, 0x02, 0xF9, 0x01, 0x06, 0xEA, 0x5B, 0x01, 0x9B, 0xB2, 0x8A,
		0xE6, 0x07, 0xAA, 0x9C, 0xDE, 0xBC, 0xD0, 0xD8, 0x1A, 0x38, 0xD4, 0x8C, 0x7E, 0xBB, 0x00, 0x62,
		0xD2, 0x87, 0x36, 0x9E, 0xC0, 0xC4, 0x21, 0x24, 0x24, 0x6A, 0xC3, 0x0D, 0x80, 0xCD, 0x60, 0x2A,
		0xB7, 0x23, 0x8D, 0x51, 0x08, 0x4D, 0xED, 0x46, 0x98, 0x16, 0x2C, 0x59, 0xD2, 0x5E, 0xAC, 0x1E,
		0x66, 0x25, 0x5B, 0x4D, 0xB2, 0x35, 0x25, 0x26, 0xEF, 0x09, 0x82, 0xC3, 0xB8, 0xAD, 0x3D, 0x1C,
		0xCE, 0x85, 0xB0, 0x1D, 0xB5, 0x78, 0x8E, 0x75, 0xE0, 0x9F, 0x44, 0xBE, 0x73, 0x61, 0x36, 0x6D,
		0xEF, 0x9D, 0x1E, 0x13, 0x17, 0xB0, 0x5E, 0x5D, 0x0F, 0xF5, 0x29, 0x0F, 0x88, 0xA0, 0xDB, 0x47},
		1,									//Length of exponent
		{0x01, 0x00, 0x01},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0xB7, 0x69, 0x77, 0x56, 0x68, 0xCA, 0xCB, 0x5D, 0x22, 0xA6, 0x47, 0xD1, 0xD9, 0x93, 0x14, 0x1E,
		0xDA, 0xB7, 0x23, 0x7B}
	};


	EMV_CAPK capk_MASTER_v05 = {
		{0xA0, 0x00, 0x00, 0x00, 0x04}, //Registered Application Provider Identifier
		0x05,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		176,							//Length of Module
										//Module
		{0xB8, 0x04, 0x8A, 0xBC, 0x30, 0xC9, 0x0D, 0x97, 0x63, 0x36, 0x54, 0x3E, 0x3F, 0xD7, 0x09, 0x1C,
		0x8F, 0xE4, 0x80, 0x0D, 0xF8, 0x20, 0xED, 0x55, 0xE7, 0xE9, 0x48, 0x13, 0xED, 0x00, 0x55, 0x5B,
		0x57, 0x3F, 0xEC, 0xA3, 0xD8, 0x4A, 0xF6, 0x13, 0x1A, 0x65, 0x1D, 0x66, 0xCF, 0xF4, 0x28, 0x4F,
		0xB1, 0x3B, 0x63, 0x5E, 0xDD, 0x0E, 0xE4, 0x01, 0x76, 0xD8, 0xBF, 0x04, 0xB7, 0xFD, 0x1C, 0x7B,
		0xAC, 0xF9, 0xAC, 0x73, 0x27, 0xDF, 0xAA, 0x8A, 0xA7, 0x2D, 0x10, 0xDB, 0x3B, 0x8E, 0x70, 0xB2,
		0xDD, 0xD8, 0x11, 0xCB, 0x41, 0x96, 0x52, 0x5E, 0xA3, 0x86, 0xAC, 0xC3, 0x3C, 0x0D, 0x9D, 0x45,
		0x75, 0x91, 0x64, 0x69, 0xC4, 0xE4, 0xF5, 0x3E, 0x8E, 0x1C, 0x91, 0x2C, 0xC6, 0x18, 0xCB, 0x22,
		0xDD, 0xE7, 0xC3, 0x56, 0x8E, 0x90, 0x02, 0x2E, 0x6B, 0xBA, 0x77, 0x02, 0x02, 0xE4, 0x52, 0x2A,
		0x2D, 0xD6, 0x23, 0xD1, 0x80, 0xE2, 0x15, 0xBD, 0x1D, 0x15, 0x07, 0xFE, 0x3D, 0xC9, 0x0C, 0xA3,
		0x10, 0xD2, 0x7B, 0x3E, 0xFC, 0xCD, 0x8F, 0x83, 0xDE, 0x30, 0x52, 0xCA, 0xD1, 0xE4, 0x89, 0x38,
		0xC6, 0x8D, 0x09, 0x5A, 0xAC, 0x91, 0xB5, 0xF3, 0x7E, 0x28, 0xBB, 0x49, 0xEC, 0x7E, 0xD5, 0x97},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0xEB, 0xFA, 0x0D, 0x5D, 0x06, 0xD8, 0xCE, 0x70, 0x2D, 0xA3, 0xEA, 0xE8, 0x90, 0x70, 0x1D, 0x45,
		0xE2, 0x74, 0xC8, 0x45}
	};

	EMV_CAPK capk_MASTER_v06 = {
		{0xA0, 0x00, 0x00, 0x00, 0x04}, //Registered Application Provider Identifier
		0x06,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		248,							//Length of Module
										//Module
		{0xCB, 0x26, 0xFC, 0x83, 0x0B, 0x43, 0x78, 0x5B, 0x2B, 0xCE, 0x37, 0xC8, 0x1E, 0xD3, 0x34, 0x62,
		0x2F, 0x96, 0x22, 0xF4, 0xC8, 0x9A, 0xAE, 0x64, 0x10, 0x46, 0xB2, 0x35, 0x34, 0x33, 0x88, 0x3F,
		0x30, 0x7F, 0xB7, 0xC9, 0x74, 0x16, 0x2D, 0xA7, 0x2F, 0x7A, 0x4E, 0xC7, 0x5D, 0x9D, 0x65, 0x73,
		0x36, 0x86, 0x5B, 0x8D, 0x30, 0x23, 0xD3, 0xD6, 0x45, 0x66, 0x76, 0x25, 0xC9, 0xA0, 0x7A, 0x6B,
		0x7A, 0x13, 0x7C, 0xF0, 0xC6, 0x41, 0x98, 0xAE, 0x38, 0xFC, 0x23, 0x80, 0x06, 0xFB, 0x26, 0x03,
		0xF4, 0x1F, 0x4F, 0x3B, 0xB9, 0xDA, 0x13, 0x47, 0x27, 0x0F, 0x2F, 0x5D, 0x8C, 0x60, 0x6E, 0x42,
		0x09, 0x58, 0xC5, 0xF7, 0xD5, 0x0A, 0x71, 0xDE, 0x30, 0x14, 0x2F, 0x70, 0xDE, 0x46, 0x88, 0x89,
		0xB5, 0xE3, 0xA0, 0x86, 0x95, 0xB9, 0x38, 0xA5, 0x0F, 0xC9, 0x80, 0x39, 0x3A, 0x9C, 0xBC, 0xE4,
		0x4A, 0xD2, 0xD6, 0x4F, 0x63, 0x0B, 0xB3, 0x3A, 0xD3, 0xF5, 0xF5, 0xFD, 0x49, 0x5D, 0x31, 0xF3,
		0x78, 0x18, 0xC1, 0xD9, 0x40, 0x71, 0x34, 0x2E, 0x07, 0xF1, 0xBE, 0xC2, 0x19, 0x4F, 0x60, 0x35,
		0xBA, 0x5D, 0xED, 0x39, 0x36, 0x50, 0x0E, 0xB8, 0x2D, 0xFD, 0xA6, 0xE8, 0xAF, 0xB6, 0x55, 0xB1,
		0xEF, 0x3D, 0x0D, 0x7E, 0xBF, 0x86, 0xB6, 0x6D, 0xD9, 0xF2, 0x9F, 0x6B, 0x1D, 0x32, 0x4F, 0xE8,
		0xB2, 0x6C, 0xE3, 0x8A, 0xB2, 0x01, 0x3D, 0xD1, 0x3F, 0x61, 0x1E, 0x7A, 0x59, 0x4D, 0x67, 0x5C,
		0x44, 0x32, 0x35, 0x0E, 0xA2, 0x44, 0xCC, 0x34, 0xF3, 0x87, 0x3C, 0xBA, 0x06, 0x59, 0x29, 0x87,
		0xA1, 0xD7, 0xE8, 0x52, 0xAD, 0xC2, 0x2E, 0xF5, 0xA2, 0xEE, 0x28, 0x13, 0x20, 0x31, 0xE4, 0x8F,
		0x74, 0x03, 0x7E, 0x3B, 0x34, 0xAB, 0x74, 0x7F},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0xF9, 0x10, 0xA1, 0x50, 0x4D, 0x5F, 0xFB, 0x79, 0x3D, 0x94, 0xF3, 0xB5, 0x00, 0x76, 0x5E, 0x1A,
		0xBC, 0xAD, 0x72, 0xD9}
	};

	EMV_CAPK capk_amex_live0F = { {0xA0, 0x00, 0x00, 0x00, 0x25}, 0x0F,
	0x01, 0x01,0xB0,
	{0xC8, 0xD5, 0xAC, 0x27, 0xA5, 0xE1, 0xFB, 0x89, 0x97, 0x8C, 0x7C, 0x64, 0x79, 0xAF, 0x99, 0x3A,
	0xB3, 0x80, 0x0E, 0xB2, 0x43, 0x99, 0x6F, 0xBB, 0x2A, 0xE2, 0x6B, 0x67, 0xB2, 0x3A, 0xC4, 0x82,
	0xC4, 0xB7, 0x46, 0x00, 0x5A, 0x51, 0xAF, 0xA7, 0xD2, 0xD8, 0x3E, 0x89, 0x4F, 0x59, 0x1A, 0x23,
	0x57, 0xB3, 0x0F, 0x85, 0xB8, 0x56, 0x27, 0xFF, 0x15, 0xDA, 0x12, 0x29, 0x0F, 0x70, 0xF0, 0x57,
	0x66, 0x55, 0x2B, 0xA1, 0x1A, 0xD3, 0x4B, 0x71, 0x09, 0xFA, 0x49, 0xDE, 0x29, 0xDC, 0xB0, 0x10,
	0x96, 0x70, 0x87, 0x5A, 0x17, 0xEA, 0x95, 0x54, 0x9E, 0x92, 0x34, 0x7B, 0x94, 0x8A, 0xA1, 0xF0,
	0x45, 0x75, 0x6D, 0xE5, 0x6B, 0x70, 0x7E, 0x38, 0x63, 0xE5, 0x9A, 0x6C, 0xBE, 0x99, 0xC1, 0x27,
	0x2E, 0xF6, 0x5F, 0xB6, 0x6C, 0xBB, 0x4C, 0xFF, 0x07, 0x0F, 0x36, 0x02, 0x9D, 0xD7, 0x62, 0x18,
	0xB2, 0x12, 0x42, 0x64, 0x5B, 0x51, 0xCA, 0x75, 0x2A, 0xF3, 0x7E, 0x70, 0xBE, 0x1A, 0x84, 0xFF,
	0x31, 0x07, 0x9D, 0xC0, 0x04, 0x8E, 0x92, 0x88, 0x83, 0xEC, 0x4F, 0xAD, 0xD4, 0x97, 0xA7, 0x19,
	0x38, 0x5C, 0x2B, 0xBB, 0xEB, 0xC5, 0xA6, 0x6A, 0xA5, 0xE5, 0x65, 0x5D, 0x18, 0x03, 0x4E, 0xC5},
	1,{0x03},{0x14, 0x12, 0x31},
	{0xA7, 0x34, 0x72, 0xB3, 0xAB, 0x55, 0x74, 0x93, 0xA9, 0xBC, 0x21, 0x79, 0xCC, 0x80, 0x14, 0x05,
	0x3B, 0x12, 0xBA, 0xB4}
	};

	//AMEX 1984 bits Live Key 10
	EMV_CAPK capk_amex_live10 = { {0xA0, 0x00, 0x00, 0x00, 0x25}, 0x10,
	0x01, 0x01,0xF8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19, 0x94, 0x36, 0x63, 0x3C, 0x67, 0xEE, 0x5A, 0x68, 0x0F,
	0x05, 0x16, 0x0E, 0xD1, 0x2D, 0x16, 0x65, 0xEC, 0x83, 0xD1, 0x99, 0x7F, 0x10, 0xFD, 0x05, 0xBB,
	0xDB, 0xF9, 0x43, 0x3E, 0x8F, 0x79, 0x7A, 0xEE, 0x3E, 0x9F, 0x02, 0xA3, 0x42, 0x28, 0xAC, 0xE9,
	0x27, 0xAB, 0xE6, 0x2B, 0x8B, 0x92, 0x81, 0xAD, 0x08, 0xD3, 0xDF, 0x5C, 0x73, 0x79, 0x68, 0x50,
	0x45, 0xD7, 0xBA, 0x5F, 0xCD, 0xE5, 0x86, 0x37},
	1,{0x03},{0x16, 0x12, 0x31},
	{0xC7, 0x29, 0xCF, 0x2F, 0xD2, 0x62, 0x39, 0x4A, 0xBC, 0x4C, 0xC1, 0x73, 0x50, 0x65, 0x02, 0x44,
	0x6A, 0xA9, 0xB9, 0xFD}
	};

	EMV_CAPK capk_DPAS_v04 = {
		{0xA0, 0x00, 0x00, 0x01, 0x52}, //Registered Application Provider Identifier
		0x04,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		176,							//Length of Module
										//Module
		{0x8E, 0xEE, 0xC0, 0xD6, 0xD3, 0x85, 0x7F, 0xD5, 0x58, 0x28, 0x5E, 0x49, 0xB6, 0x23, 0xB1, 0x09,
		0xE6, 0x77, 0x4E, 0x06, 0xE9, 0x47, 0x6F, 0xE1, 0xB2, 0xFB, 0x27, 0x36, 0x85, 0xB5, 0xA2, 0x35,
		0xE9, 0x55, 0x81, 0x0A, 0xDD, 0xB5, 0xCD, 0xCC, 0x2C, 0xB6, 0xE1, 0xA9, 0x7A, 0x07, 0x08, 0x9D,
		0x7F, 0xDE, 0x0A, 0x54, 0x8B, 0xDC, 0x62, 0x21, 0x45, 0xCA, 0x2D, 0xE3, 0xC7, 0x3D, 0x6B, 0x14,
		0xF2, 0x84, 0xB3, 0xDC, 0x1F, 0xA0, 0x56, 0xFC, 0x0F, 0xB2, 0x81, 0x8B, 0xCD, 0x7C, 0x85, 0x2F,
		0x0C, 0x97, 0x96, 0x31, 0x69, 0xF0, 0x14, 0x83, 0xCE, 0x1A, 0x63, 0xF0, 0xBF, 0x89, 0x9D, 0x41,
		0x2A, 0xB6, 0x7C, 0x5B, 0xBD, 0xC8, 0xB4, 0xF6, 0xFB, 0x9A, 0xBB, 0x57, 0xE9, 0x51, 0x25, 0x36,
		0x3D, 0xBD, 0x8F, 0x5E, 0xBA, 0xA9, 0xB7, 0x4A, 0xDB, 0x93, 0x20, 0x20, 0x50, 0x34, 0x18, 0x33,
		0xDE, 0xE8, 0xE3, 0x8D, 0x28, 0xBD, 0x17, 0x5C, 0x83, 0xA6, 0xEA, 0x72, 0x0C, 0x26, 0x26, 0x82,
		0xBE, 0xAB, 0xEA, 0x8E, 0x95, 0x5F, 0xE6, 0x7B, 0xD9, 0xC2, 0xEF, 0xF7, 0xCB, 0x9A, 0x9F, 0x45,
		0xDD, 0x5B, 0xDA, 0x4A, 0x1E, 0xEF, 0xB1, 0x48, 0xBC, 0x44, 0xFF, 0xF6, 0x8D, 0x93, 0x29, 0xFD},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0x17, 0xF9, 0x71, 0xCA, 0xF6, 0xB7, 0x08, 0xE5, 0xB9, 0x16, 0x53, 0x31, 0xFB, 0xA9, 0x15, 0x93,
		0xD0, 0xC0, 0xBF, 0x66}
	};

	EMV_CAPK capk_DPAS_v05 = {
		{0xA0, 0x00, 0x00, 0x01, 0x52}, //Registered Application Provider Identifier
		0x05,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		248,							//Length of Module
										//Module
		{0xE1, 0x20, 0x0E, 0x9F, 0x44, 0x28, 0xEB, 0x71, 0xA5, 0x26, 0xD6, 0xBB, 0x44, 0xC9, 0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, 0xD6, 0x67, 0x71, 0x43, 0x7F, 0x8B, 0x66, 0x08, 0xAA, 0x1A, 0x66, 0x5F, 0x88,
		0xD8, 0x46, 0x40, 0x3E, 0x4C, 0x41, 0xAF, 0xEE, 0xDB, 0x97, 0x29, 0xC2, 0xB2, 0x51, 0x1C, 0xFE,
		0x22, 0x8B, 0x50, 0xC1, 0xB1, 0x52, 0xB2, 0xA6, 0x0B, 0xBF, 0x61, 0xD8, 0x91, 0x3E, 0x08, 0x62,
		0x10, 0x02, 0x3A, 0x3A, 0xA4, 0x99, 0xE4, 0x23},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0x12, 0xBC, 0xD4, 0x07, 0xB6, 0xE6, 0x27, 0xA7, 0x50, 0xFD, 0xF6, 0x29, 0xEE, 0x8C, 0x2C, 0x9C,
		0xC7, 0xBA, 0x63, 0x6A}
	};

	EMV_CAPK capk_CARNET_v01 = {
		{0xA0, 0x00, 0x00, 0x07, 0x24}, //Registered Application Provider Identifier
		0x01,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		176,							//Length of Module
										//Module
		{0xAE, 0x0B, 0x89, 0x75, 0x5F, 0x05, 0x09, 0xF1, 0x11, 0xFD, 0xF7, 0xCD, 0xBA, 0xBE, 0x04, 0x91,
		0xA2, 0xE3, 0xA6, 0xA7, 0x78, 0xA0, 0xFC, 0xB1, 0x74, 0x4C, 0x54, 0x45, 0x74, 0x9F, 0xE9, 0x40,
		0x7E, 0x5B, 0xDE, 0x86, 0xD4, 0x02, 0xDC, 0x63, 0xBA, 0xE9, 0x99, 0xBD, 0x66, 0x98, 0x13, 0x21,
		0x81, 0xBE, 0x2A, 0xAD, 0x0B, 0x96, 0xC9, 0xBE, 0xBA, 0x11, 0xA5, 0x21, 0xB1, 0x65, 0x16, 0x5A,
		0xA4, 0x00, 0x57, 0x29, 0x2F, 0x79, 0xF7, 0x32, 0x97, 0x24, 0xD1, 0x78, 0xAF, 0x18, 0xFC, 0x34,
		0x2B, 0xB8, 0xB5, 0x8D, 0x1D, 0xD8, 0x4F, 0xF4, 0x48, 0x47, 0x05, 0x6B, 0xF1, 0x7F, 0x66, 0x30,
		0x75, 0x00, 0x22, 0x85, 0x58, 0xD8, 0x47, 0x67, 0x8F, 0x9F, 0xA4, 0x62, 0xE2, 0x90, 0xF3, 0xDF,
		0xD8, 0x98, 0xF1, 0x13, 0x81, 0xBA, 0x17, 0x10, 0xB9, 0x4D, 0x42, 0xF1, 0x60, 0x78, 0x0D, 0x0F,
		0x60, 0xA9, 0x09, 0x51, 0x66, 0x53, 0x97, 0x8A, 0xE7, 0x50, 0x56, 0x8B, 0x39, 0x60, 0x07, 0x10,
		0x92, 0x63, 0x35, 0x30, 0xC0, 0x53, 0xFF, 0xB7, 0x09, 0x7E, 0xFB, 0xF1, 0x40, 0xAF, 0xCB, 0x19,
		0x68, 0x61, 0xA0, 0xDA, 0x94, 0xEC, 0xDA, 0xC8, 0xD3, 0x36, 0xBE, 0x97, 0xB8, 0xE9, 0xAF, 0xB7},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0x60, 0x2A, 0x4C, 0xAB, 0x60, 0x84, 0xC4, 0x93, 0xF0, 0x1B, 0x29, 0xAB, 0x41, 0xF3, 0x14, 0x0B,
		0x85, 0xEA, 0xBB, 0xEF}
	};

	EMV_CAPK capk_CARNET_v02 = {
		{0xA0, 0x00, 0x00, 0x07, 0x24}, //Registered Application Provider Identifier
		0x02,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		248,							//Length of Module
										//Module
		{0xAA, 0xBB, 0x50, 0x4E, 0x3B, 0x2C, 0xC6, 0x1F, 0x24, 0x3A, 0x6B, 0xE3, 0xBF, 0xB1, 0x8B, 0x64,
		0x9E, 0x17, 0xED, 0x62, 0x5F, 0x1F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xE2, 0xF6, 0x5B, 0x80, 0xD5,
		0x4D, 0xBE, 0x92, 0x3C, 0x42, 0x10, 0x27, 0x41, 0x3B, 0xAA, 0x3B, 0x93, 0x51, 0x7E, 0xE0, 0x86,
		0x31, 0xD5, 0x8D, 0x00, 0x09, 0x8B, 0xA2, 0x23, 0x72, 0x92, 0x13, 0x21, 0xC4, 0x0C, 0xC5, 0x11,
		0x53, 0x46, 0x58, 0x7E, 0xD4, 0x36, 0xA1, 0x81},
		1,									//Length of exponent
		{0x03},								//Exponent
		{0x49, 0x12, 0x31},					//Expiration Date (YYMMDD)
											//Check Sum of Key
		{0x15, 0xC4, 0x8D, 0xAD, 0x19, 0xDB, 0x50, 0x2A, 0xB3, 0x97, 0x64, 0x7A, 0x38, 0xA0, 0x75, 0x5E,
		0x0F, 0xD0, 0xCB, 0x39}
	};
	//CARNET  Live Key C1
	EMV_CAPK capk_CARNET_vC1 = {
		{0xA0, 0x00, 0x00, 0x07, 0x24}, //Registered Application Provider Identifier
		0xC1,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		176,							//Length of Module
										//Module
		{0xC7, 0x1B, 0x64, 0x53, 0x81, 0x63, 0x5A, 0x88, 0x87, 0xE4, 0xFF, 0x56, 0xC8, 0x66, 0xEA, 0x5F,
		0x6E, 0x4B, 0xBE, 0x1C, 0x1C, 0xA0, 0xA5, 0x20, 0xEB, 0x1D, 0xFB, 0x94, 0x15, 0x0B, 0x50, 0xEA,
		0x36, 0x68, 0x85, 0x93, 0xF7, 0xF6, 0xF5, 0x18, 0x9E, 0x74, 0x7F, 0x22, 0x45, 0x4C, 0xA6, 0x42,
		0x1E, 0xE8, 0x3B, 0x33, 0x4F, 0x39, 0xC9, 0x9F, 0x59, 0x80, 0x53, 0x19, 0x4A, 0xE5, 0xB1, 0x55,
		0xCD, 0x8D, 0xB5, 0xFE, 0x9B, 0x3A, 0x86, 0xDE, 0x5F, 0x41, 0x62, 0xA2, 0x73, 0xBD, 0xB8, 0xFD,
		0x1A, 0x03, 0x14, 0xDD, 0xD3, 0x15, 0x66, 0x5B, 0x3D, 0xAD, 0x51, 0xF2, 0x4F, 0xDF, 0xDA, 0xA6,
		0x6F, 0xF4, 0x9B, 0x30, 0x81, 0x90, 0x6C, 0xDC, 0x1C, 0x5A, 0xF7, 0xAF, 0xE7, 0xC4, 0xD0, 0xF0,
		0x21, 0x22, 0x50, 0xC5, 0xC6, 0xFA, 0x41, 0x59, 0xB2, 0xC9, 0x37, 0xB3, 0xED, 0x00, 0xB5, 0xE5,
		0x52, 0x47, 0x96, 0xF0, 0x6C, 0xF7, 0x9C, 0xE1, 0x91, 0xFF, 0xDC, 0x0A, 0x6E, 0x6D, 0x70, 0x04,
		0xCA, 0xFD, 0xCA, 0x1B, 0x8B, 0xDA, 0xF2, 0xDF, 0x32, 0xDB, 0x86, 0xDE, 0x45, 0xCD, 0x7F, 0xB4,
		0x77, 0x60, 0x74, 0x19, 0xE9, 0xC1, 0x2E, 0x29, 0xBA, 0xDC, 0xA9, 0xFB, 0x70, 0x11, 0xDA, 0xFF},
		1,								//Length of exponent
		{0x03},							//Exponent
		{0x35, 0x12, 0x31},				//Expiration Date (YYMMDD)
										//Check Sum of Key
		{0x65, 0x50, 0x56, 0xA4, 0x91, 0x91, 0xFA, 0x5B, 0xE0, 0x42, 0x0D, 0x40, 0x98, 0x5C, 0xAD, 0x67,
		0x31, 0x9F, 0xEE, 0x24}
};

//CARNET  Live Key C2
EMV_CAPK capk_CARNET_vC2 = {
		{0xA0, 0x00, 0x00, 0x07, 0x24}, //Registered Application Provider Identifier
		0xC2,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		248,							//Length of Module
										//Module
		{0x91, 0xE3, 0x21, 0x5B, 0x11, 0x7D, 0x30, 0x01, 0x96, 0xF5, 0xA1, 0x69, 0xF6, 0x51, 0x1B, 0x63,
		0x69, 0x69, 0x91, 0xEA, 0xA6, 0xE2, 0xA6, 0x24,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 0x83, 0x7B, 0xB3, 0xA7,
		0x52, 0x9E, 0x54, 0xF1, 0x3D, 0x2D, 0xB8, 0xD4, 0x00, 0x68, 0x85, 0x70, 0x0C, 0x3A, 0x48, 0x76,
		0x2B, 0xA3, 0x9B, 0x2D, 0xC9, 0x03, 0x96, 0x23, 0x48, 0xE1, 0x3E, 0x06, 0x89, 0x42, 0x85, 0xA6,
		0x1E, 0x6B, 0xF0, 0x3A, 0xC6, 0xF8, 0xC5, 0xDF},
		1,								//Length of exponent
		{0x03},							//Exponent
		{0x35, 0x12, 0x31},				//Expiration Date (YYMMDD)
										//Check Sum of Key
		{0xA6, 0x64, 0xB9, 0x2A, 0xCD, 0xA5, 0x13, 0x0F, 0x44, 0x4A, 0x58, 0x4A, 0xF7, 0x22, 0x01, 0x66,
		0x4E, 0xFB, 0xC9, 0xF6}
};

//CARNET  Live Key 12
EMV_CAPK capk_CARNET_v12 = {
		{0xA0, 0x00, 0x00, 0x07, 0x24}, //Registered Application Provider Identifier
		0x12,							//Key Index
		0x01,							//Hash arithmetic indicator
		0x01,							//RSA arithmetic indicator
		176,							//Length of Module
										//Module
		{0xAD, 0xF0, 0x5C, 0xD4, 0xC5, 0xB4, 0x90, 0xB0, 0x87, 0xC3, 0x46, 0x7B, 0x0F, 0x30, 0x43, 0x75,
		0x04, 0x38, 0x84, 0x84, 0x61, 0x28, 0x8B, 0xFE, 0xFD, 0x61, 0x98, 0xDD, 0x57, 0x6D, 0xC3, 0xAD,
		0x7A, 0x7C, 0xFA, 0x07, 0xDB, 0xA1, 0x28, 0xC2, 0x47, 0xA8, 0xEA, 0xB3, 0x0D, 0xC3, 0xA3, 0x0B,
		0x02, 0xFC, 0xD7, 0xF1, 0xC8, 0x16, 0x79, 0x65, 0x46, 0x36, 0x26, 0xFE, 0xFF, 0x8A, 0xB1, 0xAA,
		0x61, 0xA4, 0xB9, 0xAE, 0xF0, 0x9E, 0xE1, 0x2B, 0x00, 0x98, 0x42, 0xA1, 0xAB, 0xA0, 0x1A, 0xDB,
		0x4A, 0x2B, 0x17, 0x06, 0x68, 0x78, 0x1E, 0xC9, 0x2B, 0x60, 0xF6, 0x05, 0xFD, 0x12, 0xB2, 0xB2,
		0xA6, 0xF1, 0xFE, 0x73, 0x4B, 0xE5, 0x10, 0xF6, 0x0D, 0xC5, 0xD1, 0x89, 0xE4, 0x01, 0x45, 0x1B,
		0x62, 0xB4, 0xE0, 0x68, 0x51, 0xEC, 0x20, 0xEB, 0xFF, 0x45, 0x22, 0xAA, 0xCC, 0x2E, 0x9C, 0xDC,
		0x89, 0xBC, 0x5D, 0x8C, 0xDE, 0x5D, 0x63, 0x3C, 0xFD, 0x77, 0x22, 0x0F, 0xF6, 0xBB, 0xD4, 0xA9,
		0xB4, 0x41, 0x47, 0x3C, 0xC3, 0xC6, 0xFE, 0xFC, 0x8D, 0x13, 0xE5, 0x7C, 0x3D, 0xE9, 0x7E, 0x12,
		0x69, 0xFA, 0x19, 0xF6, 0x55, 0x21, 0x5B, 0x23, 0x56, 0x3E, 0xD1, 0xD1, 0x86, 0x0D, 0x86, 0x81},
		1,								//Length of exponent
		{0x03},							//Exponent
		{0x35, 0x12, 0x31},				//Expiration Date (YYMMDD)
										//Check Sum of Key
		{0x87, 0x4B, 0x37, 0x9B, 0x7F, 0x60, 0x7D, 0xC1, 0xCA, 0xF8, 0x7A, 0x19, 0xE4, 0x00, 0xB6, 0xA9,
		0xE2, 0x51, 0x63, 0xE8}
};

#define SIZE_EMVKEYS_LIVE 14

	EMVKEY_STRUCT AllLiveEmvKey[SIZE_EMVKEYS_LIVE] = {
		{0x08,&capk_VISA_v08},
		{0x09,&capk_VISA_v09},
		{0x50,&capk_VISA_v50},
		{0x05,&capk_MASTER_v05},
		{0x06,&capk_MASTER_v06},
		{0x0F,&capk_amex_live0F},
		{0x10,&capk_amex_live10},
		{0x04,&capk_DPAS_v04},
		{0x05,&capk_DPAS_v05},
		//carnet
		{0x01,&capk_CARNET_v01},
		{0x02,&capk_CARNET_v02},
		{0x12,&capk_CARNET_v12},
		{0xC1,&capk_CARNET_vC1},
		{0xC2,&capk_CARNET_vC2},
	};

#ifdef LOG_SERIAL_CLSS
	/*memset(bufftemp, 0, sizeof(bufftemp));
	sprintf(bufftemp, "CheckCAPK_Live KeyIndex [%02X] RID [%s]", KeyIndex, RID);
	sendMessageNoACK((uchar*)bufftemp, strlen(bufftemp));*/
#endif

	for (i = 0; (i < SIZE_EMVKEYS_LIVE); i++)
	{
		//SOLO CARGA LAS QUE CORRESPONDA A glProcInfo.stTranLog.sAID
		memset(RIDAscii, 0, sizeof(RIDAscii));
		PubBcd2Asc0(AllLiveEmvKey[i].KeyValue->RID, 5, (uchar *)RIDAscii);
#ifdef LOG_SERIAL_CLSS
		/*memset(bufftemp, 0, sizeof(bufftemp));
		sprintf(bufftemp, "RIDAscii [%s] index [%02x]", RIDAscii, AllLiveEmvKey[i].KeyValue->KeyID);
		sendMessageNoACK((uchar*)bufftemp, strlen(bufftemp));*/
#endif
		if (RID == NULL || memcmp((char*)RID, (char*)RIDAscii, 10) == 0)
		{
			if (KeyIndex == -1)
			{
#ifdef LOG_SERIAL_CLSS
				/*memset(bufftemp, 0, sizeof(bufftemp));
				sprintf(bufftemp, "EMVAddCAPK  Index(%02X) RID [%02x%02x%02x%02x%02x] ", AllLiveEmvKey[i].KeyValue->KeyID,
					AllLiveEmvKey[i].KeyValue->RID[0], AllLiveEmvKey[i].KeyValue->RID[1], AllLiveEmvKey[i].KeyValue->RID[2],
					AllLiveEmvKey[i].KeyValue->RID[3], AllLiveEmvKey[i].KeyValue->RID[4]);
				sendMessageNoACK((uchar*)bufftemp, strlen(bufftemp));*/
#endif
				iRet = EMVAddCAPK(AllLiveEmvKey[i].KeyValue);
#ifdef LOG_SERIAL_CLSS
				/*memset(bufftemp, 0, sizeof(bufftemp));
				sprintf(bufftemp, "Return %d", iRet);
				sendMessageNoACK((uchar*)bufftemp, strlen(bufftemp));*/
#endif
				if (iRet != EMV_OK)
				{
					continue;
				}
			}
			else if (AllLiveEmvKey[i].KeyValue->KeyID == KeyIndex)
			{
				if (glProcInfo.stTranLog.uiEntryMode == MODE_CHIP_INPUT)
				{
#ifdef LOG_SERIAL_CLSS
					/*memset(bufftemp, 0, sizeof(bufftemp));
					sprintf(bufftemp, "EMVAddCAPK  Index(%02X) RID [%02x%02x%02x%02x%02x] ", AllLiveEmvKey[i].KeyValue->KeyID,
						AllLiveEmvKey[i].KeyValue->RID[0], AllLiveEmvKey[i].KeyValue->RID[1], AllLiveEmvKey[i].KeyValue->RID[2],
						AllLiveEmvKey[i].KeyValue->RID[3], AllLiveEmvKey[i].KeyValue->RID[4]);
					sendMessageNoACK((uchar*)bufftemp, strlen(bufftemp));*/
#endif
					iRet = EMVAddCAPK(AllLiveEmvKey[i].KeyValue);
#ifdef LOG_SERIAL_CLSS
					/*memset(bufftemp, 0, sizeof(bufftemp));
					sprintf(bufftemp, "Return %d", iRet);
					sendMessageNoACK((uchar*)bufftemp, strlen(bufftemp));*/
#endif
					if (iRet == EMV_OK)
					{
						return RET_OK;
					}
				}
				else
				{
					memcpy(&CapkKey, AllLiveEmvKey[i].KeyValue, sizeof(EMV_CAPK));
#ifdef LOG_SERIAL_CLSS
					/*memset(bufftemp, 0, sizeof(bufftemp));
					sprintf(bufftemp, "CheckCAPK_Live Value(%02x%02x%02x%02x%02x) Index(%02x)", CapkKey.Modul[0], CapkKey.Modul[1],
						CapkKey.Modul[2], CapkKey.Modul[3], CapkKey.Modul[4], CapkKey.KeyID);
					sendMessageNoACK((uchar*)bufftemp, strlen(bufftemp));*/
#endif
					return RET_OK;
				}
			}
		}
	}

	return RET_ERR;
}
#endif
Editor is loading...
Leave a Comment