SemiDrive SSDK Appication Program Interface PTG3.0
Functions
sdrv_crypto_mailbox_ske_mac.h File Reference
#include "sdrv_crypto_mailbox_common.h"
#include "sdrv_crypto_mailbox_hmac.h"
#include "sdrv_crypto_mailbox_ske_basic.h"
#include "sdrv_crypto_mailbox_trng.h"

Go to the source code of this file.

Functions

sdrv_crypto_error_status_e cmd_ske_gen_mac (uint8_t mode, uint8_t *msg, uint32_t msg_bytes, cmd_key_type_e key_type, uint8_t *key, uint16_t key_id, uint8_t *mac, uint8_t mac_bytes, uint8_t *mac_buf)
 
sdrv_crypto_error_status_e cmd_ske_verify_mac (uint8_t mode, uint8_t *msg, uint32_t msg_bytes, cmd_key_type_e key_type, uint8_t *key, uint16_t key_id, uint8_t *mac, uint8_t mac_bytes, uint8_t *mac_buf)
 

Detailed Description

Function Documentation

◆ cmd_ske_gen_mac()

sdrv_crypto_error_status_e cmd_ske_gen_mac ( uint8_t  mode,
uint8_t *  msg,
uint32_t  msg_bytes,
cmd_key_type_e  key_type,
uint8_t *  key,
uint16_t  key_id,
uint8_t *  mac,
uint8_t  mac_bytes,
uint8_t *  mac_buf 
)

ske gen mac

This function gen mac.

Parameters
[in]modeske mode
[in]msgmsg buff
[in]msg_bytesmsg bytelen
[in]key_typeenc key type
[in]keyenc key buff
[in]key_idenc key id
[out]macmac buff
[in]mac_bytesmac bytelen
[in]mac_bufmac buff
Returns
CMD_RETURN_SUCCESS or error code.

◆ cmd_ske_verify_mac()

sdrv_crypto_error_status_e cmd_ske_verify_mac ( uint8_t  mode,
uint8_t *  msg,
uint32_t  msg_bytes,
cmd_key_type_e  key_type,
uint8_t *  key,
uint16_t  key_id,
uint8_t *  mac,
uint8_t  mac_bytes,
uint8_t *  mac_buf 
)

ske verify mac

This function verify mac

Parameters
[in]modeske mode
[in]msgmsg buff
[in]msg_bytesmsg bytelen
[in]key_typeenc key type
[in]keyenc key buff
[in]key_idenc key id
[in]macmac buff
[in]mac_bytesmac bytelen
[in]mac_bufmac buff
Returns
CMD_RETURN_SUCCESS or error code.