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

宏定义

#define kapi_pke_mutex_lock()
 
#define kapi_pke_mutex_unlock()
 

函数

td_s32 kapi_cipher_pke_env_init (td_void)
 
td_s32 kapi_cipher_pke_env_deinit (td_void)
 
td_s32 kapi_pke_ecc_gen_key (drv_pke_ecc_curve_type curve_type, const drv_pke_data *input_priv_key, const drv_pke_data *output_priv_key, const drv_pke_ecc_point *output_pub_key)
 
td_s32 kapi_pke_ecdsa_sign (drv_pke_ecc_curve_type curve_type, const drv_pke_data *priv_key, const drv_pke_data *hash, const drv_pke_ecc_sig *sig)
 
td_s32 kapi_pke_ecdsa_verify (drv_pke_ecc_curve_type curve_type, const drv_pke_ecc_point *pub_key, const drv_pke_data *hash, const drv_pke_ecc_sig *sig)
 
td_s32 kapi_pke_eddsa_sign (drv_pke_ecc_curve_type curve_type, const drv_pke_data *priv_key, const drv_pke_msg *msg, const drv_pke_ecc_sig *sig)
 
td_s32 kapi_pke_eddsa_verify (drv_pke_ecc_curve_type curve_type, const drv_pke_ecc_point *pub_key, const drv_pke_msg *msg, const drv_pke_ecc_sig *sig)
 
td_s32 kapi_pke_ecc_gen_ecdh_key (drv_pke_ecc_curve_type curve_type, const drv_pke_ecc_point *input_pub_key, const drv_pke_data *input_priv_key, const drv_pke_data *output_shared_key)
 
td_s32 kapi_pke_sm2_dsa_hash (const drv_pke_data *sm2_id, const drv_pke_ecc_point *pub_key, const drv_pke_msg *msg, drv_pke_data *hash)
 
td_s32 kapi_pke_sm2_public_encrypt (const drv_pke_ecc_point *pub_key, const drv_pke_data *plain_text, const drv_pke_data *cipher_text)
 
td_s32 kapi_pke_sm2_private_decrypt (const drv_pke_data *priv_key, const drv_pke_data *cipher_text, const drv_pke_data *plain_text)
 
td_s32 kapi_pke_rsa_sign (const drv_pke_rsa_priv_key *priv_key, drv_pke_rsa_scheme scheme, drv_pke_hash_type hash_type, const drv_pke_data *input_hash, drv_pke_data *sign)
 
td_s32 kapi_pke_rsa_verify (const drv_pke_rsa_pub_key *pub_key, drv_pke_rsa_scheme scheme, drv_pke_hash_type hash_type, drv_pke_data *input_hash, const drv_pke_data *sig)
 
td_s32 kapi_pke_rsa_public_encrypt (drv_pke_rsa_scheme scheme, drv_pke_hash_type hash_type, const drv_pke_rsa_pub_key *pub_key, const drv_pke_data *input, const drv_pke_data *label, drv_pke_data *output)
 
td_s32 kapi_pke_rsa_private_decrypt (drv_pke_rsa_scheme scheme, drv_pke_hash_type hash_type, const drv_pke_rsa_priv_key *priv_key, const drv_pke_data *input, const drv_pke_data *label, drv_pke_data *output)
 
td_s32 kapi_pke_dh_gen_key (const drv_pke_data *g_data, const drv_pke_data *mod_n, const drv_pke_data *input_priv_key, const drv_pke_data *output_priv_key, const drv_pke_data *output_pub_key)
 
td_s32 kapi_pke_dh_compute_key (const drv_pke_data *mod_n, const drv_pke_data *input_priv_key, const drv_pke_data *input_pub_key, const drv_pke_data *output_shared_key)
 

变量

crypto_mutex g_pke_mutex
 

宏定义说明

◆ kapi_pke_mutex_lock

#define kapi_pke_mutex_lock ( )
值:
do { \
crypto_mutex_lock(&g_pke_mutex); \
} while (0)
crypto_mutex g_pke_mutex
Definition kapi_pke.c:12

◆ kapi_pke_mutex_unlock

#define kapi_pke_mutex_unlock ( )
值:
do { \
crypto_mutex_unlock(&g_pke_mutex); \
} while (0)

函数说明

◆ kapi_cipher_pke_env_deinit()

td_s32 kapi_cipher_pke_env_deinit ( td_void  )

◆ kapi_cipher_pke_env_init()

td_s32 kapi_cipher_pke_env_init ( td_void  )

◆ kapi_pke_dh_compute_key()

