11#include "crypto_osal_lib.h"
void crypto_wait_t
Definition crypto_osal_lib.h:19
#define CIPHER_CHECK_WORD
Definition crypto_security.h:111
td_s32(* crypto_wait_timeout_interruptible)(crypto_wait_t *wait, drv_wait_condition_func func, const td_void *param, const td_ulong timeout_ms)
Definition hal_common.h:69
td_s32 hal_pke_set_init_param(const pke_ecc_init_param *init_param, const drv_pke_ecc_curve *ecc_curve)
set the initial parameters into DRAM.
Definition hal_rom_table.c:111
td_s32 hal_pke_lock(void)
Definition hal_rom_table.c:29
void hal_pke_set_wait_event(crypto_wait_t *wait, const crypto_wait_timeout_interruptible wait_func, const td_u32 timeout_ms, const td_bool wait_done)
Definition hal_pke.c:496
void hal_pke_disable_noise(void)
Definition hal_rom_table.c:44
td_s32 hal_pke_init(void)
Definition hal_rom_table.c:19
td_s32 hal_pke_start(pke_mode mode CIPHER_CHECK_WORD)
start PKE calculate
Definition hal_rom_table.c:84
void hal_pke_enable_noise(void)
Definition hal_rom_table.c:39
td_s32 hal_pke_check_free(void)
check PKE busy, if success, then do next steps.
Definition hal_rom_table.c:54
td_s32 hal_pke_wait_done(void)
PKE wait calculation finish
Definition hal_rom_table.c:89
td_void hal_pke_set_ram(td_u32 ram_section, const td_u8 *data, td_u32 data_len, td_u32 aligned_len CIPHER_CHECK_WORD)
set data to PKE DRAM.
Definition hal_rom_table.c:59
td_s32 hal_pke_set_mont_para(td_u32 low_bit, td_u32 high_bit CIPHER_CHECK_WORD)
Set the montgomery parameter for modular multiplication.
Definition hal_rom_table.c:99
td_s32 hal_pke_deinit(void)
Definition hal_rom_table.c:24
void hal_pke_unlock(void)
Definition hal_rom_table.c:34
td_s32 hal_pke_pre_process(void)
set mask random into registerfor set_ram and get_ram.
Definition hal_rom_table.c:49
td_s32 hal_pke_set_mode(pke_mode mode, td_u32 single_instr, const rom_lib *batch_instr, pke_data_work_len work_len CIPHER_CHECK_WORD)
set calculate mode, work_len and instr to register.
Definition hal_rom_table.c:76
pke_mode
Definition hal_pke.h:22
@ PKE_SINGLE_INSTR0
Definition hal_pke.h:23
@ PKE_SINGLE_INSTR1
Definition hal_pke.h:24
@ PKE_BATCH_INSTR
Definition hal_pke.h:25
td_s32 hal_pke_get_align_val(const td_u32 len, td_u32 *aligned_len)
Get the align val object of PKE, which depending on the chip version.
Definition hal_rom_table.c:94
pke_data_work_len
Definition hal_pke.h:28
@ PKE_3072_BIT_WORK_LEN
Definition hal_pke.h:36
@ PKE_192_BIT_WORK_LEN
Definition hal_pke.h:29
@ PKE_256_BIT_WORK_LEN
Definition hal_pke.h:31
@ PKE_4096_BIT_WORK_LEN
Definition hal_pke.h:37
@ PKE_512_BIT_WORK_LEN
Definition hal_pke.h:34
@ PKE_2048_BIT_WORK_LEN
Definition hal_pke.h:35
@ PKE_224_BIT_WORK_LEN
Definition hal_pke.h:30
@ PKE_384_BIT_WORK_LEN
Definition hal_pke.h:32
@ PKE_BRAINPOOL_512_BIT_WORK_LEN
Definition hal_pke.h:33
td_void hal_pke_get_ram(td_u32 ram_section, td_u8 *data, td_u32 data_len CIPHER_CHECK_WORD)
get result data in PKE DRAM
Definition hal_rom_table.c:65
td_u32 g_pke_initialize
Definition hal_pke.c:32
td_s32 hal_pke_clean_ram(void)
clear the data in DRAM as random value. Only need to clear at the last calculate.
Definition hal_rom_table.c:71
Definition crypto_pke_struct.h:96
Definition crypto_pke_struct.h:144
unsigned char td_u8
Definition td_type.h:36
td_u8 td_bool
Definition td_type.h:50
void td_void
Definition td_type.h:49
unsigned int td_u32
Definition td_type.h:38
int td_s32
Definition td_type.h:44
Definition hal_uart_v151_regs_def.h:38