WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
pke.c 文件参考
#include "unified_cipher_pke.h"
#include "kapi_pke.h"
#include "kapi_pke_cal.h"
#include "sl_common.h"
#include "crypto_common_macro.h"
pke.c 的引用(Include)关系图:

函数

errcode_t uapi_drv_cipher_pke_ecc_gen_key (uapi_drv_cipher_pke_ecc_curve_type_t curve_type, const uapi_drv_cipher_pke_data_t *input_priv_key, const uapi_drv_cipher_pke_data_t *output_priv_key, const uapi_drv_cipher_pke_ecc_point_t *output_pub_key)
 生成ECC秘钥对。
 
errcode_t uapi_drv_cipher_pke_ecdsa_sign (uapi_drv_cipher_pke_ecc_curve_type_t curve_type, const uapi_drv_cipher_pke_data_t *priv_key, const uapi_drv_cipher_pke_data_t *hash, const uapi_drv_cipher_pke_ecc_sig_t *sig)
 椭圆曲线数字签名。
 
errcode_t uapi_drv_cipher_pke_ecdsa_verify (uapi_drv_cipher_pke_ecc_curve_type_t curve_type, const uapi_drv_cipher_pke_ecc_point_t *pub_key, const uapi_drv_cipher_pke_data_t *hash, const uapi_drv_cipher_pke_ecc_sig_t *sig)
 椭圆曲线数字ECC验签。
 
errcode_t uapi_drv_cipher_pke_eddsa_sign (uapi_drv_cipher_pke_ecc_curve_type_t curve_type, const uapi_drv_cipher_pke_data_t *priv_key, const uapi_drv_cipher_pke_msg_t *msg, const uapi_drv_cipher_pke_ecc_sig_t *sig)
 爱德华兹曲线数字签名。
 
errcode_t uapi_drv_cipher_pke_eddsa_verify (uapi_drv_cipher_pke_ecc_curve_type_t curve_type, const uapi_drv_cipher_pke_ecc_point_t *pub_key, const uapi_drv_cipher_pke_msg_t *msg, const uapi_drv_cipher_pke_ecc_sig_t *sig)
 爱德华兹曲线数字验签。
 
errcode_t uapi_drv_cipher_pke_ecc_gen_ecdh_key (uapi_drv_cipher_pke_ecc_curve_type_t curve_type, const uapi_drv_cipher_pke_ecc_point_t *input_pub_key, const uapi_drv_cipher_pke_data_t *input_priv_key, const uapi_drv_cipher_pke_data_t *output_shared_key)
 椭圆曲线迪菲-赫尔曼秘钥协商。
 
errcode_t uapi_drv_cipher_pke_check_dot_on_curve (uapi_drv_cipher_pke_ecc_curve_type_t curve_type, const uapi_drv_cipher_pke_ecc_point_t *pub_key, bool *is_on_curve)
 检查点是否在椭圆曲线上。
 
errcode_t uapi_drv_cipher_pke_sm2_dsa_hash (const uapi_drv_cipher_pke_data_t *sm2_id, const uapi_drv_cipher_pke_ecc_point_t *pub_key, const uapi_drv_cipher_pke_msg_t *msg, uapi_drv_cipher_pke_data_t *hash)
 SM2杂凑的SM3摘要计算。
 
errcode_t uapi_drv_cipher_pke_sm2_public_encrypt (const uapi_drv_cipher_pke_ecc_point_t *pub_key, const uapi_drv_cipher_pke_data_t *plain_text, const uapi_drv_cipher_pke_data_t *cipher_text)
 SM2公钥加密。
 
errcode_t uapi_drv_cipher_pke_sm2_private_decrypt (const uapi_drv_cipher_pke_data_t *priv_key, const uapi_drv_cipher_pke_data_t *cipher_text, const uapi_drv_cipher_pke_data_t *plain_text)
 SM2私钥解密。
 
errcode_t uapi_drv_cipher_pke_rsa_sign (const uapi_drv_cipher_pke_rsa_priv_key_t *priv_key, uapi_drv_cipher_pke_rsa_scheme_t scheme, uapi_drv_cipher_pke_hash_type_t hash_type, const uapi_drv_cipher_pke_data_t *input_hash, uapi_drv_cipher_pke_data_t *sign)
 RSA签名。
 
