#ifndef __SCP03_H__
#define __SCP03_H__

#include <stdint.h>
#if defined(SCP03_TEST) && defined(DEBUG_LOW)
#include "tz_platform.h"
#endif
#define SCPSTATUS   uint16_t        /* Return values */

#define SCP_SUCCESS                             0x0000
#define SCP_INITIAL_UPDATE_FAIL                 0x0001
#define SCP_VERIFY_CARD_CHALLENGE_FAIL          0x0002
#define SCP_VERIFY_CARD_CRYPTOGRAM_FAIL         0x0003
#define SCP_EXTERNAL_AUTHENTICATE_FAIL          0x0004
#define SCP_APDU_TRANSCEIVE_FAIL                0x0005
#define SCP_VERIFY_RMAC_FAIL                    0x0006
#define SCP_RANDOM_GEN_FAIL                     0x0007
#define SCP_PUTKEY_MEMORY_FAILURE               0x0008
#define SCP_NOT_ENOUGH_MEMORY                   0x0009
#define SCP_REFERENCE_DATA_NOT_FOUND            0x000A
#define SCP_PUTKEY_ALGO_NOT_SUPPORT             0x000B
#define SCP_PUTKEY_INVALID_KEY_CHECK_VALUE      0x000C
#define SCP_INCORRECT_VALUE                     0x000D
#define SCP_FILE_ALREADY_EXIST                  0x000E
#define SCP_RESPONSE_LENGTH_INVALID             0x000F

#define SCP_FAIL                                0xAAAA

#define KEY_LEN_BYTE                            16
#define KEY_LEN_BIT                             128

#define MAX_PLAIN_TEXT_SIZE                     224
#define MAX_CIPHERED_TEXT_SIZE                  240

#define MAX_RSP_PLAIN_TEXT_SIZE                 240
#define MAX_RSP_CIPHERED_TEXT_SIZE              256
#if defined(SCP03_TEST) && defined(DEBUG_LOW)
void scp03_test(p_cmd_t cmd, p_rsp_t rsp);
#endif
#endif

