first step of v2 final release

This commit is contained in:
Zhi Guan
2017-11-05 21:00:36 +08:00
parent 480b9e8d88
commit 27bde477a5
395 changed files with 26341 additions and 31364 deletions

View File

@@ -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;
};