mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-09-23 05:44:07 +08:00
first step of v2 final release
This commit is contained in:
@@ -54,19 +54,20 @@
|
||||
#include <openssl/sm9.h>
|
||||
|
||||
/* Curve ID */
|
||||
#define SM9_CID_TYPE0CURVE 0x10
|
||||
#define SM9_CID_TYPE1CURVE 0x11
|
||||
#define SM9_CID_TYPE2CURVE 0x12
|
||||
/* 一个字节表示的曲线类型 */
|
||||
#define SM9_CID_TYPE0CURVE 0x10 /* Fp上的常曲线 */
|
||||
#define SM9_CID_TYPE1CURVE 0x11 /* Fp上的超奇异曲线 */
|
||||
#define SM9_CID_TYPE2CURVE 0x12 /* Fp上常曲线及其扭曲线 */
|
||||
|
||||
/* Pairing ID */
|
||||
/* 一个字节表示的双线性对类型 */
|
||||
#define SM9_EID_TATE 0x01
|
||||
#define SM9_EID_WEIL 0x02
|
||||
#define SM9_EID_ATE 0x03
|
||||
#define SM9_EID_RATE 0x04
|
||||
|
||||
#define SM9_MAX_ID_LENGTH 127
|
||||
|
||||
/* not clear what it is */
|
||||
/* 一个字节的签名私钥生成函数标识符 */
|
||||
#define SM9_HID 0xc9
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -95,6 +96,13 @@ struct SM9MasterSecret_st {
|
||||
BIGNUM *masterSecret;
|
||||
};
|
||||
|
||||
/* 签名算法中公钥为G2上的点
|
||||
* 密钥交换和加密中为G1上的点
|
||||
*/
|
||||
struct SM9PublicKey_st {
|
||||
ASN1_OCTET_STRING *publicPoint;
|
||||
};
|
||||
|
||||
struct SM9PrivateKey_st {
|
||||
ASN1_OCTET_STRING *privatePoint;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user