c++ guard
This commit is contained in:
@@ -36,9 +36,12 @@
|
||||
#ifndef __BL702_SEC_ENG_H__
|
||||
#define __BL702_SEC_ENG_H__
|
||||
|
||||
#include "sec_eng_reg.h"
|
||||
#include "bl702_common.h"
|
||||
#include "sec_eng_reg.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/** @addtogroup BL702_Peripheral_Driver
|
||||
* @{
|
||||
*/
|
||||
@@ -193,8 +196,7 @@ typedef enum {
|
||||
/**
|
||||
* @brief SEC_ENG SHA context
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
uint32_t total[2]; /*!< Number of bytes processed */
|
||||
uint32_t *shaBuf; /*!< Data not processed but in this temp buffer */
|
||||
uint32_t *shaPadding; /*!< Padding data */
|
||||
@@ -204,8 +206,7 @@ typedef struct
|
||||
/**
|
||||
* @brief SEC_ENG SHA link mode context
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
uint32_t total[2]; /*!< Number of bytes processed */
|
||||
uint32_t *shaBuf; /*!< Data not processed but in this temp buffer */
|
||||
uint32_t *shaPadding; /*!< Padding data */
|
||||
@@ -215,8 +216,7 @@ typedef struct
|
||||
/**
|
||||
* @brief SEC_ENG AES context
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
uint8_t aesFeed; /*!< AES has feed data */
|
||||
SEC_ENG_AES_Type mode; /*!< AES mode */
|
||||
} SEC_Eng_AES_Ctx;
|
||||
@@ -224,8 +224,7 @@ typedef struct
|
||||
/**
|
||||
* @brief SEC_ENG SHA link config structure type definition
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
uint32_t : 2; /*!< [1:0]reserved */
|
||||
uint32_t shaMode : 3; /*!< [4:2]Sha-256/sha-224/sha-1/sha-1 */
|
||||
uint32_t : 1; /*!< [5]reserved */
|
||||
@@ -242,8 +241,7 @@ typedef struct
|
||||
/**
|
||||
* @brief SEC_ENG AES link config structure type definition
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
uint32_t : 3; /*!< [2:0]Reserved */
|
||||
uint32_t aesMode : 2; /*!< [4:3]128-bit/256-bit/192-bit/128-bit-double key mode select */
|
||||
uint32_t aesDecEn : 1; /*!< [5]Encode or decode */
|
||||
@@ -276,8 +274,7 @@ typedef struct
|
||||
/**
|
||||
* @brief SEC_ENG GMAC link config structure type definition
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
uint32_t : 9; /*!< [8:0]reserved */
|
||||
uint32_t gmacIntClr : 1; /*!< [9]Clear interrupt */
|
||||
uint32_t gmacIntSet : 1; /*!< [10]Set interrupt */
|
||||
@@ -295,8 +292,7 @@ typedef struct
|
||||
/**
|
||||
* @brief SEC_ENG PKA status type definition
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
uint16_t primeFail : 1; /*!< [0]Prime fail */
|
||||
uint16_t errUnknown : 1; /*!< [1]Err unknown opc */
|
||||
uint16_t errOverflow : 1; /*!< [2]Err opq overflow */
|
||||
@@ -330,107 +326,64 @@ typedef struct
|
||||
/** @defgroup SEC_ENG_SHA_TYPE
|
||||
* @{
|
||||
*/
|
||||
#define IS_SEC_ENG_SHA_TYPE(type) (((type) == SEC_ENG_SHA256) || \
|
||||
((type) == SEC_ENG_SHA224) || \
|
||||
((type) == SEC_ENG_SHA1) || \
|
||||
((type) == SEC_ENG_SHA1_RSVD))
|
||||
#define IS_SEC_ENG_SHA_TYPE(type) (((type) == SEC_ENG_SHA256) || ((type) == SEC_ENG_SHA224) || ((type) == SEC_ENG_SHA1) || ((type) == SEC_ENG_SHA1_RSVD))
|
||||
|
||||
/** @defgroup SEC_ENG_AES_TYPE
|
||||
* @{
|
||||
*/
|
||||
#define IS_SEC_ENG_AES_TYPE(type) (((type) == SEC_ENG_AES_ECB) || \
|
||||
((type) == SEC_ENG_AES_CTR) || \
|
||||
((type) == SEC_ENG_AES_CBC))
|
||||
#define IS_SEC_ENG_AES_TYPE(type) (((type) == SEC_ENG_AES_ECB) || ((type) == SEC_ENG_AES_CTR) || ((type) == SEC_ENG_AES_CBC))
|
||||
|
||||
/** @defgroup SEC_ENG_AES_KEY_TYPE
|
||||
* @{
|
||||
*/
|
||||
#define IS_SEC_ENG_AES_KEY_TYPE(type) (((type) == SEC_ENG_AES_KEY_128BITS) || \
|
||||
((type) == SEC_ENG_AES_KEY_256BITS) || \
|
||||
((type) == SEC_ENG_AES_KEY_192BITS) || \
|
||||
((type) == SEC_ENG_AES_DOUBLE_KEY_128BITS))
|
||||
#define IS_SEC_ENG_AES_KEY_TYPE(type) (((type) == SEC_ENG_AES_KEY_128BITS) || ((type) == SEC_ENG_AES_KEY_256BITS) || ((type) == SEC_ENG_AES_KEY_192BITS) || ((type) == SEC_ENG_AES_DOUBLE_KEY_128BITS))
|
||||
|
||||
/** @defgroup SEC_ENG_AES_COUNTER_TYPE
|
||||
* @{
|
||||
*/
|
||||
#define IS_SEC_ENG_AES_COUNTER_TYPE(type) (((type) == SEC_ENG_AES_COUNTER_BYTE_4) || \
|
||||
((type) == SEC_ENG_AES_COUNTER_BYTE_1) || \
|
||||
((type) == SEC_ENG_AES_COUNTER_BYTE_2) || \
|
||||
((type) == SEC_ENG_AES_COUNTER_BYTE_3))
|
||||
#define IS_SEC_ENG_AES_COUNTER_TYPE(type) \
|
||||
(((type) == SEC_ENG_AES_COUNTER_BYTE_4) || ((type) == SEC_ENG_AES_COUNTER_BYTE_1) || ((type) == SEC_ENG_AES_COUNTER_BYTE_2) || ((type) == SEC_ENG_AES_COUNTER_BYTE_3))
|
||||
|
||||
/** @defgroup SEC_ENG_AES_VALUEUSED_TYPE
|
||||
* @{
|
||||
*/
|
||||
#define IS_SEC_ENG_AES_VALUEUSED_TYPE(type) (((type) == SEC_ENG_AES_USE_NEW) || \
|
||||
((type) == SEC_ENG_AES_USE_OLD))
|
||||
#define IS_SEC_ENG_AES_VALUEUSED_TYPE(type) (((type) == SEC_ENG_AES_USE_NEW) || ((type) == SEC_ENG_AES_USE_OLD))
|
||||
|
||||
/** @defgroup SEC_ENG_AES_KEY_SRC_TYPE
|
||||
* @{
|
||||
*/
|
||||
#define IS_SEC_ENG_AES_KEY_SRC_TYPE(type) (((type) == SEC_ENG_AES_KEY_SW) || \
|
||||
((type) == SEC_ENG_AES_KEY_HW))
|
||||
#define IS_SEC_ENG_AES_KEY_SRC_TYPE(type) (((type) == SEC_ENG_AES_KEY_SW) || ((type) == SEC_ENG_AES_KEY_HW))
|
||||
|
||||
/** @defgroup SEC_ENG_AES_ENDEC_TYPE
|
||||
* @{
|
||||
*/
|
||||
#define IS_SEC_ENG_AES_ENDEC_TYPE(type) (((type) == SEC_ENG_AES_ENCRYPTION) || \
|
||||
((type) == SEC_ENG_AES_DECRYPTION))
|
||||
#define IS_SEC_ENG_AES_ENDEC_TYPE(type) (((type) == SEC_ENG_AES_ENCRYPTION) || ((type) == SEC_ENG_AES_DECRYPTION))
|
||||
|
||||
/** @defgroup SEC_ENG_PKA_REG_SIZE_TYPE
|
||||
* @{
|
||||
*/
|
||||
#define IS_SEC_ENG_PKA_REG_SIZE_TYPE(type) (((type) == SEC_ENG_PKA_REG_SIZE_8) || \
|
||||
((type) == SEC_ENG_PKA_REG_SIZE_16) || \
|
||||
((type) == SEC_ENG_PKA_REG_SIZE_32) || \
|
||||
((type) == SEC_ENG_PKA_REG_SIZE_64) || \
|
||||
((type) == SEC_ENG_PKA_REG_SIZE_96) || \
|
||||
((type) == SEC_ENG_PKA_REG_SIZE_128) || \
|
||||
((type) == SEC_ENG_PKA_REG_SIZE_192) || \
|
||||
((type) == SEC_ENG_PKA_REG_SIZE_256) || \
|
||||
((type) == SEC_ENG_PKA_REG_SIZE_384) || \
|
||||
((type) == SEC_ENG_PKA_REG_SIZE_512))
|
||||
#define IS_SEC_ENG_PKA_REG_SIZE_TYPE(type) \
|
||||
(((type) == SEC_ENG_PKA_REG_SIZE_8) || ((type) == SEC_ENG_PKA_REG_SIZE_16) || ((type) == SEC_ENG_PKA_REG_SIZE_32) || ((type) == SEC_ENG_PKA_REG_SIZE_64) || ((type) == SEC_ENG_PKA_REG_SIZE_96) \
|
||||
|| ((type) == SEC_ENG_PKA_REG_SIZE_128) || ((type) == SEC_ENG_PKA_REG_SIZE_192) || ((type) == SEC_ENG_PKA_REG_SIZE_256) || ((type) == SEC_ENG_PKA_REG_SIZE_384) \
|
||||
|| ((type) == SEC_ENG_PKA_REG_SIZE_512))
|
||||
|
||||
/** @defgroup SEC_ENG_PKA_OP_TYPE
|
||||
* @{
|
||||
*/
|
||||
#define IS_SEC_ENG_PKA_OP_TYPE(type) (((type) == SEC_ENG_PKA_OP_PPSEL) || \
|
||||
((type) == SEC_ENG_PKA_OP_MOD2N) || \
|
||||
((type) == SEC_ENG_PKA_OP_LDIV2N) || \
|
||||
((type) == SEC_ENG_PKA_OP_LMUL2N) || \
|
||||
((type) == SEC_ENG_PKA_OP_LDIV) || \
|
||||
((type) == SEC_ENG_PKA_OP_LSQR) || \
|
||||
((type) == SEC_ENG_PKA_OP_LMUL) || \
|
||||
((type) == SEC_ENG_PKA_OP_LSUB) || \
|
||||
((type) == SEC_ENG_PKA_OP_LADD) || \
|
||||
((type) == SEC_ENG_PKA_OP_LCMP) || \
|
||||
((type) == SEC_ENG_PKA_OP_MDIV2) || \
|
||||
((type) == SEC_ENG_PKA_OP_MINV) || \
|
||||
((type) == SEC_ENG_PKA_OP_MEXP) || \
|
||||
((type) == SEC_ENG_PKA_OP_MSQR) || \
|
||||
((type) == SEC_ENG_PKA_OP_MMUL) || \
|
||||
((type) == SEC_ENG_PKA_OP_MREM) || \
|
||||
((type) == SEC_ENG_PKA_OP_MSUB) || \
|
||||
((type) == SEC_ENG_PKA_OP_MADD) || \
|
||||
((type) == SEC_ENG_PKA_OP_RESIZE) || \
|
||||
((type) == SEC_ENG_PKA_OP_MOVDAT) || \
|
||||
((type) == SEC_ENG_PKA_OP_NLIR) || \
|
||||
((type) == SEC_ENG_PKA_OP_SLIR) || \
|
||||
((type) == SEC_ENG_PKA_OP_CLIR) || \
|
||||
((type) == SEC_ENG_PKA_OP_CFLIRI_BUFFER) || \
|
||||
((type) == SEC_ENG_PKA_OP_CTLIRI_PLD) || \
|
||||
((type) == SEC_ENG_PKA_OP_CFLIR_BUFFER) || \
|
||||
((type) == SEC_ENG_PKA_OP_CTLIR_PLD))
|
||||
#define IS_SEC_ENG_PKA_OP_TYPE(type) \
|
||||
(((type) == SEC_ENG_PKA_OP_PPSEL) || ((type) == SEC_ENG_PKA_OP_MOD2N) || ((type) == SEC_ENG_PKA_OP_LDIV2N) || ((type) == SEC_ENG_PKA_OP_LMUL2N) || ((type) == SEC_ENG_PKA_OP_LDIV) \
|
||||
|| ((type) == SEC_ENG_PKA_OP_LSQR) || ((type) == SEC_ENG_PKA_OP_LMUL) || ((type) == SEC_ENG_PKA_OP_LSUB) || ((type) == SEC_ENG_PKA_OP_LADD) || ((type) == SEC_ENG_PKA_OP_LCMP) \
|
||||
|| ((type) == SEC_ENG_PKA_OP_MDIV2) || ((type) == SEC_ENG_PKA_OP_MINV) || ((type) == SEC_ENG_PKA_OP_MEXP) || ((type) == SEC_ENG_PKA_OP_MSQR) || ((type) == SEC_ENG_PKA_OP_MMUL) \
|
||||
|| ((type) == SEC_ENG_PKA_OP_MREM) || ((type) == SEC_ENG_PKA_OP_MSUB) || ((type) == SEC_ENG_PKA_OP_MADD) || ((type) == SEC_ENG_PKA_OP_RESIZE) || ((type) == SEC_ENG_PKA_OP_MOVDAT) \
|
||||
|| ((type) == SEC_ENG_PKA_OP_NLIR) || ((type) == SEC_ENG_PKA_OP_SLIR) || ((type) == SEC_ENG_PKA_OP_CLIR) || ((type) == SEC_ENG_PKA_OP_CFLIRI_BUFFER) || ((type) == SEC_ENG_PKA_OP_CTLIRI_PLD) \
|
||||
|| ((type) == SEC_ENG_PKA_OP_CFLIR_BUFFER) || ((type) == SEC_ENG_PKA_OP_CTLIR_PLD))
|
||||
|
||||
/** @defgroup SEC_ENG_INT_TYPE
|
||||
* @{
|
||||
*/
|
||||
#define IS_SEC_ENG_INT_TYPE(type) (((type) == SEC_ENG_INT_TRNG) || \
|
||||
((type) == SEC_ENG_INT_AES) || \
|
||||
((type) == SEC_ENG_INT_SHA) || \
|
||||
((type) == SEC_ENG_INT_PKA) || \
|
||||
((type) == SEC_ENG_INT_CDET) || \
|
||||
((type) == SEC_ENG_INT_GMAC) || \
|
||||
((type) == SEC_ENG_INT_ALL))
|
||||
#define IS_SEC_ENG_INT_TYPE(type) \
|
||||
(((type) == SEC_ENG_INT_TRNG) || ((type) == SEC_ENG_INT_AES) || ((type) == SEC_ENG_INT_SHA) || ((type) == SEC_ENG_INT_PKA) || ((type) == SEC_ENG_INT_CDET) || ((type) == SEC_ENG_INT_GMAC) \
|
||||
|| ((type) == SEC_ENG_INT_ALL))
|
||||
|
||||
/*@} end of group SEC_ENG_Public_Constants */
|
||||
|
||||
@@ -453,37 +406,26 @@ void SEC_PKA_IRQHandler(void);
|
||||
void SEC_AES_IRQHandler(void);
|
||||
void SEC_SHA_IRQHandler(void);
|
||||
#endif
|
||||
void Sec_Eng_SHA256_Init(SEC_Eng_SHA256_Ctx *shaCtx, SEC_ENG_SHA_ID_Type shaNo, SEC_ENG_SHA_Type type,
|
||||
uint32_t shaTmpBuf[16],
|
||||
uint32_t padding[16]);
|
||||
void Sec_Eng_SHA256_Init(SEC_Eng_SHA256_Ctx *shaCtx, SEC_ENG_SHA_ID_Type shaNo, SEC_ENG_SHA_Type type, uint32_t shaTmpBuf[16], uint32_t padding[16]);
|
||||
void Sec_Eng_SHA_Start(SEC_ENG_SHA_ID_Type shaNo);
|
||||
BL_Err_Type Sec_Eng_SHA256_Update(SEC_Eng_SHA256_Ctx *shaCtx, SEC_ENG_SHA_ID_Type shaNo, const uint8_t *input,
|
||||
uint32_t len);
|
||||
BL_Err_Type Sec_Eng_SHA256_Update(SEC_Eng_SHA256_Ctx *shaCtx, SEC_ENG_SHA_ID_Type shaNo, const uint8_t *input, uint32_t len);
|
||||
BL_Err_Type Sec_Eng_SHA256_Finish(SEC_Eng_SHA256_Ctx *shaCtx, SEC_ENG_SHA_ID_Type shaNo, uint8_t *hash);
|
||||
void Sec_Eng_SHA_Enable_Link(SEC_ENG_SHA_ID_Type shaNo);
|
||||
void Sec_Eng_SHA_Disable_Link(SEC_ENG_SHA_ID_Type shaNo);
|
||||
void Sec_Eng_SHA256_Link_Init(SEC_Eng_SHA256_Link_Ctx *shaCtx, SEC_ENG_SHA_ID_Type shaNo, uint32_t linkAddr,
|
||||
uint32_t shaTmpBuf[16], uint32_t padding[16]);
|
||||
BL_Err_Type Sec_Eng_SHA256_Link_Update(SEC_Eng_SHA256_Link_Ctx *shaCtx, SEC_ENG_SHA_ID_Type shaNo,
|
||||
const uint8_t *input, uint32_t len);
|
||||
BL_Err_Type Sec_Eng_SHA256_Link_Finish(SEC_Eng_SHA256_Link_Ctx *shaCtx, SEC_ENG_SHA_ID_Type shaNo,
|
||||
uint8_t *hash);
|
||||
BL_Err_Type Sec_Eng_AES_Init(SEC_Eng_AES_Ctx *aesCtx, SEC_ENG_AES_ID_Type aesNo, SEC_ENG_AES_Type aesType,
|
||||
SEC_ENG_AES_Key_Type keyType, SEC_ENG_AES_EnDec_Type enDecType);
|
||||
void Sec_Eng_SHA256_Link_Init(SEC_Eng_SHA256_Link_Ctx *shaCtx, SEC_ENG_SHA_ID_Type shaNo, uint32_t linkAddr, uint32_t shaTmpBuf[16], uint32_t padding[16]);
|
||||
BL_Err_Type Sec_Eng_SHA256_Link_Update(SEC_Eng_SHA256_Link_Ctx *shaCtx, SEC_ENG_SHA_ID_Type shaNo, const uint8_t *input, uint32_t len);
|
||||
BL_Err_Type Sec_Eng_SHA256_Link_Finish(SEC_Eng_SHA256_Link_Ctx *shaCtx, SEC_ENG_SHA_ID_Type shaNo, uint8_t *hash);
|
||||
BL_Err_Type Sec_Eng_AES_Init(SEC_Eng_AES_Ctx *aesCtx, SEC_ENG_AES_ID_Type aesNo, SEC_ENG_AES_Type aesType, SEC_ENG_AES_Key_Type keyType, SEC_ENG_AES_EnDec_Type enDecType);
|
||||
void Sec_Eng_AES_Enable_LE(SEC_ENG_AES_ID_Type aesNo);
|
||||
void Sec_Eng_AES_Enable_BE(SEC_ENG_AES_ID_Type aesNo);
|
||||
void Sec_Eng_AES_Enable_Link(SEC_ENG_AES_ID_Type aesNo);
|
||||
void Sec_Eng_AES_Disable_Link(SEC_ENG_AES_ID_Type aesNo);
|
||||
BL_Err_Type Sec_Eng_AES_Link_Work(SEC_ENG_AES_ID_Type aesNo, uint32_t linkAddr, const uint8_t *in, uint32_t len,
|
||||
uint8_t *out);
|
||||
BL_Err_Type Sec_Eng_AES_Link_Work(SEC_ENG_AES_ID_Type aesNo, uint32_t linkAddr, const uint8_t *in, uint32_t len, uint8_t *out);
|
||||
void Sec_Eng_AES_Set_Hw_Key_Src(SEC_ENG_AES_ID_Type aesNo, uint8_t src);
|
||||
void Sec_Eng_AES_Set_Key_IV(SEC_ENG_AES_ID_Type aesNo, SEC_ENG_AES_Key_Src_Type keySrc, const uint8_t *key,
|
||||
const uint8_t *iv);
|
||||
void Sec_Eng_AES_Set_Key_IV_BE(SEC_ENG_AES_ID_Type aesNo, SEC_ENG_AES_Key_Src_Type keySrc, const uint8_t *key,
|
||||
const uint8_t *iv);
|
||||
void Sec_Eng_AES_Set_Key_IV(SEC_ENG_AES_ID_Type aesNo, SEC_ENG_AES_Key_Src_Type keySrc, const uint8_t *key, const uint8_t *iv);
|
||||
void Sec_Eng_AES_Set_Key_IV_BE(SEC_ENG_AES_ID_Type aesNo, SEC_ENG_AES_Key_Src_Type keySrc, const uint8_t *key, const uint8_t *iv);
|
||||
void Sec_Eng_AES_Set_Counter_Byte(SEC_ENG_AES_ID_Type aesNo, SEC_ENG_AES_Counter_Type counterType);
|
||||
BL_Err_Type Sec_Eng_AES_Crypt(SEC_Eng_AES_Ctx *aesCtx, SEC_ENG_AES_ID_Type aesNo, const uint8_t *in, uint32_t len,
|
||||
uint8_t *out);
|
||||
BL_Err_Type Sec_Eng_AES_Crypt(SEC_Eng_AES_Ctx *aesCtx, SEC_ENG_AES_ID_Type aesNo, const uint8_t *in, uint32_t len, uint8_t *out);
|
||||
BL_Err_Type Sec_Eng_AES_Finish(SEC_ENG_AES_ID_Type aesNo);
|
||||
BL_Err_Type Sec_Eng_Trng_Enable(void);
|
||||
void Sec_Eng_Trng_Int_Enable(void);
|
||||
@@ -497,66 +439,33 @@ void Sec_Eng_PKA_Reset(void);
|
||||
void Sec_Eng_PKA_BigEndian_Enable(void);
|
||||
void Sec_Eng_PKA_LittleEndian_Enable(void);
|
||||
void Sec_Eng_PKA_GetStatus(SEC_Eng_PKA_Status_Type *status);
|
||||
void Sec_Eng_PKA_Write_Data(SEC_ENG_PKA_REG_SIZE_Type regType, uint8_t regIndex, const uint32_t *data, uint16_t size,
|
||||
uint8_t lastOp);
|
||||
void Sec_Eng_PKA_Write_Data(SEC_ENG_PKA_REG_SIZE_Type regType, uint8_t regIndex, const uint32_t *data, uint16_t size, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_Read_Data(SEC_ENG_PKA_REG_SIZE_Type regType, uint8_t regIdx, uint32_t *result, uint8_t retSize);
|
||||
void Sec_Eng_PKA_CREG(SEC_ENG_PKA_REG_SIZE_Type dRegType, uint8_t dRegIdx, uint8_t size, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_Write_Immediate(SEC_ENG_PKA_REG_SIZE_Type regType, uint8_t regIndex, uint32_t data, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_NREG(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_Move_Data(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_RESIZE(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_MADD(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx,
|
||||
uint8_t s1RegType,
|
||||
uint8_t s1RegIdx, uint8_t s2RegType, uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_MSUB(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx,
|
||||
uint8_t s1RegType,
|
||||
uint8_t s1RegIdx, uint8_t s2RegType, uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_MREM(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx,
|
||||
uint8_t s2RegType,
|
||||
uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_MMUL(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx,
|
||||
uint8_t s1RegType,
|
||||
uint8_t s1RegIdx, uint8_t s2RegType, uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_MSQR(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx,
|
||||
uint8_t s2RegType,
|
||||
uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_MEXP(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx,
|
||||
uint8_t s1RegType,
|
||||
uint8_t s1RegIdx, uint8_t s2RegType, uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_MINV(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx,
|
||||
uint8_t s2RegType,
|
||||
uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_MINV(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx,
|
||||
uint8_t s2RegType,
|
||||
uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_MADD(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t s1RegType, uint8_t s1RegIdx, uint8_t s2RegType, uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_MSUB(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t s1RegType, uint8_t s1RegIdx, uint8_t s2RegType, uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_MREM(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t s2RegType, uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_MMUL(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t s1RegType, uint8_t s1RegIdx, uint8_t s2RegType, uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_MSQR(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t s2RegType, uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_MEXP(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t s1RegType, uint8_t s1RegIdx, uint8_t s2RegType, uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_MINV(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t s2RegType, uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_MINV(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t s2RegType, uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_LCMP(uint8_t *cout, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t s1RegType, uint8_t s1RegIdx);
|
||||
void Sec_Eng_PKA_LADD(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx,
|
||||
uint8_t s1RegType,
|
||||
uint8_t s1RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_LSUB(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx,
|
||||
uint8_t s1RegType,
|
||||
uint8_t s1RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_LMUL(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx,
|
||||
uint8_t s1RegType,
|
||||
uint8_t s1RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_LADD(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t s1RegType, uint8_t s1RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_LSUB(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t s1RegType, uint8_t s1RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_LMUL(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t s1RegType, uint8_t s1RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_LSQR(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_LDIV(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx,
|
||||
uint8_t s2RegType,
|
||||
uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_LMUL2N(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx,
|
||||
uint16_t bit_shift,
|
||||
uint8_t lastOp);
|
||||
void Sec_Eng_PKA_LDIV2N(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx,
|
||||
uint16_t bit_shift,
|
||||
uint8_t lastOp);
|
||||
void Sec_Eng_PKA_LMOD2N(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx,
|
||||
uint16_t bit_shift,
|
||||
uint8_t lastOp);
|
||||
void Sec_Eng_PKA_GF2Mont(uint8_t dRegType, uint8_t dRegIdx, uint8_t sRegType, uint8_t sRegIdx, uint32_t size,
|
||||
uint8_t tRegType, uint8_t tRegIdx, uint8_t pRegType, uint8_t pRegIdx);
|
||||
void Sec_Eng_PKA_Mont2GF(uint8_t dRegType, uint8_t dRegIdx, uint8_t aRegType, uint8_t aRegIdx, uint8_t invrRegType,
|
||||
uint8_t invrRegIdx,
|
||||
uint8_t tRegType, uint8_t tRegIdx, uint8_t pRegType, uint8_t pRegIdx);
|
||||
void Sec_Eng_PKA_LDIV(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint8_t s2RegType, uint8_t s2RegIdx, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_LMUL2N(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint16_t bit_shift, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_LDIV2N(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint16_t bit_shift, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_LMOD2N(uint8_t dRegType, uint8_t dRegIdx, uint8_t s0RegType, uint8_t s0RegIdx, uint16_t bit_shift, uint8_t lastOp);
|
||||
void Sec_Eng_PKA_GF2Mont(uint8_t dRegType, uint8_t dRegIdx, uint8_t sRegType, uint8_t sRegIdx, uint32_t size, uint8_t tRegType, uint8_t tRegIdx, uint8_t pRegType, uint8_t pRegIdx);
|
||||
void Sec_Eng_PKA_Mont2GF(uint8_t dRegType, uint8_t dRegIdx, uint8_t aRegType, uint8_t aRegIdx, uint8_t invrRegType, uint8_t invrRegIdx, uint8_t tRegType, uint8_t tRegIdx, uint8_t pRegType,
|
||||
uint8_t pRegIdx);
|
||||
void Sec_Eng_GMAC_Enable_LE(void);
|
||||
void Sec_Eng_GMAC_Enable_BE(void);
|
||||
void Sec_Eng_GMAC_Enable_Link(void);
|
||||
@@ -578,3 +487,6 @@ void SEC_Eng_Turn_Off_Sec_Ring(void);
|
||||
/*@} end of group BL702_Peripheral_Driver */
|
||||
|
||||
#endif /* __BL702_SEC_ENG_H__ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user