WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
ecc_ec_fp_verify.c 文件参考
#include "ecc_ec_fp.h"
#include "crypto_drv_common.h"
#include "hal_pke_reg.h"
#include "hal_pke.h"
#include "drv_common_pke.h"
ecc_ec_fp_verify.c 的引用(Include)关系图:

函数

td_s32 ecc_ecfn_verify_u (const drv_pke_data *s_inv, const drv_pke_data *e, const drv_pke_data *r, const drv_pke_data *n, const drv_pke_data *u1, const drv_pke_data *u2 CIPHER_CHECK_WORD)
 calculate the u1 = s_inv * e mod n & u2 = s_inv * r mod n. montgomery multiplication modulurs and twice modulo reduction to demontgomery. Before call this API, you should have set curve initial parameters into DRAM, which must include ecc_addr_rrn, ecc_addr_const_1.
 
td_s32 ecc_ecfn_verify_v (const drv_pke_ecc_curve *ecc, const drv_pke_ecc_sig *sig, td_u8 *out_v)
 verify whether the v == r.
 

函数说明

◆ ecc_ecfn_verify_u()

td_s32 ecc_ecfn_verify_u ( const drv_pke_data s_inv,
const drv_pke_data e,
const drv_pke_data r,
const drv_pke_data n,
const drv_pke_data u1,
const drv_pke_data *u2  CIPHER_CHECK_WORD 
)

calculate the u1 = s_inv * e mod n & u2 = s_inv * r mod n. montgomery multiplication modulurs and twice modulo reduction to demontgomery. Before call this API, you should have set curve initial parameters into DRAM, which must include ecc_addr_rrn, ecc_addr_const_1.

Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2023-2023. All rights reserved. Description: ecc verify algorithm implementation

Create: 2023-06-05

◆ ecc_ecfn_verify_v()

td_s32 ecc_ecfn_verify_v ( const drv_pke_ecc_curve ecc,
const drv_pke_ecc_sig sig,
td_u8 out_v 
)

verify whether the v == r.

参数
eccthe input ecc curve parameter.
sigthe signature to be verified.
out_vthe calculated verify value.
返回
td_s32 TD_SUCCESS or others.