#ifndef __IFAA_TA_VENDOR_H__
#define __IFAA_TA_VENDOR_H__

#include "ifaa_ta_common.h"
#include "gp_oem.h"
#include "ifaa_tee_common.h"

#define IFAA_DEVICE_VENDOR_ID    0x01
#define IFAA_CHIP_VENDOR_ID      0X0F // UNKNOWN
#define IFAA_TEE_VENDOR_ID       0x0F // UNKNOWN
#define IFAA_SENSOR_VENDOR_ID    0x03

//key of Galaxy S8+
#define PRI_NN (unsigned char[]) { \
    0x00,0xc1,0x8f,0xb1,0xe3,0xe4,0x6e,0xdf,0x6f,0x73,0x15,0xf0,0x56,0x34,0x31, \
    0xe6,0x04,0xfd,0x89,0xf9,0x6a,0x02,0x66,0x5a,0x8a,0x8f,0x52,0x2f,0x2b,0xcd, \
    0xf0,0xd4,0x91,0xdb,0xc1,0x29,0x53,0x6c,0xdc,0x83,0x2c,0xd5,0xa8,0x9b,0xf5, \
    0x9f,0xe9,0xf5,0xdc,0x3c,0x87,0xb8,0x0f,0x56,0xb9,0xc3,0xba,0xd1,0xbc,0x01, \
    0x56,0x71,0xfb,0xa4,0xdd,0x1f,0x29,0xbf,0x41,0x38,0x59,0x6b,0xba,0x86,0x8a, \
    0x99,0x74,0xb3,0xaf,0x6e,0xa1,0x28,0x21,0x4e,0x20,0xf2,0xc6,0xbe,0x9b,0xfe, \
    0x8f,0xc3,0xad,0xb0,0x68,0xb5,0xf0,0x2f,0x0f,0xb8,0xe9,0x44,0xe2,0x5c,0x2d, \
    0xdc,0xee,0x87,0x6d,0xab,0x19,0xe3,0x07,0x0b,0xfd,0x87,0x82,0x63,0xee,0xef, \
    0x33,0xf2,0xd6,0xe5,0x28,0x50,0x9a,0xd5,0xa1,0xd7,0x7c,0x00,0x76,0x6a,0xe9, \
    0xf5,0x77,0xbd,0x32,0x0a,0xfb,0x3d,0x51,0x4b,0x62,0xe7,0x06,0x7b,0xd8,0x4d, \
    0x65,0x04,0xf4,0x38,0x9b,0xb3,0x4d,0xd8,0x44,0x4c,0xcf,0x5d,0x85,0x6d,0x89, \
    0xd1,0x41,0xcb,0xcf,0x2a,0x70,0xcf,0x2a,0xb4,0xac,0xc9,0xa5,0x90,0x6e,0x86, \
    0x2a,0xdb,0x51,0xb2,0xab,0x0c,0x54,0x5d,0xe4,0x3f,0xae,0x1f,0xce,0xa0,0x92, \
    0x59,0xe8,0x4b,0xdd,0xee,0xaa,0x3f,0x0e,0x94,0x4d,0xd1,0x1c,0x00,0xc6,0x25, \
    0x59,0x27,0x1f,0xc4,0x42,0xbc,0x79,0x29,0xdd,0xd5,0x40,0x55,0x48,0x7f,0x7c, \
    0x50,0x7d,0x4b,0x3d,0xe0,0x76,0x8f,0x61,0xf1,0xe9,0xa0,0xbf,0x4a,0xe8,0x83, \
    0xe5,0x03,0xc5,0x6b,0xf4,0xe1,0x80,0xa3,0x12,0x4f,0x34,0x30,0xec,0xb8,0xf8, \
    0x9a,0x9b}