errcode_t uapi_drv_cipher_pke_rsa_verify (const uapi_drv_cipher_pke_rsa_pub_key_t *pub_key, uapi_drv_cipher_pke_rsa_scheme_t scheme, uapi_drv_cipher_pke_hash_type_t hash_type, uapi_drv_cipher_pke_data_t *input_hash, const uapi_drv_cipher_pke_data_t *sig)
 RSA验签。
 
errcode_t uapi_drv_cipher_pke_rsa_public_encrypt (uapi_drv_cipher_pke_rsa_scheme_t scheme, uapi_drv_cipher_pke_hash_type_t hash_type, const uapi_drv_cipher_pke_rsa_pub_key_t *pub_key, const uapi_drv_cipher_pke_data_t *input, const uapi_drv_cipher_pke_data_t *label, uapi_drv_cipher_pke_data_t *output)
 RSA公钥加密。
 
errcode_t uapi_drv_cipher_pke_rsa_private_decrypt (uapi_drv_cipher_pke_rsa_scheme_t scheme, uapi_drv_cipher_pke_hash_type_t hash_type, const uapi_drv_cipher_pke_rsa_priv_key_t *priv_key, const uapi_drv_cipher_pke_data_t *input, const uapi_drv_cipher_pke_data_t *label, const uapi_drv_cipher_pke_data_t *output)
 RSA私钥解密。
 
errcode_t uapi_drv_cipher_pke_dh_gen_key (const uapi_drv_cipher_pke_data_t *g_data, const uapi_drv_cipher_pke_data_t *mod_n, const uapi_drv_cipher_pke_data_t *input_priv_key, const uapi_drv_cipher_pke_data_t *output_priv_key, const uapi_drv_cipher_pke_data_t *output_pub_key)
 DH 公私钥对生成或由私钥生成公钥。
 
errcode_t uapi_drv_cipher_pke_dh_compute_key (const uapi_drv_cipher_pke_data_t *mod_n, const uapi_drv_cipher_pke_data_t *input_priv_key, const uapi_drv_cipher_pke_data_t *input_pub_key, const uapi_drv_cipher_pke_data_t *output_shared_key)
 DH 密钥协商算法。
 
errcode_t uapi_drv_cipher_pke_add_mod (const uapi_drv_cipher_pke_data_t *a, const uapi_drv_cipher_pke_data_t *b, const uapi_drv_cipher_pke_data_t *p, const uapi_drv_cipher_pke_data_t *c)
 模加 c = (a + b) mod p。
 
errcode_t uapi_drv_cipher_pke_sub_mod (const uapi_drv_cipher_pke_data_t *a, const uapi_drv_cipher_pke_data_t *b, const uapi_drv_cipher_pke_data_t *p, const uapi_drv_cipher_pke_data_t *c)
 模减 c = (a - b) mod p。
 
errcode_t uapi_drv_cipher_pke_mul_mod (const uapi_drv_cipher_pke_data_t *a, const uapi_drv_cipher_pke_data_t *b, const uapi_drv_cipher_pke_data_t *p, const uapi_drv_cipher_pke_data_t *c)
 模乘 c = (a * b) mod p。
 
errcode_t uapi_drv_cipher_pke_inv_mod (const uapi_drv_cipher_pke_data_t *a, const uapi_drv_cipher_pke_data_t *p, const uapi_drv_cipher_pke_data_t *c)
 模逆 c = (a^-1) mod p。
 
errcode_t uapi_drv_cipher_pke_mod (const uapi_drv_cipher_pke_data_t *a, const uapi_drv_cipher_pke_data_t *p, const uapi_drv_cipher_pke_data_t *c)
 取模运算 c = a mod p。
 
errcode_t uapi_drv_cipher_pke_mul (const uapi_drv_cipher_pke_data_t *a, const uapi_drv_cipher_pke_data_t *b, const uapi_drv_cipher_pke_data_t *c)
 大数乘 c = a * b。
 
errcode_t uapi_drv_cipher_pke_exp_mod (const uapi_drv_cipher_pke_data_t *n, const uapi_drv_cipher_pke_data_t *k, const uapi_drv_cipher_pke_data_t *in, const uapi_drv_cipher_pke_data_t *out)
 模幂 out = (in ^ k) mod n。