1 Star 0 Fork 1

1132923200/SM2-signature-creation-and-verification

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
sm2_create_key_pair.h 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
greendow 提交于 2018-11-20 21:52 . Add files via upload
/**************************************************
* File name: sm2_create_key_pair.h
* Author: HAN Wei
* Author's blog: https://blog.csdn.net/henter/
* Date: Nov 18th, 2018
* Description: declare SM2 key pair creation function
**************************************************/
#ifndef HEADER_SM2_CREATE_KEY_PAIR_H
#define HEADER_SM2_CREATE_KEY_PAIR_H
typedef struct sm2_key_pair_structure {
/* Private key is a octet string of 32-byte length. */
unsigned char pri_key[32];
/* Public key is a octet string of 65 byte length. It is a
concatenation of 04 || X || Y. X and Y both are SM2 public
key coordinates of 32-byte length. */
unsigned char pub_key[65];
} SM2_KEY_PAIR;
#ifdef __cplusplus
extern "C" {
#endif
/**************************************************
* Name: sm2_create_key_pair
* Function: create SM2 key pair, including private key
and public key
* Parameters:
key_pair[in] SM2 key pair
* Return value:
0: function executes successfully
any other value: an error occurs
**************************************************/
int sm2_create_key_pair(SM2_KEY_PAIR *key_pair);
#ifdef __cplusplus
}
#endif
#endif /* end of HEADER_SM2_CREATE_KEY_PAIR_H */
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zf1132923200/SM2-signature-creation-and-verification.git
[email protected]:zf1132923200/SM2-signature-creation-and-verification.git
zf1132923200
SM2-signature-creation-and-verification
SM2-signature-creation-and-verification
master

搜索帮助