//key of Galaxy S8+
#define PRI_DD (unsigned char[]) { \
    0x3b,0xe7,0xb8,0x1b,0x9a,0xe8,0x41,0x98,0xa1,0x9a,0xa9,0x9e,0x54,0x5b,0x19, \
    0x20,0x74,0x43,0x8e,0x80,0xa3,0xab,0x7f,0xdc,0x20,0x4d,0x44,0x32,0x1f,0x73, \
    0xa8,0xa6,0x57,0xc7,0xe9,0x7d,0x5b,0x54,0xc7,0xf8,0x49,0x4b,0xfc,0xb0,0xc1, \
    0x44,0x4c,0x86,0x53,0xe9,0x81,0x2a,0xa6,0x21,0xaa,0x15,0x18,0xb2,0x42,0x0b, \
    0xba,0x0d,0x32,0xd2,0x08,0xc2,0x07,0xe2,0x2c,0x89,0x68,0x50,0xfb,0x30,0xcc, \
    0x1b,0x95,0x3c,0xf7,0x55,0x43,0x31,0x43,0x97,0xe8,0xeb,0x5f,0xb4,0xb1,0xcd, \
    0x56,0xb7,0x5b,0xc0,0x9c,0x86,0x70,0x5a,0x42,0x55,0x57,0xaf,0x62,0xee,0x02, \
    0xd1,0x83,0xf2,0x8a,0x20,0xe1,0xe5,0x9d,0x6d,0x62,0xd2,0x15,0x11,0xae,0xd0, \
    0x7a,0x18,0xce,0x25,0x73,0x04,0xe8,0x96,0xbb,0x31,0x34,0xaa,0x37,0x8e,0xe3, \
    0x9b,0x2c,0xf9,0x6d,0xc7,0xac,0x4a,0x42,0x60,0x4f,0x6d,0x7a,0x0b,0xef,0xeb, \
    0x1d,0xef,0x6a,0x24,0xdf,0x8f,0x22,0x75,0xef,0x5b,0x2a,0xb1,0x55,0x7e,0x32, \
    0x2e,0x6a,0x95,0xae,0x5a,0x90,0x68,0xae,0x31,0x68,0x6d,0xdf,0x27,0x7b,0xe8, \
    0xec,0x34,0x65,0x28,0x05,0xc5,0xfd,0x06,0x69,0x9e,0xc0,0xcc,0x0a,0xa0,0x90, \
    0x40,0xbb,0xdc,0x9f,0xe5,0xeb,0x7e,0x5b,0xcc,0x01,0x38,0xb8,0xfb,0x74,0x9d, \
    0xd2,0xd0,0xc6,0x2a,0x74,0x48,0x30,0x9d,0x68,0xc6,0x4c,0x1e,0xc2,0xd5,0x88, \
    0xde,0x24,0xe9,0xaa,0xc3,0xc0,0x0c,0x50,0xda,0x38,0xb5,0xfc,0x8d,0x61,0x68, \
    0xb5,0xe9,0x8f,0x7d,0x10,0x13,0x87,0x78,0x82,0xe7,0x86,0x9c,0xc9,0x48,0xd3, \
    0x99}
#define SKPM_PRI_N (unsigned char[]) { \
    0xbc, 0xa7, 0xd5, 0x97, 0x93, 0xb6, 0x21, 0x7f, 0x64, 0x59, 0x1c, 0x96, 0xd1, 0x89, 0x69, \
    0xf9, 0x21, 0xd2, 0xaa, 0x67, 0xa9, 0xd6, 0x9f, 0xb3, 0xf7, 0x89, 0x35, 0x71, 0x6c, 0xa7, \
    0xee, 0xcd, 0x25, 0x5d, 0x6e, 0x5b, 0x40, 0x7e, 0x6a, 0x03, 0x15, 0x79, 0xf2, 0xc8, 0x6c, \
    0x8a, 0x64, 0x81, 0xe2, 0x8b, 0xd4, 0x2e, 0xc6, 0x23, 0x8e, 0x77, 0x96, 0xf0, 0x0d, 0xb9, \
    0x93, 0xb5, 0x0d, 0xc0, 0x3e, 0xd2, 0x3f, 0x72, 0xdf, 0x2e, 0x3a, 0x4f, 0x0a, 0xc2, 0x4a, \
    0x7c, 0x03, 0xf6, 0xb5, 0xb9, 0x25, 0xc6, 0x41, 0x2d, 0xbe, 0xec, 0x8d, 0xf4, 0x1b, 0x6e, \
    0xf6, 0xd9, 0x93, 0xed, 0xed, 0xbf, 0x0c, 0x4f, 0xaa, 0xa7, 0xb8, 0x48, 0x59, 0x0c, 0x62, \
    0x42, 0x9e, 0x9f, 0xf2, 0x8d, 0xf1, 0x6d, 0x3c, 0x27, 0x1e, 0x3d, 0xcb, 0x5a, 0xe3, 0x53, \
    0x36, 0x4c, 0x3c, 0x52, 0xf7, 0x69, 0x48, 0xa1, 0x6e, 0x77, 0xeb, 0xcf, 0xbb, 0x43, 0x9c, \
    0x8a, 0xbd, 0x55, 0xe9, 0x02, 0x05, 0x09, 0x62, 0xac, 0x66, 0xc8, 0x35, 0x0b, 0x7a, 0x70, \
    0x04, 0x6e, 0xbb, 0x79, 0xae, 0x65, 0x62, 0x0b, 0x81, 0xef, 0xd2, 0xc7, 0xa7, 0x28, 0xa5, \
    0x58, 0x14, 0x74, 0x8f, 0x34, 0x78, 0x1b, 0x2b, 0x38, 0x91, 0x91, 0x34, 0x2d, 0xed, 0x56, \
    0x77, 0xf2, 0x58, 0xb3, 0x73, 0xc4, 0x29, 0x0f, 0x55, 0xc0, 0x55, 0x2a, 0x1f, 0x27, 0xbd, \
    0xc9, 0x8d, 0x71, 0x48, 0x56, 0xe1, 0x5e, 0xe8, 0xd0, 0x31, 0x1e, 0x6c, 0x78, 0x81, 0x23, \
    0xf3, 0x3e, 0xcf, 0xec, 0x2c, 0x85, 0x91, 0x9d, 0x70, 0xe8, 0x56, 0xb3, 0xd9, 0x83, 0x61, \
    0xcb, 0xe6, 0x7a, 0x61, 0x95, 0xee, 0x1e, 0xa1, 0xe1, 0x9a, 0x80, 0x5b, 0x99, 0x81, 0xf0, \
    0x30, 0xd1, 0xc6, 0x7d, 0xe7, 0x2e, 0x97, 0xc0, 0xd5, 0xdb, 0x30, 0x1f, 0x12, 0xe9, 0x86, \
    0x21}

