SemiDrive SSDK Appication Program Interface PTG3.0
Data Structures
sdrv_crypto_utility.h File Reference
#include <debug.h>
#include <stdint.h>
#include <sdrv_common.h>

Go to the source code of this file.

Data Structures

struct  crypto_block
 

Detailed Description

Macro Definition Documentation

◆ CONFIG_OSR_CRYPTO_TEST_CACC

#define CONFIG_OSR_CRYPTO_TEST_CACC   0

◆ GET_BYTE_LEN

#define GET_BYTE_LEN (   bitLen)    (((bitLen) + 7) / 8)

◆ GET_MAX_LEN

#define GET_MAX_LEN (   a,
 
)    (((a) > (b)) ? (a) : (b))

◆ GET_MIN_LEN

#define GET_MIN_LEN (   a,
 
)    (((a) > (b)) ? (b) : (a))

◆ GET_WORD_LEN

#define GET_WORD_LEN (   bitLen)    (((bitLen) + 31) / 32)

◆ NULL

#define NULL   ((void *)0)

◆ PKE_PRINT_BUF

#define PKE_PRINT_BUF

Typedef Documentation

◆ crypto_block_t

typedef struct crypto_block crypto_block_t

◆ sdrv_crypto_error_status_e

CRYPTO error status return codes.

Enumeration Type Documentation

◆ sdrv_crypto_error_status

CRYPTO error status return codes.

Enumerator
CMD_RETURN_SUCCESS 
CMD_RETURN_FAIL 
E_OK 
E_NOT_OK 
E_PARAM_ERROR 
CMD_SEIP_SUCCESS 
CMD_SEIP_ERROR 

Function Documentation

◆ big_div2n()

uint32_t big_div2n ( uint32_t  a[],
int32_t  aWordLen,
uint32_t  n 
)

◆ bigint_check_1()

uint8_t bigint_check_1 ( uint32_t  a[],
uint32_t  aWordLen 
)

◆ bigint_check_p_1()

uint8_t bigint_check_p_1 ( uint32_t  a[],
uint32_t  p[],
uint32_t  wordLen 
)

◆ ce_get_current_time()

uint32_t ce_get_current_time ( void  )

◆ get_multiple2_number()

uint32_t get_multiple2_number ( uint32_t  a[])

◆ get_valid_bits()

uint32_t get_valid_bits ( const uint32_t *  a,
uint32_t  wordLen 
)

◆ get_valid_words()

uint32_t get_valid_words ( uint32_t *  a,
uint32_t  max_words 
)

◆ memcmp_()

int8_t memcmp_ ( void *  m1,
void *  m2,
uint32_t  size 
)

◆ memcpy_()

void memcpy_ ( void *  dst,
void *  src,
uint32_t  size 
)

◆ memset_()

void memset_ ( void *  dst,
uint8_t  value,
uint32_t  size 
)

◆ print_BN_buf_U32()

void print_BN_buf_U32 ( uint32_t  buf[],
uint32_t  wordLen,
char  name[] 
)

◆ print_buf_U32()

void print_buf_U32 ( uint32_t  buf[],
uint32_t  wordLen,
char  name[] 
)

◆ print_buf_U8()

void print_buf_U8 ( uint8_t  buf[],
uint32_t  byteLen,
char  name[] 
)

◆ reverse_byte_array()

void reverse_byte_array ( uint8_t *  in,
uint8_t *  out,
uint32_t  byteLen 
)

◆ reverse_word()

void reverse_word ( uint8_t *  in,
uint8_t *  out,
uint32_t  bytelen 
)

◆ reverse_word_array()

void reverse_word_array ( uint8_t *  in,
uint32_t *  out,
uint32_t  wordLen 
)

◆ uint32_bignum_check_zero()

uint8_t uint32_bignum_check_zero ( uint32_t  a[],
uint32_t  aWordLen 
)

◆ uint32_bignumcmp()

int32_t uint32_bignumcmp ( uint32_t *  a,
uint32_t  aWordLen,
uint32_t *  b,
uint32_t  bWordLen 
)

◆ uint32_clear()

void uint32_clear ( uint32_t *  a,
uint32_t  wordLen 
)

◆ uint32_copy()

void uint32_copy ( uint32_t *  dst,
uint32_t *  src,
uint32_t  wordLen 
)

◆ uint32_endian_reverse()

void uint32_endian_reverse ( uint8_t *  in,
uint8_t *  out,
uint32_t  wordLen 
)

◆ uint32_sec_cmp()

uint32_t uint32_sec_cmp ( uint32_t *  a,
uint32_t *  b,
uint32_t  wordLen,
uint8_t  rand 
)

◆ uint32_set()

void uint32_set ( uint32_t *  a,
uint32_t  value,
uint32_t  wordLen 
)

◆ uint32_sleep()

void uint32_sleep ( uint32_t  count,
uint8_t  rand 
)

◆ uint8_bignum_check_zero()

uint8_t uint8_bignum_check_zero ( uint8_t  a[],
uint32_t  aByteLen 
)

◆ uint8_xor()

void uint8_xor ( uint8_t *  a,
uint8_t *  b,
uint8_t *  c,
uint32_t  byteLen 
)