|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|
#include "ecc_ec_fp.h"#include "crypto_drv_common.h"#include "hal_pke_reg.h"#include "hal_pke.h"#include "drv_common_pke.h"
函数 | |
| 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. | |
| 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
| 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 | the input ecc curve parameter. |
| sig | the signature to be verified. |
| out_v | the calculated verify value. |