SemiDrive SSDK Appication Program Interface PTG3.0
Data Structures
hash_basic.h File Reference
#include "register_base_addr.h"
#include "sdrv_crypto_utility.h"

Go to the source code of this file.

Data Structures

struct  hash_reg
 

Detailed Description

Macro Definition Documentation

◆ HASH_BLOCK_MAX_BYTE_LEN

#define HASH_BLOCK_MAX_BYTE_LEN   (HASH_BLOCK_MAX_WORD_LEN << 2)

◆ HASH_BLOCK_MAX_WORD_LEN

#define HASH_BLOCK_MAX_WORD_LEN   (36)

◆ HASH_DIGEST_MAX_WORD_LEN

#define HASH_DIGEST_MAX_WORD_LEN   (16)

◆ HASH_DMA_FUNCTION

#define HASH_DMA_FUNCTION

◆ HASH_DMA_OFFSET

#define HASH_DMA_OFFSET   (16)

◆ HASH_HMAC_OFFSET

#define HASH_HMAC_OFFSET   (4)

◆ HASH_ITERATOR_MAX_WORD_LEN

#define HASH_ITERATOR_MAX_WORD_LEN   (50)

◆ HASH_LAST_BLOCK_OFFSET

#define HASH_LAST_BLOCK_OFFSET   (16)

◆ HASH_REVERSE_BYTE_ORDER_IN_WORD_OFFSET

#define HASH_REVERSE_BYTE_ORDER_IN_WORD_OFFSET   (8)

◆ HASH_TOTAL_LEN_MAX_WORD_LEN

#define HASH_TOTAL_LEN_MAX_WORD_LEN   (4)

◆ HMAC_MAX_KEY_IDX

#define HMAC_MAX_KEY_IDX
Value:
(8) /* if key is from secure port, the max key index(or the number of \
keys) */

◆ HMAC_MAX_SP_KEY_SIZE

#define HMAC_MAX_SP_KEY_SIZE    (64) /* for secure port key, max bytes of one key */

◆ HMAC_SECURE_PORT_FUNCTION

#define HMAC_SECURE_PORT_FUNCTION

◆ SUPPORT_HASH_MD5

#define SUPPORT_HASH_MD5

◆ SUPPORT_HASH_SHA1

#define SUPPORT_HASH_SHA1

◆ SUPPORT_HASH_SHA224

#define SUPPORT_HASH_SHA224

◆ SUPPORT_HASH_SHA256

#define SUPPORT_HASH_SHA256

◆ SUPPORT_HASH_SHA384

#define SUPPORT_HASH_SHA384

◆ SUPPORT_HASH_SHA3_224

#define SUPPORT_HASH_SHA3_224

◆ SUPPORT_HASH_SHA3_256

#define SUPPORT_HASH_SHA3_256

◆ SUPPORT_HASH_SHA3_384

#define SUPPORT_HASH_SHA3_384

◆ SUPPORT_HASH_SHA3_512

#define SUPPORT_HASH_SHA3_512

◆ SUPPORT_HASH_SHA512

#define SUPPORT_HASH_SHA512

◆ SUPPORT_HASH_SHA512_224

#define SUPPORT_HASH_SHA512_224

◆ SUPPORT_HASH_SHA512_256

#define SUPPORT_HASH_SHA512_256

◆ SUPPORT_HASH_SM3

#define SUPPORT_HASH_SM3

Typedef Documentation

◆ HASH_CALLBACK

typedef void(* HASH_CALLBACK) (void)

◆ hash_reg_t

typedef struct hash_reg hash_reg_t

Enumeration Type Documentation

◆ HASH_ALG

enum HASH_ALG
Enumerator
HASH_SM3 
HASH_MD5 
HASH_SHA256 
HASH_SHA384 
HASH_SHA512 
HASH_SHA1 
HASH_SHA224 
HASH_SHA512_224 
HASH_SHA512_256 
HASH_SHA3_224 
HASH_SHA3_256 
HASH_SHA3_384 
HASH_SHA3_512 

◆ HASH_RET_CODE

Enumerator
HASH_SUCCESS 
HASH_BUFFER_NULL 
HASH_CONFIG_INVALID 
HASH_INPUT_INVALID 
HASH_LEN_OVERFLOW 
HASH_ERROR 

Function Documentation

◆ hash_check_whether_sha3_alg()

uint32_t hash_check_whether_sha3_alg ( HASH_ALG  hash_alg)

