mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-29 09:13:38 +08:00
Add sm9 and paillier pem support
This commit is contained in:
@@ -963,6 +963,8 @@ int ERR_load_ASN1_strings(void);
|
||||
# define ASN1_F_I2D_PRIVATEKEY 163
|
||||
# define ASN1_F_I2D_PUBLICKEY 164
|
||||
# define ASN1_F_I2D_RSA_PUBKEY 165
|
||||
# define ASN1_F_I2D_SM9_MASTER_PUBKEY 105
|
||||
# define ASN1_F_I2D_SM9_PUBKEY 112
|
||||
# define ASN1_F_LONG_C2I 166
|
||||
# define ASN1_F_OID_MODULE_INIT 174
|
||||
# define ASN1_F_PARSE_TAGGING 182
|
||||
|
||||
@@ -139,6 +139,7 @@ int ERR_load_CPK_strings(void);
|
||||
# define CPK_R_BAD_DATA 101
|
||||
# define CPK_R_INVALID_ALGORITHM 106
|
||||
# define CPK_R_INVALID_ARGUMENT 107
|
||||
# define CPK_R_INVALID_CURVE 108
|
||||
# define CPK_R_INVALID_ID_LENGTH 102
|
||||
# define CPK_R_INVALID_MAP_ALGOR 103
|
||||
# define CPK_R_INVALID_PKEY_TYPE 104
|
||||
|
||||
@@ -98,9 +98,11 @@
|
||||
# define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
|
||||
# define EVP_PKEY_HMAC NID_hmac
|
||||
# define EVP_PKEY_CMAC NID_cmac
|
||||
# define EVP_PKEY_TLS1_PRF NID_tls1_prf
|
||||
# define EVP_PKEY_HKDF NID_hkdf
|
||||
# define EVP_PKEY_PAILLIER NID_paillier
|
||||
# define EVP_PKEY_TLS1_PRF NID_tls1_prf
|
||||
# define EVP_PKEY_HKDF NID_hkdf
|
||||
# define EVP_PKEY_PAILLIER NID_paillier
|
||||
# define EVP_PKEY_SM9_MASTER NID_id_sm9MasterSecret
|
||||
# define EVP_PKEY_SM9 NID_id_sm9PublicKey
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -454,6 +456,17 @@ typedef int (EVP_PBE_KEYGEN) (EVP_CIPHER_CTX *ctx, const char *pass,
|
||||
(char *)(paillier))
|
||||
# endif
|
||||
|
||||
# ifndef OPENSSL_NO_SM9
|
||||
# define EVP_PKEY_assign_SM9_MASTER(pkey,sm9) EVP_PKEY_assign((pkey),EVP_PKEY_SM9_MASTER,\
|
||||
(char *)(sm9))
|
||||
# define EVP_PKEY_assign_SM9(pkey,sm9) EVP_PKEY_assign((pkey),EVP_PKEY_SM9,\
|
||||
(char *)(sm9))
|
||||
# define EVP_PKEY_assign_SM9MasterSecret(pkey,sm9) EVP_PKEY_assign_SM9_MASTER(pkey,sm9)
|
||||
# define EVP_PKEY_assign_SM9PublicParameters(pkey,sm9) EVP_PKEY_assign_SM9_MASTER(pkey,sm9)
|
||||
# define EVP_PKEY_assign_SM9PrivateKey(pkey,sm9) EVP_PKEY_assign_SM9(pkey,sm9)
|
||||
# define EVP_PKEY_assign_SM9PublicKey(pkey,sm9) EVP_PKEY_assign_SM9(pkey,sm9)
|
||||
# endif
|
||||
|
||||
/* Add some extra combinations */
|
||||
# define EVP_get_digestbynid(a) EVP_get_digestbyname(OBJ_nid2sn(a))
|
||||
# define EVP_get_digestbyobj(a) EVP_get_digestbynid(OBJ_obj2nid(a))
|
||||
@@ -1023,6 +1036,28 @@ int EVP_PKEY_set1_PAILLIER(EVP_PKEY *pkey, struct paillier_st *key);
|
||||
struct paillier_st *EVP_PKEY_get0_PAILLIER(EVP_PKEY *pkey);
|
||||
struct paillier_st *EVP_PKEY_get1_PAILLIER(EVP_PKEY *pkey);
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_SM9
|
||||
struct SM9_MASTER_KEY_st;
|
||||
int EVP_PKEY_set1_SM9_MASTER(EVP_PKEY *pkey, struct SM9_MASTER_KEY_st *key);
|
||||
struct SM9_MASTER_KEY_st *EVP_PKEY_get0_SM9_MASTER(EVP_PKEY *pkey);
|
||||
struct SM9_MASTER_KEY_st *EVP_PKEY_get1_SM9_MASTER(EVP_PKEY *pkey);
|
||||
#define EVP_PKEY_set1_SM9MasterSecret(pk,k) EVP_PKEY_set1_SM9_MASTER(pk,k)
|
||||
#define EVP_PKEY_get0_SM9MasterSecret(pk) EVP_PKEY_get0_SM9_MASTER(pk)
|
||||
#define EVP_PKEY_get1_SM9MasterSecret(pk) EVP_PKEY_get1_SM9_MASTER(pk)
|
||||
#define EVP_PKEY_set1_SM9PublicParameters(pk,k) EVP_PKEY_set1_SM9_MASTER(pk,k)
|
||||
#define EVP_PKEY_get0_SM9PublicParameters(pk) EVP_PKEY_get0_SM9_MASTER(pk)
|
||||
#define EVP_PKEY_get1_SM9PublicParameters(pk) EVP_PKEY_get1_SM9_MASTER(pk)
|
||||
struct SM9_KEY_st;
|
||||
int EVP_PKEY_set1_SM9(EVP_PKEY *pkey, struct SM9_KEY_st *key);
|
||||
struct SM9_KEY_st *EVP_PKEY_get0_SM9(EVP_PKEY *pkey);
|
||||
struct SM9_KEY_st *EVP_PKEY_get1_SM9(EVP_PKEY *pkey);
|
||||
#define EVP_PKEY_set1_SM9PrivateKey(pk,k) EVP_PKEY_set1_SM9(pk,k)
|
||||
#define EVP_PKEY_get0_SM9PrivateKey(pk,k) EVP_PKEY_get0_SM9(pk)
|
||||
#define EVP_PKEY_get1_SM9PrivateKey(pk,k) EVP_PKEY_get1_SM9(pk)
|
||||
#define EVP_PKEY_set1_SM9PublicKey(pk,k) EVP_PKEY_set1_SM9(pk,k)
|
||||
#define EVP_PKEY_get0_SM9PublicKey(pk,k) EVP_PKEY_get0_SM9(pk)
|
||||
#define EVP_PKEY_get1_SM9PublicKey(pk,k) EVP_PKEY_get1_SM9(pk)
|
||||
# endif
|
||||
|
||||
EVP_PKEY *EVP_PKEY_new(void);
|
||||
int EVP_PKEY_up_ref(EVP_PKEY *pkey);
|
||||
@@ -1600,6 +1635,10 @@ int ERR_load_EVP_strings(void);
|
||||
# define EVP_F_EVP_PKEY_GET0_HMAC 183
|
||||
# define EVP_F_EVP_PKEY_GET0_PAILLIER 172
|
||||
# define EVP_F_EVP_PKEY_GET0_RSA 121
|
||||
# define EVP_F_EVP_PKEY_GET0_SM9 176
|
||||
# define EVP_F_EVP_PKEY_GET0_SM9MASTERSECRET 173
|
||||
# define EVP_F_EVP_PKEY_GET0_SM9PUBLICPARAMETERS 174
|
||||
# define EVP_F_EVP_PKEY_GET0_SM9_MASTER 175
|
||||
# define EVP_F_EVP_PKEY_KEYGEN 146
|
||||
# define EVP_F_EVP_PKEY_KEYGEN_INIT 147
|
||||
# define EVP_F_EVP_PKEY_NEW 106
|
||||
@@ -1644,6 +1683,9 @@ int ERR_load_EVP_strings(void);
|
||||
# define EVP_R_EXPECTING_A_DSA_KEY 129
|
||||
# define EVP_R_EXPECTING_A_EC_KEY 142
|
||||
# define EVP_R_EXPECTING_A_PAILLIER 176
|
||||
# define EVP_R_EXPECTING_A_SM9_KEY 180
|
||||
# define EVP_R_EXPECTING_A_SM9_MASTER_KEY 181
|
||||
# define EVP_R_EXPECTING_A_SM9_MASTER_SECRET 179
|
||||
# define EVP_R_FIPS_MODE_NOT_SUPPORTED 167
|
||||
# define EVP_R_ILLEGAL_SCRYPT_PARAMETERS 171
|
||||
# define EVP_R_INITIALIZATION_ERROR 134
|
||||
|
||||
@@ -1072,7 +1072,7 @@
|
||||
|
||||
#define SN_pbe_WithSM3AndSMS4_CBC "PBE-SM3-SMS4"
|
||||
#define LN_pbe_WithSM3AndSMS4_CBC "pbeWithSM3AndSMS4-CBC"
|
||||
#define NID_pbe_WithSM3AndSMS4_CBC 1195
|
||||
#define NID_pbe_WithSM3AndSMS4_CBC 1083
|
||||
#define OBJ_pbe_WithSM3AndSMS4_CBC OBJ_pkcs12_pbeids,100L
|
||||
|
||||
#define OBJ_pkcs12_Version1 OBJ_pkcs12,10L
|
||||
@@ -4553,26 +4553,6 @@
|
||||
#define LN_kx_gost "kx-gost"
|
||||
#define NID_kx_gost 1045
|
||||
|
||||
#define SN_kx_sm2 "KxSM2"
|
||||
#define LN_kx_sm2 "kx-sm2"
|
||||
#define NID_kx_sm2 1186
|
||||
|
||||
#define SN_kx_sm2dhe "KxSM2DHE"
|
||||
#define LN_kx_sm2dhe "kx-sm2dhe"
|
||||
#define NID_kx_sm2dhe 1190
|
||||
|
||||
#define SN_kx_sm2_psk "KxSM2-PSK"
|
||||
#define LN_kx_sm2_psk "kx-sm2-psk"
|
||||
#define NID_kx_sm2_psk 1191
|
||||
|
||||
#define SN_kx_sm9 "KxSM9"
|
||||
#define LN_kx_sm9 "kx-sm9"
|
||||
#define NID_kx_sm9 1188
|
||||
|
||||
#define SN_kx_sm9dhe "KxSM9DHE"
|
||||
#define LN_kx_sm9dhe "kx-sm9dhe"
|
||||
#define NID_kx_sm9dhe 1192
|
||||
|
||||
#define SN_auth_rsa "AuthRSA"
|
||||
#define LN_auth_rsa "auth-rsa"
|
||||
#define NID_auth_rsa 1046
|
||||
@@ -4605,14 +4585,6 @@
|
||||
#define LN_auth_null "auth-null"
|
||||
#define NID_auth_null 1053
|
||||
|
||||
#define SN_auth_sm2 "AuthSM2"
|
||||
#define LN_auth_sm2 "auth-sm2"
|
||||
#define NID_auth_sm2 1187
|
||||
|
||||
#define SN_auth_sm9 "AuthSM9"
|
||||
#define LN_auth_sm9 "auth-sm9"
|
||||
#define NID_auth_sm9 1189
|
||||
|
||||
#define SN_ecies_recommendedParameters "ecies-recommendedParameters"
|
||||
#define NID_ecies_recommendedParameters 1063
|
||||
#define OBJ_ecies_recommendedParameters OBJ_secg_scheme,7L
|
||||
@@ -4690,541 +4662,554 @@
|
||||
#define OBJ_cmac_aes256_ecies OBJ_secg_scheme,24L,2L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha1_xor_hmac "ecies-with-x9-63-sha1-xor-hmac"
|
||||
#define NID_ecies_with_x9_63_sha1_xor_hmac 1169
|
||||
#define NID_ecies_with_x9_63_sha1_xor_hmac 1084
|
||||
#define OBJ_ecies_with_x9_63_sha1_xor_hmac OBJ_ecies_specifiedParameters,1L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha256_xor_hmac "ecies-with-x9-63-sha256-xor-hmac"
|
||||
#define NID_ecies_with_x9_63_sha256_xor_hmac 1170
|
||||
#define NID_ecies_with_x9_63_sha256_xor_hmac 1085
|
||||
#define OBJ_ecies_with_x9_63_sha256_xor_hmac OBJ_ecies_specifiedParameters,2L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha512_xor_hmac "ecies-with-x9-63-sha512-xor-hmac"
|
||||
#define NID_ecies_with_x9_63_sha512_xor_hmac 1171
|
||||
#define NID_ecies_with_x9_63_sha512_xor_hmac 1086
|
||||
#define OBJ_ecies_with_x9_63_sha512_xor_hmac OBJ_ecies_specifiedParameters,3L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha1_aes128_cbc_hmac "ecies-with-x9-63-sha1-aes128-cbc-hmac"
|
||||
#define NID_ecies_with_x9_63_sha1_aes128_cbc_hmac 1172
|
||||
#define NID_ecies_with_x9_63_sha1_aes128_cbc_hmac 1087
|
||||
#define OBJ_ecies_with_x9_63_sha1_aes128_cbc_hmac OBJ_ecies_specifiedParameters,4L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha256_aes128_cbc_hmac "ecies-with-x9-63-sha256-aes128-cbc-hmac"
|
||||
#define NID_ecies_with_x9_63_sha256_aes128_cbc_hmac 1173
|
||||
#define NID_ecies_with_x9_63_sha256_aes128_cbc_hmac 1088
|
||||
#define OBJ_ecies_with_x9_63_sha256_aes128_cbc_hmac OBJ_ecies_specifiedParameters,5L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha512_aes256_cbc_hmac "ecies-with-x9-63-sha512-aes256-cbc-hmac"
|
||||
#define NID_ecies_with_x9_63_sha512_aes256_cbc_hmac 1174
|
||||
#define NID_ecies_with_x9_63_sha512_aes256_cbc_hmac 1089
|
||||
#define OBJ_ecies_with_x9_63_sha512_aes256_cbc_hmac OBJ_ecies_specifiedParameters,6L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha256_aes128_ctr_hmac "ecies-with-x9-63-sha256-aes128-ctr-hmac"
|
||||
#define NID_ecies_with_x9_63_sha256_aes128_ctr_hmac 1175
|
||||
#define NID_ecies_with_x9_63_sha256_aes128_ctr_hmac 1090
|
||||
#define OBJ_ecies_with_x9_63_sha256_aes128_ctr_hmac OBJ_ecies_specifiedParameters,7L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha512_aes256_ctr_hmac "ecies-with-x9-63-sha512-aes256-ctr-hmac"
|
||||
#define NID_ecies_with_x9_63_sha512_aes256_ctr_hmac 1176
|
||||
#define NID_ecies_with_x9_63_sha512_aes256_ctr_hmac 1091
|
||||
#define OBJ_ecies_with_x9_63_sha512_aes256_ctr_hmac OBJ_ecies_specifiedParameters,8L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha256_aes128_cbc_hmac_half "ecies-with-x9-63-sha256-aes128-cbc-hmac-half"
|
||||
#define NID_ecies_with_x9_63_sha256_aes128_cbc_hmac_half 1177
|
||||
#define NID_ecies_with_x9_63_sha256_aes128_cbc_hmac_half 1092
|
||||
#define OBJ_ecies_with_x9_63_sha256_aes128_cbc_hmac_half OBJ_ecies_specifiedParameters,9L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha512_aes256_cbc_hmac_half "ecies-with-x9-63-sha512-aes256-cbc-hmac-half"
|
||||
#define NID_ecies_with_x9_63_sha512_aes256_cbc_hmac_half 1178
|
||||
#define NID_ecies_with_x9_63_sha512_aes256_cbc_hmac_half 1093
|
||||
#define OBJ_ecies_with_x9_63_sha512_aes256_cbc_hmac_half OBJ_ecies_specifiedParameters,10L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha256_aes128_ctr_hmac_half "ecies-with-x9-63-sha256-aes128-ctr-hmac-half"
|
||||
#define NID_ecies_with_x9_63_sha256_aes128_ctr_hmac_half 1179
|
||||
#define NID_ecies_with_x9_63_sha256_aes128_ctr_hmac_half 1094
|
||||
#define OBJ_ecies_with_x9_63_sha256_aes128_ctr_hmac_half OBJ_ecies_specifiedParameters,11L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha512_aes256_ctr_hmac_half "ecies-with-x9-63-sha512-aes256-ctr-hmac-half"
|
||||
#define NID_ecies_with_x9_63_sha512_aes256_ctr_hmac_half 1180
|
||||
#define NID_ecies_with_x9_63_sha512_aes256_ctr_hmac_half 1095
|
||||
#define OBJ_ecies_with_x9_63_sha512_aes256_ctr_hmac_half OBJ_ecies_specifiedParameters,12L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha1_aes128_cbc_cmac "ecies-with-x9-63-sha1-aes128-cbc-cmac"
|
||||
#define NID_ecies_with_x9_63_sha1_aes128_cbc_cmac 1181
|
||||
#define NID_ecies_with_x9_63_sha1_aes128_cbc_cmac 1096
|
||||
#define OBJ_ecies_with_x9_63_sha1_aes128_cbc_cmac OBJ_ecies_specifiedParameters,13L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha256_aes128_cbc_cmac "ecies-with-x9-63-sha256-aes128-cbc-cmac"
|
||||
#define NID_ecies_with_x9_63_sha256_aes128_cbc_cmac 1182
|
||||
#define NID_ecies_with_x9_63_sha256_aes128_cbc_cmac 1097
|
||||
#define OBJ_ecies_with_x9_63_sha256_aes128_cbc_cmac OBJ_ecies_specifiedParameters,14L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha512_aes256_cbc_cmac "ecies-with-x9-63-sha512-aes256-cbc-cmac"
|
||||
#define NID_ecies_with_x9_63_sha512_aes256_cbc_cmac 1183
|
||||
#define NID_ecies_with_x9_63_sha512_aes256_cbc_cmac 1098
|
||||
#define OBJ_ecies_with_x9_63_sha512_aes256_cbc_cmac OBJ_ecies_specifiedParameters,15L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha256_aes128_ctr_cmac "ecies-with-x9-63-sha256-aes128-ctr-cmac"
|
||||
#define NID_ecies_with_x9_63_sha256_aes128_ctr_cmac 1184
|
||||
#define NID_ecies_with_x9_63_sha256_aes128_ctr_cmac 1099
|
||||
#define OBJ_ecies_with_x9_63_sha256_aes128_ctr_cmac OBJ_ecies_specifiedParameters,16L
|
||||
|
||||
#define SN_ecies_with_x9_63_sha512_aes256_ctr_cmac "ecies-with-x9-63-sha512-aes256-ctr-cmac"
|
||||
#define NID_ecies_with_x9_63_sha512_aes256_ctr_cmac 1185
|
||||
#define NID_ecies_with_x9_63_sha512_aes256_ctr_cmac 1100
|
||||
#define OBJ_ecies_with_x9_63_sha512_aes256_ctr_cmac OBJ_ecies_specifiedParameters,17L
|
||||
|
||||
#define OBJ_ibcs OBJ_ISO_US,1L,114334L,1L
|
||||
|
||||
#define SN_ibcs1 "ibcs1"
|
||||
#define NID_ibcs1 1101
|
||||
#define OBJ_ibcs1 OBJ_ibcs,1L
|
||||
|
||||
#define SN_type1curve "type1curve"
|
||||
#define NID_type1curve 1102
|
||||
#define OBJ_type1curve OBJ_ibcs1,1L,1L
|
||||
|
||||
#define SN_bfibe "bfibe"
|
||||
#define NID_bfibe 1103
|
||||
#define OBJ_bfibe OBJ_ibcs1,2L,1L
|
||||
|
||||
#define SN_bb1ibe "bb1ibe"
|
||||
#define NID_bb1ibe 1104
|
||||
#define OBJ_bb1ibe OBJ_ibcs1,2L,2L
|
||||
|
||||
#define SN_ISO_CN "ISO-CN"
|
||||
#define LN_ISO_CN "ISO CN Member Body"
|
||||
#define NID_ISO_CN 1083
|
||||
#define NID_ISO_CN 1105
|
||||
#define OBJ_ISO_CN OBJ_member_body,156L
|
||||
|
||||
#define SN_oscca "oscca"
|
||||
#define NID_oscca 1084
|
||||
#define NID_oscca 1106
|
||||
#define OBJ_oscca OBJ_ISO_CN,10197L
|
||||
|
||||
#define SN_sm_scheme "sm-scheme"
|
||||
#define NID_sm_scheme 1085
|
||||
#define NID_sm_scheme 1107
|
||||
#define OBJ_sm_scheme OBJ_oscca,1L
|
||||
|
||||
#define SN_sm6_ecb "SM6-ECB"
|
||||
#define LN_sm6_ecb "sm6-ecb"
|
||||
#define NID_sm6_ecb 1086
|
||||
#define OBJ_sm6_ecb OBJ_sm_scheme,101L,1L
|
||||
|
||||
#define SN_sm6_cbc "SM6-CBC"
|
||||
#define LN_sm6_cbc "sm6-cbc"
|
||||
#define NID_sm6_cbc 1087
|
||||
#define OBJ_sm6_cbc OBJ_sm_scheme,101L,2L
|
||||
|
||||
#define SN_sm6_ofb128 "SM6-OFB"
|
||||
#define LN_sm6_ofb128 "sm6-ofb"
|
||||
#define NID_sm6_ofb128 1088
|
||||
#define OBJ_sm6_ofb128 OBJ_sm_scheme,101L,3L
|
||||
|
||||
#define SN_sm6_cfb128 "SM6-CFB"
|
||||
#define LN_sm6_cfb128 "sm6-cfb"
|
||||
#define NID_sm6_cfb128 1089
|
||||
#define OBJ_sm6_cfb128 OBJ_sm_scheme,101L,4L
|
||||
|
||||
#define SN_sm1_ecb "SM1-ECB"
|
||||
#define LN_sm1_ecb "sm1-ecb"
|
||||
#define NID_sm1_ecb 1090
|
||||
#define OBJ_sm1_ecb OBJ_sm_scheme,102L,1L
|
||||
|
||||
#define SN_sm1_cbc "SM1-CBC"
|
||||
#define LN_sm1_cbc "sm1-cbc"
|
||||
#define NID_sm1_cbc 1091
|
||||
#define OBJ_sm1_cbc OBJ_sm_scheme,102L,2L
|
||||
|
||||
#define SN_sm1_ofb128 "SM1-OFB"
|
||||
#define LN_sm1_ofb128 "sm1-ofb"
|
||||
#define NID_sm1_ofb128 1092
|
||||
#define OBJ_sm1_ofb128 OBJ_sm_scheme,102L,3L
|
||||
|
||||
#define SN_sm1_cfb128 "SM1-CFB"
|
||||
#define LN_sm1_cfb128 "sm1-cfb"
|
||||
#define NID_sm1_cfb128 1093
|
||||
#define OBJ_sm1_cfb128 OBJ_sm_scheme,102L,4L
|
||||
|
||||
#define SN_sm1_cfb1 "SM1-CFB1"
|
||||
#define LN_sm1_cfb1 "sm1-cfb1"
|
||||
#define NID_sm1_cfb1 1094
|
||||
#define OBJ_sm1_cfb1 OBJ_sm_scheme,102L,5L
|
||||
|
||||
#define SN_sm1_cfb8 "SM1-CFB8"
|
||||
#define LN_sm1_cfb8 "sm1-cfb8"
|
||||
#define NID_sm1_cfb8 1095
|
||||
#define OBJ_sm1_cfb8 OBJ_sm_scheme,102L,6L
|
||||
|
||||
#define SN_ssf33_ecb "SSF33-ECB"
|
||||
#define LN_ssf33_ecb "ssf33-ecb"
|
||||
#define NID_ssf33_ecb 1096
|
||||
#define NID_ssf33_ecb 1108
|
||||
#define OBJ_ssf33_ecb OBJ_sm_scheme,103L,1L
|
||||
|
||||
#define SN_ssf33_cbc "SSF33-CBC"
|
||||
#define LN_ssf33_cbc "ssf33-cbc"
|
||||
#define NID_ssf33_cbc 1097
|
||||
#define NID_ssf33_cbc 1109
|
||||
#define OBJ_ssf33_cbc OBJ_sm_scheme,103L,2L
|
||||
|
||||
#define SN_ssf33_ofb128 "SSF33-OFB"
|
||||
#define LN_ssf33_ofb128 "ssf33-ofb"
|
||||
#define NID_ssf33_ofb128 1098
|
||||
#define NID_ssf33_ofb128 1110
|
||||
#define OBJ_ssf33_ofb128 OBJ_sm_scheme,103L,3L
|
||||
|
||||
#define SN_ssf33_cfb128 "SSF33-CFB"
|
||||
#define LN_ssf33_cfb128 "ssf33-cfb"
|
||||
#define NID_ssf33_cfb128 1099
|
||||
#define NID_ssf33_cfb128 1111
|
||||
#define OBJ_ssf33_cfb128 OBJ_sm_scheme,103L,4L
|
||||
|
||||
#define SN_ssf33_cfb1 "SSF33-CFB1"
|
||||
#define LN_ssf33_cfb1 "ssf33-cfb1"
|
||||
#define NID_ssf33_cfb1 1100
|
||||
#define NID_ssf33_cfb1 1112
|
||||
#define OBJ_ssf33_cfb1 OBJ_sm_scheme,103L,5L
|
||||
|
||||
#define SN_ssf33_cfb8 "SSF33-CFB8"
|
||||
#define LN_ssf33_cfb8 "ssf33-cfb8"
|
||||
#define NID_ssf33_cfb8 1101
|
||||
#define NID_ssf33_cfb8 1113
|
||||
#define OBJ_ssf33_cfb8 OBJ_sm_scheme,103L,6L
|
||||
|
||||
#define SN_ssf33_cbc_mac "SSF33-CBC-MAC"
|
||||
#define LN_ssf33_cbc_mac "ssf33-cbc-mac"
|
||||
#define NID_ssf33_cbc_mac 1114
|
||||
#define OBJ_ssf33_cbc_mac OBJ_sm_scheme,103L,7L
|
||||
|
||||
#define SN_sm1_ecb "SM1-ECB"
|
||||
#define LN_sm1_ecb "sm1-ecb"
|
||||
#define NID_sm1_ecb 1115
|
||||
#define OBJ_sm1_ecb OBJ_sm_scheme,102L,1L
|
||||
|
||||
#define SN_sm1_cbc "SM1-CBC"
|
||||
#define LN_sm1_cbc "sm1-cbc"
|
||||
#define NID_sm1_cbc 1116
|
||||
#define OBJ_sm1_cbc OBJ_sm_scheme,102L,2L
|
||||
|
||||
#define SN_sm1_ofb128 "SM1-OFB"
|
||||
#define LN_sm1_ofb128 "sm1-ofb"
|
||||
#define NID_sm1_ofb128 1117
|
||||
#define OBJ_sm1_ofb128 OBJ_sm_scheme,102L,3L
|
||||
|
||||
#define SN_sm1_cfb128 "SM1-CFB"
|
||||
#define LN_sm1_cfb128 "sm1-cfb"
|
||||
#define NID_sm1_cfb128 1118
|
||||
#define OBJ_sm1_cfb128 OBJ_sm_scheme,102L,4L
|
||||
|
||||
#define SN_sm1_cfb1 "SM1-CFB1"
|
||||
#define LN_sm1_cfb1 "sm1-cfb1"
|
||||
#define NID_sm1_cfb1 1119
|
||||
#define OBJ_sm1_cfb1 OBJ_sm_scheme,102L,5L
|
||||
|
||||
#define SN_sm1_cfb8 "SM1-CFB8"
|
||||
#define LN_sm1_cfb8 "sm1-cfb8"
|
||||
#define NID_sm1_cfb8 1120
|
||||
#define OBJ_sm1_cfb8 OBJ_sm_scheme,102L,6L
|
||||
|
||||
#define SN_sm2p256v1 "sm2p256v1"
|
||||
#define NID_sm2p256v1 1121
|
||||
#define OBJ_sm2p256v1 OBJ_sm_scheme,301L
|
||||
|
||||
#define SN_sm2sign "sm2sign"
|
||||
#define NID_sm2sign 1122
|
||||
#define OBJ_sm2sign OBJ_sm_scheme,301L,1L
|
||||
|
||||
#define SN_sm2exchange "sm2exchange"
|
||||
#define NID_sm2exchange 1123
|
||||
#define OBJ_sm2exchange OBJ_sm_scheme,301L,2L
|
||||
|
||||
#define SN_sm2encrypt "sm2encrypt"
|
||||
#define NID_sm2encrypt 1124
|
||||
#define OBJ_sm2encrypt OBJ_sm_scheme,301L,3L
|
||||
|
||||
#define SN_sm2sign_with_sm3 "SM2Sign-with-SM3"
|
||||
#define LN_sm2sign_with_sm3 "sm2sign-with-sm3"
|
||||
#define NID_sm2sign_with_sm3 1125
|
||||
#define OBJ_sm2sign_with_sm3 OBJ_sm_scheme,501L
|
||||
|
||||
#define SN_sm2sign_with_sha1 "SM2Sign-with-SHA1"
|
||||
#define LN_sm2sign_with_sha1 "sm2sign-with-sha1"
|
||||
#define NID_sm2sign_with_sha1 1126
|
||||
#define OBJ_sm2sign_with_sha1 OBJ_sm_scheme,502L
|
||||
|
||||
#define SN_sm2sign_with_sha256 "SM2Sign-with-SHA256"
|
||||
#define LN_sm2sign_with_sha256 "sm2sign-with-sha256"
|
||||
#define NID_sm2sign_with_sha256 1127
|
||||
#define OBJ_sm2sign_with_sha256 OBJ_sm_scheme,503L
|
||||
|
||||
#define SN_sm2sign_with_sha512 "SM2Sign-with-SHA511"
|
||||
#define LN_sm2sign_with_sha512 "sm2sign-with-sha512"
|
||||
#define NID_sm2sign_with_sha512 1128
|
||||
#define OBJ_sm2sign_with_sha512 OBJ_sm_scheme,504L
|
||||
|
||||
#define SN_sm2sign_with_sha224 "SM2Sign-with-SHA224"
|
||||
#define LN_sm2sign_with_sha224 "sm2sign-with-sha224"
|
||||
#define NID_sm2sign_with_sha224 1129
|
||||
#define OBJ_sm2sign_with_sha224 OBJ_sm_scheme,505L
|
||||
|
||||
#define SN_sm2sign_with_sha384 "SM2Sign-with-SHA384"
|
||||
#define LN_sm2sign_with_sha384 "sm2sign-with-sha384"
|
||||
#define NID_sm2sign_with_sha384 1130
|
||||
#define OBJ_sm2sign_with_sha384 OBJ_sm_scheme,506L
|
||||
|
||||
#define SN_sm2sign_with_rmd160 "SM2Sign-with-RMD160"
|
||||
#define LN_sm2sign_with_rmd160 "sm2sign-with-rmd160"
|
||||
#define NID_sm2sign_with_rmd160 1131
|
||||
#define OBJ_sm2sign_with_rmd160 OBJ_sm_scheme,507L
|
||||
|
||||
#define SN_sm2sign_with_whirlpool "SM2Sign-with-Whirlpool"
|
||||
#define LN_sm2sign_with_whirlpool "sm2sign-with-whirlpool"
|
||||
#define NID_sm2sign_with_whirlpool 1132
|
||||
#define OBJ_sm2sign_with_whirlpool OBJ_sm_scheme,520L
|
||||
|
||||
#define SN_sm2sign_with_blake2b512 "SM2Sign-with-Blake2b512"
|
||||
#define LN_sm2sign_with_blake2b512 "sm2sign-with-blake2b512"
|
||||
#define NID_sm2sign_with_blake2b512 1133
|
||||
#define OBJ_sm2sign_with_blake2b512 OBJ_sm_scheme,521L
|
||||
|
||||
#define SN_sm2sign_with_blake2s256 "SM2Sign-with-Blake2s256"
|
||||
#define LN_sm2sign_with_blake2s256 "sm2sign-with-blake2s256"
|
||||
#define NID_sm2sign_with_blake2s256 1134
|
||||
#define OBJ_sm2sign_with_blake2s256 OBJ_sm_scheme,522L
|
||||
|
||||
#define SN_sm2encrypt_recommendedParameters "sm2encrypt-recommendedParameters"
|
||||
#define NID_sm2encrypt_recommendedParameters 1135
|
||||
#define OBJ_sm2encrypt_recommendedParameters OBJ_sm2encrypt,1L
|
||||
|
||||
#define SN_sm2encrypt_specifiedParameters "sm2encrypt-specifiedParameters"
|
||||
#define NID_sm2encrypt_specifiedParameters 1136
|
||||
#define OBJ_sm2encrypt_specifiedParameters OBJ_sm2encrypt,2L
|
||||
|
||||
#define SN_sm2encrypt_with_sm3 "sm2encrypt-with-sm3"
|
||||
#define NID_sm2encrypt_with_sm3 1137
|
||||
#define OBJ_sm2encrypt_with_sm3 OBJ_sm2encrypt,2L,1L
|
||||
|
||||
#define SN_sm2encrypt_with_sha1 "sm2encrypt-with-sha1"
|
||||
#define NID_sm2encrypt_with_sha1 1138
|
||||
#define OBJ_sm2encrypt_with_sha1 OBJ_sm2encrypt,2L,2L
|
||||
|
||||
#define SN_sm2encrypt_with_sha224 "sm2encrypt-with-sha224"
|
||||
#define NID_sm2encrypt_with_sha224 1139
|
||||
#define OBJ_sm2encrypt_with_sha224 OBJ_sm2encrypt,2L,3L
|
||||
|
||||
#define SN_sm2encrypt_with_sha256 "sm2encrypt-with-sha256"
|
||||
#define NID_sm2encrypt_with_sha256 1140
|
||||
#define OBJ_sm2encrypt_with_sha256 OBJ_sm2encrypt,2L,4L
|
||||
|
||||
#define SN_sm2encrypt_with_sha384 "sm2encrypt-with-sha384"
|
||||
#define NID_sm2encrypt_with_sha384 1141
|
||||
#define OBJ_sm2encrypt_with_sha384 OBJ_sm2encrypt,2L,5L
|
||||
|
||||
#define SN_sm2encrypt_with_sha512 "sm2encrypt-with-sha512"
|
||||
#define NID_sm2encrypt_with_sha512 1142
|
||||
#define OBJ_sm2encrypt_with_sha512 OBJ_sm2encrypt,2L,6L
|
||||
|
||||
#define SN_sm2encrypt_with_rmd160 "sm2encrypt-with-rmd160"
|
||||
#define NID_sm2encrypt_with_rmd160 1143
|
||||
#define OBJ_sm2encrypt_with_rmd160 OBJ_sm2encrypt,2L,7L
|
||||
|
||||
#define SN_sm2encrypt_with_whirlpool "sm2encrypt-with-whirlpool"
|
||||
#define NID_sm2encrypt_with_whirlpool 1144
|
||||
#define OBJ_sm2encrypt_with_whirlpool OBJ_sm2encrypt,2L,8L
|
||||
|
||||
#define SN_sm2encrypt_with_blake2b512 "sm2encrypt-with-blake2b512"
|
||||
#define NID_sm2encrypt_with_blake2b512 1145
|
||||
#define OBJ_sm2encrypt_with_blake2b512 OBJ_sm2encrypt,2L,9L
|
||||
|
||||
#define SN_sm2encrypt_with_blake2s256 "sm2encrypt-with-blake2s256"
|
||||
#define NID_sm2encrypt_with_blake2s256 1146
|
||||
#define OBJ_sm2encrypt_with_blake2s256 OBJ_sm2encrypt,2L,10L
|
||||
|
||||
#define SN_sm2encrypt_with_md5 "sm2encrypt-with-md5"
|
||||
#define NID_sm2encrypt_with_md5 1147
|
||||
#define OBJ_sm2encrypt_with_md5 OBJ_sm2encrypt,2L,11L
|
||||
|
||||
#define SN_sm3 "SM3"
|
||||
#define LN_sm3 "sm3"
|
||||
#define NID_sm3 1148
|
||||
#define OBJ_sm3 OBJ_sm_scheme,401L
|
||||
|
||||
#define SN_hmac_sm3 "HMAC-SM3"
|
||||
#define LN_hmac_sm3 "hmac-sm3"
|
||||
#define NID_hmac_sm3 1149
|
||||
#define OBJ_hmac_sm3 OBJ_sm_scheme,401L,2L
|
||||
|
||||
#define SN_sms4_ecb "SMS4-ECB"
|
||||
#define LN_sms4_ecb "sms4-ecb"
|
||||
#define NID_sms4_ecb 1102
|
||||
#define NID_sms4_ecb 1150
|
||||
#define OBJ_sms4_ecb OBJ_sm_scheme,104L,1L
|
||||
|
||||
#define SN_sms4_cbc "SMS4-CBC"
|
||||
#define LN_sms4_cbc "sms4-cbc"
|
||||
#define NID_sms4_cbc 1103
|
||||
#define NID_sms4_cbc 1151
|
||||
#define OBJ_sms4_cbc OBJ_sm_scheme,104L,2L
|
||||
|
||||
#define SN_sms4_ofb128 "SMS4-OFB"
|
||||
#define LN_sms4_ofb128 "sms4-ofb"
|
||||
#define NID_sms4_ofb128 1104
|
||||
#define NID_sms4_ofb128 1152
|
||||
#define OBJ_sms4_ofb128 OBJ_sm_scheme,104L,3L
|
||||
|
||||
#define SN_sms4_cfb128 "SMS4-CFB"
|
||||
#define LN_sms4_cfb128 "sms4-cfb"
|
||||
#define NID_sms4_cfb128 1105
|
||||
#define NID_sms4_cfb128 1153
|
||||
#define OBJ_sms4_cfb128 OBJ_sm_scheme,104L,4L
|
||||
|
||||
#define SN_sms4_cfb1 "SMS4-CFB1"
|
||||
#define LN_sms4_cfb1 "sms4-cfb1"
|
||||
#define NID_sms4_cfb1 1106
|
||||
#define NID_sms4_cfb1 1154
|
||||
#define OBJ_sms4_cfb1 OBJ_sm_scheme,104L,5L
|
||||
|
||||
#define SN_sms4_cfb8 "SMS4-CFB8"
|
||||
#define LN_sms4_cfb8 "sms4-cfb8"
|
||||
#define NID_sms4_cfb8 1107
|
||||
#define NID_sms4_cfb8 1155
|
||||
#define OBJ_sms4_cfb8 OBJ_sm_scheme,104L,6L
|
||||
|
||||
#define SN_sms4_ctr "SMS4-CTR"
|
||||
#define LN_sms4_ctr "sms4-ctr"
|
||||
#define NID_sms4_ctr 1108
|
||||
#define NID_sms4_ctr 1156
|
||||
#define OBJ_sms4_ctr OBJ_sm_scheme,104L,7L
|
||||
|
||||
#define SN_sms4_gcm "SMS4-GCM"
|
||||
#define LN_sms4_gcm "sms4-gcm"
|
||||
#define NID_sms4_gcm 1109
|
||||
#define NID_sms4_gcm 1157
|
||||
#define OBJ_sms4_gcm OBJ_sm_scheme,104L,8L
|
||||
|
||||
#define SN_sms4_ccm "SMS4-CCM"
|
||||
#define LN_sms4_ccm "sms4-ccm"
|
||||
#define NID_sms4_ccm 1110
|
||||
#define NID_sms4_ccm 1158
|
||||
#define OBJ_sms4_ccm OBJ_sm_scheme,104L,9L
|
||||
|
||||
#define SN_sms4_xts "SMS4-XTS"
|
||||
#define LN_sms4_xts "sms4-xts"
|
||||
#define NID_sms4_xts 1111
|
||||
#define NID_sms4_xts 1159
|
||||
#define OBJ_sms4_xts OBJ_sm_scheme,104L,10L
|
||||
|
||||
#define SN_sms4_wrap "SMS4-WRAP"
|
||||
#define LN_sms4_wrap "sms4-wrap"
|
||||
#define NID_sms4_wrap 1112
|
||||
#define NID_sms4_wrap 1160
|
||||
#define OBJ_sms4_wrap OBJ_sm_scheme,104L,11L
|
||||
|
||||
#define SN_sms4_wrap_pad "SMS4-WRAP-PAD"
|
||||
#define LN_sms4_wrap_pad "sms4-wrap-pad"
|
||||
#define NID_sms4_wrap_pad 1113
|
||||
#define NID_sms4_wrap_pad 1161
|
||||
#define OBJ_sms4_wrap_pad OBJ_sm_scheme,104L,12L
|
||||
|
||||
#define SN_sms4_ocb "SMS4-OCB"
|
||||
#define LN_sms4_ocb "sms4-ocb"
|
||||
#define NID_sms4_ocb 1114
|
||||
#define NID_sms4_ocb 1162
|
||||
#define OBJ_sms4_ocb OBJ_sm_scheme,104L,100L
|
||||
|
||||
#define SN_sm5 "SM5"
|
||||
#define LN_sm5 "sm5"
|
||||
#define NID_sm5 1163
|
||||
#define OBJ_sm5 OBJ_sm_scheme,201L
|
||||
|
||||
#define SN_sm6_ecb "SM6-ECB"
|
||||
#define LN_sm6_ecb "sm6-ecb"
|
||||
#define NID_sm6_ecb 1164
|
||||
#define OBJ_sm6_ecb OBJ_sm_scheme,101L,1L
|
||||
|
||||
#define SN_sm6_cbc "SM6-CBC"
|
||||
#define LN_sm6_cbc "sm6-cbc"
|
||||
#define NID_sm6_cbc 1165
|
||||
#define OBJ_sm6_cbc OBJ_sm_scheme,101L,2L
|
||||
|
||||
#define SN_sm6_ofb128 "SM6-OFB"
|
||||
#define LN_sm6_ofb128 "sm6-ofb"
|
||||
#define NID_sm6_ofb128 1166
|
||||
#define OBJ_sm6_ofb128 OBJ_sm_scheme,101L,3L
|
||||
|
||||
#define SN_sm6_cfb128 "SM6-CFB"
|
||||
#define LN_sm6_cfb128 "sm6-cfb"
|
||||
#define NID_sm6_cfb128 1167
|
||||
#define OBJ_sm6_cfb128 OBJ_sm_scheme,101L,4L
|
||||
|
||||
#define OBJ_sm7 OBJ_sm_scheme,105L
|
||||
|
||||
#define OBJ_sm8 OBJ_sm_scheme,106L
|
||||
|
||||
#define SN_sm5 "SM5"
|
||||
#define LN_sm5 "sm5"
|
||||
#define NID_sm5 1115
|
||||
#define OBJ_sm5 OBJ_sm_scheme,201L
|
||||
|
||||
#define SN_sm2p256v1 "sm2p256v1"
|
||||
#define NID_sm2p256v1 1116
|
||||
#define OBJ_sm2p256v1 OBJ_sm_scheme,301L
|
||||
|
||||
#define SN_sm2sign "sm2sign"
|
||||
#define NID_sm2sign 1117
|
||||
#define OBJ_sm2sign OBJ_sm_scheme,301L,1L
|
||||
|
||||
#define SN_sm2exchange "sm2exchange"
|
||||
#define NID_sm2exchange 1149
|
||||
#define OBJ_sm2exchange OBJ_sm_scheme,301L,2L
|
||||
|
||||
#define SN_sm2encrypt "sm2encrypt"
|
||||
#define NID_sm2encrypt 1119
|
||||
#define OBJ_sm2encrypt OBJ_sm_scheme,301L,3L
|
||||
|
||||
#define SN_sm2encrypt_recommendedParameters "sm2encrypt-recommendedParameters"
|
||||
#define NID_sm2encrypt_recommendedParameters 1120
|
||||
#define OBJ_sm2encrypt_recommendedParameters OBJ_sm2encrypt,1L
|
||||
|
||||
#define SN_sm2encrypt_specifiedParameters "sm2encrypt-specifiedParameters"
|
||||
#define NID_sm2encrypt_specifiedParameters 1121
|
||||
#define OBJ_sm2encrypt_specifiedParameters OBJ_sm2encrypt,2L
|
||||
|
||||
#define SN_sm2encrypt_with_sm3 "sm2encrypt-with-sm3"
|
||||
#define NID_sm2encrypt_with_sm3 1155
|
||||
#define OBJ_sm2encrypt_with_sm3 OBJ_sm2encrypt,2L,1L
|
||||
|
||||
#define SN_sm2encrypt_with_sha1 "sm2encrypt-with-sha1"
|
||||
#define NID_sm2encrypt_with_sha1 1156
|
||||
#define OBJ_sm2encrypt_with_sha1 OBJ_sm2encrypt,2L,2L
|
||||
|
||||
#define SN_sm2encrypt_with_sha224 "sm2encrypt-with-sha224"
|
||||
#define NID_sm2encrypt_with_sha224 1157
|
||||
#define OBJ_sm2encrypt_with_sha224 OBJ_sm2encrypt,2L,3L
|
||||
|
||||
#define SN_sm2encrypt_with_sha256 "sm2encrypt-with-sha256"
|
||||
#define NID_sm2encrypt_with_sha256 1158
|
||||
#define OBJ_sm2encrypt_with_sha256 OBJ_sm2encrypt,2L,4L
|
||||
|
||||
#define SN_sm2encrypt_with_sha384 "sm2encrypt-with-sha384"
|
||||
#define NID_sm2encrypt_with_sha384 1159
|
||||
#define OBJ_sm2encrypt_with_sha384 OBJ_sm2encrypt,2L,5L
|
||||
|
||||
#define SN_sm2encrypt_with_sha512 "sm2encrypt-with-sha512"
|
||||
#define NID_sm2encrypt_with_sha512 1160
|
||||
#define OBJ_sm2encrypt_with_sha512 OBJ_sm2encrypt,2L,6L
|
||||
|
||||
#define SN_sm2encrypt_with_rmd160 "sm2encrypt-with-rmd160"
|
||||
#define NID_sm2encrypt_with_rmd160 1161
|
||||
#define OBJ_sm2encrypt_with_rmd160 OBJ_sm2encrypt,2L,7L
|
||||
|
||||
#define SN_sm2encrypt_with_whirlpool "sm2encrypt-with-whirlpool"
|
||||
#define NID_sm2encrypt_with_whirlpool 1162
|
||||
#define OBJ_sm2encrypt_with_whirlpool OBJ_sm2encrypt,2L,8L
|
||||
|
||||
#define SN_sm2encrypt_with_blake2b512 "sm2encrypt-with-blake2b512"
|
||||
#define NID_sm2encrypt_with_blake2b512 1163
|
||||
#define OBJ_sm2encrypt_with_blake2b512 OBJ_sm2encrypt,2L,9L
|
||||
|
||||
#define SN_sm2encrypt_with_blake2s256 "sm2encrypt-with-blake2s256"
|
||||
#define NID_sm2encrypt_with_blake2s256 1164
|
||||
#define OBJ_sm2encrypt_with_blake2s256 OBJ_sm2encrypt,2L,10L
|
||||
|
||||
#define SN_sm2encrypt_with_md5 "sm2encrypt-with-md5"
|
||||
#define NID_sm2encrypt_with_md5 1165
|
||||
#define OBJ_sm2encrypt_with_md5 OBJ_sm2encrypt,2L,11L
|
||||
|
||||
#define SN_id_sm9PublicKey "id-sm9PublicKey"
|
||||
#define NID_id_sm9PublicKey 1122
|
||||
#define NID_id_sm9PublicKey 1168
|
||||
#define OBJ_id_sm9PublicKey OBJ_sm_scheme,302L
|
||||
|
||||
#define SN_sm9sign "sm9sign"
|
||||
#define NID_sm9sign 1123
|
||||
#define NID_sm9sign 1169
|
||||
#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 NID_sm9keyagreement 1170
|
||||
#define OBJ_sm9keyagreement OBJ_sm_scheme,302L,2L
|
||||
|
||||
#define SN_sm9encrypt "sm9encrypt"
|
||||
#define NID_sm9encrypt 1125
|
||||
#define NID_sm9encrypt 1171
|
||||
#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 NID_sm9hash1 1172
|
||||
#define OBJ_sm9hash1 OBJ_sm_scheme,302L,4L
|
||||
|
||||
#define SN_sm9kdf "sm9kdf"
|
||||
#define NID_sm9kdf 1209
|
||||
#define NID_sm9kdf 1173
|
||||
#define OBJ_sm9kdf OBJ_sm_scheme,302L,5L
|
||||
|
||||
#define SN_id_sm9MasterSecret "id-sm9MasterSecret"
|
||||
#define NID_id_sm9MasterSecret 1174
|
||||
#define OBJ_id_sm9MasterSecret OBJ_sm_scheme,302L,6L
|
||||
|
||||
#define SN_sm9bn256v1 "sm9bn256v1"
|
||||
#define NID_sm9bn256v1 1175
|
||||
#define OBJ_sm9bn256v1 OBJ_sm_scheme,302L,6L,1L
|
||||
|
||||
#define SN_sm9sign_with_sm3 "sm9sign-with-sm3"
|
||||
#define NID_sm9sign_with_sm3 1176
|
||||
#define OBJ_sm9sign_with_sm3 OBJ_sm9sign,1L
|
||||
|
||||
#define SN_sm9sign_with_sha256 "sm9sign-with-sha256"
|
||||
#define NID_sm9sign_with_sha256 1177
|
||||
#define OBJ_sm9sign_with_sha256 OBJ_sm9sign,2L
|
||||
|
||||
#define SN_sm9encrypt_with_sm3_xor "sm9encrypt-with-sm3-xor"
|
||||
#define NID_sm9encrypt_with_sm3_xor 1178
|
||||
#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 1179
|
||||
#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 1180
|
||||
#define OBJ_sm9encrypt_with_sm3_sms4_ctr OBJ_sm9encrypt,3L
|
||||
|
||||
#define SN_sm9hash1_with_sm3 "sm9hash1-with-sm3"
|
||||
#define NID_sm9hash1_with_sm3 1202
|
||||
#define NID_sm9hash1_with_sm3 1181
|
||||
#define OBJ_sm9hash1_with_sm3 OBJ_sm9hash1,1L
|
||||
|
||||
#define SN_sm9hash1_with_sha256 "sm9hash1-with-sha256"
|
||||
#define NID_sm9hash1_with_sha256 1203
|
||||
#define NID_sm9hash1_with_sha256 1182
|
||||
#define OBJ_sm9hash1_with_sha256 OBJ_sm9hash1,2L
|
||||
|
||||
#define SN_sm9kdf_with_sm3 "sm9kdf-with-sm3"
|
||||
#define NID_sm9kdf_with_sm3 1210
|
||||
#define NID_sm9kdf_with_sm3 1183
|
||||
#define OBJ_sm9kdf_with_sm3 OBJ_sm9kdf,1L
|
||||
|
||||
#define SN_sm9kdf_with_sha256 "sm9kdf-with-sha256"
|
||||
#define NID_sm9kdf_with_sha256 1211
|
||||
#define NID_sm9kdf_with_sha256 1184
|
||||
#define OBJ_sm9kdf_with_sha256 OBJ_sm9kdf,2L
|
||||
|
||||
#define SN_sm3 "SM3"
|
||||
#define LN_sm3 "sm3"
|
||||
#define NID_sm3 1126
|
||||
#define OBJ_sm3 OBJ_sm_scheme,401L
|
||||
|
||||
#define SN_hmac_sm3 "HMAC-SM3"
|
||||
#define LN_hmac_sm3 "hmac-sm3"
|
||||
#define NID_hmac_sm3 1127
|
||||
#define OBJ_hmac_sm3 OBJ_sm_scheme,401L,2L
|
||||
|
||||
#define SN_sm2sign_with_sm3 "SM2Sign-with-SM3"
|
||||
#define LN_sm2sign_with_sm3 "sm2sign-with-sm3"
|
||||
#define NID_sm2sign_with_sm3 1128
|
||||
#define OBJ_sm2sign_with_sm3 OBJ_sm_scheme,501L
|
||||
|
||||
#define SN_sm2sign_with_sha1 "SM2Sign-with-SHA1"
|
||||
#define LN_sm2sign_with_sha1 "sm2sign-with-sha1"
|
||||
#define NID_sm2sign_with_sha1 1129
|
||||
#define OBJ_sm2sign_with_sha1 OBJ_sm_scheme,502L
|
||||
|
||||
#define SN_sm2sign_with_sha256 "SM2Sign-with-SHA256"
|
||||
#define LN_sm2sign_with_sha256 "sm2sign-with-sha256"
|
||||
#define NID_sm2sign_with_sha256 1130
|
||||
#define OBJ_sm2sign_with_sha256 OBJ_sm_scheme,503L
|
||||
|
||||
#define SN_sm2sign_with_sha512 "SM2Sign-with-SHA511"
|
||||
#define LN_sm2sign_with_sha512 "sm2sign-with-sha512"
|
||||
#define NID_sm2sign_with_sha512 1131
|
||||
#define OBJ_sm2sign_with_sha512 OBJ_sm_scheme,504L
|
||||
|
||||
#define SN_sm2sign_with_sha224 "SM2Sign-with-SHA224"
|
||||
#define LN_sm2sign_with_sha224 "sm2sign-with-sha224"
|
||||
#define NID_sm2sign_with_sha224 1132
|
||||
#define OBJ_sm2sign_with_sha224 OBJ_sm_scheme,505L
|
||||
|
||||
#define SN_sm2sign_with_sha384 "SM2Sign-with-SHA384"
|
||||
#define LN_sm2sign_with_sha384 "sm2sign-with-sha384"
|
||||
#define NID_sm2sign_with_sha384 1133
|
||||
#define OBJ_sm2sign_with_sha384 OBJ_sm_scheme,506L
|
||||
|
||||
#define SN_sm2sign_with_rmd160 "SM2Sign-with-RMD160"
|
||||
#define LN_sm2sign_with_rmd160 "sm2sign-with-rmd160"
|
||||
#define NID_sm2sign_with_rmd160 1134
|
||||
#define OBJ_sm2sign_with_rmd160 OBJ_sm_scheme,507L
|
||||
|
||||
#define SN_sm2sign_with_whirlpool "SM2Sign-with-Whirlpool"
|
||||
#define LN_sm2sign_with_whirlpool "sm2sign-with-whirlpool"
|
||||
#define NID_sm2sign_with_whirlpool 1166
|
||||
#define OBJ_sm2sign_with_whirlpool OBJ_sm_scheme,520L
|
||||
|
||||
#define SN_sm2sign_with_blake2b512 "SM2Sign-with-Blake2b512"
|
||||
#define LN_sm2sign_with_blake2b512 "sm2sign-with-blake2b512"
|
||||
#define NID_sm2sign_with_blake2b512 1167
|
||||
#define OBJ_sm2sign_with_blake2b512 OBJ_sm_scheme,521L
|
||||
|
||||
#define SN_sm2sign_with_blake2s256 "SM2Sign-with-Blake2s256"
|
||||
#define LN_sm2sign_with_blake2s256 "sm2sign-with-blake2s256"
|
||||
#define NID_sm2sign_with_blake2s256 1168
|
||||
#define OBJ_sm2sign_with_blake2s256 OBJ_sm_scheme,522L
|
||||
|
||||
#define SN_zuc "ZUC"
|
||||
#define LN_zuc "zuc"
|
||||
#define NID_zuc 1136
|
||||
#define NID_zuc 1185
|
||||
#define OBJ_zuc OBJ_sm_scheme,800L
|
||||
|
||||
#define SN_zuc_128eea3 "zuc-128eea3"
|
||||
#define NID_zuc_128eea3 1193
|
||||
#define NID_zuc_128eea3 1186
|
||||
#define OBJ_zuc_128eea3 OBJ_zuc,1L
|
||||
|
||||
#define SN_zuc_128eia3 "zuc-128eia3"
|
||||
#define NID_zuc_128eia3 1194
|
||||
#define NID_zuc_128eia3 1187
|
||||
#define OBJ_zuc_128eia3 OBJ_zuc,2L
|
||||
|
||||
#define OBJ_ibcs1 OBJ_ISO_US,1L,114334L,1L
|
||||
#define SN_bwips "bwips"
|
||||
#define NID_bwips 1188
|
||||
#define OBJ_bwips OBJ_ISO_CN,11235L
|
||||
|
||||
#define SN_bfibe "bfibe"
|
||||
#define NID_bfibe 1137
|
||||
#define OBJ_bfibe OBJ_ibcs1,2L,1L
|
||||
#define SN_wapi_crypto "wapi-crypto"
|
||||
#define NID_wapi_crypto 1189
|
||||
#define OBJ_wapi_crypto OBJ_bwips,1L
|
||||
|
||||
#define SN_bb1 "bb1"
|
||||
#define NID_bb1 1138
|
||||
#define OBJ_bb1 OBJ_ibcs1,2L,2L
|
||||
#define SN_wapi_ec "wapi-ec"
|
||||
#define NID_wapi_ec 1190
|
||||
#define OBJ_wapi_ec OBJ_wapi_crypto,1L
|
||||
|
||||
#define SN_type1curve "type1curve"
|
||||
#define NID_type1curve 1139
|
||||
#define OBJ_type1curve OBJ_ibcs1,1L,1L
|
||||
#define SN_wapi_ecdsa192_sha256 "wapi-ecdsa192-sha256"
|
||||
#define NID_wapi_ecdsa192_sha256 1191
|
||||
#define OBJ_wapi_ecdsa192_sha256 OBJ_wapi_ec,1L
|
||||
|
||||
#define SN_type2curve "type2curve"
|
||||
#define NID_type2curve 1140
|
||||
#define OBJ_type2curve OBJ_ibcs1,1L,2L
|
||||
#define SN_wapip192v1 "wapip192v1"
|
||||
#define NID_wapip192v1 1192
|
||||
#define OBJ_wapip192v1 OBJ_wapi_ec,2L,1L
|
||||
|
||||
#define SN_type3curve "type3curve"
|
||||
#define NID_type3curve 1141
|
||||
#define OBJ_type3curve OBJ_ibcs1,1L,3L
|
||||
#define SN_kx_sm2 "KxSM2"
|
||||
#define LN_kx_sm2 "kx-sm2"
|
||||
#define NID_kx_sm2 1193
|
||||
|
||||
#define SN_type4curve "type4curve"
|
||||
#define NID_type4curve 1142
|
||||
#define OBJ_type4curve OBJ_ibcs1,1L,4L
|
||||
#define SN_kx_sm2dhe "KxSM2DHE"
|
||||
#define LN_kx_sm2dhe "kx-sm2dhe"
|
||||
#define NID_kx_sm2dhe 1194
|
||||
|
||||
#define SN_tate_pairing "tate-pairing"
|
||||
#define NID_tate_pairing 1143
|
||||
#define OBJ_tate_pairing OBJ_ibcs1,3L,1L
|
||||
#define SN_kx_sm2_psk "KxSM2-PSK"
|
||||
#define LN_kx_sm2_psk "kx-sm2-psk"
|
||||
#define NID_kx_sm2_psk 1195
|
||||
|
||||
#define SN_weil_pairing "weil-pairing"
|
||||
#define NID_weil_pairing 1144
|
||||
#define OBJ_weil_pairing OBJ_ibcs1,3L,2L
|
||||
#define SN_kx_sm9 "KxSM9"
|
||||
#define LN_kx_sm9 "kx-sm9"
|
||||
#define NID_kx_sm9 1196
|
||||
|
||||
#define SN_ate_pairing "ate-pairing"
|
||||
#define NID_ate_pairing 1145
|
||||
#define OBJ_ate_pairing OBJ_ibcs1,3L,3L
|
||||
#define SN_kx_sm9dhe "KxSM9DHE"
|
||||
#define LN_kx_sm9dhe "kx-sm9dhe"
|
||||
#define NID_kx_sm9dhe 1197
|
||||
|
||||
#define SN_r_ate_pairing "r-ate-pairing"
|
||||
#define NID_r_ate_pairing 1146
|
||||
#define OBJ_r_ate_pairing OBJ_ibcs1,3L,4L
|
||||
#define SN_auth_sm2 "AuthSM2"
|
||||
#define LN_auth_sm2 "auth-sm2"
|
||||
#define NID_auth_sm2 1198
|
||||
|
||||
#define SN_auth_sm9 "AuthSM9"
|
||||
#define LN_auth_sm9 "auth-sm9"
|
||||
#define NID_auth_sm9 1199
|
||||
|
||||
#define SN_GmSSL "gmssl"
|
||||
#define LN_GmSSL "GmSSL"
|
||||
#define NID_GmSSL 1150
|
||||
#define NID_GmSSL 1200
|
||||
#define OBJ_GmSSL OBJ_Enterprises,49549L
|
||||
|
||||
#define SN_cpk "CPK"
|
||||
#define LN_cpk "cpk"
|
||||
#define NID_cpk 1147
|
||||
#define NID_cpk 1201
|
||||
#define OBJ_cpk OBJ_GmSSL,1L
|
||||
|
||||
#define SN_cpk_map "cpk-map"
|
||||
#define NID_cpk_map 1151
|
||||
#define NID_cpk_map 1202
|
||||
#define OBJ_cpk_map OBJ_cpk,1L
|
||||
|
||||
#define SN_cpk_map_sha1 "cpk-map-sha1"
|
||||
#define NID_cpk_map_sha1 1218
|
||||
#define NID_cpk_map_sha1 1203
|
||||
#define OBJ_cpk_map_sha1 OBJ_cpk_map,1L
|
||||
|
||||
#define SN_cpk_map_sha256 "cpk-map-sha256"
|
||||
#define NID_cpk_map_sha256 1219
|
||||
#define NID_cpk_map_sha256 1204
|
||||
#define OBJ_cpk_map_sha256 OBJ_cpk_map,2L
|
||||
|
||||
#define SN_cpk_map_sm3 "cpk-map-sm3"
|
||||
#define NID_cpk_map_sm3 1220
|
||||
#define NID_cpk_map_sm3 1205
|
||||
#define OBJ_cpk_map_sm3 OBJ_cpk_map,3L
|
||||
|
||||
#define SN_cpk_map_sha384 "cpk-map-sha384"
|
||||
#define NID_cpk_map_sha384 1221
|
||||
#define NID_cpk_map_sha384 1206
|
||||
#define OBJ_cpk_map_sha384 OBJ_cpk_map,4L
|
||||
|
||||
#define SN_cpk_map_sha512 "cpk-map-sha512"
|
||||
#define NID_cpk_map_sha512 1222
|
||||
#define NID_cpk_map_sha512 1207
|
||||
#define OBJ_cpk_map_sha512 OBJ_cpk_map,5L
|
||||
|
||||
#define SN_paillier "paillier"
|
||||
#define NID_paillier 1148
|
||||
#define NID_paillier 1208
|
||||
#define OBJ_paillier OBJ_GmSSL,21L
|
||||
|
||||
#define SN_bwips "bwips"
|
||||
#define NID_bwips 1196
|
||||
#define OBJ_bwips OBJ_ISO_CN,11235L
|
||||
|
||||
#define SN_wapi_crypto "wapi-crypto"
|
||||
#define NID_wapi_crypto 1197
|
||||
#define OBJ_wapi_crypto OBJ_bwips,1L
|
||||
|
||||
#define SN_wapi_ec "wapi-ec"
|
||||
#define NID_wapi_ec 1198
|
||||
#define OBJ_wapi_ec OBJ_wapi_crypto,1L
|
||||
|
||||
#define SN_wapi_ecdsa192_sha256 "wapi-ecdsa192-sha256"
|
||||
#define NID_wapi_ecdsa192_sha256 1199
|
||||
#define OBJ_wapi_ecdsa192_sha256 OBJ_wapi_ec,1L
|
||||
|
||||
#define SN_wapip192v1 "wapip192v1"
|
||||
#define NID_wapip192v1 1135
|
||||
#define OBJ_wapip192v1 OBJ_wapi_ec,2L,1L
|
||||
|
||||
#define SN_sm9bn256v1 "sm9bn256v1"
|
||||
#define NID_sm9bn256v1 1200
|
||||
#define OBJ_sm9bn256v1 OBJ_GmSSL,9L,1L
|
||||
|
||||
@@ -41,9 +41,9 @@ extern "C" {
|
||||
*/
|
||||
# define OPENSSL_VERSION_NUMBER 0x1010004fL
|
||||
# ifdef OPENSSL_FIPS
|
||||
# define OPENSSL_VERSION_TEXT "GmSSL 2.4.0 - OpenSSL 1.1.0d-fips 13 Oct 2018"
|
||||
# define OPENSSL_VERSION_TEXT "GmSSL 2.4.1 - OpenSSL 1.1.0d-fips 16 Nov 2018"
|
||||
# else
|
||||
# define OPENSSL_VERSION_TEXT "GmSSL 2.4.0 - OpenSSL 1.1.0d 13 Oct 2018"
|
||||
# define OPENSSL_VERSION_TEXT "GmSSL 2.4.1 - OpenSSL 1.1.0d 16 Nov 2018"
|
||||
# endif
|
||||
|
||||
/*-
|
||||
|
||||
@@ -69,6 +69,9 @@ typedef struct paillier_st PAILLIER;
|
||||
PAILLIER *PAILLIER_new(void);
|
||||
void PAILLIER_free(PAILLIER *key);
|
||||
|
||||
int PAILLIER_size(const PAILLIER *key);
|
||||
int PAILLIER_security_bits(const PAILLIER *key);
|
||||
|
||||
int PAILLIER_generate_key(PAILLIER *key, int bits);
|
||||
int PAILLIER_check_key(PAILLIER *key);
|
||||
int PAILLIER_encrypt(BIGNUM *out, const BIGNUM *in, PAILLIER *key);
|
||||
@@ -92,6 +95,7 @@ int ERR_load_PAILLIER_strings(void);
|
||||
/* Error codes for the PAILLIER functions. */
|
||||
|
||||
/* Function codes. */
|
||||
# define PAILLIER_F_OLD_PAILLIER_PRIV_DECODE 110
|
||||
# define PAILLIER_F_PAILLIER_CHECK_KEY 100
|
||||
# define PAILLIER_F_PAILLIER_CIPHERTEXT_ADD 101
|
||||
# define PAILLIER_F_PAILLIER_CIPHERTEXT_SCALAR_MUL 102
|
||||
@@ -99,12 +103,15 @@ int ERR_load_PAILLIER_strings(void);
|
||||
# define PAILLIER_F_PAILLIER_ENCRYPT 104
|
||||
# define PAILLIER_F_PAILLIER_GENERATE_KEY 105
|
||||
# define PAILLIER_F_PAILLIER_NEW 106
|
||||
# define PAILLIER_F_PAILLIER_PRIV_DECODE 111
|
||||
# define PAILLIER_F_PAILLIER_PRIV_ENCODE 112
|
||||
# define PAILLIER_F_PAILLIER_PUB_DECODE 107
|
||||
# define PAILLIER_F_PKEY_PAILLIER_DECRYPT 108
|
||||
# define PAILLIER_F_PKEY_PAILLIER_ENCRYPT 109
|
||||
|
||||
/* Reason codes. */
|
||||
# define PAILLIER_R_BUFFER_TOO_SMALL 104
|
||||
# define PAILLIER_R_DECODE_ERROR 105
|
||||
# define PAILLIER_R_GENERATE_PRIME_FAILED 100
|
||||
# define PAILLIER_R_INVALID_PLAINTEXT 101
|
||||
# define PAILLIER_R_MALLOC_FAILED 102
|
||||
|
||||
@@ -49,6 +49,23 @@ extern "C" {
|
||||
# define PEM_STRING_PARAMETERS "PARAMETERS"
|
||||
# define PEM_STRING_CMS "CMS"
|
||||
|
||||
# define PEM_STRING_PAILLIER "PAILLIER PRIVATE KEY"
|
||||
# define PEM_STRING_PAILLIER_PUBLIC "PAILLIER PUBLIC KEY"
|
||||
# define PEM_STRING_CPK_MASTER "CPK MASTER PRIVATE KEY"
|
||||
# define PEM_STRING_CPK_MASTER_PUBLIC "CPK MASTER PUBLIC KEY"
|
||||
# define PEM_STRING_SM9_MASTER "SM9 MASTER PRIVATE KEY"
|
||||
# define PEM_STRING_SM9_MASTER_PUBLIC "SM9 MASTER PUBLIC KEY"
|
||||
# define PEM_STRING_SM9 "SM9 PRIVATE KEY"
|
||||
# define PEM_STRING_SM9_PUBLIC "SM9 PUBLIC KEY"
|
||||
# define PEM_STRING_BFIBE_MASTER "BFIBE MASTER PRIVATE KEY"
|
||||
# define PEM_STRING_BFIBE_MASTER_PUBLIC "BFIBE MASTER PUBLIC KEY"
|
||||
# define PEM_STRING_BFIBE "BFIBE PRIVATE KEY"
|
||||
# define PEM_STRING_BFIBE_PUBLIC "BFIBE PUBLIC KEY"
|
||||
# define PEM_STRING_BB1IBE_MASTER "BB1IBE MASTER PRIVATE KEY"
|
||||
# define PEM_STRING_BB1IBE_MASTER_PUBLIC "BB1IBE MASTER PUBLIC KEY"
|
||||
# define PEM_STRING_BB1IBE "BB1IBE PRIVATE KEY"
|
||||
# define PEM_STRING_BB1IBE_PUBLIC "BB1IBE PUBLIC KEY"
|
||||
|
||||
# define PEM_TYPE_ENCRYPTED 10
|
||||
# define PEM_TYPE_MIC_ONLY 20
|
||||
# define PEM_TYPE_MIC_CLEAR 30
|
||||
@@ -356,6 +373,25 @@ DECLARE_PEM_rw(EC_PUBKEY, EC_KEY)
|
||||
DECLARE_PEM_rw_const(DHparams, DH)
|
||||
DECLARE_PEM_write_const(DHxparams, DH)
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_PAILLIER
|
||||
DECLARE_PEM_rw_cb(PaillierPrivateKey, PAILLIER)
|
||||
DECLARE_PEM_rw_const(PaillierPublicKey, PAILLIER)
|
||||
DECLARE_PEM_rw(PAILLIER_PUBKEY, PAILLIER)
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_CPK
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_SM9
|
||||
DECLARE_PEM_rw_cb(SM9MasterSecret, SM9_MASTER_KEY)
|
||||
DECLARE_PEM_rw_const(SM9PublicParameters, SM9_MASTER_KEY)
|
||||
DECLARE_PEM_rw(SM9_MASTER_PUBKEY, SM9_MASTER_KEY)
|
||||
DECLARE_PEM_rw_cb(SM9PrivateKey, SM9_KEY)
|
||||
DECLARE_PEM_rw_const(SM9PublicKey, SM9_KEY)
|
||||
DECLARE_PEM_rw(SM9_PUBKEY, SM9_KEY)
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_BFIBE
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_BB1IBE
|
||||
# endif
|
||||
DECLARE_PEM_rw_cb(PrivateKey, EVP_PKEY)
|
||||
DECLARE_PEM_rw(PUBKEY, EVP_PKEY)
|
||||
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
/* ====================================================================
|
||||
* Copyright (c) 2015 - 2016 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
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the GmSSL Project.
|
||||
* (http://gmssl.org/)"
|
||||
*
|
||||
* 4. The name "GmSSL Project" must not be used to endorse or promote
|
||||
* products derived from this software without prior written
|
||||
* permission. For written permission, please contact
|
||||
* guanzhi1980@gmail.com.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "GmSSL"
|
||||
* nor may "GmSSL" appear in their names without prior written
|
||||
* permission of the GmSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the GmSSL Project
|
||||
* (http://gmssl.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE GmSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE GmSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
#ifndef HEADER_PEM3_H
|
||||
#define HEADER_PEM3_H
|
||||
|
||||
#ifndef OPENSSL_NO_CPK
|
||||
# include <openssl/cpk.h>
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SM9
|
||||
# include <openssl/sm9.h>
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_BFIBE
|
||||
# include <openssl/bfibe.h>
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_BB1IBE
|
||||
# include <openssl/bb1ibe.h>
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_PAILLIER
|
||||
# include <openssl/paillier.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#include <openssl/pem.h>
|
||||
|
||||
|
||||
#define PEM_STRING_PAILLIER "PAILLIER PRIVATE KEY"
|
||||
#define PEM_STRING_PAILLIER_PUBLIC "PAILLIER PUBLIC KEY"
|
||||
#define PEM_STRING_CPK_PARAMS "CPK PUBLIC PARAMETERS"
|
||||
#define PEM_STRING_CPK_MASTER "CPK MASTER SECRET"
|
||||
#define PEM_STRING_SM9_PARAMS "SM9 PUBLIC PARAMETERS"
|
||||
#define PEM_STRING_SM9_MASTER "SM9 MASTER SECRET"
|
||||
#define PEM_STRING_SM9_PRIVATE "SM9 PRIVATE KEY"
|
||||
#define PEM_STRING_BFIBE_PARAMS "BFIBE PUBLIC PARAMETERS"
|
||||
#define PEM_STRING_BFIBE_MASTER "BFIBE MASTER SECRET"
|
||||
#define PEM_STRING_BFIBE_PRIVATE "BFIBE PRIVATE KEY"
|
||||
#define PEM_STRING_BB1IBE_PARAMS "BB1IBE PUBLIC PARAMETERS"
|
||||
#define PEM_STRING_BB1IBE_MASTER "BB1IBE MASTER SECRET"
|
||||
#define PEM_STRING_BB1IBE_PRIVATE "BB1IBE PRIVATE KEY"
|
||||
|
||||
|
||||
# ifndef OPENSSL_NO_PAILLIER
|
||||
/*
|
||||
DECLARE_PEM_rw_cb(PAILLIERPrivateKey, PAILLIER)
|
||||
DECLARE_PEM_rw_const(PAILLIERPublicKey, PAILLIER)
|
||||
DECLARE_PEM_rw(PAILLIER_PUBKEY, PAILLIER)
|
||||
*/
|
||||
# endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -67,13 +67,20 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct SM9MasterSecret_st SM9MasterSecret;
|
||||
typedef struct SM9PublicParameters_st SM9PublicParameters;
|
||||
typedef struct SM9PrivateKey_st SM9PrivateKey;
|
||||
typedef struct SM9PublicKey_st SM9PublicKey;
|
||||
typedef struct SM9_MASTER_KEY_st SM9_MASTER_KEY;
|
||||
typedef struct SM9_KEY_st SM9_KEY;
|
||||
typedef struct SM9Signature_st SM9Signature;
|
||||
typedef struct SM9Ciphertext_st SM9Ciphertext;
|
||||
|
||||
typedef SM9_MASTER_KEY SM9MasterSecret;
|
||||
typedef SM9_MASTER_KEY SM9PublicParameters;
|
||||
typedef SM9_KEY SM9PrivateKey;
|
||||
typedef SM9_KEY SM9PublicKey;
|
||||
|
||||
SM9_MASTER_KEY *SM9_MASTER_KEY_new(void);
|
||||
void SM9_MASTER_KEY_free(SM9_MASTER_KEY *a);
|
||||
SM9_KEY *SM9_KEY_new(void);
|
||||
void SM9_KEY_free(SM9_KEY *a);
|
||||
|
||||
int SM9_setup(int pairing, /* NID_sm9bn256v1 */
|
||||
int scheme, /* NID_[sm9sign | sm9encrypt | sm9keyagreement] */
|
||||
@@ -81,13 +88,11 @@ int SM9_setup(int pairing, /* NID_sm9bn256v1 */
|
||||
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);
|
||||
|
||||
SM9PrivateKey *SM9_extract_private_key(SM9MasterSecret *msk,
|
||||
const char *id, size_t idlen);
|
||||
SM9PublicKey *SM9_extract_public_key(SM9PublicParameters *mpk,
|
||||
const char *id, size_t idlen);
|
||||
|
||||
@@ -169,25 +174,42 @@ int SM9_compute_share_key_B(int type,
|
||||
|
||||
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
SM9MasterSecret *d2i_SM9MasterSecret_fp(FILE *fp, SM9MasterSecret **msk);
|
||||
SM9PublicParameters *d2i_SM9PublicParameters_fp(FILE *fp, SM9PublicParameters **mpk);
|
||||
SM9PrivateKey *d2i_SM9PrivateKey_fp(FILE *fp, SM9PrivateKey **sk);
|
||||
SM9Signature *d2i_SM9Signature_fp(FILE *fp, SM9Signature **sk);
|
||||
SM9Ciphertext *d2i_SM9Ciphertext_fp(FILE *fp, SM9Ciphertext **sk);
|
||||
int i2d_SM9MasterSecret_fp(FILE *fp, SM9MasterSecret *msk);
|
||||
int i2d_SM9PublicParameters_fp(FILE *fp, SM9PublicParameters *mpk);
|
||||
int i2d_SM9PrivateKey_fp(FILE *fp, SM9PrivateKey *sk);
|
||||
int i2d_SM9Signature_fp(FILE *fp, SM9Signature *sk);
|
||||
int i2d_SM9Ciphertext_fp(FILE *fp, SM9Ciphertext *sk);
|
||||
|
||||
SM9MasterSecret *d2i_SM9MasterSecret_fp(FILE *fp, SM9MasterSecret **pp);
|
||||
SM9PublicParameters *d2i_SM9PublicParameters_fp(FILE *fp, SM9PublicParameters **pp);
|
||||
SM9PrivateKey *d2i_SM9PrivateKey_fp(FILE *fp, SM9PrivateKey **pp);
|
||||
SM9PublicKey *d2i_SM9PublicKey_fp(FILE *fp, SM9PublicKey **pp);
|
||||
SM9Signature *d2i_SM9Signature_fp(FILE *fp, SM9Signature **pp);
|
||||
SM9Ciphertext *d2i_SM9Ciphertext_fp(FILE *fp, SM9Ciphertext **pp);
|
||||
|
||||
int i2d_SM9MasterSecret_fp(FILE *fp, SM9MasterSecret *a);
|
||||
int i2d_PublicParameters_fp(FILE *fp, SM9PublicParameters *a);
|
||||
int i2d_SM9PrivateKey_fp(FILE *fp, SM9PrivateKey *a);
|
||||
int i2d_SM9PublicKey_fp(FILE *fp, SM9PublicKey *a);
|
||||
int i2d_SM9Signature_fp(FILE *fp, SM9Signature *a);
|
||||
int i2d_SM9Ciphertext_fp(FILE *fp, SM9Ciphertext *a);
|
||||
#endif
|
||||
|
||||
DECLARE_ASN1_FUNCTIONS(SM9MasterSecret)
|
||||
DECLARE_ASN1_FUNCTIONS(SM9PublicParameters)
|
||||
DECLARE_ASN1_FUNCTIONS(SM9PrivateKey)
|
||||
DECLARE_ASN1_FUNCTIONS(SM9PublicKey)
|
||||
int SM9_MASTER_KEY_up_ref(SM9_MASTER_KEY *msk);
|
||||
int SM9_KEY_up_ref(SM9_KEY *sk);
|
||||
|
||||
DECLARE_ASN1_ENCODE_FUNCTIONS_const(SM9_MASTER_KEY,SM9MasterSecret)
|
||||
DECLARE_ASN1_ENCODE_FUNCTIONS_const(SM9_MASTER_KEY,SM9PublicParameters)
|
||||
DECLARE_ASN1_ENCODE_FUNCTIONS_const(SM9_KEY,SM9PrivateKey)
|
||||
DECLARE_ASN1_ENCODE_FUNCTIONS_const(SM9_KEY,SM9PublicKey)
|
||||
DECLARE_ASN1_FUNCTIONS(SM9Signature)
|
||||
DECLARE_ASN1_FUNCTIONS(SM9Ciphertext)
|
||||
|
||||
#define SM9MasterSecret_new() SM9_MASTER_KEY_new()
|
||||
#define SM9MasterSecret_free(a) SM9_MASTER_KEY_free(a)
|
||||
#define SM9PublicParameters_new() SM9_MASTER_KEY_new()
|
||||
#define SM9PublicParameters_free(a) SM9_MASTER_KEY_free(a)
|
||||
#define SM9PrivateKey_new() SM9_KEY_new()
|
||||
#define SM9PrivateKey_free(a) SM9_KEY_free(a)
|
||||
#define SM9PublicKey_new() SM9_KEY_new()
|
||||
#define SM9PublicKey_free(a) SM9_KEY_free(a)
|
||||
|
||||
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
/*
|
||||
@@ -200,6 +222,8 @@ int ERR_load_SM9_strings(void);
|
||||
/* Error codes for the SM9 functions. */
|
||||
|
||||
/* Function codes. */
|
||||
# define SM9_F_OLD_SM9_MASTER_DECODE 124
|
||||
# define SM9_F_OLD_SM9_PRIV_DECODE 125
|
||||
# define SM9_F_SM9CIPHERTEXT_CHECK 100
|
||||
# define SM9_F_SM9ENCPARAMETERS_DECRYPT 101
|
||||
# define SM9_F_SM9ENCPARAMETERS_ENCRYPT 102
|
||||
@@ -216,6 +240,15 @@ int ERR_load_SM9_strings(void);
|
||||
# define SM9_F_SM9_EXTRACT_PUBLIC_PARAMETERS 111
|
||||
# define SM9_F_SM9_GENERATE_KEY_EXCHANGE 121
|
||||
# define SM9_F_SM9_GENERATE_MASTER_SECRET 112
|
||||
# define SM9_F_SM9_KEY_NEW 132
|
||||
# define SM9_F_SM9_MASTER_DECODE 126
|
||||
# define SM9_F_SM9_MASTER_ENCODE 127
|
||||
# define SM9_F_SM9_MASTER_KEY_EXTRACT_KEY 134
|
||||
# define SM9_F_SM9_MASTER_KEY_NEW 133
|
||||
# define SM9_F_SM9_PARAMS_DECODE 128
|
||||
# define SM9_F_SM9_PRIV_DECODE 129
|
||||
# define SM9_F_SM9_PRIV_ENCODE 130
|
||||
# define SM9_F_SM9_PUB_DECODE 131
|
||||
# define SM9_F_SM9_SIGN 119
|
||||
# define SM9_F_SM9_SIGNFINAL 115
|
||||
# define SM9_F_SM9_SIGNINIT 116
|
||||
@@ -227,6 +260,7 @@ int ERR_load_SM9_strings(void);
|
||||
|
||||
/* Reason codes. */
|
||||
# define SM9_R_BUFFER_TOO_SMALL 100
|
||||
# define SM9_R_DECODE_ERROR 132
|
||||
# define SM9_R_DIGEST_FAILURE 119
|
||||
# define SM9_R_EC_LIB 101
|
||||
# define SM9_R_EXTENSION_FIELD_ERROR 120
|
||||
@@ -253,6 +287,7 @@ int ERR_load_SM9_strings(void);
|
||||
# define SM9_R_INVALID_SIGNATURE_FORMAT 127
|
||||
# define SM9_R_INVALID_TYPE1CURVE 115
|
||||
# define SM9_R_KDF_FAILURE 116
|
||||
# define SM9_R_NO_MASTER_SECRET 133
|
||||
# define SM9_R_PAIRING_ERROR 124
|
||||
# define SM9_R_RATE_PAIRING_ERROR 129
|
||||
# define SM9_R_TWIST_CURVE_ERROR 117
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
# ifndef OPENSSL_NO_PAILLIER
|
||||
# include <openssl/paillier.h>
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_SM9
|
||||
# include <openssl/sm9.h>
|
||||
# endif
|
||||
|
||||
# if OPENSSL_API_COMPAT < 0x10100000L
|
||||
# ifndef OPENSSL_NO_RSA
|
||||
@@ -549,6 +552,12 @@ EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp, long length);
|
||||
int i2d_PAILLIER_PUBKEY(PAILLIER *a, unsigned char **pp);
|
||||
PAILLIER *d2i_PAILLIER_PUBKEY(PAILLIER **a, const unsigned char **pp, long length);
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_SM9
|
||||
int i2d_SM9_MASTER_PUBKEY(SM9_MASTER_KEY *a, unsigned char **pp);
|
||||
SM9_MASTER_KEY *d2i_SM9_MASTER_PUBKEY(SM9_MASTER_KEY **a, const unsigned char **pp, long length);
|
||||
int i2d_SM9_PUBKEY(SM9_KEY *a, unsigned char **pp);
|
||||
SM9_KEY *d2i_SM9_PUBKEY(SM9_KEY **a, const unsigned char **pp, long length);
|
||||
# endif
|
||||
|
||||
|
||||
DECLARE_ASN1_FUNCTIONS(X509_SIG)
|
||||
|
||||
Reference in New Issue
Block a user