41 #define SEC_CMAC_KEY_LEN 16 44 #define SEC_AES_BLK_LEN 16 47 #define SEC_CMAC_HASH_LEN 16 50 #define SEC_ECC_KEY_LEN 32 56 #define SEC_CCM_KEY_LEN 16 57 #define SEC_CCM_MAX_ADDITIONAL_LEN ((1<<16) - (1<<8)) 59 #define SEC_CCM_NONCE_LEN (15-SEC_CCM_L) 63 #define SEC_TOKEN_INVALID 0xFF 243 uint16_t param, uint8_t event);
262 uint16_t param, uint8_t event);
279 uint16_t param, uint8_t event);
300 bool_t
SecCcmEnc(
const uint8_t *pKey, uint8_t *pNonce, uint8_t *pPlainText, uint16_t textLen,
301 uint8_t *pClear, uint16_t clearLen, uint8_t micLen, uint8_t *pResult,
324 bool_t
SecCcmDec(
const uint8_t *pKey, uint8_t *pNonce, uint8_t *pCypherText, uint16_t textLen,
325 uint8_t *pClear, uint16_t clearLen, uint8_t *pMic, uint8_t micLen,
326 uint8_t *pResult,
wsfHandlerId_t handlerId, uint16_t param, uint8_t event);
380 void SecRand(uint8_t *pRand, uint8_t randLen);
ECC Security callback parameters structure.
void SecAesInit(void)
Initialize the AES service. This function should only be called once upon system initialization.
uint8_t SecAes(uint8_t *pKey, uint8_t *pPlaintext, wsfHandlerId_t handlerId, uint16_t param, uint8_t event)
Execute an AES calculation. When the calculation completes, a WSF message will be sent to the specifi...
void SecRand(uint8_t *pRand, uint8_t randLen)
This function returns up to 16 bytes of random data to a buffer provided by the client.
AES Security callback parameters structure.
bool_t SecCmac(const uint8_t *pKey, uint8_t *pPlaintext, uint16_t textLen, wsfHandlerId_t handlerId, uint16_t param, uint8_t event)
Execute the CMAC algorithm.
CMAC Security callback parameters structure.
void SecCcmInit(void)
Called to initialize CCM security.
Generic security callback parameters structure.
void(* SecBlkEncFunc_t)(uint8_t *pKey, uint8_t *pMessage, void *pParam)
Block encryption function.
void SecRandInit(void)
Initialize the random number service. This function should only be called once upon system initializa...
void SecInit(void)
Initialize the security service. This function should only be called once upon system initialization...
secEccSharedSec_t sharedSecret
void SecCmacInit(void)
Called to initialize CMAC security. This function should only be called once upon system initializati...
bool_t SecCcmDec(const uint8_t *pKey, uint8_t *pNonce, uint8_t *pCypherText, uint16_t textLen, uint8_t *pClear, uint16_t clearLen, uint8_t *pMic, uint8_t micLen, uint8_t *pResult, wsfHandlerId_t handlerId, uint16_t param, uint8_t event)
Execute the CCM-Mode verify and decrypt algorithm.
void SecEccInit(void)
Called to initialize ECC security. This function should only be called once upon system initializatio...
bool_t SecEccGenKey(wsfHandlerId_t handlerId, uint16_t param, uint8_t event)
Generate an ECC key.
ECC security DH Key shared secret.
bool_t SecCcmEnc(const uint8_t *pKey, uint8_t *pNonce, uint8_t *pPlainText, uint16_t textLen, uint8_t *pClear, uint16_t clearLen, uint8_t micLen, uint8_t *pResult, wsfHandlerId_t handlerId, uint16_t param, uint8_t event)
Execute the CCM-Mode encryption algorithm.
ECC Security public/private key pair.
Platform-independent data types.
bool_t SecEccGenSharedSecret(secEccKey_t *pKey, wsfHandlerId_t handlerId, uint16_t param, uint8_t event)
Generate an ECC key.
uint8_t wsfHandlerId_t
Event handler ID data type.
uint8_t SecAesRev(uint8_t *pKey, uint8_t *pPlaintext, wsfHandlerId_t handlerId, uint16_t param, uint8_t event)
Execute an AES calculation. When the calculation completes, a WSF message will be sent to the specifi...
#define SEC_ECC_KEY_LEN
ECC algorithm key length.
CCM-Mode encrypt callback parameters structure.
CCM-Mode decrypt and authenticate callback parameters structure.
Common message structure passed to event handler.
void SecAesRevInit(void)
Initialize the AES (reverse) service. This function should only be called once upon system initializa...