◆ hash_clear_dma_ch_en()

void hash_clear_dma_ch_en ( void  )

◆ hash_clear_dma_sa_da()

void hash_clear_dma_sa_da ( void  )

◆ hash_clear_hmac_key_mode()

void hash_clear_hmac_key_mode ( void  )

◆ hash_clear_msg_len()

void hash_clear_msg_len ( void  )

◆ hash_clear_risp()

void hash_clear_risp ( void  )

◆ hash_disable_cpu_interruption()

void hash_disable_cpu_interruption ( void  )

◆ hash_disable_dma_interruption()

void hash_disable_dma_interruption ( void  )

◆ hash_dma_operate()

void hash_dma_operate ( uint32_t *  msg,
uint32_t *  iterator,
uint32_t  msgBitLen,
HASH_CALLBACK  callback 
)

◆ hash_enable_cpu_interruption()

void hash_enable_cpu_interruption ( void  )

◆ hash_enable_dma_interruption()

void hash_enable_dma_interruption ( void  )

◆ hash_get_iterator()

void hash_get_iterator ( uint8_t *  iterator,
uint8_t  hash_iterator_words 
)

◆ hash_get_version()

uint32_t hash_get_version ( void  )

◆ hash_hmac_disable_secure_port()

void hash_hmac_disable_secure_port ( void  )

◆ hash_hmac_enable_secure_port()

void hash_hmac_enable_secure_port ( uint16_t  sp_key_idx)

◆ hash_hmac_key_opr()

void hash_hmac_key_opr ( uint8_t *  key,
uint32_t  key_bytes 
)

◆ hash_hmac_key_opr_one_block()

void hash_hmac_key_opr_one_block ( uint32_t *  key,
uint32_t  block_byte_len 
)

◆ hash_hmac_sp_key_opr()

void hash_hmac_sp_key_opr ( uint32_t  key_bits)

◆ hash_input_msg()

void hash_input_msg ( uint8_t *  msg,
uint32_t  msg_words 
)

◆ hash_input_msg_u8()

void hash_input_msg_u8 ( uint8_t *  msg,
uint32_t  msg_bytes 
)

◆ hash_set_alg()

void hash_set_alg ( HASH_ALG  hash_alg)

◆ hash_set_cpu_mode()

void hash_set_cpu_mode ( void  )

◆ hash_set_dma_ch_ctl()

void hash_set_dma_ch_ctl ( uint32_t  ch_ctl)

◆ hash_set_dma_ch_rctl()

void hash_set_dma_ch_rctl ( uint32_t  ch_rctl)

◆ hash_set_dma_ch_wctl()

void hash_set_dma_ch_wctl ( uint32_t  ch_wctl)

◆ hash_set_dma_ctl0()

void hash_set_dma_ctl0 ( uint32_t  ctl0)

◆ hash_set_dma_ctl1()

void hash_set_dma_ctl1 ( uint32_t  ctl1)

◆ hash_set_dma_mode()

void hash_set_dma_mode ( void  )

◆ hash_set_dma_sublen()

void hash_set_dma_sublen ( uint32_t  sublen)

◆ hash_set_dma_wlen()

void hash_set_dma_wlen ( uint32_t  wlen)

◆ hash_set_endian_uint32()

void hash_set_endian_uint32 ( void  )

◆ hash_set_hash_mode()

void hash_set_hash_mode ( void  )

◆ hash_set_hmac_key_cnt()

void hash_set_hmac_key_cnt ( uint32_t  bitlen)

◆ hash_set_hmac_key_len()

void hash_set_hmac_key_len ( uint32_t  bitlen)

◆ hash_set_hmac_key_mode()

void hash_set_hmac_key_mode ( void  )

◆ hash_set_hmac_mode()

void hash_set_hmac_mode ( void  )

◆ hash_set_iterator()

void hash_set_iterator ( uint32_t *  iterator,
uint8_t  hash_iterator_words 
)

◆ hash_set_last_block()

void hash_set_last_block ( uint8_t  tag)

◆ hash_set_msg_len()

void hash_set_msg_len ( uint32_t  bytelen)

◆ hash_set_msg_total_bit_len()

void hash_set_msg_total_bit_len ( uint32_t *  msg_total_bits,
uint32_t  block_byte_len 
)

◆ hash_start()

void hash_start ( void  )

◆ hash_update_config()

void hash_update_config ( void  )

◆ hash_wait_till_done()

void hash_wait_till_done ( void  )