td_s32 kapi_pke_dh_compute_key ( const drv_pke_data mod_n,
const drv_pke_data input_priv_key,
const drv_pke_data input_pub_key,
const drv_pke_data output_shared_key 
)

◆ kapi_pke_dh_gen_key()

td_s32 kapi_pke_dh_gen_key ( const drv_pke_data g_data,
const drv_pke_data mod_n,
const drv_pke_data input_priv_key,
const drv_pke_data output_priv_key,
const drv_pke_data output_pub_key 
)

◆ kapi_pke_ecc_gen_ecdh_key()

td_s32 kapi_pke_ecc_gen_ecdh_key ( drv_pke_ecc_curve_type  curve_type,
const drv_pke_ecc_point input_pub_key,
const drv_pke_data input_priv_key,
const drv_pke_data output_shared_key 
)

◆ kapi_pke_ecc_gen_key()

td_s32 kapi_pke_ecc_gen_key ( drv_pke_ecc_curve_type  curve_type,
const drv_pke_data input_priv_key,
const drv_pke_data output_priv_key,
const drv_pke_ecc_point output_pub_key 
)

Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2023-2023. All rights reserved. Description: public key cryptographic algorithm kernel API header file.

Create: 2023-05-26

◆ kapi_pke_ecdsa_sign()

td_s32 kapi_pke_ecdsa_sign ( drv_pke_ecc_curve_type  curve_type,
const drv_pke_data priv_key,
const drv_pke_data hash,
const drv_pke_ecc_sig sig 
)

◆ kapi_pke_ecdsa_verify()

td_s32 kapi_pke_ecdsa_verify ( drv_pke_ecc_curve_type  curve_type,
const drv_pke_ecc_point pub_key,
const drv_pke_data hash,
const drv_pke_ecc_sig sig 
)

◆ kapi_pke_eddsa_sign()

td_s32 kapi_pke_eddsa_sign ( drv_pke_ecc_curve_type  curve_type,
const drv_pke_data priv_key,
const drv_pke_msg msg,
const drv_pke_ecc_sig sig 
)

◆ kapi_pke_eddsa_verify()

td_s32 kapi_pke_eddsa_verify ( drv_pke_ecc_curve_type  curve_type,
const drv_pke_ecc_point pub_key,
const drv_pke_msg msg,
const drv_pke_ecc_sig sig 
)

◆ kapi_pke_rsa_private_decrypt()

td_s32 kapi_pke_rsa_private_decrypt ( drv_pke_rsa_scheme  scheme,
drv_pke_hash_type  hash_type,
const drv_pke_rsa_priv_key priv_key,
const drv_pke_data input,
const drv_pke_data label,
drv_pke_data output 
)

◆ kapi_pke_rsa_public_encrypt()

td_s32 kapi_pke_rsa_public_encrypt ( drv_pke_rsa_scheme  scheme,
drv_pke_hash_type  hash_type,
const drv_pke_rsa_pub_key pub_key,
const drv_pke_data input,
const drv_pke_data label,
drv_pke_data output 
)

◆ kapi_pke_rsa_sign()

td_s32 kapi_pke_rsa_sign ( const drv_pke_rsa_priv_key priv_key,
drv_pke_rsa_scheme  scheme,
drv_pke_hash_type  hash_type,
const drv_pke_data input_hash,
drv_pke_data sign 
)

◆ kapi_pke_rsa_verify()

td_s32 kapi_pke_rsa_verify ( const drv_pke_rsa_pub_key pub_key,
drv_pke_rsa_scheme  scheme,
drv_pke_hash_type  hash_type,
drv_pke_data input_hash,
const drv_pke_data sig 
)

◆ kapi_pke_sm2_dsa_hash()

td_s32 kapi_pke_sm2_dsa_hash ( const drv_pke_data sm2_id,
const drv_pke_ecc_point pub_key,
const drv_pke_msg msg,
drv_pke_data hash 
)

◆ kapi_pke_sm2_private_decrypt()

td_s32 kapi_pke_sm2_private_decrypt ( const drv_pke_data priv_key,
const drv_pke_data cipher_text,
const drv_pke_data plain_text 
)

◆ kapi_pke_sm2_public_encrypt()

td_s32 kapi_pke_sm2_public_encrypt ( const drv_pke_ecc_point pub_key,
const drv_pke_data plain_text,
const drv_pke_data cipher_text 
)

变量说明

◆ g_pke_mutex

crypto_mutex g_pke_mutex

Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2023-2023. All rights reserved. Description: public key cryptographic algorithm kernel API function implementation

Create: 2023-05-26