mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-17 18:33:39 +08:00
Update SM9 schemes
Update SM9 schemes based on the default sm9bn256v1 r-ate pairing. To be continued.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
/* Serialized OID's */
|
||||
static const unsigned char so[7797] = {
|
||||
static const unsigned char so[7876] = {
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 0] OBJ_rsadsi */
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 6] OBJ_pkcs */
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x02, /* [ 13] OBJ_md2 */
|
||||
@@ -1092,9 +1092,17 @@ static const unsigned char so[7797] = {
|
||||
0x2A,0x81,0x1C,0xD7,0x63,0x01,0x01, /* [ 7771] OBJ_wapi_ec */
|
||||
0x2A,0x81,0x1C,0xD7,0x63,0x01,0x01,0x01, /* [ 7778] OBJ_wapi_ecdsa192_sha256 */
|
||||
0x2B,0x06,0x01,0x04,0x01,0x83,0x83,0x0D,0x09,0x01, /* [ 7786] OBJ_sm9bn256v1 */
|
||||
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x82,0x2E,0x04, /* [ 7796] OBJ_sm9hash1 */
|
||||
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x82,0x2E,0x04,0x01, /* [ 7805] OBJ_sm9hash1_with_sm3 */
|
||||
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x82,0x2E,0x04,0x02, /* [ 7815] OBJ_sm9hash1_with_sha256 */
|
||||
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x82,0x2E,0x01,0x01, /* [ 7825] OBJ_sm9sign_with_sm3 */
|
||||
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x82,0x2E,0x01,0x02, /* [ 7835] OBJ_sm9sign_with_sha256 */
|
||||
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x82,0x2E,0x03,0x01, /* [ 7845] OBJ_sm9encrypt_with_sm3_xor */
|
||||
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x82,0x2E,0x03,0x02, /* [ 7855] OBJ_sm9encrypt_with_sm3_sms4_cbc */
|
||||
0x2A,0x81,0x1C,0xCF,0x55,0x01,0x82,0x2E,0x03,0x03, /* [ 7865] OBJ_sm9encrypt_with_sm3_sms4_ctr */
|
||||
};
|
||||
|
||||
#define NUM_NID 1201
|
||||
#define NUM_NID 1209
|
||||
static const ASN1_OBJECT nid_objs[NUM_NID] = {
|
||||
{"UNDEF", "undefined", NID_undef},
|
||||
{"rsadsi", "RSA Data Security, Inc.", NID_rsadsi, 6, &so[0]},
|
||||
@@ -2297,9 +2305,17 @@ static const ASN1_OBJECT nid_objs[NUM_NID] = {
|
||||
{"wapi-ec", "wapi-ec", NID_wapi_ec, 7, &so[7771]},
|
||||
{"wapi-ecdsa192-sha256", "wapi-ecdsa192-sha256", NID_wapi_ecdsa192_sha256, 8, &so[7778]},
|
||||
{"sm9bn256v1", "sm9bn256v1", NID_sm9bn256v1, 10, &so[7786]},
|
||||
{"sm9hash1", "sm9hash1", NID_sm9hash1, 9, &so[7796]},
|
||||
{"sm9hash1-with-sm3", "sm9hash1-with-sm3", NID_sm9hash1_with_sm3, 10, &so[7805]},
|
||||
{"sm9hash1-with-sha256", "sm9hash1-with-sha256", NID_sm9hash1_with_sha256, 10, &so[7815]},
|
||||
{"sm9sign-with-sm3", "sm9sign-with-sm3", NID_sm9sign_with_sm3, 10, &so[7825]},
|
||||
{"sm9sign-with-sha256", "sm9sign-with-sha256", NID_sm9sign_with_sha256, 10, &so[7835]},
|
||||
{"sm9encrypt-with-sm3-xor", "sm9encrypt-with-sm3-xor", NID_sm9encrypt_with_sm3_xor, 10, &so[7845]},
|
||||
{"sm9encrypt-with-sm3-sms4-cbc", "sm9encrypt-with-sm3-sms4-cbc", NID_sm9encrypt_with_sm3_sms4_cbc, 10, &so[7855]},
|
||||
{"sm9encrypt-with-sm3-sms4-ctr", "sm9encrypt-with-sm3-sms4-ctr", NID_sm9encrypt_with_sm3_sms4_ctr, 10, &so[7865]},
|
||||
};
|
||||
|
||||
#define NUM_SN 1190
|
||||
#define NUM_SN 1198
|
||||
static const unsigned int sn_objs[NUM_SN] = {
|
||||
364, /* "AD_DVCS" */
|
||||
419, /* "AES-128-CBC" */
|
||||
@@ -3424,8 +3440,16 @@ static const unsigned int sn_objs[NUM_SN] = {
|
||||
1117, /* "sm2sign" */
|
||||
1200, /* "sm9bn256v1" */
|
||||
1125, /* "sm9encrypt" */
|
||||
1207, /* "sm9encrypt-with-sm3-sms4-cbc" */
|
||||
1208, /* "sm9encrypt-with-sm3-sms4-ctr" */
|
||||
1206, /* "sm9encrypt-with-sm3-xor" */
|
||||
1201, /* "sm9hash1" */
|
||||
1203, /* "sm9hash1-with-sha256" */
|
||||
1202, /* "sm9hash1-with-sm3" */
|
||||
1124, /* "sm9keyagreement" */
|
||||
1123, /* "sm9sign" */
|
||||
1205, /* "sm9sign-with-sha256" */
|
||||
1204, /* "sm9sign-with-sm3" */
|
||||
387, /* "snmpv2" */
|
||||
660, /* "street" */
|
||||
85, /* "subjectAltName" */
|
||||
@@ -3493,7 +3517,7 @@ static const unsigned int sn_objs[NUM_SN] = {
|
||||
1194, /* "zuc-128eia3" */
|
||||
};
|
||||
|
||||
#define NUM_LN 1190
|
||||
#define NUM_LN 1198
|
||||
static const unsigned int ln_objs[NUM_LN] = {
|
||||
363, /* "AD Time Stamping" */
|
||||
405, /* "ANSI X9.62" */
|
||||
@@ -4602,8 +4626,16 @@ static const unsigned int ln_objs[NUM_LN] = {
|
||||
1088, /* "sm6-ofb" */
|
||||
1200, /* "sm9bn256v1" */
|
||||
1125, /* "sm9encrypt" */
|
||||
1207, /* "sm9encrypt-with-sm3-sms4-cbc" */
|
||||
1208, /* "sm9encrypt-with-sm3-sms4-ctr" */
|
||||
1206, /* "sm9encrypt-with-sm3-xor" */
|
||||
1201, /* "sm9hash1" */
|
||||
1203, /* "sm9hash1-with-sha256" */
|
||||
1202, /* "sm9hash1-with-sm3" */
|
||||
1124, /* "sm9keyagreement" */
|
||||
1123, /* "sm9sign" */
|
||||
1205, /* "sm9sign-with-sha256" */
|
||||
1204, /* "sm9sign-with-sm3" */
|
||||
1103, /* "sms4-cbc" */
|
||||
1110, /* "sms4-ccm" */
|
||||
1105, /* "sms4-cfb" */
|
||||
@@ -4687,7 +4719,7 @@ static const unsigned int ln_objs[NUM_LN] = {
|
||||
1194, /* "zuc-128eia3" */
|
||||
};
|
||||
|
||||
#define NUM_OBJ 1087
|
||||
#define NUM_OBJ 1095
|
||||
static const unsigned int obj_objs[NUM_OBJ] = {
|
||||
0, /* OBJ_undef 0 */
|
||||
181, /* OBJ_iso 1 */
|
||||
@@ -5428,6 +5460,7 @@ static const unsigned int obj_objs[NUM_OBJ] = {
|
||||
1123, /* OBJ_sm9sign 1 2 156 10197 1 302 1 */
|
||||
1124, /* OBJ_sm9keyagreement 1 2 156 10197 1 302 2 */
|
||||
1125, /* OBJ_sm9encrypt 1 2 156 10197 1 302 3 */
|
||||
1201, /* OBJ_sm9hash1 1 2 156 10197 1 302 4 */
|
||||
1127, /* OBJ_hmac_sm3 1 2 156 10197 1 401 2 */
|
||||
1193, /* OBJ_zuc_128eea3 1 2 156 10197 1 800 1 */
|
||||
1194, /* OBJ_zuc_128eia3 1 2 156 10197 1 800 2 */
|
||||
@@ -5635,6 +5668,13 @@ static const unsigned int obj_objs[NUM_OBJ] = {
|
||||
457, /* OBJ_qualityLabelledData 0 9 2342 19200300 100 4 22 */
|
||||
1120, /* OBJ_sm2encrypt_recommendedParameters 1 2 156 10197 1 301 3 1 */
|
||||
1121, /* OBJ_sm2encrypt_specifiedParameters 1 2 156 10197 1 301 3 2 */
|
||||
1204, /* OBJ_sm9sign_with_sm3 1 2 156 10197 1 302 1 1 */
|
||||
1205, /* OBJ_sm9sign_with_sha256 1 2 156 10197 1 302 1 2 */
|
||||
1206, /* OBJ_sm9encrypt_with_sm3_xor 1 2 156 10197 1 302 3 1 */
|
||||
1207, /* OBJ_sm9encrypt_with_sm3_sms4_cbc 1 2 156 10197 1 302 3 2 */
|
||||
1208, /* OBJ_sm9encrypt_with_sm3_sms4_ctr 1 2 156 10197 1 302 3 3 */
|
||||
1202, /* OBJ_sm9hash1_with_sm3 1 2 156 10197 1 302 4 1 */
|
||||
1203, /* OBJ_sm9hash1_with_sha256 1 2 156 10197 1 302 4 2 */
|
||||
1139, /* OBJ_type1curve 1 2 840 1 114334 1 1 1 */
|
||||
1140, /* OBJ_type2curve 1 2 840 1 114334 1 1 2 */
|
||||
1141, /* OBJ_type3curve 1 2 840 1 114334 1 1 3 */
|
||||
|
||||
@@ -1198,3 +1198,11 @@ wapi_crypto 1197
|
||||
wapi_ec 1198
|
||||
wapi_ecdsa192_sha256 1199
|
||||
sm9bn256v1 1200
|
||||
sm9hash1 1201
|
||||
sm9hash1_with_sm3 1202
|
||||
sm9hash1_with_sha256 1203
|
||||
sm9sign_with_sm3 1204
|
||||
sm9sign_with_sha256 1205
|
||||
sm9encrypt_with_sm3_xor 1206
|
||||
sm9encrypt_with_sm3_sms4_cbc 1207
|
||||
sm9encrypt_with_sm3_sms4_ctr 1208
|
||||
|
||||
@@ -1613,8 +1613,16 @@ sm2encrypt 2 11 : sm2encrypt-with-md5
|
||||
|
||||
sm-scheme 302 : id-sm9PublicKey
|
||||
sm-scheme 302 1 : sm9sign
|
||||
sm9sign 1 : sm9sign-with-sm3
|
||||
sm9sign 2 : sm9sign-with-sha256
|
||||
sm-scheme 302 2 : sm9keyagreement
|
||||
sm-scheme 302 3 : sm9encrypt
|
||||
sm9encrypt 1 : sm9encrypt-with-sm3-xor
|
||||
sm9encrypt 2 : sm9encrypt-with-sm3-sms4-cbc
|
||||
sm9encrypt 3 : sm9encrypt-with-sm3-sms4-ctr
|
||||
sm-scheme 302 4 : sm9hash1
|
||||
sm9hash1 1 : sm9hash1-with-sm3
|
||||
sm9hash1 2 : sm9hash1-with-sha256
|
||||
|
||||
sm-scheme 401 : SM3 : sm3
|
||||
sm-scheme 401 2 : HMAC-SM3 : hmac-sm3
|
||||
@@ -1630,7 +1638,6 @@ sm-scheme 520 : SM2Sign-with-Whirlpool : sm2sign-with-whirlpool
|
||||
sm-scheme 521 : SM2Sign-with-Blake2b512 : sm2sign-with-blake2b512
|
||||
sm-scheme 522 : SM2Sign-with-Blake2s256 : sm2sign-with-blake2s256
|
||||
|
||||
|
||||
# GmSSL ZUC OID
|
||||
sm-scheme 800 : ZUC : zuc
|
||||
zuc 1 : zuc-128eea3
|
||||
@@ -1672,5 +1679,3 @@ wapi-ec 2 1 : wapip192v1
|
||||
|
||||
# SM9 curve
|
||||
GmSSL 9 1 : sm9bn256v1
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
LIBS=../../libcrypto
|
||||
SOURCE[../../libcrypto]=sm9_lib.c sm9_err.c sm9_asn1.c sm9_params.c \
|
||||
sm9_setup.c sm9_keygen.c sm9_sign.c sm9_enc.c sm9_exch.c \
|
||||
sm9_rate.c
|
||||
sm9_setup.c sm9_keygen.c sm9_sign.c sm9_enc.c sm9_rate.c
|
||||
|
||||
@@ -55,39 +55,43 @@
|
||||
#include <openssl/sm9.h>
|
||||
#include "sm9_lcl.h"
|
||||
|
||||
ASN1_SEQUENCE(SM9PublicParameters) = {
|
||||
ASN1_SIMPLE(SM9PublicParameters, curve, ASN1_OBJECT),
|
||||
ASN1_SIMPLE(SM9PublicParameters, p, BIGNUM),
|
||||
ASN1_SIMPLE(SM9PublicParameters, a, BIGNUM),
|
||||
ASN1_SIMPLE(SM9PublicParameters, b, BIGNUM),
|
||||
ASN1_SIMPLE(SM9PublicParameters, beta, BIGNUM),
|
||||
ASN1_SIMPLE(SM9PublicParameters, order, BIGNUM),
|
||||
ASN1_SIMPLE(SM9PublicParameters, cofactor, BIGNUM),
|
||||
ASN1_SIMPLE(SM9PublicParameters, k, BIGNUM),
|
||||
ASN1_SIMPLE(SM9PublicParameters, pointP1, ASN1_OCTET_STRING),
|
||||
ASN1_SIMPLE(SM9PublicParameters, pointP2, ASN1_OCTET_STRING),
|
||||
ASN1_SIMPLE(SM9PublicParameters, pairing, ASN1_OBJECT),
|
||||
ASN1_SIMPLE(SM9PublicParameters, pointPpub, ASN1_OCTET_STRING),
|
||||
ASN1_SIMPLE(SM9PublicParameters, g1, BIGNUM),
|
||||
ASN1_SIMPLE(SM9PublicParameters, g2, BIGNUM),
|
||||
ASN1_SIMPLE(SM9PublicParameters, hashfcn, ASN1_OBJECT)
|
||||
} ASN1_SEQUENCE_END(SM9PublicParameters)
|
||||
IMPLEMENT_ASN1_FUNCTIONS(SM9PublicParameters)
|
||||
IMPLEMENT_ASN1_DUP_FUNCTION(SM9PublicParameters)
|
||||
|
||||
ASN1_SEQUENCE(SM9MasterSecret) = {
|
||||
ASN1_SIMPLE(SM9MasterSecret, pairing, ASN1_OBJECT),
|
||||
ASN1_SIMPLE(SM9MasterSecret, scheme, ASN1_OBJECT),
|
||||
ASN1_SIMPLE(SM9MasterSecret, hash1, ASN1_OBJECT),
|
||||
ASN1_SIMPLE(SM9MasterSecret, pointPpub, ASN1_OCTET_STRING),
|
||||
ASN1_SIMPLE(SM9MasterSecret, masterSecret, BIGNUM)
|
||||
} ASN1_SEQUENCE_END(SM9MasterSecret)
|
||||
IMPLEMENT_ASN1_FUNCTIONS(SM9MasterSecret)
|
||||
IMPLEMENT_ASN1_DUP_FUNCTION(SM9MasterSecret)
|
||||
|
||||
ASN1_SEQUENCE(SM9PublicParameters) = {
|
||||
ASN1_SIMPLE(SM9PublicParameters, pairing, ASN1_OBJECT),
|
||||
ASN1_SIMPLE(SM9PublicParameters, scheme, ASN1_OBJECT),
|
||||
ASN1_SIMPLE(SM9PublicParameters, hash1, ASN1_OBJECT),
|
||||
ASN1_SIMPLE(SM9PublicParameters, pointPpub, ASN1_OCTET_STRING)
|
||||
} ASN1_SEQUENCE_END(SM9PublicParameters)
|
||||
IMPLEMENT_ASN1_FUNCTIONS(SM9PublicParameters)
|
||||
IMPLEMENT_ASN1_DUP_FUNCTION(SM9PublicParameters)
|
||||
|
||||
ASN1_SEQUENCE(SM9PrivateKey) = {
|
||||
ASN1_SIMPLE(SM9PrivateKey, pairing, ASN1_OBJECT),
|
||||
ASN1_SIMPLE(SM9PrivateKey, scheme, ASN1_OBJECT),
|
||||
ASN1_SIMPLE(SM9PrivateKey, hash1, ASN1_OBJECT),
|
||||
ASN1_SIMPLE(SM9PrivateKey, pointPpub, ASN1_OCTET_STRING),
|
||||
ASN1_SIMPLE(SM9PrivateKey, identity, ASN1_OCTET_STRING),
|
||||
ASN1_SIMPLE(SM9PrivateKey, publicPoint, ASN1_OCTET_STRING),
|
||||
ASN1_SIMPLE(SM9PrivateKey, privatePoint, ASN1_OCTET_STRING)
|
||||
} ASN1_SEQUENCE_END(SM9PrivateKey)
|
||||
IMPLEMENT_ASN1_FUNCTIONS(SM9PrivateKey)
|
||||
IMPLEMENT_ASN1_DUP_FUNCTION(SM9PrivateKey)
|
||||
|
||||
ASN1_SEQUENCE(SM9PublicKey) = {
|
||||
ASN1_SIMPLE(SM9PublicKey, pairing, ASN1_OBJECT),
|
||||
ASN1_SIMPLE(SM9PublicKey, scheme, ASN1_OBJECT),
|
||||
ASN1_SIMPLE(SM9PublicKey, hash1, ASN1_OBJECT),
|
||||
ASN1_SIMPLE(SM9PublicKey, pointPpub, ASN1_OCTET_STRING),
|
||||
ASN1_SIMPLE(SM9PublicKey, identity, ASN1_OCTET_STRING),
|
||||
ASN1_SIMPLE(SM9PublicKey, publicPoint, ASN1_OCTET_STRING)
|
||||
} ASN1_SEQUENCE_END(SM9PublicKey)
|
||||
IMPLEMENT_ASN1_FUNCTIONS(SM9PublicKey)
|
||||
|
||||
1113
crypto/sm9/sm9_enc.c
1113
crypto/sm9/sm9_enc.c
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -31,41 +31,51 @@ static ERR_STRING_DATA SM9_str_functs[] = {
|
||||
{ERR_FUNC(SM9_F_SM9_DECRYPT), "SM9_decrypt"},
|
||||
{ERR_FUNC(SM9_F_SM9_DO_DECRYPT), "SM9_do_decrypt"},
|
||||
{ERR_FUNC(SM9_F_SM9_DO_ENCRYPT), "SM9_do_encrypt"},
|
||||
{ERR_FUNC(SM9_F_SM9_DO_SIGN), "SM9_do_sign"},
|
||||
{ERR_FUNC(SM9_F_SM9_DO_SIGN_TYPE1CURVE), "SM9_do_sign_type1curve"},
|
||||
{ERR_FUNC(SM9_F_SM9_DO_VERIFY), "SM9_do_verify"},
|
||||
{ERR_FUNC(SM9_F_SM9_DO_VERIFY_TYPE1CURVE), "SM9_do_verify_type1curve"},
|
||||
{ERR_FUNC(SM9_F_SM9_ENCRYPT), "SM9_encrypt"},
|
||||
{ERR_FUNC(SM9_F_SM9_EXTRACT_PRIVATE_KEY), "SM9_extract_private_key"},
|
||||
{ERR_FUNC(SM9_F_SM9_SETUP_TYPE1CURVE), "SM9_setup_type1curve"},
|
||||
{ERR_FUNC(SM9_F_SM9_EXTRACT_PUBLIC_PARAMETERS),
|
||||
"SM9_extract_public_parameters"},
|
||||
{ERR_FUNC(SM9_F_SM9_GENERATE_MASTER_SECRET),
|
||||
"SM9_generate_master_secret"},
|
||||
{ERR_FUNC(SM9_F_SM9_SIGN), "SM9_sign"},
|
||||
{ERR_FUNC(SM9_F_SM9_SIGNFINAL), "SM9_SignFinal"},
|
||||
{ERR_FUNC(SM9_F_SM9_SIGNINIT), "SM9_SignInit"},
|
||||
{ERR_FUNC(SM9_F_SM9_UNWRAP_KEY), "SM9_unwrap_key"},
|
||||
{ERR_FUNC(SM9_F_SM9_VERIFY), "SM9_verify"},
|
||||
{ERR_FUNC(SM9_F_SM9_VERIFYFINAL), "SM9_VerifyFInal"},
|
||||
{ERR_FUNC(SM9_F_SM9_VERIFYINIT), "SM9_VerifyInit"},
|
||||
{ERR_FUNC(SM9_F_SM9_WRAP_KEY), "SM9_wrap_key"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
static ERR_STRING_DATA SM9_str_reasons[] = {
|
||||
{ERR_REASON(SM9_R_BUFFER_TOO_SMALL), "buffer too small"},
|
||||
{ERR_REASON(SM9_R_COMPUTE_PAIRING_FAILURE), "compute pairing failure"},
|
||||
{ERR_REASON(SM9_R_DIGEST_FAILURE), "digest failure"},
|
||||
{ERR_REASON(SM9_R_EC_LIB), "ec lib"},
|
||||
{ERR_REASON(SM9_R_EXTENSION_FIELD_ERROR), "extension field error"},
|
||||
{ERR_REASON(SM9_R_GENERATE_MAC_FAILURE), "generate mac failure"},
|
||||
{ERR_REASON(SM9_R_HASH_FAILURE), "hash failure"},
|
||||
{ERR_REASON(SM9_R_INVALID_CIPHERTEXT), "invalid ciphertext"},
|
||||
{ERR_REASON(SM9_R_INVALID_CURVE), "invalid curve"},
|
||||
{ERR_REASON(SM9_R_INVALID_DIGEST), "invalid digest"},
|
||||
{ERR_REASON(SM9_R_INVALID_DIGEST_LENGTH), "invalid digest length"},
|
||||
{ERR_REASON(SM9_R_INVALID_ENCPARAMETERS), "invalid encparameters"},
|
||||
{ERR_REASON(SM9_R_INVALID_HASH1), "invalid hash1"},
|
||||
{ERR_REASON(SM9_R_INVALID_HASH2_DIGEST), "invalid hash2 digest"},
|
||||
{ERR_REASON(SM9_R_INVALID_ID), "invalid id"},
|
||||
{ERR_REASON(SM9_R_INVALID_ID_LENGTH), "invalid id length"},
|
||||
{ERR_REASON(SM9_R_INVALID_INPUT), "invalid input"},
|
||||
{ERR_REASON(SM9_R_INVALID_KEY_LENGTH), "invalid key length"},
|
||||
{ERR_REASON(SM9_R_INVALID_MD), "invalid md"},
|
||||
{ERR_REASON(SM9_R_INVALID_PAIRING_TYPE), "invalid pairing type"},
|
||||
{ERR_REASON(SM9_R_INVALID_PARAMETER), "invalid parameter"},
|
||||
{ERR_REASON(SM9_R_INVALID_POINTPPUB), "invalid pointppub"},
|
||||
{ERR_REASON(SM9_R_INVALID_PRIVATE_POINT), "invalid private point"},
|
||||
{ERR_REASON(SM9_R_INVALID_SCHEME), "invalid scheme"},
|
||||
{ERR_REASON(SM9_R_INVALID_SIGNATURE), "invalid signature"},
|
||||
{ERR_REASON(SM9_R_INVALID_SIGNATURE_FORMAT), "invalid signature format"},
|
||||
{ERR_REASON(SM9_R_INVALID_TYPE1CURVE), "invalid type1curve"},
|
||||
{ERR_REASON(SM9_R_KDF_FAILURE), "kdf failure"},
|
||||
{ERR_REASON(SM9_R_NOT_NAMED_CURVE), "not named curve"},
|
||||
{ERR_REASON(SM9_R_PARSE_PAIRING), "parse pairing"},
|
||||
{ERR_REASON(SM9_R_PAIRING_ERROR), "pairing error"},
|
||||
{ERR_REASON(SM9_R_TWIST_CURVE_ERROR), "twist curve error"},
|
||||
{ERR_REASON(SM9_R_VERIFY_FAILURE), "verify failure"},
|
||||
{ERR_REASON(SM9_R_ZERO_ID), "zero id"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
@@ -51,30 +51,51 @@
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/sm9.h>
|
||||
#include <openssl/ec_type1.h>
|
||||
#include <openssl/bn_hash.h>
|
||||
#include "sm9_lcl.h"
|
||||
|
||||
static int SM9PublicParameters_get_usage(SM9PublicParameters *mpk)
|
||||
|
||||
int SM9_hash1(const EVP_MD *md, BIGNUM **r,
|
||||
const char *id, size_t idlen,
|
||||
unsigned char hid,
|
||||
const BIGNUM *range,
|
||||
BN_CTX *ctx)
|
||||
{
|
||||
//FIXME
|
||||
return SM9_HID_SIGN;
|
||||
unsigned char *buf;
|
||||
|
||||
if (!(buf = OPENSSL_malloc(idlen + 1))) {
|
||||
return 0;
|
||||
}
|
||||
memcpy(buf, id, idlen);
|
||||
buf[idlen] = hid;
|
||||
|
||||
if (!BN_hash_to_range(md, r, buf, idlen + 1, range, ctx)) {
|
||||
OPENSSL_free(buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
OPENSSL_free(buf);
|
||||
return 1;
|
||||
}
|
||||
|
||||
SM9PrivateKey *SM9_extract_private_key(SM9PublicParameters *mpk,
|
||||
SM9MasterSecret *msk, const char *id, size_t idlen)
|
||||
SM9PrivateKey *SM9_extract_private_key(SM9MasterSecret *msk,
|
||||
const char *id, size_t idlen)
|
||||
{
|
||||
int e = 1;
|
||||
SM9PrivateKey *ret = NULL;
|
||||
BN_CTX *bn_ctx = NULL;
|
||||
EC_GROUP *group = NULL;
|
||||
EC_POINT *point = NULL;
|
||||
BIGNUM *h;
|
||||
SM9PrivateKey *sk = NULL;
|
||||
const BIGNUM *p = SM9_get0_prime();
|
||||
const BIGNUM *n = SM9_get0_order();
|
||||
int scheme;
|
||||
unsigned char hid;
|
||||
const EVP_MD *md;
|
||||
BN_CTX *ctx = NULL;
|
||||
BIGNUM *t = NULL;
|
||||
int point_form = POINT_CONVERSION_UNCOMPRESSED;
|
||||
size_t size;
|
||||
unsigned char buf[129];
|
||||
size_t len = sizeof(buf);
|
||||
|
||||
int hid = SM9PublicParameters_get_usage(mpk);
|
||||
|
||||
if (!mpk || !msk || !id) {
|
||||
/* check args */
|
||||
if (!msk || !id) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PRIVATE_KEY,
|
||||
ERR_R_PASSED_NULL_PARAMETER);
|
||||
return NULL;
|
||||
@@ -85,110 +106,299 @@ SM9PrivateKey *SM9_extract_private_key(SM9PublicParameters *mpk,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* BN_CTX */
|
||||
if (!(bn_ctx = BN_CTX_new())) {
|
||||
/* check pairing */
|
||||
if (OBJ_obj2nid(msk->pairing) != NID_sm9bn256v1) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* check scheme */
|
||||
scheme = OBJ_obj2nid(msk->scheme);
|
||||
switch (scheme) {
|
||||
case NID_sm9sign:
|
||||
hid = SM9_HID_SIGN;
|
||||
break;
|
||||
case NID_sm9keyagreement:
|
||||
hid = SM9_HID_EXCH;
|
||||
break;
|
||||
case NID_sm9encrypt:
|
||||
hid = SM9_HID_ENC;
|
||||
break;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* check hash1 and set hash1 md */
|
||||
switch (OBJ_obj2nid(msk->hash1)) {
|
||||
case NID_sm9hash1_with_sm3:
|
||||
md = EVP_sm3();
|
||||
break;
|
||||
case NID_sm9hash1_with_sha256:
|
||||
md = EVP_sha256();
|
||||
break;
|
||||
default:
|
||||
SM9err(SM9_F_SM9_EXTRACT_PRIVATE_KEY, SM9_R_INVALID_HASH1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* malloc */
|
||||
if (!(sk = SM9PrivateKey_new())
|
||||
|| !(ctx = BN_CTX_new())) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PRIVATE_KEY,
|
||||
ERR_R_MALLOC_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
BN_CTX_start(bn_ctx);
|
||||
BN_CTX_start(ctx);
|
||||
|
||||
/* EC_GROUP */
|
||||
if (!(group = EC_GROUP_new_type1curve_ex(mpk->p,
|
||||
mpk->a, mpk->b, mpk->pointP1->data, mpk->pointP1->length,
|
||||
mpk->order, mpk->cofactor, bn_ctx))) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PRIVATE_KEY, SM9_R_INVALID_TYPE1CURVE);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* malloc */
|
||||
ret = SM9PrivateKey_new();
|
||||
point = EC_POINT_new(group);
|
||||
h = BN_CTX_get(bn_ctx);
|
||||
|
||||
if (!ret || !point || !h) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PRIVATE_KEY, ERR_R_MALLOC_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* md = mpk->hashfcn */
|
||||
if (!(md = EVP_get_digestbyobj(mpk->hashfcn))) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PRIVATE_KEY, SM9_R_INVALID_MD);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* h = H1(ID||HID) in [0, mpk->order] */
|
||||
if (!SM9_hash1(md, &h, id, idlen, hid, mpk->order, bn_ctx)) {
|
||||
/* t1 = H1(ID||hid) + msk (mod n) */
|
||||
if (!SM9_hash1(md, &t, id, idlen, hid, n, ctx)) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PRIVATE_KEY, ERR_R_SM9_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* h = h + msk->masterSecret (mod mpk->order) */
|
||||
if (!BN_mod_add(h, h, msk->masterSecret, mpk->order, bn_ctx)) {
|
||||
if (!BN_mod_add(t, t, msk->masterSecret, n, ctx)) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PRIVATE_KEY, ERR_R_BN_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* if h is zero, return failed */
|
||||
if (BN_is_zero(h)) {
|
||||
/* if t1 is zero, return failed */
|
||||
if (BN_is_zero(t)) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PRIVATE_KEY, SM9_R_ZERO_ID);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* h = msk->masterSecret * h^-1 (mod mpk->order) */
|
||||
if (!BN_mod_inverse(h, h, mpk->order, bn_ctx)) {
|
||||
/* t2 = msk * t1^-1 (mod n) */
|
||||
if (!BN_mod_inverse(t, t, n, ctx)) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PRIVATE_KEY, ERR_R_BN_LIB);
|
||||
goto end;
|
||||
}
|
||||
if (!BN_mod_mul(h, msk->masterSecret, h, mpk->order, bn_ctx)) {
|
||||
if (!BN_mod_mul(t, msk->masterSecret, t, n, ctx)) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PRIVATE_KEY, ERR_R_BN_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* sk->privatePoint = mpk->pointP1 * h */
|
||||
if (!EC_POINT_mul(group, point, h, NULL, NULL, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PRIVATE_KEY, ERR_R_EC_LIB);
|
||||
goto end;
|
||||
/* generate ds or de */
|
||||
if (scheme == NID_sm9sign) {
|
||||
|
||||
EC_GROUP *group = NULL;
|
||||
EC_POINT *ds = NULL;
|
||||
|
||||
/* ds = t2 * P1 */
|
||||
if (!(group = EC_GROUP_new_by_curve_name(NID_sm9bn256v1))
|
||||
|| !(ds = EC_POINT_new(group))
|
||||
|| !EC_POINT_mul(group, ds, t, NULL, NULL, ctx)
|
||||
|| !(len = EC_POINT_point2oct(group, ds, point_form, buf, len, ctx))) {
|
||||
EC_GROUP_free(group);
|
||||
EC_POINT_free(ds);
|
||||
goto end;
|
||||
}
|
||||
|
||||
EC_GROUP_free(group);
|
||||
EC_POINT_free(ds);
|
||||
|
||||
} else if (scheme == NID_sm9encrypt) {
|
||||
|
||||
point_t de;
|
||||
|
||||
/* de = t2 * P2 */
|
||||
if (!point_init(&de, ctx)
|
||||
|| !point_mul_generator(&de, t, p, ctx)
|
||||
|| !point_to_octets(&de, buf, ctx)) {
|
||||
point_cleanup(&de);
|
||||
goto end;
|
||||
}
|
||||
|
||||
point_cleanup(&de);
|
||||
}
|
||||
if (!(size = EC_POINT_point2oct(group, point, point_form,
|
||||
NULL, 0, bn_ctx))) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PRIVATE_KEY, ERR_R_EC_LIB);
|
||||
goto end;
|
||||
}
|
||||
if (!ASN1_OCTET_STRING_set(ret->privatePoint, NULL, size)) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PRIVATE_KEY, ERR_R_MALLOC_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
if (!EC_POINT_point2oct(group, point, point_form,
|
||||
ret->privatePoint->data, ret->privatePoint->length, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PRIVATE_KEY, ERR_R_EC_LIB);
|
||||
|
||||
ASN1_OBJECT_free(sk->pairing);
|
||||
ASN1_OBJECT_free(sk->scheme);
|
||||
ASN1_OBJECT_free(sk->hash1);
|
||||
sk->pairing = NULL;
|
||||
sk->scheme = NULL;
|
||||
sk->hash1 = NULL;
|
||||
|
||||
if (!(sk->pairing = msk->pairing)
|
||||
|| !(sk->scheme = msk->scheme)
|
||||
|| !(sk->hash1 = msk->hash1)
|
||||
|| !ASN1_STRING_copy(sk->pointPpub, msk->pointPpub)
|
||||
|| !ASN1_STRING_set(sk->identity, id, idlen)
|
||||
/* FIXME: create publicPoint */
|
||||
|| !ASN1_STRING_set(sk->privatePoint, buf, len)) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PRIVATE_KEY, ERR_R_ASN1_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
e = 0;
|
||||
|
||||
ret = sk;
|
||||
sk = NULL;
|
||||
|
||||
end:
|
||||
if (e && ret) {
|
||||
SM9PrivateKey_free(ret);
|
||||
ret = NULL;
|
||||
if (ctx) {
|
||||
BN_CTX_end(ctx);
|
||||
}
|
||||
if (bn_ctx) {
|
||||
BN_CTX_end(bn_ctx);
|
||||
}
|
||||
BN_CTX_free(bn_ctx);
|
||||
EC_GROUP_free(group);
|
||||
EC_POINT_free(point);
|
||||
return NULL;
|
||||
BN_CTX_free(ctx);
|
||||
BN_clear_free(t);
|
||||
OPENSSL_cleanse(buf, sizeof(buf));
|
||||
return ret;
|
||||
}
|
||||
|
||||
SM9PublicKey *SM9_extract_public_key(SM9PublicParameters *mpk,
|
||||
const char *id, size_t idlen)
|
||||
{
|
||||
return NULL;
|
||||
SM9PublicKey *ret = NULL;
|
||||
SM9PublicKey *pk = NULL;
|
||||
BN_CTX *ctx = NULL;
|
||||
BIGNUM *h1 = NULL;
|
||||
int scheme;
|
||||
unsigned char hid;
|
||||
const EVP_MD *md;
|
||||
const BIGNUM *p = SM9_get0_prime();
|
||||
const BIGNUM *n = SM9_get0_order();
|
||||
int point_form = POINT_CONVERSION_UNCOMPRESSED;
|
||||
unsigned char buf[129];
|
||||
size_t len = sizeof(buf);
|
||||
|
||||
if (!(pk = SM9PublicKey_new())
|
||||
|| !(ctx = BN_CTX_new())) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* check pairing */
|
||||
if (OBJ_obj2nid(mpk->pairing) != NID_sm9bn256v1) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* check scheme and set hash1 hid */
|
||||
scheme = OBJ_obj2nid(mpk->scheme);
|
||||
switch (scheme) {
|
||||
case NID_sm9sign:
|
||||
hid = SM9_HID_SIGN;
|
||||
break;
|
||||
case NID_sm9encrypt:
|
||||
hid = SM9_HID_ENC;
|
||||
break;
|
||||
case NID_sm9keyagreement:
|
||||
hid = SM9_HID_EXCH;
|
||||
break;
|
||||
default:
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* check hash1 and set hash1 md */
|
||||
switch (OBJ_obj2nid(mpk->hash1)) {
|
||||
case NID_sm9hash1_with_sm3:
|
||||
md = EVP_sm3();
|
||||
break;
|
||||
case NID_sm9hash1_with_sha256:
|
||||
md = EVP_sha256();
|
||||
break;
|
||||
default:
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* h1 = H1(ID || hid) in [1, n-1] */
|
||||
if (!SM9_hash1(md, &h1, id, idlen, hid, n, ctx)) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (scheme == NID_sm9sign) {
|
||||
/* publicPoint = h1 * P2 + Ppubs */
|
||||
point_t point;
|
||||
point_t Ppubs;
|
||||
|
||||
|
||||
if (!point_init(&point, ctx)
|
||||
|| !point_init(&Ppubs, ctx)
|
||||
|| ASN1_STRING_length(mpk->pointPpub) != sizeof(buf)
|
||||
|| !point_from_octets(&Ppubs, ASN1_STRING_get0_data(mpk->pointPpub), p, ctx)
|
||||
|| !point_mul_generator(&point, h1, p, ctx)
|
||||
|| !point_add(&point, &point, &Ppubs, p, ctx)
|
||||
|| !point_to_octets(&point, buf, ctx)) {
|
||||
point_cleanup(&point);
|
||||
point_cleanup(&Ppubs);
|
||||
goto end;
|
||||
}
|
||||
point_cleanup(&point);
|
||||
point_cleanup(&Ppubs);
|
||||
|
||||
} else if (OBJ_obj2nid(mpk->scheme) == NID_sm9encrypt) {
|
||||
/* publicPoint = h1 * P1 + Ppube */
|
||||
EC_GROUP *group = NULL;
|
||||
EC_POINT *point = NULL;
|
||||
EC_POINT *Ppube = NULL;
|
||||
|
||||
if (!(group = EC_GROUP_new_by_curve_name(NID_sm9bn256v1))
|
||||
|| !(point = EC_POINT_new(group))
|
||||
|| !(Ppube = EC_POINT_new(group))
|
||||
|| !EC_POINT_oct2point(group, Ppube,
|
||||
ASN1_STRING_get0_data(mpk->pointPpub),
|
||||
ASN1_STRING_length(mpk->pointPpub), ctx)
|
||||
|| !EC_POINT_mul(group, point, h1, NULL, NULL, ctx)
|
||||
|| !EC_POINT_add(group, point, point, Ppube, ctx)
|
||||
|| !(len = EC_POINT_point2oct(group, point, point_form, buf, len, ctx))) {
|
||||
EC_GROUP_free(group);
|
||||
EC_POINT_free(point);
|
||||
EC_POINT_free(Ppube);
|
||||
goto end;
|
||||
}
|
||||
EC_GROUP_free(group);
|
||||
EC_POINT_free(point);
|
||||
EC_POINT_free(Ppube);
|
||||
}
|
||||
|
||||
/* init object */
|
||||
ASN1_OBJECT_free(pk->pairing);
|
||||
ASN1_OBJECT_free(pk->scheme);
|
||||
ASN1_OBJECT_free(pk->hash1);
|
||||
pk->pairing = NULL;
|
||||
pk->scheme = NULL;
|
||||
pk->hash1 = NULL;
|
||||
|
||||
if (!(pk->pairing = OBJ_dup(mpk->pairing))
|
||||
|| !(pk->scheme = OBJ_dup(mpk->scheme))
|
||||
|| !(pk->hash1 = OBJ_dup(mpk->hash1))
|
||||
|| !ASN1_STRING_copy(pk->pointPpub, mpk->pointPpub)
|
||||
|| !ASN1_STRING_set(pk->publicPoint, buf, len)
|
||||
|| !ASN1_STRING_set(pk->identity, id, idlen)) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
ret = pk;
|
||||
pk = NULL;
|
||||
|
||||
end:
|
||||
SM9PublicKey_free(pk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
SM9PublicKey *SM9PrivateKey_get_public_key(SM9PublicParameters *mpk,
|
||||
SM9PrivateKey *sk)
|
||||
SM9PublicKey *SM9PrivateKey_get_public_key(SM9PrivateKey *sk)
|
||||
{
|
||||
return NULL;
|
||||
SM9PublicKey *ret = NULL;
|
||||
SM9PublicKey *pk = NULL;
|
||||
|
||||
if (!(pk = SM9PublicKey_new())) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ASN1_OBJECT_free(pk->pairing);
|
||||
ASN1_OBJECT_free(pk->scheme);
|
||||
ASN1_OBJECT_free(pk->hash1);
|
||||
pk->pairing = NULL;
|
||||
pk->scheme = NULL;
|
||||
pk->hash1 = NULL;
|
||||
|
||||
if (!(pk->pairing = OBJ_dup(sk->pairing))
|
||||
|| !(pk->scheme = OBJ_dup(sk->scheme))
|
||||
|| !(pk->hash1 = OBJ_dup(sk->hash1))
|
||||
|| !ASN1_STRING_copy(pk->pointPpub, sk->pointPpub)
|
||||
|| !ASN1_STRING_copy(pk->publicPoint, sk->publicPoint)
|
||||
|| !ASN1_STRING_copy(pk->identity, sk->identity)) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
ret = pk;
|
||||
pk = NULL;
|
||||
|
||||
end:
|
||||
SM9PublicKey_free(pk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -76,48 +76,50 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int SM9_rate_pairing(BIGNUM *r[12], const BIGNUM *xQ[2], const BIGNUM *yQ[2],
|
||||
const BIGNUM *xP, const BIGNUM *yP, BN_CTX *ctx);
|
||||
|
||||
struct SM9PublicParameters_st {
|
||||
ASN1_OBJECT *curve;
|
||||
BIGNUM *p;
|
||||
BIGNUM *a;
|
||||
BIGNUM *b;
|
||||
BIGNUM *beta;
|
||||
BIGNUM *order;
|
||||
BIGNUM *cofactor;
|
||||
BIGNUM *k;
|
||||
ASN1_OCTET_STRING *pointP1;
|
||||
ASN1_OCTET_STRING *pointP2;
|
||||
ASN1_OBJECT *pairing;
|
||||
ASN1_OCTET_STRING *pointPpub;
|
||||
BIGNUM *g1; /* g1 = e(P1, Ppub) */
|
||||
BIGNUM *g2; /* g2 = e(Ppub, P2) */
|
||||
ASN1_OBJECT *hashfcn;
|
||||
};
|
||||
|
||||
struct SM9MasterSecret_st {
|
||||
ASN1_OBJECT *pairing;
|
||||
ASN1_OBJECT *scheme;
|
||||
ASN1_OBJECT *hash1;
|
||||
ASN1_OCTET_STRING *pointPpub;
|
||||
BIGNUM *masterSecret;
|
||||
};
|
||||
|
||||
struct SM9PublicKey_st {
|
||||
ASN1_OCTET_STRING *publicPoint;
|
||||
struct SM9PublicParameters_st {
|
||||
ASN1_OBJECT *pairing;
|
||||
ASN1_OBJECT *scheme;
|
||||
ASN1_OBJECT *hash1;
|
||||
ASN1_OCTET_STRING *pointPpub;
|
||||
};
|
||||
|
||||
struct SM9PrivateKey_st {
|
||||
ASN1_OBJECT *pairing;
|
||||
ASN1_OBJECT *scheme;
|
||||
ASN1_OBJECT *hash1;
|
||||
ASN1_OCTET_STRING *pointPpub;
|
||||
ASN1_OCTET_STRING *identity;
|
||||
ASN1_OCTET_STRING *publicPoint;
|
||||
ASN1_OCTET_STRING *privatePoint;
|
||||
};
|
||||
|
||||
struct SM9PublicKey_st {
|
||||
ASN1_OBJECT *pairing;
|
||||
ASN1_OBJECT *scheme;
|
||||
ASN1_OBJECT *hash1;
|
||||
ASN1_OCTET_STRING *pointPpub;
|
||||
ASN1_OCTET_STRING *identity;
|
||||
ASN1_OCTET_STRING *publicPoint;
|
||||
};
|
||||
|
||||
struct SM9Ciphertext_st {
|
||||
ASN1_OCTET_STRING *pointC1;
|
||||
ASN1_OCTET_STRING *c2;
|
||||
ASN1_OCTET_STRING *c3;
|
||||
ASN1_OCTET_STRING *pointC1; /* point over E(F_p) */
|
||||
ASN1_OCTET_STRING *c2; /* ciphertext */
|
||||
ASN1_OCTET_STRING *c3; /* mac-tag */
|
||||
};
|
||||
|
||||
struct SM9Signature_st {
|
||||
BIGNUM *h;
|
||||
ASN1_OCTET_STRING *pointS;
|
||||
BIGNUM *h; /* hash */
|
||||
ASN1_OCTET_STRING *pointS; /* point over E'(F_p^2) */
|
||||
};
|
||||
|
||||
int SM9_hash1(const EVP_MD *md, BIGNUM **r,
|
||||
@@ -131,6 +133,7 @@ int SM9_hash2(const EVP_MD *md, BIGNUM **r,
|
||||
|
||||
const BIGNUM *SM9_get0_prime(void);
|
||||
const BIGNUM *SM9_get0_order(void);
|
||||
const BIGNUM *SM9_get0_order_minus_one(void);
|
||||
const BIGNUM *SM9_get0_loop_count(void);
|
||||
const BIGNUM *SM9_get0_final_exponent(void);
|
||||
const BIGNUM *SM9_get0_generator2_x0(void);
|
||||
@@ -138,6 +141,34 @@ const BIGNUM *SM9_get0_generator2_x1(void);
|
||||
const BIGNUM *SM9_get0_generator2_y0(void);
|
||||
const BIGNUM *SM9_get0_generator2_y1(void);
|
||||
|
||||
typedef BIGNUM *fp2_t[2];
|
||||
typedef fp2_t fp4_t[2];
|
||||
typedef fp4_t fp12_t[3];
|
||||
typedef struct point_t {
|
||||
fp2_t X;
|
||||
fp2_t Y;
|
||||
fp2_t Z;
|
||||
} point_t;
|
||||
|
||||
int fp12_init(fp12_t a, BN_CTX *ctx);
|
||||
int fp12_mul(fp12_t r, const fp12_t a, const fp12_t b, const BIGNUM *p, BN_CTX *ctx);
|
||||
int fp12_pow(fp12_t r, const fp12_t a, const BIGNUM *k, const BIGNUM *p, BN_CTX *ctx);
|
||||
int fp12_to_bin(const fp12_t a, unsigned char to[384]);
|
||||
void fp12_cleanup(fp12_t a);
|
||||
|
||||
int point_init(point_t *P, BN_CTX *ctx);
|
||||
int point_copy(point_t *R, const point_t *P);
|
||||
int point_equ(const point_t *P, const point_t *Q);
|
||||
int point_is_on_curve(point_t *P, const BIGNUM *p, BN_CTX *ctx);
|
||||
int point_to_octets(const point_t *P, unsigned char to[129], BN_CTX *ctx);
|
||||
int point_from_octets(point_t *P, const unsigned char from[129], const BIGNUM *p, BN_CTX *ctx);
|
||||
int point_add(point_t *R, const point_t *A, const point_t *B, const BIGNUM *p, BN_CTX *ctx);
|
||||
int point_mul(point_t *R, const BIGNUM *k, const point_t *P, const BIGNUM *p, BN_CTX *ctx);
|
||||
int point_mul_generator(point_t *R, const BIGNUM *k, const BIGNUM *p, BN_CTX *ctx);
|
||||
void point_cleanup(point_t *P);
|
||||
|
||||
int rate_pairing(fp12_t r, const point_t *Q, const EC_POINT *P, BN_CTX *ctx);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -65,28 +65,6 @@ int SM9PublicKey_get_gmtls_encoded(SM9PublicParameters *mpk,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SM9_hash1(const EVP_MD *md, BIGNUM **r,
|
||||
const char *id, size_t idlen,
|
||||
unsigned char hid,
|
||||
const BIGNUM *range,
|
||||
BN_CTX *ctx)
|
||||
{
|
||||
unsigned char *buf;
|
||||
|
||||
if (!(buf = OPENSSL_malloc(idlen + 1))) {
|
||||
return 0;
|
||||
}
|
||||
memcpy(buf, id, idlen);
|
||||
buf[idlen] = hid;
|
||||
|
||||
if (!BN_hash_to_range(md, r, buf, idlen + 1, range, ctx)) {
|
||||
OPENSSL_free(buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
OPENSSL_free(buf);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int SM9_hash2(const EVP_MD *md, BIGNUM **r,
|
||||
const unsigned char *data, size_t datalen,
|
||||
@@ -110,3 +88,43 @@ int SM9_hash2(const EVP_MD *md, BIGNUM **r,
|
||||
return 1;
|
||||
}
|
||||
|
||||
int SM9_DigestInit(EVP_MD_CTX *ctx, unsigned char prefix,
|
||||
const EVP_MD *md, ENGINE *impl)
|
||||
{
|
||||
if (!EVP_DigestInit_ex(ctx, md, impl)
|
||||
|| !EVP_DigestUpdate(ctx, &prefix, 1)) {
|
||||
ERR_print_errors_fp(stderr);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if 0
|
||||
int SM9_DigestFinal(EVP_MD_CTX *ctx1, BIGNUM *h, const BIGNUM *n_1)
|
||||
{
|
||||
int ret = 0;
|
||||
EVP_MD_CTX *ctx2 = NULL;
|
||||
const unsigned char ct1[4] = {0x00, 0x00, 0x00, 0x01};
|
||||
const unsigned char ct2[4] = {0x00, 0x00, 0x00, 0x02};
|
||||
unsigned char Ha[EVP_MAX_MD_SIZE * 2];
|
||||
unsigned int len = 0;
|
||||
|
||||
if (!(ctx2 = EVP_MD_CTX_new())
|
||||
|| !EVP_MD_CTX_copy(ctx2, ctx1)
|
||||
|| !EVP_DigestUpdate(ctx1, ct1, sizeof(ct))
|
||||
|| !EVP_DigestUpdate(ctx2, ct2, sizeof(ct2))
|
||||
|| !EVP_DigestFinal_ex(ctx1, Ha, &len)
|
||||
|| !EVP_DigestFinal_ex(ctx2, Ha + len, &len)
|
||||
|| !BN_bin2bn(Ha, 40, h)
|
||||
|| !BN_mod(h, h, n_1, bn_ctx)
|
||||
|| !BN_add_word(h, 1)) {
|
||||
ERR_print_errors_fp(stderr);
|
||||
goto end;
|
||||
}
|
||||
|
||||
ret = 1;
|
||||
end:
|
||||
EVP_MD_CTX_free(ctx2);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -74,6 +74,11 @@ static const BN_ULONG _sm9bn256v1_order[BN_SM9_BN256_TOP] = {
|
||||
0xD603AB4FF58EC744ULL, 0xB640000002A3A6F1ULL,
|
||||
};
|
||||
|
||||
static const BN_ULONG _sm9bn256v1_order_minus_one[BN_SM9_BN256_TOP] = {
|
||||
0xE56EE19CD69ECF24ULL, 0x49F2934B18EA8BEEULL,
|
||||
0xD603AB4FF58EC744ULL, 0xB640000002A3A6F1ULL,
|
||||
};
|
||||
|
||||
static const BN_ULONG _sm9bn256v1_loop[BN_SM9_LOOP_TOP] = {
|
||||
0x400000000215D93EULL, 0x02ULL,
|
||||
};
|
||||
@@ -128,6 +133,11 @@ static const BN_ULONG _sm9bn256v1_order[BN_SM9_BN256_TOP] = {
|
||||
0xF58EC744, 0xD603AB4F, 0x02A3A6F1, 0xB6400000,
|
||||
};
|
||||
|
||||
static const BN_ULONG _sm9bn256v1_order_minus_one[BN_SM9_BN256_TOP] = {
|
||||
0xD69ECF24, 0xE56EE19C, 0x18EA8BEE, 0x49F2934B,
|
||||
0xF58EC744, 0xD603AB4F, 0x02A3A6F1, 0xB6400000,
|
||||
};
|
||||
|
||||
static const BN_ULONG _sm9bn256v1_loop[BN_SM9_LOOP_TOP] = {
|
||||
0x0215D93E, 0x40000000, 0x02,
|
||||
};
|
||||
@@ -191,6 +201,14 @@ static const BIGNUM _bignum_sm9bn256v1_order = {
|
||||
BN_FLG_STATIC_DATA
|
||||
};
|
||||
|
||||
static const BIGNUM _bignum_sm9bn256v1_order_minus_one = {
|
||||
(BN_ULONG *)_sm9bn256v1_order_minus_one,
|
||||
BN_SM9_BN256_TOP,
|
||||
BN_SM9_BN256_TOP,
|
||||
0,
|
||||
BN_FLG_STATIC_DATA
|
||||
};
|
||||
|
||||
static const BIGNUM _bignum_sm9bn256v1_loop = {
|
||||
(BN_ULONG *)_sm9bn256v1_loop,
|
||||
BN_SM9_LOOP_TOP,
|
||||
@@ -269,6 +287,11 @@ const BIGNUM *SM9_get0_order(void)
|
||||
return &_bignum_sm9bn256v1_order;
|
||||
}
|
||||
|
||||
const BIGNUM *SM9_get0_order_minus_one(void)
|
||||
{
|
||||
return &_bignum_sm9bn256v1_order_minus_one;
|
||||
}
|
||||
|
||||
const BIGNUM *SM9_get0_loop_count(void)
|
||||
{
|
||||
return &_bignum_sm9bn256v1_loop;
|
||||
|
||||
@@ -55,16 +55,6 @@
|
||||
#include <openssl/err.h>
|
||||
#include "sm9_lcl.h"
|
||||
|
||||
typedef BIGNUM *fp2_t[2];
|
||||
typedef fp2_t fp4_t[2];
|
||||
typedef fp4_t fp12_t[3];
|
||||
typedef struct point_t {
|
||||
fp2_t X;
|
||||
fp2_t Y;
|
||||
fp2_t Z;
|
||||
} point_t;
|
||||
|
||||
|
||||
|
||||
static int fp2_init(fp2_t a, BN_CTX *ctx)
|
||||
{
|
||||
@@ -421,6 +411,20 @@ static int fp2_div(fp2_t r, const fp2_t a, const fp2_t b, const BIGNUM *p, BN_CT
|
||||
&& fp2_mul(r, a, r, p, ctx);
|
||||
}
|
||||
|
||||
static int fp2_to_bin(const fp2_t a, unsigned char to[64])
|
||||
{
|
||||
memset(to, 0, 64);
|
||||
BN_bn2bin(a[0], to + 32 - BN_num_bytes(a[0]));
|
||||
BN_bn2bin(a[1], to + 64 - BN_num_bytes(a[1]));
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int fp2_from_bin(fp2_t a, const unsigned char from[64])
|
||||
{
|
||||
return BN_bin2bn(from, 32, a[0])
|
||||
&& BN_bin2bn(from + 32, 32, a[1]);
|
||||
}
|
||||
|
||||
static int fp2_test(const BIGNUM *p, BN_CTX *ctx)
|
||||
{
|
||||
const char *_a[] = {
|
||||
@@ -655,6 +659,18 @@ static int fp4_equ_hex(const fp4_t a, const char *str[4], BN_CTX *ctx)
|
||||
return fp4_equ(a, t);
|
||||
}
|
||||
|
||||
static int fp4_to_bin(const fp4_t a, unsigned char to[128])
|
||||
{
|
||||
return fp2_to_bin(a[1], to)
|
||||
&& fp2_to_bin(a[0], to + 64);
|
||||
}
|
||||
|
||||
static int fp4_from_bin(fp4_t a, const unsigned char from[128])
|
||||
{
|
||||
return fp2_from_bin(a[1], from)
|
||||
&& fp2_from_bin(a[0], from + 64);
|
||||
}
|
||||
|
||||
static int fp4_add(fp4_t r, const fp4_t a, const fp4_t b, const BIGNUM *p, BN_CTX *ctx)
|
||||
{
|
||||
return fp2_add(r[0], a[0], b[0], p, ctx)
|
||||
@@ -963,8 +979,7 @@ static int fp4_test(const BIGNUM *p, BN_CTX *ctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int fp12_init(fp12_t a, BN_CTX *ctx)
|
||||
int fp12_init(fp12_t a, BN_CTX *ctx)
|
||||
{
|
||||
int r;
|
||||
r = fp4_init(a[0], ctx);
|
||||
@@ -978,7 +993,7 @@ static int fp12_init(fp12_t a, BN_CTX *ctx)
|
||||
return r;
|
||||
}
|
||||
|
||||
static void fp12_cleanup(fp12_t a)
|
||||
void fp12_cleanup(fp12_t a)
|
||||
{
|
||||
fp4_cleanup(a[0]);
|
||||
fp4_cleanup(a[1]);
|
||||
@@ -1120,6 +1135,20 @@ static int fp12_equ_hex(const fp12_t a, const char *str[12], BN_CTX *ctx)
|
||||
return fp12_equ(a, t);
|
||||
}
|
||||
|
||||
int fp12_to_bin(const fp12_t a, unsigned char to[384])
|
||||
{
|
||||
return fp4_to_bin(a[2], to)
|
||||
&& fp4_to_bin(a[1], to + 128)
|
||||
&& fp4_to_bin(a[0], to + 256);
|
||||
}
|
||||
|
||||
static int fp12_from_bin(fp4_t a, const unsigned char from[384])
|
||||
{
|
||||
return fp4_from_bin(a[2], from)
|
||||
&& fp4_from_bin(a[1], from + 128)
|
||||
&& fp4_from_bin(a[0], from + 256);
|
||||
}
|
||||
|
||||
static int fp12_add(fp12_t r, const fp12_t a, const fp12_t b, const BIGNUM *p, BN_CTX *ctx)
|
||||
{
|
||||
|
||||
@@ -1163,7 +1192,7 @@ static int fp12_neg(fp12_t r, const fp12_t a, const BIGNUM *p, BN_CTX *ctx)
|
||||
&& fp4_neg(r[2], a[2], p, ctx);
|
||||
}
|
||||
|
||||
static int fp12_mul(fp12_t r, const fp12_t a, const fp12_t b, const BIGNUM *p, BN_CTX *ctx)
|
||||
int fp12_mul(fp12_t r, const fp12_t a, const fp12_t b, const BIGNUM *p, BN_CTX *ctx)
|
||||
{
|
||||
fp4_t r0, r1, r2, t;
|
||||
fp4_init(r0, ctx);
|
||||
@@ -1362,7 +1391,7 @@ static int fp12_div(fp12_t r, const fp12_t a, const fp12_t b, const BIGNUM *p, B
|
||||
&& fp12_mul(r, a, r, p, ctx);
|
||||
}
|
||||
|
||||
static int fp12_pow(fp12_t r, const fp12_t a, const BIGNUM *k, const BIGNUM *p, BN_CTX *ctx)
|
||||
int fp12_pow(fp12_t r, const fp12_t a, const BIGNUM *k, const BIGNUM *p, BN_CTX *ctx)
|
||||
{
|
||||
int n, i;
|
||||
fp12_t t;
|
||||
@@ -1680,7 +1709,7 @@ static int fp12_test(const BIGNUM *p, BN_CTX *ctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int point_init(point_t *P, BN_CTX *ctx)
|
||||
int point_init(point_t *P, BN_CTX *ctx)
|
||||
{
|
||||
int r;
|
||||
r = fp2_init(P->X, ctx);
|
||||
@@ -1698,7 +1727,7 @@ static int point_init(point_t *P, BN_CTX *ctx)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void point_cleanup(point_t *P)
|
||||
void point_cleanup(point_t *P)
|
||||
{
|
||||
fp2_cleanup(P->X);
|
||||
fp2_cleanup(P->Y);
|
||||
@@ -1716,42 +1745,42 @@ static void point_print(const point_t *P)
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
static int point_copy(point_t *R, const point_t *P)
|
||||
int point_copy(point_t *R, const point_t *P)
|
||||
{
|
||||
return fp2_copy(R->X, P->X)
|
||||
&& fp2_copy(R->Y, P->Y)
|
||||
&& fp2_copy(R->Z, P->Z);
|
||||
}
|
||||
|
||||
static int point_set_to_infinity(point_t *P)
|
||||
int point_set_to_infinity(point_t *P)
|
||||
{
|
||||
fp2_set_zero(P->X);
|
||||
fp2_set_zero(P->Z);
|
||||
return fp2_set_one(P->Y);
|
||||
}
|
||||
|
||||
static int point_is_at_infinity(const point_t *P)
|
||||
int point_is_at_infinity(const point_t *P)
|
||||
{
|
||||
return fp2_is_zero(P->X)
|
||||
&& fp2_is_one(P->Y)
|
||||
&& fp2_is_zero(P->Z);
|
||||
}
|
||||
|
||||
static int point_equ(const point_t *P, const point_t *Q)
|
||||
int point_equ(const point_t *P, const point_t *Q)
|
||||
{
|
||||
return fp2_equ(P->X, Q->X)
|
||||
&& fp2_equ(P->Y, Q->Y)
|
||||
&& fp2_equ(P->Z, Q->Z);
|
||||
}
|
||||
|
||||
static int point_set_affine_coordinates(point_t *P, const fp2_t x, const fp2_t y)
|
||||
int point_set_affine_coordinates(point_t *P, const fp2_t x, const fp2_t y)
|
||||
{
|
||||
return fp2_copy(P->X, x)
|
||||
&& fp2_copy(P->Y, y)
|
||||
&& fp2_set_one(P->Z);
|
||||
}
|
||||
|
||||
static int point_set_affine_coordinates_hex(point_t *P, const char *str[4])
|
||||
int point_set_affine_coordinates_hex(point_t *P, const char *str[4])
|
||||
{
|
||||
fp2_set_hex(P->X, str);
|
||||
fp2_set_hex(P->Y, str + 2);
|
||||
@@ -1767,7 +1796,7 @@ static int point_equ_hex(const point_t *P, const char *str[4], BN_CTX *ctx)
|
||||
return point_equ(P, &T);
|
||||
}
|
||||
|
||||
static int point_set_affine_coordinates_bignums(point_t *P,
|
||||
int point_set_affine_coordinates_bignums(point_t *P,
|
||||
const BIGNUM *x0, const BIGNUM *x1, const BIGNUM *y0, const BIGNUM *y1)
|
||||
{
|
||||
return fp2_set(P->X, x0, x1)
|
||||
@@ -1775,14 +1804,14 @@ static int point_set_affine_coordinates_bignums(point_t *P,
|
||||
&& fp2_set_one(P->Z);
|
||||
}
|
||||
|
||||
static int point_get_affine_coordinates(const point_t *P, fp2_t x, fp2_t y)
|
||||
int point_get_affine_coordinates(const point_t *P, fp2_t x, fp2_t y)
|
||||
{
|
||||
return fp2_copy(x, P->X)
|
||||
&& fp2_copy(y, P->Y)
|
||||
&& fp2_is_one(P->Z);
|
||||
}
|
||||
|
||||
static int point_get_ext_affine_coordinates(const point_t *P, fp12_t x, fp12_t y, const BIGNUM *p, BN_CTX *ctx)
|
||||
int point_get_ext_affine_coordinates(const point_t *P, fp12_t x, fp12_t y, const BIGNUM *p, BN_CTX *ctx)
|
||||
{
|
||||
int r;
|
||||
fp2_t xP;
|
||||
@@ -1825,7 +1854,7 @@ end:
|
||||
return r;
|
||||
}
|
||||
|
||||
static int point_set_ext_affine_coordinates(point_t *P, const fp12_t x, const fp12_t y, const BIGNUM *p, BN_CTX *ctx)
|
||||
int point_set_ext_affine_coordinates(point_t *P, const fp12_t x, const fp12_t y, const BIGNUM *p, BN_CTX *ctx)
|
||||
{
|
||||
fp12_t tx;
|
||||
fp12_t ty;
|
||||
@@ -1845,7 +1874,7 @@ static int point_set_ext_affine_coordinates(point_t *P, const fp12_t x, const fp
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int point_is_on_curve(point_t *P, const BIGNUM *p, BN_CTX *ctx)
|
||||
int point_is_on_curve(point_t *P, const BIGNUM *p, BN_CTX *ctx)
|
||||
{
|
||||
int r;
|
||||
fp2_t x, y, b, t;
|
||||
@@ -1879,7 +1908,39 @@ end:
|
||||
return r;
|
||||
}
|
||||
|
||||
static int point_dbl(point_t *R, const point_t *P, const BIGNUM *p, BN_CTX *ctx)
|
||||
int point_to_octets(const point_t *P, unsigned char to[129], BN_CTX *ctx)
|
||||
{
|
||||
to[0] = 0x04;
|
||||
|
||||
if (fp2_is_one(P->Z)) {
|
||||
fp2_to_bin(P->X, to + 1);
|
||||
fp2_to_bin(P->Y, to + 65);
|
||||
} else {
|
||||
fp2_t x, y;
|
||||
fp2_init(x, ctx);
|
||||
fp2_init(y, ctx);
|
||||
point_get_affine_coordinates(P, x, y);
|
||||
|
||||
fp2_to_bin(x, to + 1);
|
||||
fp2_to_bin(y, to + 65);
|
||||
fp2_cleanup(x);
|
||||
fp2_cleanup(y);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int point_from_octets(point_t *P, const unsigned char from[129], const BIGNUM *p, BN_CTX *ctx)
|
||||
{
|
||||
if (from[0] != 0x04) {
|
||||
return 0;
|
||||
}
|
||||
fp2_from_bin(P->X, from + 1);
|
||||
fp2_from_bin(P->Y, from + 65);
|
||||
fp2_set_one(P->Z);
|
||||
return point_is_on_curve(P, p, ctx);
|
||||
}
|
||||
|
||||
int point_dbl(point_t *R, const point_t *P, const BIGNUM *p, BN_CTX *ctx)
|
||||
{
|
||||
int r;
|
||||
fp2_t x3, y3, x1, y1, lambda, t;
|
||||
@@ -1933,7 +1994,7 @@ end:
|
||||
return r;
|
||||
}
|
||||
|
||||
static int point_add(point_t *R, const point_t *P, const point_t *Q, const BIGNUM *p, BN_CTX *ctx)
|
||||
int point_add(point_t *R, const point_t *P, const point_t *Q, const BIGNUM *p, BN_CTX *ctx)
|
||||
{
|
||||
int r;
|
||||
fp2_t x1;
|
||||
@@ -2016,14 +2077,14 @@ end:
|
||||
return r;
|
||||
}
|
||||
|
||||
static int point_neg(point_t *R, const point_t *P, const BIGNUM *p, BN_CTX *ctx)
|
||||
int point_neg(point_t *R, const point_t *P, const BIGNUM *p, BN_CTX *ctx)
|
||||
{
|
||||
return fp2_copy(R->X, P->X)
|
||||
&& fp2_neg(R->Y, P->Y, p, ctx)
|
||||
&& fp2_copy(R->Z, P->Z);
|
||||
}
|
||||
|
||||
static int point_sub(point_t *R, const point_t *P, const point_t *Q, const BIGNUM *p, BN_CTX *ctx)
|
||||
int point_sub(point_t *R, const point_t *P, const point_t *Q, const BIGNUM *p, BN_CTX *ctx)
|
||||
{
|
||||
point_t T;
|
||||
|
||||
@@ -2038,7 +2099,7 @@ static int point_sub(point_t *R, const point_t *P, const point_t *Q, const BIGNU
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int point_mul(point_t *R, const BIGNUM *k, const point_t *P, const BIGNUM *p, BN_CTX *ctx)
|
||||
int point_mul(point_t *R, const BIGNUM *k, const point_t *P, const BIGNUM *p, BN_CTX *ctx)
|
||||
{
|
||||
int i, n;
|
||||
|
||||
@@ -2065,7 +2126,7 @@ static int point_mul(point_t *R, const BIGNUM *k, const point_t *P, const BIGNUM
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int point_mul_generator(point_t *R, const BIGNUM *k, const BIGNUM *p, BN_CTX *ctx)
|
||||
int point_mul_generator(point_t *R, const BIGNUM *k, const BIGNUM *p, BN_CTX *ctx)
|
||||
{
|
||||
point_t G;
|
||||
|
||||
@@ -2435,7 +2496,7 @@ static int params_test(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int sm9_rate(fp12_t r, const point_t *Q, const EC_POINT *P, BN_CTX *ctx)
|
||||
int rate_pairing(fp12_t r, const point_t *Q, const EC_POINT *P, BN_CTX *ctx)
|
||||
{
|
||||
int ret = 1;
|
||||
const EC_GROUP *group;
|
||||
@@ -2499,7 +2560,7 @@ static int rate_test(void)
|
||||
point_set_affine_coordinates_hex(&Ppubs, Ppubs_str);
|
||||
|
||||
fp12_init(g, ctx);
|
||||
sm9_rate(g, &Ppubs, P1, ctx);
|
||||
rate_pairing(g, &Ppubs, P1, ctx);
|
||||
|
||||
ok = fp12_equ_hex(g, g_str, ctx);
|
||||
printf("rate %d: %s\n", __LINE__, ok ? "ok" : "error");
|
||||
@@ -2512,9 +2573,10 @@ static int rate_test(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* for SM9 sign, the (xP, yP) is the fixed generator of E(Fp)
|
||||
*/
|
||||
int SM9_rate_pairing(BIGNUM *r[12], const BIGNUM *xQ[2], const BIGNUM *yQ[2],
|
||||
const BIGNUM *xP, const BIGNUM *yP, BN_CTX *ctx)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,175 +48,193 @@
|
||||
*/
|
||||
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/sm9.h>
|
||||
#include "sm9_lcl.h"
|
||||
|
||||
//TODO: `hid` should be add to arguments
|
||||
int SM9_setup_type1curve(const EC_GROUP *group, const EVP_MD *md,
|
||||
SM9PublicParameters **pmpk, SM9MasterSecret **pmsk)
|
||||
SM9MasterSecret *SM9_generate_master_secret(int pairing, int scheme, int hash1)
|
||||
{
|
||||
int ret = 0;
|
||||
SM9PublicParameters *mpk = NULL;
|
||||
SM9MasterSecret *ret = NULL;
|
||||
SM9MasterSecret *msk = NULL;
|
||||
BN_CTX *bn_ctx = NULL;
|
||||
EC_POINT *point = NULL;
|
||||
BN_CTX *ctx = NULL;
|
||||
const BIGNUM *n = SM9_get0_order();
|
||||
const BIGNUM *p = SM9_get0_prime();
|
||||
int point_form = POINT_CONVERSION_UNCOMPRESSED;
|
||||
size_t size;
|
||||
unsigned char buf[129];
|
||||
size_t len = sizeof(buf);
|
||||
|
||||
if (!group || !pmpk || !pmsk) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, ERR_R_PASSED_NULL_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* BN_CTX */
|
||||
if (!(bn_ctx = BN_CTX_new())) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, ERR_R_MALLOC_FAILURE);
|
||||
if (!(msk = SM9MasterSecret_new())
|
||||
|| !(ctx = BN_CTX_new())) {
|
||||
SM9err(SM9_F_SM9_GENERATE_MASTER_SECRET, ERR_R_MALLOC_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
BN_CTX_start(ctx);
|
||||
|
||||
mpk = SM9PublicParameters_new();
|
||||
msk = SM9MasterSecret_new();
|
||||
point = EC_POINT_new(group);
|
||||
|
||||
if (!mpk || !msk || !point) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, ERR_R_MALLOC_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* set mpk->curve */
|
||||
OPENSSL_assert(mpk->curve);
|
||||
ASN1_OBJECT_free(mpk->curve);
|
||||
if (!(mpk->curve = OBJ_nid2obj(NID_type1curve))) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, SM9_R_NOT_NAMED_CURVE);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* mpk->p = group->p
|
||||
* mpk->a = group->a
|
||||
* mpk->b = group->b
|
||||
*/
|
||||
if (!EC_GROUP_get_curve_GFp(group, mpk->p, mpk->a, mpk->b, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, ERR_R_EC_LIB);
|
||||
goto end;
|
||||
}
|
||||
if (!BN_is_zero(mpk->a) || !BN_is_one(mpk->b)) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, SM9_R_INVALID_TYPE1CURVE);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* mpk->beta = 0 */
|
||||
BN_zero(mpk->beta);
|
||||
|
||||
/* mpk->order = group->order */
|
||||
if (!EC_GROUP_get_order(group, mpk->order, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, SM9_R_INVALID_TYPE1CURVE);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* mpk->cofactor = group->cofactor */
|
||||
if (!EC_GROUP_get_cofactor(group, mpk->cofactor, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, SM9_R_INVALID_TYPE1CURVE);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* mpk->k = 2 */
|
||||
if (!BN_set_word(mpk->k, 2)) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, ERR_R_BN_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* mpk->pointP1 = group->generator
|
||||
* mpk->pointP2 = group->generator
|
||||
*/
|
||||
if (!(size = EC_POINT_point2oct(group, EC_GROUP_get0_generator(group),
|
||||
point_form, NULL, 0, bn_ctx))) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, ERR_R_EC_LIB);
|
||||
goto end;
|
||||
}
|
||||
if (!ASN1_OCTET_STRING_set(mpk->pointP1, NULL, size)) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, ERR_R_MALLOC_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
if (!EC_POINT_point2oct(group, EC_GROUP_get0_generator(group),
|
||||
point_form, mpk->pointP1->data, mpk->pointP1->length, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, ERR_R_EC_LIB);
|
||||
goto end;
|
||||
}
|
||||
if (!ASN1_OCTET_STRING_set(mpk->pointP2,
|
||||
mpk->pointP1->data, mpk->pointP1->length)) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, ERR_R_MALLOC_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* mpk->pairing = "tate" */
|
||||
ASN1_OBJECT_free(mpk->pairing);
|
||||
if (!(mpk->pairing = OBJ_nid2obj(NID_tate_pairing))) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, SM9_R_PARSE_PAIRING);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* set mpk->hashfcn */
|
||||
OPENSSL_assert(mpk->hashfcn);
|
||||
ASN1_OBJECT_free(mpk->hashfcn);
|
||||
if (!(mpk->hashfcn = OBJ_nid2obj(EVP_MD_type(md)))) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, SM9_R_PARSE_PAIRING);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* set mpk->g1 = e(P1, Ppub) */
|
||||
//TODO
|
||||
|
||||
/* set mpk->g2 = e(Ppub, P2) */
|
||||
//TODO
|
||||
|
||||
/* random msk->masterSecret in [2, mpk->order - 1] */
|
||||
do {
|
||||
if (!BN_rand_range(msk->masterSecret, mpk->order)) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, ERR_R_BN_LIB);
|
||||
/* set pairing type */
|
||||
switch (pairing) {
|
||||
case NID_sm9bn256v1:
|
||||
ASN1_OBJECT_free(msk->pairing);
|
||||
if (!(msk->pairing = OBJ_nid2obj(pairing))) {
|
||||
SM9err(SM9_F_SM9_GENERATE_MASTER_SECRET, ERR_R_OBJ_LIB);
|
||||
goto end;
|
||||
}
|
||||
} while (BN_is_zero(msk->masterSecret) || BN_is_one(msk->masterSecret));
|
||||
|
||||
/* mpk->pointPpub = msk->masterSecret * mpk->pointP */
|
||||
if (!EC_POINT_mul(group, point, msk->masterSecret,
|
||||
NULL, NULL, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, ERR_R_EC_LIB);
|
||||
goto end;
|
||||
}
|
||||
if (!(size = EC_POINT_point2oct(group, point, point_form,
|
||||
NULL, 0, bn_ctx))) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, ERR_R_EC_LIB);
|
||||
goto end;
|
||||
}
|
||||
if (!ASN1_OCTET_STRING_set(mpk->pointPpub, NULL, size)) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, ERR_R_MALLOC_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
if (!EC_POINT_point2oct(group, point, point_form,
|
||||
mpk->pointPpub->data, mpk->pointPpub->length, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_SETUP_TYPE1CURVE, ERR_R_EC_LIB);
|
||||
break;
|
||||
default:
|
||||
SM9err(SM9_F_SM9_GENERATE_MASTER_SECRET, SM9_R_INVALID_PAIRING_TYPE);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* set return value */
|
||||
*pmpk = mpk;
|
||||
*pmsk = msk;
|
||||
ret = 1;
|
||||
/* set helper functions */
|
||||
switch (scheme) {
|
||||
case NID_sm9sign:
|
||||
case NID_sm9encrypt:
|
||||
case NID_sm9keyagreement:
|
||||
ASN1_OBJECT_free(msk->scheme);
|
||||
if (!(msk->scheme = OBJ_nid2obj(scheme))) {
|
||||
SM9err(SM9_F_SM9_GENERATE_MASTER_SECRET, ERR_R_OBJ_LIB);
|
||||
goto end;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
SM9err(SM9_F_SM9_GENERATE_MASTER_SECRET, SM9_R_INVALID_SCHEME);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* set hash1 */
|
||||
switch (hash1) {
|
||||
case NID_sm9hash1_with_sm3:
|
||||
case NID_sm9hash1_with_sha256:
|
||||
ASN1_OBJECT_free(msk->hash1);
|
||||
if (!(msk->hash1 = OBJ_nid2obj(hash1))) {
|
||||
SM9err(SM9_F_SM9_GENERATE_MASTER_SECRET, ERR_R_OBJ_LIB);
|
||||
goto end;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
SM9err(SM9_F_SM9_GENERATE_MASTER_SECRET, SM9_R_INVALID_HASH1);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* generate master secret k = rand(1, n - 1) */
|
||||
do {
|
||||
if (!BN_rand_range(msk->masterSecret, n)) {
|
||||
return 0;
|
||||
}
|
||||
} while (BN_is_zero(msk->masterSecret));
|
||||
|
||||
/* generate master public point */
|
||||
if (scheme == NID_sm9sign) {
|
||||
|
||||
/* Ppubs = k * P2 in E'(F_p^2) */
|
||||
point_t Ppubs;
|
||||
|
||||
if (!point_init(&Ppubs, ctx)
|
||||
|| !point_mul_generator(&Ppubs, msk->masterSecret, p, ctx)
|
||||
|| !point_to_octets(&Ppubs, buf, ctx)) {
|
||||
SM9err(SM9_F_SM9_GENERATE_MASTER_SECRET, SM9_R_TWIST_CURVE_ERROR);
|
||||
point_cleanup(&Ppubs);
|
||||
goto end;
|
||||
}
|
||||
|
||||
len = 129;
|
||||
point_cleanup(&Ppubs);
|
||||
|
||||
} else if (scheme == NID_sm9keyagreement
|
||||
|| scheme == NID_sm9encrypt) {
|
||||
|
||||
/* Ppube = k * P1 in E(F_p) */
|
||||
EC_GROUP *group = NULL;
|
||||
EC_POINT *Ppube = NULL;
|
||||
|
||||
if (!(group = EC_GROUP_new_by_curve_name(NID_sm9bn256v1))
|
||||
|| !(Ppube = EC_POINT_new(group))
|
||||
|| !EC_POINT_mul(group, Ppube, msk->masterSecret, NULL, NULL, ctx)
|
||||
|| !(len = EC_POINT_point2oct(group, Ppube, point_form, buf, len, ctx))) {
|
||||
SM9err(SM9_F_SM9_GENERATE_MASTER_SECRET, SM9_R_EC_LIB);
|
||||
EC_GROUP_free(group);
|
||||
EC_POINT_free(Ppube);
|
||||
goto end;
|
||||
}
|
||||
|
||||
EC_GROUP_free(group);
|
||||
EC_POINT_free(Ppube);
|
||||
|
||||
} else {
|
||||
SM9err(SM9_F_SM9_GENERATE_MASTER_SECRET, SM9_R_INVALID_SCHEME);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!ASN1_OCTET_STRING_set(msk->pointPpub, buf, (int)len)) {
|
||||
ERR_print_errors_fp(stderr);
|
||||
goto end;
|
||||
}
|
||||
|
||||
ret = msk;
|
||||
msk = NULL;
|
||||
|
||||
end:
|
||||
if (!ret) {
|
||||
SM9PublicParameters_free(mpk);
|
||||
SM9MasterSecret_free(msk);
|
||||
*pmpk = NULL;
|
||||
*pmsk = NULL;
|
||||
SM9MasterSecret_free(msk);
|
||||
if (ctx) {
|
||||
BN_CTX_end(ctx);
|
||||
}
|
||||
BN_CTX_free(bn_ctx);
|
||||
EC_POINT_free(point);
|
||||
BN_CTX_free(ctx);
|
||||
OPENSSL_cleanse(buf, sizeof(buf));
|
||||
return ret;
|
||||
}
|
||||
|
||||
int SM9_setup_by_pairing_name(int nid, int hid,
|
||||
SM9PublicParameters **mpk, SM9MasterSecret **msk)
|
||||
SM9PublicParameters *SM9_extract_public_parameters(SM9MasterSecret *msk)
|
||||
{
|
||||
return 0;
|
||||
SM9PublicParameters *ret = NULL;
|
||||
SM9PublicParameters *mpk = NULL;
|
||||
|
||||
if (!(mpk = SM9PublicParameters_new())) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PUBLIC_PARAMETERS, ERR_R_MALLOC_FAILURE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ASN1_OBJECT_free(mpk->pairing);
|
||||
ASN1_OBJECT_free(mpk->scheme);
|
||||
ASN1_OBJECT_free(mpk->hash1);
|
||||
mpk->pairing = NULL;
|
||||
mpk->scheme = NULL;
|
||||
mpk->hash1 = NULL;
|
||||
|
||||
if (!(mpk->pairing = OBJ_dup(msk->pairing))
|
||||
|| !(mpk->scheme = OBJ_dup(msk->scheme))
|
||||
|| !(mpk->hash1 = OBJ_dup(msk->hash1))
|
||||
|| !ASN1_STRING_copy(mpk->pointPpub, msk->pointPpub)) {
|
||||
SM9err(SM9_F_SM9_EXTRACT_PUBLIC_PARAMETERS, ERR_R_MALLOC_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
|
||||
ret = mpk;
|
||||
mpk = NULL;
|
||||
|
||||
end:
|
||||
SM9PublicParameters_free(mpk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int SM9_setup(int pairing, int scheme, int hash1,
|
||||
SM9PublicParameters **pmpk, SM9MasterSecret **pmsk)
|
||||
{
|
||||
int ret = 0;
|
||||
SM9MasterSecret *msk = NULL;
|
||||
SM9PublicParameters *mpk = NULL;
|
||||
|
||||
if (!(msk = SM9_generate_master_secret(pairing, scheme, hash1))
|
||||
|| !(mpk = SM9_extract_public_parameters(msk))) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
*pmsk = msk;
|
||||
*pmpk = mpk;
|
||||
msk = NULL;
|
||||
mpk = NULL;
|
||||
ret = 1;
|
||||
|
||||
end:
|
||||
SM9MasterSecret_free(msk);
|
||||
SM9PublicParameters_free(mpk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -55,480 +55,387 @@
|
||||
#include <openssl/bn_gfp2.h>
|
||||
#include "sm9_lcl.h"
|
||||
|
||||
|
||||
int SM9_signature_size(SM9PublicParameters *mpk)
|
||||
{
|
||||
return 0;
|
||||
return 105;
|
||||
}
|
||||
|
||||
static SM9Signature *SM9_do_sign_type1curve(SM9PublicParameters *mpk,
|
||||
const unsigned char *dgst, size_t dgstlen, SM9PrivateKey *sk)
|
||||
int SM9_SignInit(EVP_MD_CTX *ctx, const EVP_MD *md, ENGINE *eng)
|
||||
{
|
||||
unsigned char prefix = 0x02;
|
||||
|
||||
if (!EVP_DigestInit_ex(ctx, md, eng)) {
|
||||
SM9err(SM9_F_SM9_SIGNINIT, ERR_R_EVP_LIB);
|
||||
return 0;
|
||||
}
|
||||
if (!EVP_DigestUpdate(ctx, &prefix, 1)) {
|
||||
SM9err(SM9_F_SM9_SIGNINIT, ERR_R_EVP_LIB);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
SM9Signature *SM9_SignFinal(EVP_MD_CTX *ctx1, SM9PrivateKey *sk)
|
||||
{
|
||||
int e = 1;
|
||||
SM9Signature *ret = NULL;
|
||||
BN_CTX *bn_ctx = NULL;
|
||||
SM9Signature *sig = NULL;
|
||||
const BIGNUM *p = SM9_get0_prime();
|
||||
const BIGNUM *n = SM9_get0_order();
|
||||
int point_form = POINT_CONVERSION_COMPRESSED;
|
||||
/* buf for w and prefix zeros of ct1/2 */
|
||||
unsigned char buf[387] = {0};
|
||||
unsigned int len;
|
||||
const unsigned char ct1 = 0x01;
|
||||
const unsigned char ct2 = 0x02;
|
||||
EVP_MD_CTX *ctx2 = NULL;
|
||||
EC_GROUP *group = NULL;
|
||||
EC_POINT *point = NULL;
|
||||
BN_GFP2 *w = NULL;
|
||||
unsigned char *buf = NULL;
|
||||
BIGNUM *r;
|
||||
BIGNUM *l;
|
||||
const EVP_MD *md;
|
||||
int point_form = POINT_CONVERSION_UNCOMPRESSED;
|
||||
size_t size;
|
||||
EC_POINT *S = NULL;
|
||||
BN_CTX *bn_ctx = NULL;
|
||||
BIGNUM *r = NULL;
|
||||
point_t Ppubs;
|
||||
fp12_t w;
|
||||
|
||||
if (!mpk || !dgst || dgstlen <= 0 || !sk) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE,
|
||||
ERR_R_PASSED_NULL_PARAMETER);
|
||||
return NULL;
|
||||
}
|
||||
if (dgstlen > EVP_MAX_MD_SIZE) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE,
|
||||
SM9_R_INVALID_DIGEST);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* BN_CTX */
|
||||
if (!(bn_ctx = BN_CTX_new())) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE,
|
||||
ERR_R_MALLOC_FAILURE);
|
||||
if (!(sig = SM9Signature_new())
|
||||
|| !(ctx2 = EVP_MD_CTX_new())
|
||||
|| !(group = EC_GROUP_new_by_curve_name(NID_sm9bn256v1))
|
||||
|| !(S = EC_POINT_new(group))
|
||||
|| !(bn_ctx = BN_CTX_new())) {
|
||||
SM9err(SM9_F_SM9_SIGNFINAL, ERR_R_MALLOC_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
BN_CTX_start(bn_ctx);
|
||||
|
||||
/* EC_GROUP */
|
||||
if (!(group = EC_GROUP_new_type1curve_ex(mpk->p,
|
||||
mpk->a, mpk->b, mpk->pointP1->data, mpk->pointP1->length,
|
||||
mpk->order, mpk->cofactor, bn_ctx))) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE, SM9_R_INVALID_TYPE1CURVE);
|
||||
if (!(r = BN_CTX_get(bn_ctx))
|
||||
|| !fp12_init(w, bn_ctx)
|
||||
|| !point_init(&Ppubs, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_SIGNFINAL, ERR_R_MALLOC_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* malloc */
|
||||
ret = SM9Signature_new();
|
||||
point = EC_POINT_new(group);
|
||||
r = BN_CTX_get(bn_ctx);
|
||||
l = BN_CTX_get(bn_ctx);
|
||||
|
||||
if (!ret || !point || !r || !l) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE, ERR_R_MALLOC_FAILURE);
|
||||
/* get Ppubs */
|
||||
if (ASN1_STRING_length(sk->pointPpub) != 129
|
||||
|| !point_from_octets(&Ppubs, ASN1_STRING_get0_data(sk->pointPpub), p, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_SIGNFINAL, SM9_R_INVALID_POINTPPUB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* md = mpk->hashfcn */
|
||||
if (!(md = EVP_get_digestbyobj(mpk->hashfcn))) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE, SM9_R_INVALID_MD);
|
||||
/* g = e(P1, Ppubs) */
|
||||
if (!rate_pairing(w, &Ppubs, EC_GROUP_get0_generator(group), bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_SIGNFINAL, SM9_R_PAIRING_ERROR);
|
||||
goto end;
|
||||
}
|
||||
|
||||
do {
|
||||
/* rand r in [1, mpk->order - 1] */
|
||||
/* r = rand(1, n - 1) */
|
||||
do {
|
||||
if (!BN_rand_range(r, mpk->order)) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE, ERR_R_BN_LIB);
|
||||
if (!BN_rand_range(r, n)) {
|
||||
SM9err(SM9_F_SM9_SIGNFINAL, ERR_R_BN_LIB);
|
||||
goto end;
|
||||
}
|
||||
} while (BN_is_zero(r));
|
||||
|
||||
/* get w = mpk->g = e(mpk->pointP1, mpk->pointPpub) */
|
||||
if (!BN_bn2gfp2(mpk->g1, w, mpk->p, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE, ERR_R_BN_LIB);
|
||||
/* w = g^r */
|
||||
if (!fp12_pow(w, w, r, p, bn_ctx)
|
||||
|| !fp12_to_bin(w, buf)) {
|
||||
SM9err(SM9_F_SM9_SIGNFINAL, SM9_R_EXTENSION_FIELD_ERROR);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* w = w^r = (mpk->g)^r in F_p^2 */
|
||||
if (!BN_GFP2_exp(w, w, r, mpk->p, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE, ERR_R_BN_LIB);
|
||||
if (!EVP_DigestUpdate(ctx1, buf, sizeof(buf))
|
||||
|| !EVP_MD_CTX_copy(ctx2, ctx1)
|
||||
/* Ha1 = Hv(0x02||M||w||0x00000001) */
|
||||
|| !EVP_DigestUpdate(ctx1, &ct1, 1)
|
||||
|| !EVP_DigestFinal_ex(ctx1, buf, &len)
|
||||
/* Ha2 = Hv(0x02||M||w||0x00000002) */
|
||||
|| !EVP_DigestUpdate(ctx2, &ct2, 1)
|
||||
|| !EVP_DigestFinal_ex(ctx2, buf + len, &len)) {
|
||||
SM9err(SM9_F_SM9_SIGNFINAL, SM9_R_DIGEST_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* prepare w buf and canonical(w, order=0) */
|
||||
if (!BN_GFP2_canonical(w, NULL, &size, 0, mpk->p, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE, ERR_R_BN_LIB);
|
||||
goto end;
|
||||
}
|
||||
if (!(buf = OPENSSL_malloc(size))) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE, ERR_R_MALLOC_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
if (!BN_GFP2_canonical(w, buf, &size, 0, mpk->p, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE, ERR_R_BN_LIB);
|
||||
/* Ha = Ha1||Ha2[0..7] */
|
||||
if (!BN_bin2bn(buf, 40, sig->h)
|
||||
/* h = (Ha mod (n - 1)) + 1 */
|
||||
|| !BN_mod(sig->h, sig->h, SM9_get0_order_minus_one(), bn_ctx)
|
||||
|| !BN_add_word(sig->h, 1)
|
||||
/* l = r - h */
|
||||
|| !BN_mod_sub(r, r, sig->h, p, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_SIGNFINAL, ERR_R_BN_LIB);
|
||||
goto end;
|
||||
}
|
||||
} while (BN_is_zero(r));
|
||||
|
||||
/* ret->h = H2(H(m)||w) in range defined by mpk->order */
|
||||
if (!SM9_hash2(md, &ret->h, dgst, dgstlen, buf, size, mpk->order, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE, ERR_R_SM9_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* l = (r - ret->h) (mod mpk->order) */
|
||||
if (!BN_mod_sub(l, r, ret->h, mpk->order, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE, ERR_R_BN_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* if l == 0, re-generate r */
|
||||
} while (BN_is_zero(l));
|
||||
|
||||
/* point = sk->prointPoint */
|
||||
if (!EC_POINT_oct2point(group, point,
|
||||
sk->privatePoint->data, sk->privatePoint->length, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE, ERR_R_EC_LIB);
|
||||
/* get sk */
|
||||
if (!EC_POINT_oct2point(group, S, ASN1_STRING_get0_data(sk->privatePoint),
|
||||
ASN1_STRING_length(sk->privatePoint), bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_SIGNFINAL, SM9_R_INVALID_PRIVATE_POINT);
|
||||
goto end;
|
||||
}
|
||||
/* S = l * sk */
|
||||
len = sizeof(buf);
|
||||
if (!EC_POINT_mul(group, S, NULL, S, r, bn_ctx)
|
||||
|| !(len = EC_POINT_point2oct(group, S, point_form, buf, len, bn_ctx))
|
||||
|| !ASN1_OCTET_STRING_set(sig->pointS, buf, len)) {
|
||||
SM9err(SM9_F_SM9_SIGNFINAL, ERR_R_EC_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* sig->pointS = sk->privatePoint * l */
|
||||
if (!EC_POINT_mul(group, point, NULL, point, l, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE, ERR_R_EC_LIB);
|
||||
goto end;
|
||||
}
|
||||
if (!(size = EC_POINT_point2oct(group, point, point_form,
|
||||
NULL, 0, bn_ctx))) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE, ERR_R_EC_LIB);
|
||||
goto end;
|
||||
}
|
||||
if (!ASN1_OCTET_STRING_set(ret->pointS, NULL, size)) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN_TYPE1CURVE, ERR_R_EC_LIB);
|
||||
goto end;
|
||||
}
|
||||
if (!EC_POINT_point2oct(group, point, point_form,
|
||||
ret->pointS->data, ret->pointS->length, bn_ctx)) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
e = 0;
|
||||
ret = sig;
|
||||
sig = NULL;
|
||||
|
||||
end:
|
||||
if (e && ret) {
|
||||
SM9Signature_free(ret);
|
||||
ret = NULL;
|
||||
}
|
||||
if (bn_ctx) {
|
||||
BN_CTX_end(bn_ctx);
|
||||
}
|
||||
BN_CTX_free(bn_ctx);
|
||||
SM9Signature_free(sig);
|
||||
EVP_MD_CTX_free(ctx2);
|
||||
EC_GROUP_free(group);
|
||||
EC_POINT_free(point);
|
||||
BN_GFP2_free(w);
|
||||
OPENSSL_free(buf);
|
||||
EC_POINT_free(S);
|
||||
BN_free(r);
|
||||
point_cleanup(&Ppubs);
|
||||
fp12_cleanup(w);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int SM9_VerifyInit(EVP_MD_CTX *ctx, const EVP_MD *md, ENGINE *eng)
|
||||
{
|
||||
unsigned char prefix = 0x02;
|
||||
|
||||
if (!EVP_DigestInit_ex(ctx, md, eng)) {
|
||||
SM9err(SM9_F_SM9_VERIFYINIT, ERR_R_EVP_LIB);
|
||||
return 0;
|
||||
}
|
||||
if (!EVP_DigestUpdate(ctx, &prefix, 1)) {
|
||||
SM9err(SM9_F_SM9_VERIFYINIT, ERR_R_EVP_LIB);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const EVP_MD *sm9hash1_to_md(const ASN1_OBJECT *hash1obj)
|
||||
{
|
||||
switch (OBJ_obj2nid(hash1obj)) {
|
||||
case NID_sm9hash1_with_sm3:
|
||||
return EVP_sm3();
|
||||
case NID_sm9hash1_with_sha256:
|
||||
return EVP_sha256();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SM9Signature *SM9_do_sign(SM9PublicParameters *mpk,
|
||||
const unsigned char *dgst, size_t dgstlen,
|
||||
SM9PrivateKey *sk)
|
||||
int SM9_VerifyFinal(EVP_MD_CTX *ctx1, const SM9Signature *sig, SM9PublicKey *pk)
|
||||
{
|
||||
if (!mpk || !dgst || dgstlen <= 0 || !sk) {
|
||||
SM9err(SM9_F_SM9_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (OBJ_obj2nid(mpk->curve) == NID_type1curve) {
|
||||
return SM9_do_sign_type1curve(mpk, dgst, dgstlen, sk);
|
||||
}
|
||||
|
||||
SM9err(SM9_F_SM9_DO_SIGN, SM9_R_INVALID_CURVE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int SM9_do_verify_type1curve_ex(SM9PublicParameters *mpk,
|
||||
const unsigned char *dgst, size_t dgstlen,
|
||||
const SM9Signature *sig, SM9PublicKey *pk)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int SM9_do_verify_type1curve(SM9PublicParameters *mpk,
|
||||
const unsigned char *dgst, size_t dgstlen,
|
||||
const SM9Signature *sig, const char *id, size_t idlen)
|
||||
{
|
||||
int ret = 0;
|
||||
BN_CTX *bn_ctx = NULL;
|
||||
EC_GROUP *group = NULL;
|
||||
EC_POINT *point = NULL;
|
||||
EC_POINT *pointS = NULL;
|
||||
EC_POINT *Ppub = NULL;
|
||||
BN_GFP2 *t = NULL;
|
||||
BN_GFP2 *u = NULL;
|
||||
BN_GFP2 *w = NULL;
|
||||
unsigned char *buf = NULL;
|
||||
BIGNUM *h1;
|
||||
BIGNUM *h2;
|
||||
size_t size;
|
||||
int ret = -1;
|
||||
const BIGNUM *p = SM9_get0_prime();
|
||||
const BIGNUM *n = SM9_get0_order();
|
||||
const EVP_MD *md;
|
||||
unsigned char buf[387] = {0};
|
||||
unsigned int len;
|
||||
const unsigned char ct1 = 0x01;
|
||||
const unsigned char ct2 = 0x02;
|
||||
EVP_MD_CTX *ctx2 = NULL;
|
||||
EC_GROUP *group = NULL;
|
||||
EC_POINT *S = NULL;
|
||||
BN_CTX *bn_ctx = NULL;
|
||||
BIGNUM *h = NULL;
|
||||
point_t Ppubs;
|
||||
point_t P;
|
||||
fp12_t w;
|
||||
fp12_t u;
|
||||
|
||||
if (!mpk || !dgst || dgstlen <= 0 || !sig || !id || idlen <= 0) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, ERR_R_PASSED_NULL_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
if (dgstlen > EVP_MAX_MD_SIZE) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, SM9_R_INVALID_DIGEST);
|
||||
return 0;
|
||||
}
|
||||
if (idlen > SM9_MAX_ID_LENGTH) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, SM9_R_INVALID_ID);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* BN_CTX */
|
||||
if (!(bn_ctx = BN_CTX_new())) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, ERR_R_MALLOC_FAILURE);
|
||||
if (!(ctx2 = EVP_MD_CTX_new())
|
||||
|| !(group = EC_GROUP_new_by_curve_name(NID_sm9bn256v1))
|
||||
|| !(S = EC_POINT_new(group))
|
||||
|| !(bn_ctx = BN_CTX_new())) {
|
||||
SM9err(SM9_F_SM9_VERIFYFINAL, ERR_R_MALLOC_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
BN_CTX_start(bn_ctx);
|
||||
|
||||
/* EC_GROUP */
|
||||
if (!(group = EC_GROUP_new_type1curve_ex(mpk->p,
|
||||
mpk->a, mpk->b, mpk->pointP1->data, mpk->pointP1->length,
|
||||
mpk->order, mpk->cofactor, bn_ctx))) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, SM9_R_INVALID_TYPE1CURVE);
|
||||
if (!(h = BN_CTX_get(bn_ctx))
|
||||
|| !point_init(&Ppubs, bn_ctx)
|
||||
|| !point_init(&P, bn_ctx)
|
||||
|| !fp12_init(w, bn_ctx)
|
||||
|| !fp12_init(u, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_VERIFYFINAL, ERR_R_MALLOC_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* malloc */
|
||||
point = EC_POINT_new(group);
|
||||
pointS = EC_POINT_new(group);
|
||||
Ppub = EC_POINT_new(group);
|
||||
t = BN_GFP2_new();
|
||||
u = BN_GFP2_new();
|
||||
w = BN_GFP2_new();
|
||||
h1 = BN_CTX_get(bn_ctx);
|
||||
h2 = BN_CTX_get(bn_ctx);
|
||||
|
||||
if (!point || !pointS || !Ppub || !t || !u || !w || !h1 || !h2) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, ERR_R_MALLOC_FAILURE);
|
||||
/* check signature (h, S) */
|
||||
if (BN_is_zero(sig->h) || BN_cmp(sig->h, SM9_get0_order()) >= 0) {
|
||||
SM9err(SM9_F_SM9_VERIFYFINAL, SM9_R_INVALID_SIGNATURE);
|
||||
goto end;
|
||||
}
|
||||
if (!EC_POINT_oct2point(group, S, ASN1_STRING_get0_data(sig->pointS),
|
||||
ASN1_STRING_length(sig->pointS), bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_VERIFYFINAL, SM9_R_INVALID_SIGNATURE);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* md = mpk->hashfcn */
|
||||
if (!(md = EVP_get_digestbyobj(mpk->hashfcn))) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, SM9_R_INVALID_MD);
|
||||
/* g = e(P1, Ppubs) */
|
||||
if (ASN1_STRING_length(pk->pointPpub) != 129
|
||||
|| !point_from_octets(&Ppubs, ASN1_STRING_get0_data(pk->pointPpub), p, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_VERIFYFINAL, SM9_R_INVALID_POINTPPUB);
|
||||
goto end;
|
||||
}
|
||||
if (!rate_pairing(w, &Ppubs, EC_GROUP_get0_generator(group), bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_VERIFYFINAL, SM9_R_PAIRING_ERROR);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* check sig->h in [1, mpk->order - 1] */
|
||||
//FIXME: do we need to check sig->h > 0 ?
|
||||
if (BN_is_zero(sig->h) || BN_cmp(sig->h, mpk->order) >= 0) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, SM9_R_INVALID_SIGNATURE);
|
||||
/* t = g^(sig->h) */
|
||||
if (!fp12_pow(w, w, sig->h, p, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_VERIFYFINAL, SM9_R_EXTENSION_FIELD_ERROR);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* pointS = sig->pointS */
|
||||
if (!EC_POINT_oct2point(group, pointS,
|
||||
sig->pointS->data, sig->pointS->length, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, SM9_R_INVALID_SIGNATURE);
|
||||
/* h1 = H1(ID||hid, N) */
|
||||
if (!(md = sm9hash1_to_md(pk->hash1))) {
|
||||
SM9err(SM9_F_SM9_VERIFYFINAL, SM9_R_INVALID_HASH1);
|
||||
goto end;
|
||||
}
|
||||
if (!SM9_hash1(md, &h, (const char *)ASN1_STRING_get0_data(pk->identity),
|
||||
ASN1_STRING_length(pk->identity), SM9_HID_SIGN, n, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_VERIFYFINAL, ERR_R_SM9_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* decode t from mpk->g in F_p^2 */
|
||||
if (!BN_bn2gfp2(mpk->g1, t, mpk->p, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, ERR_R_BN_LIB);
|
||||
/* P = h1 * P2 + Ppubs */
|
||||
if (!point_mul_generator(&P, h, p, bn_ctx)
|
||||
|| !point_add(&P, &P, &Ppubs, p, bn_ctx)
|
||||
/* u = e(sig->S, P) */
|
||||
|| !rate_pairing(u, &P, S, bn_ctx)
|
||||
/* w = u * t */
|
||||
|| !fp12_mul(w, u, w, p, bn_ctx)
|
||||
|| !fp12_to_bin(w, buf)) {
|
||||
SM9err(SM9_F_SM9_VERIFYFINAL, SM9_R_EXTENSION_FIELD_ERROR);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* t = t^(sig->h) = (mpk->g)^(sig->h) in F_p^2 */
|
||||
if (!BN_GFP2_exp(t, t, sig->h, mpk->p, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, ERR_R_BN_LIB);
|
||||
/* h2 = H2(M||w) mod n */
|
||||
if (!EVP_DigestUpdate(ctx1, buf, sizeof(buf))
|
||||
|| !EVP_MD_CTX_copy(ctx2, ctx1)
|
||||
/* Ha1 = Hv(0x02||M||w||0x00000001) */
|
||||
|| !EVP_DigestUpdate(ctx1, &ct1, 1)
|
||||
/* Ha2 = Hv(0x02||M||w||0x00000002) */
|
||||
|| !EVP_DigestUpdate(ctx2, &ct2, 1)
|
||||
|| !EVP_DigestFinal_ex(ctx1, buf, &len)
|
||||
|| !EVP_DigestFinal_ex(ctx2, buf + len, &len)) {
|
||||
SM9err(SM9_F_SM9_VERIFYFINAL, SM9_R_DIGEST_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* h1 = H1(ID||hid) to range [0, mpk->order) */
|
||||
if (!SM9_hash1(md, &h1, id, idlen, SM9_HID_SIGN, mpk->order, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, ERR_R_SM9_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* point = mpk->pointP2 * h1 + mpk->pointPpub */
|
||||
if (!EC_POINT_mul(group, point, h1, NULL, NULL, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, ERR_R_EC_LIB);
|
||||
goto end;
|
||||
}
|
||||
if (!EC_POINT_oct2point(group, Ppub,
|
||||
mpk->pointPpub->data, mpk->pointPpub->length, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, SM9_R_INVALID_TYPE1CURVE);
|
||||
goto end;
|
||||
}
|
||||
if (!EC_POINT_add(group, point, point, Ppub, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, ERR_R_EC_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* u = e(sig->pointS, point) in F_p^2 */
|
||||
if (!EC_type1curve_tate(group, u, pointS, point, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, SM9_R_COMPUTE_PAIRING_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* w = u * t in F_p^2 */
|
||||
if (!BN_GFP2_mul(w, u, t, mpk->p, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, ERR_R_BN_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* buf = canonical(w) */
|
||||
if (!BN_GFP2_canonical(w, NULL, &size, 0, mpk->p, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, ERR_R_BN_LIB);
|
||||
goto end;
|
||||
}
|
||||
if (!(buf = OPENSSL_malloc(size))) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, ERR_R_MALLOC_FAILURE);
|
||||
goto end;
|
||||
}
|
||||
if (!BN_GFP2_canonical(w, buf, &size, 0, mpk->p, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, ERR_R_BN_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* h2 = H2(M||w) in [0, mpk->order - 1] */
|
||||
if (!SM9_hash2(md, &h2, dgst, dgstlen, buf, size, mpk->order, bn_ctx)) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, SM9_R_HASH_FAILURE);
|
||||
/* Ha = Ha1||Ha2[0..7] */
|
||||
if (!BN_bin2bn(buf, 40, h)
|
||||
/* h2 = (Ha mod (n - 1)) + 1 */
|
||||
|| !BN_mod(h, h, SM9_get0_order_minus_one(), bn_ctx)
|
||||
|| !BN_add_word(h, 1)) {
|
||||
SM9err(SM9_F_SM9_VERIFYFINAL, ERR_R_BN_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* check if h2 == sig->h */
|
||||
if (BN_cmp(h2, sig->h) != 0) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY_TYPE1CURVE, SM9_R_INVALID_SIGNATURE);
|
||||
goto end;
|
||||
if (BN_cmp(h, sig->h) != 0) {
|
||||
SM9err(SM9_F_SM9_VERIFYFINAL, SM9_R_VERIFY_FAILURE);
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
//FIXME: return value of sig verify
|
||||
ret = 1;
|
||||
|
||||
end:
|
||||
EVP_MD_CTX_free(ctx2);
|
||||
EC_GROUP_free(group);
|
||||
EC_POINT_free(S);
|
||||
BN_free(h);
|
||||
point_cleanup(&Ppubs);
|
||||
point_cleanup(&P);
|
||||
fp12_cleanup(w);
|
||||
fp12_cleanup(u);
|
||||
if (bn_ctx) {
|
||||
BN_CTX_end(bn_ctx);
|
||||
}
|
||||
BN_CTX_free(bn_ctx);
|
||||
EC_GROUP_free(group);
|
||||
EC_POINT_free(point);
|
||||
EC_POINT_free(pointS);
|
||||
EC_POINT_free(Ppub);
|
||||
BN_GFP2_free(t);
|
||||
BN_GFP2_free(u);
|
||||
BN_GFP2_free(w);
|
||||
OPENSSL_free(buf);
|
||||
return ret;
|
||||
BN_CTX_free(bn_ctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int SM9_do_verify_ex(SM9PublicParameters *mpk,
|
||||
const unsigned char *dgst, size_t dgstlen,
|
||||
const SM9Signature *sig, SM9PublicKey *pk)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int SM9_do_verify(SM9PublicParameters *mpk,
|
||||
const unsigned char *dgst, size_t dgstlen,
|
||||
const SM9Signature *sig, const char *id, size_t idlen)
|
||||
{
|
||||
if (!mpk || !dgst || dgstlen <= 0 || !sig || !id || idlen <= 0) {
|
||||
SM9err(SM9_F_SM9_DO_VERIFY, ERR_R_PASSED_NULL_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (OBJ_obj2nid(mpk->curve) == NID_type1curve) {
|
||||
return SM9_do_verify_type1curve(mpk, dgst, dgstlen, sig, id, idlen);
|
||||
}
|
||||
|
||||
SM9err(SM9_F_SM9_DO_VERIFY, SM9_R_INVALID_CURVE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SM9PublicParmeters_get_signature_size(void *a, void *b)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SM9_sign(SM9PublicParameters *mpk, const unsigned char *dgst,
|
||||
size_t dgstlen, unsigned char *sig, size_t *siglen,
|
||||
int SM9_sign(int type, /* NID_[sm3 | sha256] */
|
||||
const unsigned char *data, size_t datalen,
|
||||
unsigned char *sig, size_t *siglen,
|
||||
SM9PrivateKey *sk)
|
||||
{
|
||||
int ret = 0;
|
||||
SM9Signature *sigobj = NULL;
|
||||
unsigned char *p;
|
||||
size_t sigsiz;
|
||||
EVP_MD_CTX *ctx = NULL;
|
||||
SM9Signature *sm9sig = NULL;
|
||||
const EVP_MD *md;
|
||||
int len;
|
||||
|
||||
if (!mpk || !dgst || !siglen || !sk) {
|
||||
SM9err(SM9_F_SM9_SIGN, ERR_R_PASSED_NULL_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
if (dgstlen <= 0 || dgstlen > EVP_MAX_MD_SIZE) {
|
||||
SM9err(SM9_F_SM9_SIGN, SM9_R_INVALID_DIGEST_LENGTH);
|
||||
if (!(md = EVP_get_digestbynid(type))
|
||||
|| EVP_MD_size(md) != EVP_MD_size(EVP_sm3())) {
|
||||
SM9err(SM9_F_SM9_SIGN, SM9_R_INVALID_HASH2_DIGEST);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* compute output signature size */
|
||||
if (!SM9PublicParmeters_get_signature_size(mpk, &sigsiz)) {
|
||||
SM9err(SM9_F_SM9_SIGN, ERR_R_SM9_LIB);
|
||||
if (!(ctx = EVP_MD_CTX_new())) {
|
||||
SM9err(SM9_F_SM9_SIGN, ERR_R_MALLOC_FAILURE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!sig) {
|
||||
*siglen = sigsiz;
|
||||
return 1;
|
||||
}
|
||||
if (*siglen < sigsiz) {
|
||||
SM9err(SM9_F_SM9_SIGN, SM9_R_BUFFER_TOO_SMALL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* do_sign */
|
||||
if (!(sigobj = SM9_do_sign(mpk, dgst, dgstlen, sk))) {
|
||||
SM9err(SM9_F_SM9_SIGN, ERR_R_SM9_LIB);
|
||||
return 0;
|
||||
}
|
||||
|
||||
p = sig;
|
||||
if (i2d_SM9Signature(sigobj, &p) < 0) {
|
||||
if (!SM9_SignInit(ctx, md, NULL)
|
||||
|| !SM9_SignUpdate(ctx, data, datalen)
|
||||
|| !(sm9sig = SM9_SignFinal(ctx, sk))) {
|
||||
SM9err(SM9_F_SM9_SIGN, ERR_R_SM9_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
*siglen = p - sig;
|
||||
if ((len = i2d_SM9Signature(sm9sig, &sig)) <= 0) {
|
||||
SM9err(SM9_F_SM9_SIGN, ERR_R_SM9_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
*siglen = len;
|
||||
ret = 1;
|
||||
|
||||
end:
|
||||
SM9Signature_free(sigobj);
|
||||
end:
|
||||
EVP_MD_CTX_free(ctx);
|
||||
SM9Signature_free(sm9sig);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int SM9_verify_ex(SM9PublicParameters *mpk, const unsigned char *dgst,
|
||||
size_t dgstlen, const unsigned char *sig, size_t siglen,
|
||||
SM9PublicKey *pk)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int SM9_verify(SM9PublicParameters *mpk, const unsigned char *dgst,
|
||||
size_t dgstlen, const unsigned char *sig, size_t siglen,
|
||||
const char *id, size_t idlen)
|
||||
int SM9_verify(int type, /* NID_[sm3 | sha256] */
|
||||
const unsigned char *data, size_t datalen,
|
||||
const unsigned char *sig, size_t siglen,
|
||||
SM9PublicParameters *mpk, const char *id, size_t idlen)
|
||||
{
|
||||
int ret = -1;
|
||||
SM9Signature *sigobj = NULL;
|
||||
const unsigned char *p;
|
||||
EVP_MD_CTX *ctx = NULL;
|
||||
SM9Signature *sm9sig = NULL;
|
||||
SM9PublicKey *pk = NULL;
|
||||
const EVP_MD *md;
|
||||
|
||||
if (!mpk || !dgst || !sig || !id) {
|
||||
SM9err(SM9_F_SM9_VERIFY, ERR_R_PASSED_NULL_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
if (dgstlen <= 0 || dgstlen > EVP_MAX_MD_SIZE) {
|
||||
SM9err(SM9_F_SM9_VERIFY, SM9_R_INVALID_DIGEST_LENGTH);
|
||||
return 0;
|
||||
}
|
||||
if (idlen <= 0 || idlen > SM9_MAX_ID_LENGTH || strlen(id) != idlen) {
|
||||
SM9err(SM9_F_SM9_VERIFY, SM9_R_INVALID_ID_LENGTH);
|
||||
return 0;
|
||||
if (!(md = EVP_get_digestbynid(type))
|
||||
|| EVP_MD_size(md) != EVP_MD_size(EVP_sm3())) {
|
||||
SM9err(SM9_F_SM9_VERIFY, SM9_R_INVALID_HASH2_DIGEST);
|
||||
return -1;
|
||||
}
|
||||
|
||||
p = sig;
|
||||
if (!(sigobj = d2i_SM9Signature(NULL, &p, siglen))) {
|
||||
if (!(sm9sig = d2i_SM9Signature(NULL, &sig, siglen))
|
||||
|| i2d_SM9Signature(sm9sig, NULL) != siglen) {
|
||||
SM9err(SM9_F_SM9_VERIFY, SM9_R_INVALID_SIGNATURE_FORMAT);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!(pk = SM9_extract_public_key(mpk, id, idlen))) {
|
||||
SM9err(SM9_F_SM9_VERIFY, ERR_R_SM9_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
ret = SM9_do_verify(mpk, dgst, dgstlen, sigobj, id, idlen);
|
||||
|
||||
if (!SM9_VerifyInit(ctx, md, NULL)
|
||||
|| !SM9_VerifyUpdate(ctx, data, datalen)
|
||||
|| (ret = SM9_VerifyFinal(ctx, sm9sig, pk)) < 0) {
|
||||
SM9err(SM9_F_SM9_VERIFY, ERR_R_SM9_LIB);
|
||||
goto end;
|
||||
}
|
||||
|
||||
end:
|
||||
SM9Signature_free(sigobj);
|
||||
EVP_MD_CTX_free(ctx);
|
||||
SM9Signature_free(sm9sig);
|
||||
SM9PublicKey_free(pk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -5000,6 +5000,14 @@
|
||||
#define NID_sm9sign 1123
|
||||
#define OBJ_sm9sign OBJ_sm_scheme,302L,1L
|
||||
|
||||
#define SN_sm9sign_with_sm3 "sm9sign-with-sm3"
|
||||
#define NID_sm9sign_with_sm3 1204
|
||||
#define OBJ_sm9sign_with_sm3 OBJ_sm9sign,1L
|
||||
|
||||
#define SN_sm9sign_with_sha256 "sm9sign-with-sha256"
|
||||
#define NID_sm9sign_with_sha256 1205
|
||||
#define OBJ_sm9sign_with_sha256 OBJ_sm9sign,2L
|
||||
|
||||
#define SN_sm9keyagreement "sm9keyagreement"
|
||||
#define NID_sm9keyagreement 1124
|
||||
#define OBJ_sm9keyagreement OBJ_sm_scheme,302L,2L
|
||||
@@ -5008,6 +5016,30 @@
|
||||
#define NID_sm9encrypt 1125
|
||||
#define OBJ_sm9encrypt OBJ_sm_scheme,302L,3L
|
||||
|
||||
#define SN_sm9encrypt_with_sm3_xor "sm9encrypt-with-sm3-xor"
|
||||
#define NID_sm9encrypt_with_sm3_xor 1206
|
||||
#define OBJ_sm9encrypt_with_sm3_xor OBJ_sm9encrypt,1L
|
||||
|
||||
#define SN_sm9encrypt_with_sm3_sms4_cbc "sm9encrypt-with-sm3-sms4-cbc"
|
||||
#define NID_sm9encrypt_with_sm3_sms4_cbc 1207
|
||||
#define OBJ_sm9encrypt_with_sm3_sms4_cbc OBJ_sm9encrypt,2L
|
||||
|
||||
#define SN_sm9encrypt_with_sm3_sms4_ctr "sm9encrypt-with-sm3-sms4-ctr"
|
||||
#define NID_sm9encrypt_with_sm3_sms4_ctr 1208
|
||||
#define OBJ_sm9encrypt_with_sm3_sms4_ctr OBJ_sm9encrypt,3L
|
||||
|
||||
#define SN_sm9hash1 "sm9hash1"
|
||||
#define NID_sm9hash1 1201
|
||||
#define OBJ_sm9hash1 OBJ_sm_scheme,302L,4L
|
||||
|
||||
#define SN_sm9hash1_with_sm3 "sm9hash1-with-sm3"
|
||||
#define NID_sm9hash1_with_sm3 1202
|
||||
#define OBJ_sm9hash1_with_sm3 OBJ_sm9hash1,1L
|
||||
|
||||
#define SN_sm9hash1_with_sha256 "sm9hash1-with-sha256"
|
||||
#define NID_sm9hash1_with_sha256 1203
|
||||
#define OBJ_sm9hash1_with_sha256 OBJ_sm9hash1,2L
|
||||
|
||||
#define SN_sm3 "SM3"
|
||||
#define LN_sm3 "sm3"
|
||||
#define NID_sm3 1126
|
||||
|
||||
@@ -41,9 +41,9 @@ extern "C" {
|
||||
*/
|
||||
# define OPENSSL_VERSION_NUMBER 0x1010004fL
|
||||
# ifdef OPENSSL_FIPS
|
||||
# define OPENSSL_VERSION_TEXT "GmSSL 2.3.2 - OpenSSL 1.1.0d-fips 21 Sep 2018"
|
||||
# define OPENSSL_VERSION_TEXT "GmSSL 2.3.2 - OpenSSL 1.1.0d-fips 28 Sep 2018"
|
||||
# else
|
||||
# define OPENSSL_VERSION_TEXT "GmSSL 2.3.2 - OpenSSL 1.1.0d 21 Sep 2018"
|
||||
# define OPENSSL_VERSION_TEXT "GmSSL 2.3.2 - OpenSSL 1.1.0d 28 Sep 2018"
|
||||
# endif
|
||||
|
||||
/*-
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2016 The GmSSL Project. All rights reserved.
|
||||
* Copyright (c) 2016 - 2018 The GmSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -67,28 +67,38 @@
|
||||
#define SM9_HID_EXCH 0x02
|
||||
#define SM9_HID_ENC 0x03
|
||||
|
||||
#define SM9_HASH1 0x01
|
||||
#define SM9_HASH2 0x02
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct SM9PublicParameters_st SM9PublicParameters;
|
||||
typedef struct SM9MasterSecret_st SM9MasterSecret;
|
||||
typedef struct SM9PublicKey_st SM9PublicKey;
|
||||
typedef struct SM9PublicParameters_st SM9PublicParameters;
|
||||
typedef struct SM9PrivateKey_st SM9PrivateKey;
|
||||
typedef struct SM9Ciphertext_st SM9Ciphertext;
|
||||
typedef struct SM9PublicKey_st SM9PublicKey;
|
||||
typedef struct SM9Signature_st SM9Signature;
|
||||
typedef struct SM9Ciphertext_st SM9Ciphertext;
|
||||
|
||||
int SM9_setup_by_pairing_name(int nid, int hid,
|
||||
SM9PublicParameters **mpk, SM9MasterSecret **msk);
|
||||
|
||||
SM9PrivateKey *SM9_extract_private_key(SM9PublicParameters *mpk,
|
||||
SM9MasterSecret *msk, const char *id, size_t idlen);
|
||||
int SM9_setup(int pairing, /* NID_sm9bn256v1 */
|
||||
int scheme, /* NID_[sm9sign | sm9encrypt | sm9keyagreement] */
|
||||
int hash1, /* NID_sm9hash1_with_[sm3 | sha256] */
|
||||
SM9PublicParameters **mpk,
|
||||
SM9MasterSecret **msk);
|
||||
|
||||
SM9PrivateKey *SM9_extract_private_key(SM9MasterSecret *msk,
|
||||
const char *id, size_t idlen);
|
||||
|
||||
SM9MasterSecret *SM9_generate_master_secret(int pairing, int scheme, int hash1);
|
||||
|
||||
SM9PublicParameters *SM9_extract_public_parameters(SM9MasterSecret *msk);
|
||||
|
||||
SM9PublicKey *SM9_extract_public_key(SM9PublicParameters *mpk,
|
||||
const char *id, size_t idlen);
|
||||
|
||||
SM9PublicKey *SM9PrivateKey_get_public_key(SM9PublicParameters *mpk,
|
||||
SM9PrivateKey *sk);
|
||||
SM9PublicKey *SM9PrivateKey_get_public_key(SM9PrivateKey *sk);
|
||||
|
||||
int SM9PrivateKey_get_gmtls_public_key(SM9PublicParameters *mpk,
|
||||
SM9PrivateKey *sk, unsigned char pub_key[1024]);
|
||||
@@ -96,6 +106,26 @@ int SM9PrivateKey_get_gmtls_public_key(SM9PublicParameters *mpk,
|
||||
int SM9PublicKey_get_gmtls_encoded(SM9PublicParameters *mpk,
|
||||
SM9PublicKey *pk, unsigned char encoded[1024]);
|
||||
|
||||
int SM9_signature_size(SM9PublicParameters *mpk);
|
||||
|
||||
int SM9_sign(int type,
|
||||
const unsigned char *data, size_t datalen,
|
||||
unsigned char *sig, size_t *siglen,
|
||||
SM9PrivateKey *sk);
|
||||
|
||||
int SM9_verify(int type,
|
||||
const unsigned char *data, size_t datalen,
|
||||
const unsigned char *sig, size_t siglen,
|
||||
SM9PublicParameters *mpk, const char *id, size_t idlen);
|
||||
|
||||
int SM9_SignInit(EVP_MD_CTX *ctx, const EVP_MD *md, ENGINE *engine);
|
||||
#define SM9_SignUpdate(ctx,d,l) EVP_DigestUpdate(ctx,d,l)
|
||||
SM9Signature *SM9_SignFinal(EVP_MD_CTX *ctx, SM9PrivateKey *sk);
|
||||
|
||||
int SM9_VerifyInit(EVP_MD_CTX *ctx, const EVP_MD *md, ENGINE *engine);
|
||||
#define SM9_VerifyUpdate(ctx,d,l) EVP_DigestUpdate(ctx,d,l)
|
||||
int SM9_VerifyFinal(EVP_MD_CTX *ctx, const SM9Signature *sig, SM9PublicKey *pk);
|
||||
|
||||
typedef struct {
|
||||
const EVP_MD *kdf_md;
|
||||
const EVP_CIPHER *enc_cipher;
|
||||
@@ -104,105 +134,31 @@ typedef struct {
|
||||
const EVP_MD *hmac_md;
|
||||
} SM9EncParameters;
|
||||
|
||||
SM9Ciphertext *SM9_do_encrypt_ex(SM9PublicParameters *mpk,
|
||||
const SM9EncParameters *encparams,
|
||||
int SM9_encrypt(int type,
|
||||
const unsigned char *in, size_t inlen,
|
||||
unsigned char *out, size_t *outlen,
|
||||
SM9PublicParameters *mpk, const char *id, size_t idlen);
|
||||
|
||||
int SM9_decrypt(int type,
|
||||
const unsigned char *in, size_t inlen,
|
||||
unsigned char *out, size_t *outlen,
|
||||
SM9PrivateKey *sk);
|
||||
|
||||
SM9Ciphertext *SM9_do_encrypt(const SM9EncParameters *encparams,
|
||||
const unsigned char *in, size_t inlen,
|
||||
SM9PublicKey *pk);
|
||||
|
||||
SM9Ciphertext *SM9_do_encrypt(SM9PublicParameters *mpk,
|
||||
const SM9EncParameters *encparams,
|
||||
const unsigned char *in, size_t inlen,
|
||||
const char *id, size_t idlen);
|
||||
|
||||
int SM9_do_decrypt(SM9PublicParameters *mpk,
|
||||
const SM9EncParameters *encparams,
|
||||
int SM9_do_decrypt(const SM9EncParameters *encparams,
|
||||
const SM9Ciphertext *in,
|
||||
unsigned char *out, size_t *outlen,
|
||||
SM9PrivateKey *sk,
|
||||
const char *id, size_t idlen);
|
||||
|
||||
int SM9_encrypt_ex(SM9PublicParameters *mpk,
|
||||
const SM9EncParameters *encparams,
|
||||
const unsigned char *in, size_t inlen,
|
||||
unsigned char *out, size_t *outlen,
|
||||
SM9PublicKey *pk);
|
||||
|
||||
int SM9_encrypt(SM9PublicParameters *mpk,
|
||||
const SM9EncParameters *encparams,
|
||||
const unsigned char *in, size_t inlen,
|
||||
unsigned char *out, size_t *outlen,
|
||||
const char *id, size_t idlen);
|
||||
|
||||
int SM9_decrypt(SM9PublicParameters *mpk,
|
||||
const SM9EncParameters *encparams,
|
||||
const unsigned char *in, size_t inlen,
|
||||
unsigned char *out, size_t *outlen,
|
||||
SM9PrivateKey *sk,
|
||||
const char *id, size_t idlen);
|
||||
|
||||
int SM9_encrypt_with_recommended_ex(SM9PublicParameters *mpk,
|
||||
const unsigned char *in, size_t inlen,
|
||||
unsigned char *out, size_t *outlen,
|
||||
SM9PublicKey *pk);
|
||||
|
||||
int SM9_encrypt_with_recommended(SM9PublicParameters *mpk,
|
||||
const unsigned char *in, size_t inlen,
|
||||
unsigned char *out, size_t *outlen,
|
||||
const char *id, size_t idlen);
|
||||
|
||||
int SM9_decrypt_with_recommended(SM9PublicParameters *mpk,
|
||||
const unsigned char *in, size_t inlen,
|
||||
unsigned char *out, size_t *outlen,
|
||||
SM9PrivateKey *sk,
|
||||
const char *id, size_t idlen);
|
||||
|
||||
int SM9_signature_size(SM9PublicParameters *mpk);
|
||||
|
||||
SM9Signature *SM9_do_sign(SM9PublicParameters *mpk,
|
||||
const unsigned char *dgst, size_t dgstlen,
|
||||
SM9PrivateKey *sk);
|
||||
|
||||
int SM9_do_verify_ex(SM9PublicParameters *mpk,
|
||||
const unsigned char *dgst, size_t dgstlen,
|
||||
const SM9Signature *sig,
|
||||
SM9PublicKey *pk);
|
||||
|
||||
int SM9_do_verify(SM9PublicParameters *mpk,
|
||||
const unsigned char *dgst, size_t dgstlen,
|
||||
const SM9Signature *sig,
|
||||
const char *id, size_t idlen);
|
||||
|
||||
int SM9_sign(SM9PublicParameters *mpk,
|
||||
const unsigned char *dgst, size_t dgstlen,
|
||||
unsigned char *sig, size_t *siglen,
|
||||
SM9PrivateKey *sk);
|
||||
|
||||
int SM9_verify_ex(SM9PublicParameters *mpk,
|
||||
const unsigned char *dgst, size_t dgstlen,
|
||||
const unsigned char *sig, size_t siglen,
|
||||
SM9PublicKey *pk);
|
||||
|
||||
int SM9_verify(SM9PublicParameters *mpk,
|
||||
const unsigned char *dgst, size_t dgstlen,
|
||||
const unsigned char *sig, size_t siglen,
|
||||
const char *id, size_t idlen);
|
||||
|
||||
SM9PublicKey *SM9_generate_key_exchange(SM9PublicParameters *mpk,
|
||||
const char *peer_id, size_t peer_idlen, BIGNUM **r);
|
||||
|
||||
int SM9_compute_share_key(SM9PublicParameters *mpk,
|
||||
unsigned char *out, size_t *outlen,
|
||||
const char *peer_id, size_t peer_idlen, SM9PublicKey *peer_exch,
|
||||
const char *id, size_t idlen, SM9PublicKey *exch,
|
||||
SM9PrivateKey *sk, int initiator);
|
||||
|
||||
|
||||
DECLARE_ASN1_FUNCTIONS(SM9PublicParameters)
|
||||
DECLARE_ASN1_FUNCTIONS(SM9MasterSecret)
|
||||
DECLARE_ASN1_FUNCTIONS(SM9PublicParameters)
|
||||
DECLARE_ASN1_FUNCTIONS(SM9PrivateKey)
|
||||
DECLARE_ASN1_FUNCTIONS(SM9PublicKey)
|
||||
DECLARE_ASN1_FUNCTIONS(SM9Ciphertext)
|
||||
DECLARE_ASN1_FUNCTIONS(SM9Signature)
|
||||
DECLARE_ASN1_FUNCTIONS(SM9Ciphertext)
|
||||
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
@@ -225,43 +181,51 @@ int ERR_load_SM9_strings(void);
|
||||
# define SM9_F_SM9_DECRYPT 106
|
||||
# define SM9_F_SM9_DO_DECRYPT 107
|
||||
# define SM9_F_SM9_DO_ENCRYPT 108
|
||||
# define SM9_F_SM9_DO_SIGN 109
|
||||
# define SM9_F_SM9_DO_SIGN_TYPE1CURVE 110
|
||||
# define SM9_F_SM9_DO_VERIFY 111
|
||||
# define SM9_F_SM9_DO_VERIFY_TYPE1CURVE 112
|
||||
# define SM9_F_SM9_ENCRYPT 113
|
||||
# define SM9_F_SM9_EXTRACT_PRIVATE_KEY 114
|
||||
# define SM9_F_SM9_SETUP_TYPE1CURVE 115
|
||||
# define SM9_F_SM9_SIGN 116
|
||||
# define SM9_F_SM9_UNWRAP_KEY 117
|
||||
# define SM9_F_SM9_VERIFY 118
|
||||
# define SM9_F_SM9_WRAP_KEY 119
|
||||
# define SM9_F_SM9_ENCRYPT 109
|
||||
# define SM9_F_SM9_EXTRACT_PRIVATE_KEY 110
|
||||
# define SM9_F_SM9_EXTRACT_PUBLIC_PARAMETERS 111
|
||||
# define SM9_F_SM9_GENERATE_MASTER_SECRET 112
|
||||
# define SM9_F_SM9_SIGN 119
|
||||
# define SM9_F_SM9_SIGNFINAL 115
|
||||
# define SM9_F_SM9_SIGNINIT 116
|
||||
# define SM9_F_SM9_UNWRAP_KEY 113
|
||||
# define SM9_F_SM9_VERIFY 120
|
||||
# define SM9_F_SM9_VERIFYFINAL 117
|
||||
# define SM9_F_SM9_VERIFYINIT 118
|
||||
# define SM9_F_SM9_WRAP_KEY 114
|
||||
|
||||
/* Reason codes. */
|
||||
# define SM9_R_BUFFER_TOO_SMALL 100
|
||||
# define SM9_R_COMPUTE_PAIRING_FAILURE 101
|
||||
# define SM9_R_DIGEST_FAILURE 119
|
||||
# define SM9_R_EC_LIB 101
|
||||
# define SM9_R_EXTENSION_FIELD_ERROR 120
|
||||
# define SM9_R_GENERATE_MAC_FAILURE 102
|
||||
# define SM9_R_HASH_FAILURE 103
|
||||
# define SM9_R_INVALID_CIPHERTEXT 104
|
||||
# define SM9_R_INVALID_CURVE 105
|
||||
# define SM9_R_INVALID_DIGEST 106
|
||||
# define SM9_R_INVALID_DIGEST_LENGTH 107
|
||||
# define SM9_R_INVALID_ENCPARAMETERS 108
|
||||
# define SM9_R_INVALID_ID 109
|
||||
# define SM9_R_INVALID_ID_LENGTH 110
|
||||
# define SM9_R_INVALID_INPUT 111
|
||||
# define SM9_R_INVALID_KEY_LENGTH 112
|
||||
# define SM9_R_INVALID_MD 113
|
||||
# define SM9_R_INVALID_PARAMETER 114
|
||||
# define SM9_R_INVALID_SIGNATURE 115
|
||||
# define SM9_R_INVALID_TYPE1CURVE 116
|
||||
# define SM9_R_KDF_FAILURE 117
|
||||
# define SM9_R_NOT_NAMED_CURVE 118
|
||||
# define SM9_R_PARSE_PAIRING 119
|
||||
# define SM9_R_ZERO_ID 120
|
||||
# define SM9_R_INVALID_ENCPARAMETERS 105
|
||||
# define SM9_R_INVALID_HASH1 106
|
||||
# define SM9_R_INVALID_HASH2_DIGEST 126
|
||||
# define SM9_R_INVALID_ID 107
|
||||
# define SM9_R_INVALID_ID_LENGTH 108
|
||||
# define SM9_R_INVALID_INPUT 109
|
||||
# define SM9_R_INVALID_KEY_LENGTH 110
|
||||
# define SM9_R_INVALID_MD 111
|
||||
# define SM9_R_INVALID_PAIRING_TYPE 112
|
||||
# define SM9_R_INVALID_PARAMETER 113
|
||||
# define SM9_R_INVALID_POINTPPUB 121
|
||||
# define SM9_R_INVALID_PRIVATE_POINT 122
|
||||
# define SM9_R_INVALID_SCHEME 114
|
||||
# define SM9_R_INVALID_SIGNATURE 123
|
||||
# define SM9_R_INVALID_SIGNATURE_FORMAT 127
|
||||
# define SM9_R_INVALID_TYPE1CURVE 115
|
||||
# define SM9_R_KDF_FAILURE 116
|
||||
# define SM9_R_PAIRING_ERROR 124
|
||||
# define SM9_R_TWIST_CURVE_ERROR 117
|
||||
# define SM9_R_VERIFY_FAILURE 125
|
||||
# define SM9_R_ZERO_ID 118
|
||||
|
||||
# ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -970,11 +970,13 @@ static int gmtls_construct_ske_sm9(SSL *s, unsigned char **p, int *l, int *al, i
|
||||
/* sign digest and output signature */
|
||||
d = *p;
|
||||
siglen = SM9_signature_size(s->cert->ibs.params);
|
||||
#if 0
|
||||
if (!SM9_sign(s->cert->ibs.params, dgst, dgstlen, &(d[2]), &siglen,
|
||||
s->cert->ibs.privatekey)) {
|
||||
SSLerr(SSL_F_GMTLS_CONSTRUCT_SKE_SM9, ERR_R_SM9_LIB);
|
||||
goto end;
|
||||
}
|
||||
#endif
|
||||
s2n(siglen, d);
|
||||
|
||||
*l += 2 + siglen;
|
||||
@@ -1071,6 +1073,7 @@ static int gmtls_process_ske_sm9(SSL *s, PACKET *pkt, int *al, int dhe)
|
||||
}
|
||||
|
||||
/* verify signature */
|
||||
#if 0
|
||||
if (1 != SM9_verify(s->session->ibs.params, dgst, dgstlen,
|
||||
PACKET_data(&signature), PACKET_remaining(&signature),
|
||||
s->session->ibs.id, strlen(s->session->ibs.id))) {
|
||||
@@ -1078,6 +1081,7 @@ static int gmtls_process_ske_sm9(SSL *s, PACKET *pkt, int *al, int dhe)
|
||||
SSLerr(SSL_F_GMTLS_PROCESS_SKE_SM9, SSL_R_BAD_SIGNATURE);
|
||||
goto end;
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = 1;
|
||||
|
||||
@@ -1802,6 +1806,7 @@ static int gmtls_construct_cke_sm9(SSL *s, unsigned char **p, int *l, int *al)
|
||||
encparam.cbcmac_cipher = NULL;
|
||||
encparam.hmac_md = EVP_sm3();
|
||||
|
||||
#if 0
|
||||
if (!SM9_encrypt(sm9->params, &encparam, pms, pmslen,
|
||||
NULL, &enclen, sm9->id, strlen(sm9->id))) {
|
||||
SSLerr(SSL_F_GMTLS_CONSTRUCT_CKE_SM9, ERR_R_INTERNAL_ERROR);
|
||||
@@ -1813,6 +1818,7 @@ static int gmtls_construct_cke_sm9(SSL *s, unsigned char **p, int *l, int *al)
|
||||
SSLerr(SSL_F_GMTLS_CONSTRUCT_CKE_SM9, ERR_R_INTERNAL_ERROR);
|
||||
goto end;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* save pre_master_secret */
|
||||
s->s3->tmp.pms = pms;
|
||||
@@ -1863,6 +1869,7 @@ static int gmtls_process_cke_sm9(SSL *s, PACKET *pkt, int *al)
|
||||
encparam.cbcmac_cipher = NULL;
|
||||
encparam.hmac_md = EVP_sm3();
|
||||
|
||||
#if 0
|
||||
if (!SM9_decrypt(sm9->params, &encparam,
|
||||
PACKET_data(&enced_pms), PACKET_remaining(&enced_pms), pms, &pms_len,
|
||||
sm9->privatekey, sm9->id, strlen(sm9->id))) {
|
||||
@@ -1876,6 +1883,7 @@ static int gmtls_process_cke_sm9(SSL *s, PACKET *pkt, int *al)
|
||||
SSLerr(SSL_F_GMTLS_PROCESS_CKE_SM9, SSL_R_DECRYPTION_FAILED);
|
||||
goto end;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* generate master_secret */
|
||||
if (!ssl_generate_master_secret(s, pms, pms_len, 0)) {
|
||||
|
||||
139
test/sm9test.c
139
test/sm9test.c
@@ -60,91 +60,96 @@ int main(int argc, char **argv)
|
||||
}
|
||||
#else
|
||||
# include <openssl/evp.h>
|
||||
# include <openssl/err.h>
|
||||
# include <openssl/sm9.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
static int sm9test_sign(const char *id, const unsigned char *msg, size_t msglen)
|
||||
{
|
||||
int err = 1;
|
||||
int curve_id = NID_sm2p256v1; //FIXME
|
||||
char *id = "guanzhi1980@gmail.com";
|
||||
char *in = "message to be signed or encrypted";
|
||||
int ret = 0;
|
||||
SM9PublicParameters *mpk = NULL;
|
||||
SM9MasterSecret *msk = NULL;
|
||||
SM9PrivateKey *sk = NULL;
|
||||
unsigned char dgst[32] = {0x01, 0x00};
|
||||
unsigned char *c = NULL;
|
||||
unsigned char *m = NULL;
|
||||
unsigned char *sig = NULL;
|
||||
size_t clen, mlen, siglen;
|
||||
unsigned char sig[256];
|
||||
size_t siglen = sizeof(sig);
|
||||
|
||||
/* setup */
|
||||
if (!SM9_setup_by_pairing_name(curve_id, SM9_HID_SIGN, &mpk, &msk)) {
|
||||
if (!SM9_setup(NID_sm9bn256v1, NID_sm9sign, NID_sm9hash1_with_sm3, &mpk, &msk)) {
|
||||
ERR_print_errors_fp(stderr);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* keygen */
|
||||
if (!(sk = SM9_extract_private_key(mpk, msk, id, strlen(id)))) {
|
||||
if (!(sk = SM9_extract_private_key(msk, id, strlen(id)))) {
|
||||
ERR_print_errors_fp(stderr);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* encrypt */
|
||||
clen = 0;
|
||||
if (!SM9_encrypt_with_recommended(mpk, (unsigned char *)in,
|
||||
strlen(in), NULL, &clen, id, strlen(id))) {
|
||||
if (!SM9_sign(NID_sm3, msg, sizeof(msg), sig, &siglen, sk)) {
|
||||
ERR_print_errors_fp(stderr);
|
||||
goto end;
|
||||
}
|
||||
if (!(c = OPENSSL_zalloc(clen))) {
|
||||
if (1 != SM9_verify(NID_sm3, msg, sizeof(msg), sig, siglen, mpk, id, strlen(id))) {
|
||||
ERR_print_errors_fp(stderr);
|
||||
goto end;
|
||||
}
|
||||
if (!SM9_encrypt_with_recommended(mpk, (unsigned char *)in,
|
||||
strlen(in), c, &clen, id, strlen(id))) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* decrypt */
|
||||
mlen = 0;
|
||||
if (!SM9_decrypt_with_recommended(mpk, c, clen, NULL, &mlen,
|
||||
sk, id, strlen(id))) {
|
||||
goto end;
|
||||
}
|
||||
if (!(m = OPENSSL_zalloc(mlen))) {
|
||||
goto end;
|
||||
}
|
||||
if (!SM9_decrypt_with_recommended(mpk, c, clen, m, &mlen,
|
||||
sk, id, strlen(id))) {
|
||||
goto end;
|
||||
}
|
||||
if (strlen(in) != mlen || memcmp(in, m, mlen) != 0) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* sign */
|
||||
siglen = 0;
|
||||
if (!SM9_sign(mpk, dgst, sizeof(dgst), NULL, &siglen, sk)) {
|
||||
goto end;
|
||||
}
|
||||
if (!(sig = OPENSSL_zalloc(siglen))) {
|
||||
goto end;
|
||||
}
|
||||
if (!SM9_sign(mpk, dgst, sizeof(dgst), sig, &siglen, sk)) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* verify */
|
||||
if (1 != SM9_verify(mpk, dgst, sizeof(dgst), sig, siglen,
|
||||
id, strlen(id))) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
err = 0;
|
||||
|
||||
ret = 1;
|
||||
end:
|
||||
SM9PublicParameters_free(mpk);
|
||||
SM9MasterSecret_free(msk);
|
||||
SM9PrivateKey_free(sk);
|
||||
OPENSSL_free(c);
|
||||
OPENSSL_free(m);
|
||||
OPENSSL_free(sig);
|
||||
//FIXME: return err;
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int sm9test_enc(const char *id, const unsigned char *data, size_t datalen)
|
||||
{
|
||||
int ret = 0;
|
||||
SM9PublicParameters *mpk = NULL;
|
||||
SM9MasterSecret *msk = NULL;
|
||||
SM9PrivateKey *sk = NULL;
|
||||
unsigned char mbuf[1024] = {0};
|
||||
unsigned char cbuf[1024] = {0};
|
||||
size_t clen, mlen;
|
||||
|
||||
if (!SM9_setup(NID_sm9bn256v1, NID_sm9encrypt, NID_sm9hash1_with_sm3, &mpk, &msk)) {
|
||||
ERR_print_errors_fp(stderr);
|
||||
goto end;
|
||||
}
|
||||
if (!(sk = SM9_extract_private_key(msk, id, strlen(id)))) {
|
||||
ERR_print_errors_fp(stderr);
|
||||
goto end;
|
||||
}
|
||||
if (!SM9_encrypt(NID_sm9encrypt_with_sm3_xor, data, datalen,
|
||||
cbuf, &clen, mpk, id, strlen(id))) {
|
||||
ERR_print_errors_fp(stderr);
|
||||
goto end;
|
||||
}
|
||||
if (!SM9_decrypt(NID_sm9encrypt_with_sm3_xor, cbuf, clen,
|
||||
mbuf, &mlen, sk)) {
|
||||
ERR_print_errors_fp(stderr);
|
||||
goto end;
|
||||
}
|
||||
if (mlen != datalen || memcmp(mbuf, data, datalen) != 0) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
ret = 1;
|
||||
end:
|
||||
SM9PublicParameters_free(mpk);
|
||||
SM9MasterSecret_free(msk);
|
||||
SM9PrivateKey_free(sk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int err = 0;
|
||||
char *id = "guanzhi1980@gmail.com";
|
||||
unsigned char in[] = "message to be signed or encrypted";
|
||||
|
||||
if (!sm9test_sign(id, in, sizeof(in))) {
|
||||
err++;
|
||||
}
|
||||
if (!sm9test_enc(id, in, sizeof(in))) {
|
||||
err++;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
|
||||
9881
util/libcrypto.num
9881
util/libcrypto.num
File diff suppressed because it is too large
Load Diff
820
util/libssl.num
820
util/libssl.num
@@ -1,411 +1,411 @@
|
||||
SSL_CIPHER_get_kx_nid 1 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_tmp_dh_callback 2 1_1_0d EXIST::FUNCTION:DH
|
||||
SSL_set_read_ahead 3 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_RSAPrivateKey 4 1_1_0d EXIST::FUNCTION:RSA
|
||||
SSL_get_wfd 5 1_1_0d EXIST::FUNCTION:
|
||||
DTLS_method 6 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_verify_depth 7 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_info_callback 8 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_free 9 1_1_0d EXIST::FUNCTION:
|
||||
BIO_new_buffer_ssl_connect 10 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_cert_verify_callback 11 1_1_0d EXIST::FUNCTION:
|
||||
SSL_dup_CA_list 12 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_security_level 13 1_1_0d EXIST::FUNCTION:
|
||||
SSL_extension_supported 14 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_sessions 15 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_PrivateKey_ASN1 16 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_options 17 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_CTX_set_flags 18 1_1_0d EXIST::FUNCTION:
|
||||
SSL_COMP_get_name 19 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_error 20 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_has_client_custom_ext 21 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_connect_state 22 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_verify_depth 23 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_CTX_free 24 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_flush_sessions 25 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_srp_userinfo 26 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_SRP_CTX_init 27 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CTX_set_client_cert_engine 28 1_1_0d EXIST::FUNCTION:ENGINE
|
||||
SSL_CTX_get_info_callback 29 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_session_id_context 30 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_SRP_CTX_free 31 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CIPHER_get_cipher_nid 32 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_peername 33 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_srp_N 34 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CIPHER_get_name 35 1_1_0d EXIST::FUNCTION:
|
||||
TLSv1_client_method 36 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_METHOD
|
||||
PEM_read_SSL_SESSION 37 1_1_0d EXIST::FUNCTION:STDIO
|
||||
SSL_get_psk_identity 38 1_1_0d EXIST::FUNCTION:PSK
|
||||
SSL_CONF_cmd_argv 39 1_1_0d EXIST::FUNCTION:
|
||||
SSL_dane_enable 40 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_options 41 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_ex_data 42 1_1_0d EXIST::FUNCTION:
|
||||
SSL_add1_host 43 1_1_0d EXIST::FUNCTION:
|
||||
TLS_server_method 44 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_current_expansion 45 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_CTX_clear_flags 46 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_shutdown 47 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_alpn_selected 48 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set1_param 49 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_client_CA_list 50 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_free 51 1_1_0d EXIST::FUNCTION:
|
||||
SSL_clear_options 52 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_verify_result 53 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_dane_authority 54 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_default_read_buffer_len 55 1_1_0d EXIST::FUNCTION:
|
||||
DTLS_server_method 56 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_print_keylog 57 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_psk_server_callback 58 1_1_0d EXIST::FUNCTION:PSK
|
||||
SSL_get_servername_type 59 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_psk_client_callback 60 1_1_0d EXIST::FUNCTION:PSK
|
||||
SSL_CTX_dane_set_flags 61 1_1_0d EXIST::FUNCTION:
|
||||
DTLS_client_method 62 1_1_0d EXIST::FUNCTION:
|
||||
SSL_add_ssl_module 63 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_RSAPrivateKey_file 64 1_1_0d EXIST::FUNCTION:RSA
|
||||
SSL_CTX_set_ex_data 65 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_serverinfo 66 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_sess_set_new_cb 67 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_RSAPrivateKey_ASN1 68 1_1_0d EXIST::FUNCTION:RSA
|
||||
SSL_set_srp_server_param_pw 69 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_set_security_level 70 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_set1_id 71 1_1_0d EXIST::FUNCTION:
|
||||
GMTLS_client_method 72 1_1_0d EXIST::FUNCTION:GMTLS
|
||||
SSL_SESSION_new 73 1_1_0d EXIST::FUNCTION:
|
||||
SSL_read 74 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_config 75 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_tlsext_use_srtp 76 1_1_0d EXIST::FUNCTION:SRTP
|
||||
SSL_ct_is_enabled 77 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_load_client_CA_file 78 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_certificate_chain_file 79 1_1_0d EXIST::FUNCTION:
|
||||
SSL_in_init 80 1_1_0d EXIST::FUNCTION:
|
||||
SSL_COMP_add_compression_method 81 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_certificate 82 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_CTX_set_ssl 83 1_1_0d EXIST::FUNCTION:
|
||||
SSL_version 84 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_read_ahead 85 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get0_privatekey 86 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_CTX_set1_prefix 87 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_srp_password 88 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CTX_get_verify_mode 89 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_set_ex_data 90 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_shared_ciphers 91 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_wfd 92 1_1_0d EXIST::FUNCTION:SOCK
|
||||
SSL_CIPHER_get_auth_nid 93 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_dane_tlsa 94 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_srp_verify_param_callback 95 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_rstate_string 96 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_verified_chain 97 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_servername 98 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_certificate_ASN1 99 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_default_passwd_cb_userdata 100 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_next_protos_advertised_cb 101 1_1_0d EXIST::FUNCTION:NEXTPROTONEG
|
||||
SSL_CTX_set_srp_username 102 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CTX_ctrl 103 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_peer_finished 104 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_clear_options 105 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_verify 106 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_generate_session_id 107 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_default_verify_dir 108 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_ssl_method 109 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_default_passwd_cb 110 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_ctlog_list_file 111 1_1_0d EXIST::FUNCTION:CT
|
||||
GMTLS_server_method 112 1_1_0d EXIST::FUNCTION:GMTLS
|
||||
SSLv3_client_method 113 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,SSL3_METHOD
|
||||
SSL_SESSION_get_id 114 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_set_time 115 1_1_0d EXIST::FUNCTION:
|
||||
SSL_is_server 116 1_1_0d EXIST::FUNCTION:
|
||||
SSL_new 117 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_security_level 118 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_default_passwd_cb 119 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_current_compression 120 1_1_0d EXIST::FUNCTION:
|
||||
SSL_session_reused 121 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_SRP_CTX_init 122 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CTX_set_timeout 123 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_dane_mtype_set 124 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_shutdown 125 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_security_ex_data 126 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_quiet_shutdown 127 1_1_0d EXIST::FUNCTION:
|
||||
TLSv1_1_server_method 128 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_1_METHOD
|
||||
SSL_CTX_dane_enable 129 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_all_async_fds 130 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_rfd 131 1_1_0d EXIST::FUNCTION:SOCK
|
||||
SSL_renegotiate_abbreviated 132 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_shared_sigalgs 133 1_1_0d EXIST::FUNCTION:
|
||||
DTLSv1_client_method 134 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,DTLS1_METHOD
|
||||
SSL_set_session_ticket_ext 135 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_rbio 136 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get0_peer 137 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get1_session 138 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_cert_cb 139 1_1_0d EXIST::FUNCTION:
|
||||
TLSv1_1_client_method 140 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_1_METHOD
|
||||
TLSv1_2_method 141 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_2_METHOD
|
||||
SSL_enable_ct 142 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_CTX_set_cipher_list 143 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CIPHER_get_id 144 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_next_proto_negotiated 145 1_1_0d EXIST::FUNCTION:NEXTPROTONEG
|
||||
SSL_CTX_set_quiet_shutdown 146 1_1_0d EXIST::FUNCTION:
|
||||
SSL_clear 147 1_1_0d EXIST::FUNCTION:
|
||||
TLSv1_2_server_method 148 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_2_METHOD
|
||||
DTLSv1_method 149 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,DTLS1_METHOD
|
||||
SSL_alert_type_string_long 150 1_1_0d EXIST::FUNCTION:
|
||||
DTLSv1_2_server_method 151 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,DTLS1_2_METHOD
|
||||
SSL_set1_host 152 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_default_passwd_cb_userdata 153 1_1_0d EXIST::FUNCTION:
|
||||
SSL_state_string_long 154 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_psk_identity_hint 155 1_1_0d EXIST::FUNCTION:PSK
|
||||
SSL_SESSION_get0_cipher 156 1_1_0d EXIST::FUNCTION:
|
||||
i2d_SSL_SESSION 157 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_certificate_chain_file 158 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_server_random 159 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_verify_callback 160 1_1_0d EXIST::FUNCTION:
|
||||
SSL_check_chain 161 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_serverinfo_file 162 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_hostflags 163 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_certificate 164 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_SSL_CTX 165 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_dane 166 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_timeout 167 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_version 168 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_sess_set_get_cb 169 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_enable_ct 170 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_CTX_get_client_cert_cb 171 1_1_0d EXIST::FUNCTION:
|
||||
d2i_SSL_SESSION 172 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_ct_validation_callback 173 1_1_0d EXIST::FUNCTION:CT
|
||||
PEM_read_bio_SSL_SESSION 174 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get_compress_id 175 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get_time 176 1_1_0d EXIST::FUNCTION:
|
||||
SSL_dane_tlsa_add 177 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_accept_state 178 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_add_client_CA 179 1_1_0d EXIST::FUNCTION:
|
||||
SSL_has_pending 180 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_ex_data 181 1_1_0d EXIST::FUNCTION:
|
||||
DTLSv1_listen 182 1_1_0d EXIST::FUNCTION:SOCK
|
||||
SSL_set_tmp_dh_callback 183 1_1_0d EXIST::FUNCTION:DH
|
||||
SSL_CTX_get_default_passwd_cb 184 1_1_0d EXIST::FUNCTION:
|
||||
SSL_test_functions 185 1_1_0d EXIST::FUNCTION:UNIT_TEST
|
||||
SSL_renegotiate 186 1_1_0d EXIST::FUNCTION:
|
||||
SSL_dane_clear_flags 187 1_1_0d EXIST::FUNCTION:
|
||||
SSL_alert_type_string 188 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_up_ref 189 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_verify 190 1_1_0d EXIST::FUNCTION:
|
||||
PEM_write_bio_SSL_SESSION 191 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get0_param 192 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_security_level 193 1_1_0d EXIST::FUNCTION:
|
||||
SSL_state_string 194 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_ssl_method 195 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_srp_username 196 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CTX_ct_is_enabled 197 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_set_bio 198 1_1_0d EXIST::FUNCTION:
|
||||
SSL_alert_desc_string 199 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_check_private_key 200 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CIPHER_is_aead 201 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_sess_get_get_cb 202 1_1_0d EXIST::FUNCTION:
|
||||
SSL_connect 203 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_sess_get_new_cb 204 1_1_0d EXIST::FUNCTION:
|
||||
SSL_write 205 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_add_server_custom_ext 206 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_add_session 207 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_psk_identity_hint 208 1_1_0d EXIST::FUNCTION:PSK
|
||||
SSL_CONF_cmd_value_type 209 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_generate_session_id 210 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_psk_server_callback 211 1_1_0d EXIST::FUNCTION:PSK
|
||||
SSL_get_default_passwd_cb 212 1_1_0d EXIST::FUNCTION:
|
||||
TLS_method 213 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_sess_get_remove_cb 214 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get_ex_data 215 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_security_callback 216 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_CTX_set_ssl_ctx 217 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_sess_set_remove_cb 218 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_load_verify_locations 219 1_1_0d EXIST::FUNCTION:
|
||||
SSL_add_file_cert_subjects_to_stack 220 1_1_0d EXIST::FUNCTION:
|
||||
SSL_certs_clear 221 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CIPHER_get_bits 222 1_1_0d EXIST::FUNCTION:
|
||||
SSL_accept 223 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_state 224 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_verify_mode 225 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get0_hostname 226 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_cipher_list 227 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_set_timeout 228 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_remove_session 229 1_1_0d EXIST::FUNCTION:
|
||||
SSL_shutdown 230 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get1_supported_ciphers 231 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_ex_data_X509_STORE_CTX_idx 232 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_ciphers 233 1_1_0d EXIST::FUNCTION:
|
||||
TLSv1_server_method 234 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_METHOD
|
||||
SSL_trace 235 1_1_0d EXIST::FUNCTION:SSL_TRACE
|
||||
SSL_CTX_get_default_passwd_cb_userdata 236 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_RSAPrivateKey_ASN1 237 1_1_0d EXIST::FUNCTION:RSA
|
||||
SSL_CIPHER_description 238 1_1_0d EXIST::FUNCTION:
|
||||
SSL_COMP_get0_name 239 1_1_0d EXIST::FUNCTION:
|
||||
SSL_free 240 1_1_0d EXIST::FUNCTION:
|
||||
DTLSv1_server_method 241 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,DTLS1_METHOD
|
||||
SSL_CTX_use_PrivateKey_file 242 1_1_0d EXIST::FUNCTION:
|
||||
DTLSv1_2_method 243 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,DTLS1_2_METHOD
|
||||
SSL_do_handshake 244 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_trust 245 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_alpn_protos 246 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_trust 247 1_1_0d EXIST::FUNCTION:
|
||||
SSL_peek 248 1_1_0d EXIST::FUNCTION:
|
||||
BIO_new_ssl_connect 249 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_security_callback 250 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CIPHER_get_digest_nid 251 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_session 252 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_srp_server_param 253 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CTX_set_srp_username_callback 254 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_check_private_key 255 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_param 256 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_info_callback 257 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get_protocol_version 258 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CIPHER_find 259 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_certificate_file 260 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_PrivateKey_ASN1 261 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set0_wbio 262 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_has_ticket 263 1_1_0d EXIST::FUNCTION:
|
||||
GMTLS_method 264 1_1_0d EXIST::FUNCTION:GMTLS
|
||||
SSL_CTX_set_srp_client_pwd_callback 265 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_export_keying_material 266 1_1_0d EXIST::FUNCTION:
|
||||
BIO_ssl_copy_session_id 267 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_psk_client_callback 268 1_1_0d EXIST::FUNCTION:PSK
|
||||
SSL_is_dtls 269 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_options 270 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_RSAPrivateKey 271 1_1_0d EXIST::FUNCTION:RSA
|
||||
SSL_set_ct_validation_callback 272 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_set_msg_callback 273 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_certificate_file 274 1_1_0d EXIST::FUNCTION:
|
||||
SSL_COMP_get_id 275 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_session_id_context 276 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_changed_async_fds 277 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_new 278 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_set1_id_context 279 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_fd 280 1_1_0d EXIST::FUNCTION:SOCK
|
||||
BIO_new_ssl 281 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_srtp_profiles 282 1_1_0d EXIST::FUNCTION:SRTP
|
||||
SRP_Calc_A_param 283 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_set_quiet_shutdown 284 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_wbio 285 1_1_0d EXIST::FUNCTION:
|
||||
SSLv3_server_method 286 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,SSL3_METHOD
|
||||
SSL_CTX_callback_ctrl 287 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_up_ref 288 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_cmd 289 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_quiet_shutdown 290 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_PrivateKey_file 291 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_not_resumable_session_callback 292 1_1_0d EXIST::FUNCTION:
|
||||
SSL_copy_session_id 293 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_print 294 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_SSL_CTX 295 1_1_0d EXIST::FUNCTION:
|
||||
SSLv3_method 296 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,SSL3_METHOD
|
||||
SSL_set_purpose 297 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_cert_store 298 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set0_ctlog_store 299 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_CTX_get0_certificate 300 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get0_ticket 301 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_msg_callback 302 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_info_callback 303 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_default_ctlog_list_file 304 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_SRP_CTX_free 305 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_set_session_ticket_ext_cb 306 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set0_rbio 307 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_PrivateKey 308 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_print_fp 309 1_1_0d EXIST::FUNCTION:STDIO
|
||||
SSL_CTX_set_srp_cb_arg 310 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CTX_set_cookie_generate_cb 311 1_1_0d EXIST::FUNCTION:
|
||||
SSL_config 312 1_1_0d EXIST::FUNCTION:
|
||||
BIO_f_ssl 313 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get_master_key 314 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_peer_cert_chain 315 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_psk_identity_hint 316 1_1_0d EXIST::FUNCTION:PSK
|
||||
TLSv1_2_client_method 317 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_2_METHOD
|
||||
SSL_set_not_resumable_session_callback 318 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_current_cipher 319 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_client_CA_list 320 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_alpn_select_cb 321 1_1_0d EXIST::FUNCTION:
|
||||
SSL_add_dir_cert_subjects_to_stack 322 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_sigalgs 323 1_1_0d EXIST::FUNCTION:
|
||||
SSL_ctrl 324 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_purpose 325 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_session_secret_cb 326 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_default_passwd_cb_userdata 327 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_certificate 328 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_default_verify_file 329 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_fd 330 1_1_0d EXIST::FUNCTION:
|
||||
BIO_ssl_shutdown 331 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_verify_result 332 1_1_0d EXIST::FUNCTION:
|
||||
SSL_add_client_CA 333 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get_timeout 334 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_CTX_finish 335 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_ex_data 336 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get0_security_ex_data 337 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_cipher_list 338 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_cert_store 339 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_dane_clear_flags 340 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set0_security_ex_data 341 1_1_0d EXIST::FUNCTION:
|
||||
SSL_select_next_proto 342 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_privatekey 343 1_1_0d EXIST::FUNCTION:
|
||||
ERR_load_SSL_strings 344 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_default_verify_paths 345 1_1_0d EXIST::FUNCTION:
|
||||
PEM_write_SSL_SESSION 346 1_1_0d EXIST::FUNCTION:STDIO
|
||||
SSL_set_options 347 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_rfd 348 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get_ticket_lifetime_hint 349 1_1_0d EXIST::FUNCTION:
|
||||
SSL_is_gmtls 350 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set1_param 351 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_debug 352 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0
|
||||
SSL_CTX_use_RSAPrivateKey_file 353 1_1_0d EXIST::FUNCTION:RSA
|
||||
SSL_has_matching_session_id 354 1_1_0d EXIST::FUNCTION:
|
||||
SSL_in_before 355 1_1_0d EXIST::FUNCTION:
|
||||
SSL_up_ref 356 1_1_0d EXIST::FUNCTION:
|
||||
SSL_callback_ctrl 357 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_client_cert_cb 358 1_1_0d EXIST::FUNCTION:
|
||||
OPENSSL_init_ssl 359 1_1_0d EXIST::FUNCTION:
|
||||
TLS_client_method 360 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_cookie_verify_cb 361 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_security_callback 362 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_certificate_ASN1 363 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_client_CA_list 364 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_srp_g 365 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CTX_get0_ctlog_store 366 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_CTX_set_alpn_protos 367 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_verify_depth 368 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_selected_srtp_profile 369 1_1_0d EXIST::FUNCTION:SRTP
|
||||
SSL_get_client_ciphers 370 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_verify_depth 371 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_srp_strength 372 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_SESSION_set_time 1 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_ssl_version 2 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_shared_sigalgs 3 1_1_0d EXIST::FUNCTION:
|
||||
SSL_add_client_CA 4 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set0_security_ex_data 5 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_certificate_ASN1 6 1_1_0d EXIST::FUNCTION:
|
||||
BIO_new_ssl_connect 7 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_not_resumable_session_callback 8 1_1_0d EXIST::FUNCTION:
|
||||
GMTLS_client_method 9 1_1_0d EXIST::FUNCTION:GMTLS
|
||||
SSL_SESSION_get_protocol_version 10 1_1_0d EXIST::FUNCTION:
|
||||
SSL_COMP_get_name 11 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_current_expansion 12 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_ctlog_list_file 13 1_1_0d EXIST::FUNCTION:CT
|
||||
DTLSv1_2_server_method 14 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,DTLS1_2_METHOD
|
||||
SSL_CTX_set_default_read_buffer_len 15 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_peer_finished 16 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_fd 17 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_alpn_protos 18 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_peer_certificate 19 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_session_id_context 20 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_connect_state 21 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_tmp_dh_callback 22 1_1_0d EXIST::FUNCTION:DH
|
||||
SSL_set_purpose 23 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_client_CA_list 24 1_1_0d EXIST::FUNCTION:
|
||||
SSL_alert_desc_string 25 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_msg_callback 26 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_security_callback 27 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_msg_callback 28 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get_ex_data 29 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set0_security_ex_data 30 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_psk_server_callback 31 1_1_0d EXIST::FUNCTION:PSK
|
||||
SSL_CTX_set_default_ctlog_list_file 32 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_CTX_get_verify_mode 33 1_1_0d EXIST::FUNCTION:
|
||||
SSL_free 34 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_wfd 35 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_srp_g 36 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_SESSION_set1_id_context 37 1_1_0d EXIST::FUNCTION:
|
||||
SSL_alert_type_string 38 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_CTX_finish 39 1_1_0d EXIST::FUNCTION:
|
||||
SSL_rstate_string 40 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_SSL_CTX 41 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_new 42 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_ciphers 43 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_default_passwd_cb_userdata 44 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_RSAPrivateKey_file 45 1_1_0d EXIST::FUNCTION:RSA
|
||||
SSL_test_functions 46 1_1_0d EXIST::FUNCTION:UNIT_TEST
|
||||
SSL_SESSION_up_ref 47 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_print 48 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_verified_chain 49 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_session 50 1_1_0d EXIST::FUNCTION:
|
||||
d2i_SSL_SESSION 51 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SRP_CTX_init 52 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CTX_set_client_cert_cb 53 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_info_callback 54 1_1_0d EXIST::FUNCTION:
|
||||
TLS_method 55 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get_id 56 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get1_session 57 1_1_0d EXIST::FUNCTION:
|
||||
SSL_read 58 1_1_0d EXIST::FUNCTION:
|
||||
PEM_write_SSL_SESSION 59 1_1_0d EXIST::FUNCTION:STDIO
|
||||
SSL_get_sigalgs 60 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_flush_sessions 61 1_1_0d EXIST::FUNCTION:
|
||||
SSL_alert_desc_string_long 62 1_1_0d EXIST::FUNCTION:
|
||||
SSL_rstate_string_long 63 1_1_0d EXIST::FUNCTION:
|
||||
TLS_client_method 64 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_client_random 65 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get0_privatekey 66 1_1_0d EXIST::FUNCTION:
|
||||
SSL_export_keying_material 67 1_1_0d EXIST::FUNCTION:
|
||||
TLSv1_2_server_method 68 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_2_METHOD
|
||||
SSL_CIPHER_standard_name 69 1_1_0d EXIST::FUNCTION:SSL_TRACE
|
||||
SSL_CTX_get_options 70 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_PrivateKey 71 1_1_0d EXIST::FUNCTION:
|
||||
SSL_ctrl 72 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_peer_cert_chain 73 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_dane_set_flags 74 1_1_0d EXIST::FUNCTION:
|
||||
DTLSv1_listen 75 1_1_0d EXIST::FUNCTION:SOCK
|
||||
SSL_use_RSAPrivateKey 76 1_1_0d EXIST::FUNCTION:RSA
|
||||
SSL_CTX_set_cert_cb 77 1_1_0d EXIST::FUNCTION:
|
||||
SSL_add_ssl_module 78 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_callback_ctrl 79 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_srtp_profiles 80 1_1_0d EXIST::FUNCTION:SRTP
|
||||
SSL_CTX_add_server_custom_ext 81 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CIPHER_get_cipher_nid 82 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_certificate_chain_file 83 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_sess_set_remove_cb 84 1_1_0d EXIST::FUNCTION:
|
||||
DTLSv1_method 85 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,DTLS1_METHOD
|
||||
SSL_CTX_get_default_passwd_cb_userdata 86 1_1_0d EXIST::FUNCTION:
|
||||
SSL_ct_is_enabled 87 1_1_0d EXIST::FUNCTION:CT
|
||||
OPENSSL_init_ssl 88 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_CTX_set1_prefix 89 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_psk_identity_hint 90 1_1_0d EXIST::FUNCTION:PSK
|
||||
SSL_CTX_SRP_CTX_init 91 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_SESSION_get_master_key 92 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_client_CA_list 93 1_1_0d EXIST::FUNCTION:
|
||||
SSL_do_handshake 94 1_1_0d EXIST::FUNCTION:
|
||||
SSL_session_reused 95 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_debug 96 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0
|
||||
SSL_CTX_set_tlsext_use_srtp 97 1_1_0d EXIST::FUNCTION:SRTP
|
||||
SSL_CTX_load_verify_locations 98 1_1_0d EXIST::FUNCTION:
|
||||
SSL_client_version 99 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_all_async_fds 100 1_1_0d EXIST::FUNCTION:
|
||||
TLSv1_2_client_method 101 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_2_METHOD
|
||||
SSL_has_pending 102 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_current_compression 103 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_ciphers 104 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_options 105 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_dane_mtype_set 106 1_1_0d EXIST::FUNCTION:
|
||||
SSL_is_dtls 107 1_1_0d EXIST::FUNCTION:
|
||||
SSL_certs_clear 108 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_set1_id 109 1_1_0d EXIST::FUNCTION:
|
||||
TLSv1_1_method 110 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_1_METHOD
|
||||
SSL_CTX_get_security_level 111 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_verify 112 1_1_0d EXIST::FUNCTION:
|
||||
SSL_clear 113 1_1_0d EXIST::FUNCTION:
|
||||
SSL_copy_session_id 114 1_1_0d EXIST::FUNCTION:
|
||||
SSL_version 115 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_srp_client_pwd_callback 116 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CIPHER_get_name 117 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_srp_strength 118 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_get_info_callback 119 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get_compress_id 120 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CIPHER_get_digest_nid 121 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_PrivateKey_ASN1 122 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_sess_get_remove_cb 123 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_dane_authority 124 1_1_0d EXIST::FUNCTION:
|
||||
GMTLS_server_method 125 1_1_0d EXIST::FUNCTION:GMTLS
|
||||
SSL_CTX_free 126 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_selected_srtp_profile 127 1_1_0d EXIST::FUNCTION:SRTP
|
||||
SSL_CTX_clear_options 128 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_shutdown 129 1_1_0d EXIST::FUNCTION:
|
||||
PEM_read_SSL_SESSION 130 1_1_0d EXIST::FUNCTION:STDIO
|
||||
SSL_get_rbio 131 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_free 132 1_1_0d EXIST::FUNCTION:
|
||||
SSL_dane_enable 133 1_1_0d EXIST::FUNCTION:
|
||||
SSL_dane_clear_flags 134 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_alpn_selected 135 1_1_0d EXIST::FUNCTION:
|
||||
SSL_enable_ct 136 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_get_privatekey 137 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_verify_depth 138 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_sess_get_get_cb 139 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_add_session 140 1_1_0d EXIST::FUNCTION:
|
||||
PEM_read_bio_SSL_SESSION 141 1_1_0d EXIST::FUNCTION:
|
||||
TLSv1_client_method 142 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_METHOD
|
||||
SSL_CIPHER_description 143 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_ex_data 144 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_srp_username 145 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_dup 146 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_psk_client_callback 147 1_1_0d EXIST::FUNCTION:PSK
|
||||
SSL_get_rfd 148 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_srp_server_param_pw 149 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CTX_set_cert_store 150 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_sess_set_get_cb 151 1_1_0d EXIST::FUNCTION:
|
||||
SSL_trace 152 1_1_0d EXIST::FUNCTION:SSL_TRACE
|
||||
SSL_get1_supported_ciphers 153 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_sess_get_new_cb 154 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_PrivateKey_file 155 1_1_0d EXIST::FUNCTION:
|
||||
SSL_COMP_add_compression_method 156 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_srp_username 157 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_set_cipher_list 158 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get0_id_context 159 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_generate_session_id 160 1_1_0d EXIST::FUNCTION:
|
||||
SSL_extension_supported 161 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_client_cert_cb 162 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_cmd 163 1_1_0d EXIST::FUNCTION:
|
||||
TLSv1_method 164 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_METHOD
|
||||
SSL_CTX_set_trust 165 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_default_passwd_cb 166 1_1_0d EXIST::FUNCTION:
|
||||
DTLSv1_server_method 167 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,DTLS1_METHOD
|
||||
DTLS_server_method 168 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_default_passwd_cb_userdata 169 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_read_ahead 170 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_cert_store 171 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_security_ex_data 172 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_next_protos_advertised_cb 173 1_1_0d EXIST::FUNCTION:NEXTPROTONEG
|
||||
SSL_CTX_set_cert_verify_callback 174 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get0_certificate 175 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_security_callback 176 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_ex_data 177 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_CTX_set_flags 178 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_CTX_set_ssl 179 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_ctrl 180 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_client_ciphers 181 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_current_cipher 182 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CIPHER_get_id 183 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_peername 184 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_client_CA_list 185 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_next_proto_select_cb 186 1_1_0d EXIST::FUNCTION:NEXTPROTONEG
|
||||
SSL_SESSION_get0_peer 187 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_add_client_custom_ext 188 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_quiet_shutdown 189 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_RSAPrivateKey 190 1_1_0d EXIST::FUNCTION:RSA
|
||||
SSL_set_psk_client_callback 191 1_1_0d EXIST::FUNCTION:PSK
|
||||
SSL_use_certificate 192 1_1_0d EXIST::FUNCTION:
|
||||
SSL_shutdown 193 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_CTX_clear_flags 194 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_add_client_CA 195 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_cipher_list 196 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_servername 197 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get0_param 198 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_ex_data_X509_STORE_CTX_idx 199 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_certificate_ASN1 200 1_1_0d EXIST::FUNCTION:
|
||||
SSLv3_client_method 201 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,SSL3_METHOD
|
||||
SSL_set_cert_cb 202 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_verify_mode 203 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_verify_callback 204 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CIPHER_get_version 205 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_cmd_argv 206 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_default_passwd_cb 207 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_servername_type 208 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set0_rbio 209 1_1_0d EXIST::FUNCTION:
|
||||
SSL_want 210 1_1_0d EXIST::FUNCTION:
|
||||
SSL_is_gmtls 211 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_not_resumable_session_callback 212 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_psk_identity 213 1_1_0d EXIST::FUNCTION:PSK
|
||||
SSL_set_session_secret_cb 214 1_1_0d EXIST::FUNCTION:
|
||||
TLSv1_1_server_method 215 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_1_METHOD
|
||||
SSL_CTX_set_security_callback 216 1_1_0d EXIST::FUNCTION:
|
||||
BIO_ssl_copy_session_id 217 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_tmp_dh_callback 218 1_1_0d EXIST::FUNCTION:DH
|
||||
SSL_CTX_set_ct_validation_callback 219 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_set_SSL_CTX 220 1_1_0d EXIST::FUNCTION:
|
||||
SSL_state_string 221 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get0_hostname 222 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_CTX_set_ssl_ctx 223 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_srp_cb_arg 224 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CTX_set_options 225 1_1_0d EXIST::FUNCTION:
|
||||
SSL_is_server 226 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_srp_password 227 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CIPHER_is_aead 228 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_cookie_generate_cb 229 1_1_0d EXIST::FUNCTION:
|
||||
SSL_renegotiate 230 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_cipher_list 231 1_1_0d EXIST::FUNCTION:
|
||||
SSL_COMP_get0_name 232 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_session_ticket_ext 233 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_tlsext_use_srtp 234 1_1_0d EXIST::FUNCTION:SRTP
|
||||
SSL_CTX_get_security_callback 235 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_set_ex_data 236 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_verify_callback 237 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_cmd_value_type 238 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_generate_session_id 239 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_srp_N 240 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_set_security_level 241 1_1_0d EXIST::FUNCTION:
|
||||
DTLSv1_client_method 242 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,DTLS1_METHOD
|
||||
SSL_get0_peer_scts 243 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_CTX_set_default_verify_file 244 1_1_0d EXIST::FUNCTION:
|
||||
SSL_in_init 245 1_1_0d EXIST::FUNCTION:
|
||||
ERR_load_SSL_strings 246 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CIPHER_get_kx_nid 247 1_1_0d EXIST::FUNCTION:
|
||||
SSL_COMP_get_compression_methods 248 1_1_0d EXIST::FUNCTION:
|
||||
SSL_check_private_key 249 1_1_0d EXIST::FUNCTION:
|
||||
SSL_callback_ctrl 250 1_1_0d EXIST::FUNCTION:
|
||||
SSL_COMP_set0_compression_methods 251 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_psk_server_callback 252 1_1_0d EXIST::FUNCTION:PSK
|
||||
SSL_SESSION_get_timeout 253 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_default_verify_paths 254 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_srp_userinfo 255 1_1_0d EXIST::FUNCTION:SRP
|
||||
DTLSv1_2_client_method 256 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,DTLS1_2_METHOD
|
||||
BIO_new_ssl 257 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_fd 258 1_1_0d EXIST::FUNCTION:SOCK
|
||||
SSL_CTX_dane_clear_flags 259 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_sessions 260 1_1_0d EXIST::FUNCTION:
|
||||
SSL_write 261 1_1_0d EXIST::FUNCTION:
|
||||
SSL_COMP_get_id 262 1_1_0d EXIST::FUNCTION:
|
||||
SSL_config 263 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_set_timeout 264 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_client_cert_engine 265 1_1_0d EXIST::FUNCTION:ENGINE
|
||||
SSL_get_default_timeout 266 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_session_ticket_ext_cb 267 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_trust 268 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_finished 269 1_1_0d EXIST::FUNCTION:
|
||||
SRP_Calc_A_param 270 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CTX_get_default_passwd_cb 271 1_1_0d EXIST::FUNCTION:
|
||||
SSL_renegotiate_pending 272 1_1_0d EXIST::FUNCTION:
|
||||
SSLv3_server_method 273 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,SSL3_METHOD
|
||||
SSL_set_read_ahead 274 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_print_fp 275 1_1_0d EXIST::FUNCTION:STDIO
|
||||
SSL_set_session 276 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_accept_state 277 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_ex_data 278 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_certificate_file 279 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_certificate_file 280 1_1_0d EXIST::FUNCTION:
|
||||
TLSv1_2_method 281 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_2_METHOD
|
||||
SSL_set1_host 282 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_rfd 283 1_1_0d EXIST::FUNCTION:SOCK
|
||||
SSL_get_shutdown 284 1_1_0d EXIST::FUNCTION:
|
||||
SSL_has_matching_session_id 285 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_config 286 1_1_0d EXIST::FUNCTION:
|
||||
PEM_write_bio_SSL_SESSION 287 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_serverinfo_file 288 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set0_wbio 289 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_serverinfo 290 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_verify_depth 291 1_1_0d EXIST::FUNCTION:
|
||||
SSL_check_chain 292 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_timeout 293 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_verify_result 294 1_1_0d EXIST::FUNCTION:
|
||||
SSLv3_method 295 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,SSL3_METHOD
|
||||
DTLSv1_2_method 296 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,DTLS1_2_METHOD
|
||||
SSL_CTX_up_ref 297 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_verify 298 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_ssl_method 299 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_security_level 300 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_RSAPrivateKey_ASN1 301 1_1_0d EXIST::FUNCTION:RSA
|
||||
TLS_server_method 302 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_PrivateKey_file 303 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_wfd 304 1_1_0d EXIST::FUNCTION:SOCK
|
||||
SSL_clear_options 305 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_verify_depth 306 1_1_0d EXIST::FUNCTION:
|
||||
SSL_select_next_proto 307 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CIPHER_get_auth_nid 308 1_1_0d EXIST::FUNCTION:
|
||||
DTLS_method 309 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get0_security_ex_data 310 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_security_level 311 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_bio 312 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_RSAPrivateKey_file 313 1_1_0d EXIST::FUNCTION:RSA
|
||||
SSL_is_init_finished 314 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_version 315 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_default_passwd_cb_userdata 316 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_sess_set_new_cb 317 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_has_client_custom_ext 318 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_CTX_free 319 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_SRP_CTX_free 320 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_use_RSAPrivateKey_ASN1 321 1_1_0d EXIST::FUNCTION:RSA
|
||||
SSL_CTX_set_srp_username_callback 322 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_dane_tlsa_add 323 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_verify_result 324 1_1_0d EXIST::FUNCTION:
|
||||
SSL_add_file_cert_subjects_to_stack 325 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_dane_tlsa 326 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_psk_identity_hint 327 1_1_0d EXIST::FUNCTION:PSK
|
||||
SSL_CTX_get_timeout 328 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get_time 329 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set0_ctlog_store 330 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_set_options 331 1_1_0d EXIST::FUNCTION:
|
||||
SSL_peek 332 1_1_0d EXIST::FUNCTION:
|
||||
BIO_f_ssl 333 1_1_0d EXIST::FUNCTION:
|
||||
SSL_alert_type_string_long 334 1_1_0d EXIST::FUNCTION:
|
||||
GMTLS_method 335 1_1_0d EXIST::FUNCTION:GMTLS
|
||||
SSL_CTX_get_client_CA_list 336 1_1_0d EXIST::FUNCTION:
|
||||
TLSv1_server_method 337 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_METHOD
|
||||
SSL_dup_CA_list 338 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_changed_async_fds 339 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SRP_CTX_free 340 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CTX_set1_param 341 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_new 342 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_info_callback 343 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get0_cipher 344 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_certificate_chain_file 345 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_check_private_key 346 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_quiet_shutdown 347 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_default_read_buffer_len 348 1_1_0d EXIST::FUNCTION:
|
||||
SSL_renegotiate_abbreviated 349 1_1_0d EXIST::FUNCTION:
|
||||
SSL_add_dir_cert_subjects_to_stack 350 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_srp_server_param 351 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_CTX_get_ex_data 352 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_alpn_select_cb 353 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_info_callback 354 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_CTX_new 355 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_quiet_shutdown 356 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_param 357 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set1_param 358 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_remove_session 359 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_srp_verify_param_callback 360 1_1_0d EXIST::FUNCTION:SRP
|
||||
BIO_new_buffer_ssl_connect 361 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_hostflags 362 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_PrivateKey_ASN1 363 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_error 364 1_1_0d EXIST::FUNCTION:
|
||||
TLSv1_1_client_method 365 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_1_METHOD
|
||||
SSL_CTX_set_verify_depth 366 1_1_0d EXIST::FUNCTION:
|
||||
i2d_SSL_SESSION 367 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get_ticket_lifetime_hint 368 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_ssl_method 369 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_state 370 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_shared_ciphers 371 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_default_passwd_cb 372 1_1_0d EXIST::FUNCTION:
|
||||
SSL_waiting_for_async 373 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_finished 374 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_default_timeout 375 1_1_0d EXIST::FUNCTION:
|
||||
TLSv1_1_method 376 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_1_METHOD
|
||||
SSL_client_version 377 1_1_0d EXIST::FUNCTION:
|
||||
SSL_dup 378 1_1_0d EXIST::FUNCTION:
|
||||
SSL_srp_server_param_with_username 379 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_set_cert_cb 380 1_1_0d EXIST::FUNCTION:
|
||||
SSL_dane_set_flags 381 1_1_0d EXIST::FUNCTION:
|
||||
TLSv1_method 382 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,TLS1_METHOD
|
||||
SSL_CTX_add_client_custom_ext 383 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_peer_certificate 384 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CONF_CTX_new 385 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_verify_callback 386 1_1_0d EXIST::FUNCTION:
|
||||
DTLSv1_2_client_method 387 1_1_0d EXIST::FUNCTION:DEPRECATEDIN_1_1_0,DTLS1_2_METHOD
|
||||
SSL_COMP_get_compression_methods 388 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_session 389 1_1_0d EXIST::FUNCTION:
|
||||
SSL_renegotiate_pending 390 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_next_proto_select_cb 391 1_1_0d EXIST::FUNCTION:NEXTPROTONEG
|
||||
SSL_CTX_set_security_callback 392 1_1_0d EXIST::FUNCTION:
|
||||
SSL_want 393 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get_ssl_method 394 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_ciphers 395 1_1_0d EXIST::FUNCTION:
|
||||
SSL_COMP_set0_compression_methods 396 1_1_0d EXIST::FUNCTION:
|
||||
SSL_alert_desc_string_long 397 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_tlsext_use_srtp 398 1_1_0d EXIST::FUNCTION:SRTP
|
||||
SSL_pending 399 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_client_CA_list 400 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CIPHER_get_version 401 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_ssl_version 402 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_default_read_buffer_len 403 1_1_0d EXIST::FUNCTION:
|
||||
SSL_use_PrivateKey 404 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_client_random 405 1_1_0d EXIST::FUNCTION:
|
||||
SSL_is_init_finished 406 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get0_id_context 407 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_peer_scts 408 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_rstate_string_long 409 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CIPHER_standard_name 410 1_1_0d EXIST::FUNCTION:SSL_TRACE
|
||||
SSL_set0_security_ex_data 411 1_1_0d EXIST::FUNCTION:
|
||||
SSL_up_ref 374 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_ct_is_enabled 375 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_get0_next_proto_negotiated 376 1_1_0d EXIST::FUNCTION:NEXTPROTONEG
|
||||
SSL_get_certificate 377 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_get0_ctlog_store 378 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_CIPHER_find 379 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_has_ticket 380 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_psk_identity_hint 381 1_1_0d EXIST::FUNCTION:PSK
|
||||
BIO_ssl_shutdown 382 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_quiet_shutdown 383 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CIPHER_get_bits 384 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_session_id_context 385 1_1_0d EXIST::FUNCTION:
|
||||
SSL_add1_host 386 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_get0_ticket 387 1_1_0d EXIST::FUNCTION:
|
||||
DTLS_client_method 388 1_1_0d EXIST::FUNCTION:
|
||||
SSL_SESSION_print_keylog 389 1_1_0d EXIST::FUNCTION:
|
||||
SSL_pending 390 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get_wbio 391 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_alpn_protos 392 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_ssl_method 393 1_1_0d EXIST::FUNCTION:
|
||||
SSL_load_client_CA_file 394 1_1_0d EXIST::FUNCTION:
|
||||
SSL_accept 395 1_1_0d EXIST::FUNCTION:
|
||||
SSL_get0_dane 396 1_1_0d EXIST::FUNCTION:
|
||||
SSL_in_before 397 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_cookie_verify_cb 398 1_1_0d EXIST::FUNCTION:
|
||||
SSL_state_string_long 399 1_1_0d EXIST::FUNCTION:
|
||||
SSL_set_ct_validation_callback 400 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_get_server_random 401 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_dane_enable 402 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_default_verify_dir 403 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_set_purpose 404 1_1_0d EXIST::FUNCTION:
|
||||
SSL_new 405 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_enable_ct 406 1_1_0d EXIST::FUNCTION:CT
|
||||
SSL_srp_server_param_with_username 407 1_1_0d EXIST::FUNCTION:SRP
|
||||
SSL_dane_set_flags 408 1_1_0d EXIST::FUNCTION:
|
||||
SSL_connect 409 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_certificate 410 1_1_0d EXIST::FUNCTION:
|
||||
SSL_CTX_use_PrivateKey 411 1_1_0d EXIST::FUNCTION:
|
||||
|
||||
Reference in New Issue
Block a user