WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
ecc_ec_fp_verify_common.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_common.c 的引用(Include)关系图:

函数

CRYPTO_STATIC td_s32 point_multi_mul_sim (const drv_pke_ecc_curve *ecc, const drv_pke_data *u1, const drv_pke_data *u2 CIPHER_CHECK_WORD)
 
td_s32 ecc_ecfp_mul_add (const drv_pke_ecc_curve *ecc, const drv_pke_data *u1, const drv_pke_data *u2, const drv_pke_ecc_point *q, const drv_pke_ecc_point *r CIPHER_CHECK_WORD)
 R = u1 * G + u2 * Q. Before call this API, you should have set curve initial parameters into DRAM, which must include ecc_addr_mont_a, ecc_addr_mont_1_p, ecc_addr_const_1, ecc_addr_const_0.
 

函数说明

◆ ecc_ecfp_mul_add()

td_s32 ecc_ecfp_mul_add ( const drv_pke_ecc_curve ecc,
const drv_pke_data u1,
const drv_pke_data u2,
const drv_pke_ecc_point q,
const drv_pke_ecc_point *r  CIPHER_CHECK_WORD 
)

R = u1 * G + u2 * Q. Before call this API, you should have set curve initial parameters into DRAM, which must include ecc_addr_mont_a, ecc_addr_mont_1_p, ecc_addr_const_1, ecc_addr_const_0.

参数
eccinput ecc curve param.
u1the scalar.
u2the scalar.
qthe input point(public key), which is in affine coordinate system.
rthe output point. result is in (ecc_addr_cx, ecc_addr_cy, ecc_addr_cz).
CIPHER_CHECK_WORDifdef SEC_ENHANCE, the value is XOR result of parameters, otherwise it doesn't exist.
返回
td_s32 TD_SUCCESS or others.

◆ point_multi_mul_sim()

CRYPTO_STATIC td_s32 point_multi_mul_sim ( const drv_pke_ecc_curve ecc,
const drv_pke_data u1,
const drv_pke_data *u2  CIPHER_CHECK_WORD 
)

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

Create: 2023-06-05