#define SKPM_PRI_D (unsigned char[]) { \
    0x1c,0x20,0x7d,0xc4,0xe2,0x9d,0xf5,0xf2,0x93,0x58,0x81,0xdd,0xae,0x91,0xe9, \
    0x3d,0xde,0xa0,0x15,0x0d,0xed,0x91,0x75,0x30,0x14,0xc8,0xdd,0x31,0xf2,0xfc, \
    0x3a,0xab,0x55,0x55,0xcf,0xbd,0x45,0x29,0x53,0xce,0xef,0xe5,0xc5,0x9f,0xc2, \
    0x27,0x04,0x03,0x25,0x6e,0xa9,0x8c,0xeb,0xb7,0xa3,0x67,0x0b,0x16,0xf1,0x44, \
    0xe8,0xd3,0xc6,0xa0,0x11,0xfd,0xb0,0xbe,0x04,0xae,0x54,0xbd,0x32,0x22,0x73, \
    0x8e,0x77,0xdc,0xd1,0x8d,0x30,0x27,0x95,0xd2,0x27,0x34,0x07,0x9a,0x0c,0x79, \
    0x07,0xce,0xba,0xb2,0x6f,0x8e,0xdb,0x5c,0x09,0x5a,0x86,0x2c,0x2b,0x32,0xa0, \
    0x77,0xc4,0x44,0x9e,0x9a,0x31,0x13,0x93,0x33,0x55,0xdb,0xea,0xb4,0xbb,0x4d, \
    0xcd,0xbb,0xa2,0x06,0xd0,0xa2,0x5e,0xd4,0x89,0x1d,0xd8,0xb8,0x90,0x47,0xd5, \
    0x3b,0x25,0x95,0xd8,0x40,0x81,0xa8,0x28,0xfa,0x69,0xd0,0x0e,0xf3,0x07,0x1b, \
    0x9c,0xb8,0x71,0x28,0x2b,0xcd,0x87,0x16,0x32,0x34,0xc7,0x8e,0x4e,0x23,0x6e, \
    0x07,0x35,0xe6,0xfc,0x06,0x23,0x7b,0x0e,0x9a,0x86,0x4a,0x71,0x8e,0x43,0x78, \
    0x2d,0x5c,0x10,0x69,0x91,0xe7,0x94,0xed,0xff,0x34,0x49,0x02,0xa7,0xb8,0xc2, \
    0x75,0xc8,0x90,0x35,0x4b,0x6f,0x09,0xa6,0x62,0x11,0x64,0x93,0x6f,0x22,0x2d, \
    0x8f,0x3f,0x5a,0x78,0x5a,0xcb,0xca,0xed,0x0a,0xde,0x3a,0x52,0xa6,0xdb,0x3b, \
    0xee,0xe5,0x53,0x61,0xd3,0xaf,0x24,0xdd,0xda,0x67,0x3f,0x15,0x6c,0x0e,0x29, \
    0xd5,0x07,0xa3,0x9a,0xf1,0xa0,0x6a,0x88,0xe8,0xb4,0x33,0x4a,0xcd,0x2b,0x34, \
    0x5d}


typedef struct ifaa_ta_cmd_pair{
        ifaa_ta_cmd cmd_id;
            const char *cmd_string;
} ifaa_ta_cmd_pair_t;

extern IFAA_Result IFAA_GetFpLastIdentifiedResult(uint8_t *buf_id, uint32_t *id_len);

extern IFAA_Result IFAA_GetFpAuthenticatorVersion(uint32_t *version);

extern IFAA_Result IFAA_GetFpEnrolledIdList(uint8_t* buf_id_list, uint32_t* id_list_len);

extern IFAABoolean IFAA_FpIdCompare(const uint8_t *buf_l, const uint8_t *buf_r, uint32_t buf_len);

extern IFAABoolean IFAA_CheckRoot();

extern IFAA_Result IFAA_ClearFiles();

extern const char * IFAA_getCmdString(ifaa_ta_cmd);


#endif /*__IFAA_TA_VENDOR_H__*/

