|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|
#include "ecc_ec_fp.h"#include "crypto_drv_common.h"#include "drv_trng.h"#include "hal_pke_reg.h"#include "hal_pke.h"#include "drv_common_pke.h"
函数 | |
| td_s32 | ecc_ecfn_sign_s (const drv_pke_data *k_inv, const drv_pke_data *e, const drv_pke_data *d, const drv_pke_data *r, const drv_pke_data *n, const drv_pke_data *s CIPHER_CHECK_WORD) |
| calculate the s value of signature. s = k_inv * (e + d * r) mod n. montgomery multiplication modulurs and twice modulo reduction to demontgomery, and make sure s, r in [1, n-1] 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_sign_s | ( | const drv_pke_data * | k_inv, |
| const drv_pke_data * | e, | ||
| const drv_pke_data * | d, | ||
| const drv_pke_data * | r, | ||
| const drv_pke_data * | n, | ||
| const drv_pke_data *s | CIPHER_CHECK_WORD | ||
| ) |
calculate the s value of signature. s = k_inv * (e + d * r) mod n. montgomery multiplication modulurs and twice modulo reduction to demontgomery, and make sure s, r in [1, n-1] 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 sign algorithm implementation
Create: 2023-06-05