提交 458c2917 编写于 作者: B Bodo Möller

move ECC ASN1 that is not specific to ECDSA into crypto/ec/,

and make some appropriate changes to the EC library.

Submitted by: Nils Larsch
上级 8a5dbb0a
......@@ -4,6 +4,19 @@
Changes between 0.9.7 and 0.9.8 [xx XXX 2002]
*) Add 'nid' and 'asn1_flag' members to EC_GROUP, and functions
EC_GROUP_get_nid()
EC_GROUP_get_set_asn1_flag()
EC_GROUP_get_get_asn1_flag()
'nid' is an optional NID for named curves. 'asn1_flag'
determines the encoding to be used for ASN1 purposes.
[Nils Larsch <nla@trustcenter.de>]
*) Add 'field_type' member to EC_METHOD, which holds the NID
of the appropriate field type OID. The new function
EC_METHOD_get_field_type() returns this value.
[Nils Larsch <nla@trustcenter.de>]
*) Add functions
EC_POINT_point2bn()
EC_POINT_bn2point()
......
......@@ -431,7 +431,9 @@ bad:
goto end;
ecdsa->group = EC_GROUP_new_by_name(curve_type);
if (named_curve)
ECDSA_set_parameter_flags(ecdsa, ECDSA_FLAG_NAMED_CURVE);
EC_GROUP_set_asn1_flag(ecdsa->group,
OPENSSL_EC_NAMED_CURVE |
(EC_GROUP_get_asn1_flag(ecdsa->group) & ~0x3));
}
else if (informat == FORMAT_ASN1)
ecdsa = d2i_ECDSAParameters_bio(in,NULL);
......
......@@ -145,7 +145,8 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey)
goto err;
}
if ((ECDSA_get_parameter_flags(ecdsa) & ECDSA_FLAG_NAMED_CURVE) && (nid = EC_GROUP_get_nid(ecdsa->group)))
if ((EC_GROUP_get_asn1_flag(ecdsa->group) & OPENSSL_EC_NAMED_CURVE)
&& (nid = EC_GROUP_get_nid(ecdsa->group)))
{
/* just set the OID */
a->parameter->type = V_ASN1_OBJECT;
......@@ -302,13 +303,17 @@ EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)
/* type == V_ASN1_OBJECT => the parameters are given
* by an asn1 OID
*/
ECDSA *ecdsa;
if (ret->pkey.ecdsa == NULL)
ret->pkey.ecdsa = ECDSA_new();
if (ret->pkey.ecdsa->group)
EC_GROUP_free(ret->pkey.ecdsa->group);
ret->pkey.ecdsa->parameter_flags |= ECDSA_FLAG_NAMED_CURVE;
if ((ret->pkey.ecdsa->group = EC_GROUP_new_by_name(OBJ_obj2nid(a->parameter->value.object))) == NULL)
ecdsa = ret->pkey.ecdsa;
if (ecdsa->group)
EC_GROUP_free(ecdsa->group);
if ((ecdsa->group = EC_GROUP_new_by_name(
OBJ_obj2nid(a->parameter->value.object))) == NULL)
goto err;
EC_GROUP_set_asn1_flag(ecdsa->group, OPENSSL_EC_NAMED_CURVE |
(EC_GROUP_get_asn1_flag(ecdsa->group) & ~0x03));
}
/* the case implicitlyCA is currently not implemented */
ret->save_parameters = 1;
......
......@@ -82,13 +82,14 @@ clean:
# DO NOT DELETE THIS LINE -- make depend depends on it.
ec_check.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
ec_check.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
ec_check.o: ../../include/openssl/ec.h ../../include/openssl/err.h
ec_check.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
ec_check.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
ec_check.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
ec_check.o: ec_check.c ec_lcl.h
ec_check.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
ec_check.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
ec_check.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
ec_check.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
ec_check.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
ec_check.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
ec_check.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
ec_check.o: ../../include/openssl/symhacks.h ec_check.c ec_lcl.h
ec_curve.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
ec_curve.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
ec_curve.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
......@@ -98,53 +99,71 @@ ec_curve.o: ../../include/openssl/opensslconf.h
ec_curve.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
ec_curve.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
ec_curve.o: ../../include/openssl/symhacks.h ec_curve.c ec_lcl.h
ec_cvt.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
ec_cvt.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h
ec_cvt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
ec_cvt.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
ec_cvt.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
ec_cvt.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
ec_cvt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
ec_cvt.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
ec_cvt.o: ../../include/openssl/symhacks.h ec_cvt.c ec_lcl.h
ec_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
ec_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
ec_err.o: ../../include/openssl/ec.h ../../include/openssl/err.h
ec_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
ec_err.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
ec_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
ec_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
ec_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
ec_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
ec_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
ec_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
ec_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
ec_err.o: ec_err.c
ec_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
ec_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
ec_lib.o: ../../include/openssl/ec.h ../../include/openssl/err.h
ec_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
ec_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
ec_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
ec_lib.o: ec_lcl.h ec_lib.c
ec_mult.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
ec_mult.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
ec_mult.o: ../../include/openssl/ec.h ../../include/openssl/err.h
ec_mult.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
ec_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
ec_mult.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
ec_mult.o: ec_lcl.h ec_mult.c
ec_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
ec_lib.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
ec_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
ec_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
ec_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
ec_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
ec_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
ec_lib.o: ../../include/openssl/symhacks.h ec_lcl.h ec_lib.c
ec_mult.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
ec_mult.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
ec_mult.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
ec_mult.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
ec_mult.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
ec_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
ec_mult.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
ec_mult.o: ../../include/openssl/symhacks.h ec_lcl.h ec_mult.c
ec_print.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
ec_print.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
ec_print.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
ec_print.o: ../../include/openssl/opensslconf.h
ec_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
ec_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
ec_print.o: ec_lcl.h ec_print.c
ecp_mont.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
ecp_mont.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
ecp_mont.o: ../../include/openssl/ec.h ../../include/openssl/err.h
ecp_mont.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
ecp_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
ecp_mont.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
ecp_mont.o: ec_lcl.h ecp_mont.c
ecp_nist.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
ecp_nist.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h
ec_print.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
ec_print.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
ec_print.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
ec_print.o: ../../include/openssl/symhacks.h ec_lcl.h ec_print.c
ecp_mont.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
ecp_mont.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
ecp_mont.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
ecp_mont.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
ecp_mont.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
ecp_mont.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
ecp_mont.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
ecp_mont.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_mont.c
ecp_nist.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
ecp_nist.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
ecp_nist.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
ecp_nist.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
ecp_nist.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
ecp_nist.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
ecp_nist.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_nist.c
ecp_recp.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h
ecp_recp.o: ../../include/openssl/ec.h ../../include/openssl/opensslconf.h
ecp_recp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
ecp_recp.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
ecp_recp.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
ecp_recp.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
ecp_recp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
ecp_recp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
ecp_recp.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_recp.c
ecp_smpl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
ecp_smpl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
ecp_smpl.o: ../../include/openssl/ec.h ../../include/openssl/err.h
ecp_smpl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
ecp_smpl.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
ecp_smpl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
ecp_smpl.o: ec_lcl.h ecp_smpl.c
ecp_smpl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
ecp_smpl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
ecp_smpl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
ecp_smpl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
ecp_smpl.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
ecp_smpl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
ecp_smpl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
ecp_smpl.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_smpl.c
......@@ -61,6 +61,7 @@
#endif
#include <openssl/bn.h>
#include <openssl/asn1.h>
#include <openssl/symhacks.h>
#ifdef __cplusplus
......@@ -108,6 +109,7 @@ void EC_GROUP_clear_free(EC_GROUP *);
int EC_GROUP_copy(EC_GROUP *, const EC_GROUP *);
const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *);
int EC_METHOD_get_field_type(const EC_METHOD *);
int EC_GROUP_set_generator(EC_GROUP *, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofactor);
EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *);
......@@ -226,6 +228,35 @@ int EC_GROUP_precompute_mult(EC_GROUP *, BN_CTX *);
/* ASN1 stuff */
#define OPENSSL_EC_EXPLICIT 0x001
#define OPENSSL_EC_NAMED_CURVE 0x002
#define OPENSSL_EC_COMPRESSED 0x010
#define OPENSSL_EC_UNCOMPRESSED 0x020
#define OPENSSL_EC_HYBRID 0x040
typedef struct ec_parameters_st ECPARAMETERS;
typedef struct ecpk_parameters_st ECPKPARAMETERS;
DECLARE_ASN1_ITEM(ECPARAMETERS)
DECLARE_ASN1_ITEM(ECPKPARAMETERS)
DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPARAMETERS, ECPARAMETERS)
DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPKPARAMETERS, ECPKPARAMETERS)
EC_GROUP *EC_ASN1_pkparameters2group(const ECPKPARAMETERS *);
ECPKPARAMETERS *EC_ASN1_group2pkparameters(const EC_GROUP *, ECPKPARAMETERS *);
void EC_GROUP_set_asn1_flag(EC_GROUP *, int flag);
int EC_GROUP_get_asn1_flag(const EC_GROUP *);
EC_GROUP *d2i_ECParameters(EC_GROUP **, const unsigned char **in, long len);
int i2d_ECParameters(const EC_GROUP *, unsigned char **out);
EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes
* made after this point may be overwritten when the script is next run.
......@@ -236,6 +267,15 @@ void ERR_load_EC_strings(void);
/* Function codes. */
#define EC_F_COMPUTE_WNAF 143
#define EC_F_D2I_ECDSAPARAMETERS 154
#define EC_F_D2I_ECPARAMETERS 155
#define EC_F_D2I_ECPKPARAMETERS 161
#define EC_F_EC_ASN1_GROUP2CURVE 159
#define EC_F_EC_ASN1_GROUP2FIELDID 156
#define EC_F_EC_ASN1_GROUP2PARAMETERS 160
#define EC_F_EC_ASN1_GROUP2PKPARAMETERS 162
#define EC_F_EC_ASN1_PARAMETERS2GROUP 157
#define EC_F_EC_ASN1_PKPARAMETERS2GROUP 163
#define EC_F_EC_GFP_MONT_FIELD_DECODE 133
#define EC_F_EC_GFP_MONT_FIELD_ENCODE 134
#define EC_F_EC_GFP_MONT_FIELD_MUL 131
......@@ -286,10 +326,23 @@ void ERR_load_EC_strings(void);
#define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP 126
#define EC_F_EC_POINT_SET_TO_INFINITY 127
#define EC_F_GFP_MONT_GROUP_SET_CURVE_GFP 135
#define EC_F_I2D_ECDSAPARAMETERS 158
#define EC_F_I2D_ECPARAMETERS 164
#define EC_F_I2D_ECPKPARAMETERS 165
/* Reason codes. */
#define EC_R_ASN1_ERROR 130
#define EC_R_ASN1_UNKNOWN_FIELD 131
#define EC_R_BUFFER_TOO_SMALL 100
#define EC_R_D2I_ECPARAMETERS_FAILURE 132
#define EC_R_D2I_ECPKPARAMETERS_FAILURE 133
#define EC_R_D2I_EC_PARAMETERS_FAILURE 123
#define EC_R_DISCRIMINANT_IS_ZERO 118
#define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE 124
#define EC_R_GROUP2PARAMETERS_FAILURE 125
#define EC_R_GROUP2PKPARAMETERS_FAILURE 134
#define EC_R_I2D_ECPKPARAMETERS_FAILURE 135
#define EC_R_I2D_EC_PARAMETERS_FAILURE 126
#define EC_R_INCOMPATIBLE_OBJECTS 101
#define EC_R_INVALID_ARGUMENT 112
#define EC_R_INVALID_COMPRESSED_POINT 110
......@@ -298,8 +351,12 @@ void ERR_load_EC_strings(void);
#define EC_R_INVALID_FIELD 103
#define EC_R_INVALID_FORM 104
#define EC_R_INVALID_GROUP_ORDER 119
#define EC_R_MISSING_PARAMETERS 127
#define EC_R_NOT_IMPLEMENTED 136
#define EC_R_NOT_INITIALIZED 111
#define EC_R_NO_SUCH_EXTRA_DATA 105
#define EC_R_PARAMETERS2GROUP_FAILURE 128
#define EC_R_PKPARAMETERS2GROUP_FAILURE 137
#define EC_R_POINT_AT_INFINITY 106
#define EC_R_POINT_IS_NOT_ON_CURVE 107
#define EC_R_SLOT_FULL 108
......@@ -308,6 +365,7 @@ void ERR_load_EC_strings(void);
#define EC_R_UNKNOWN_GROUP 116
#define EC_R_UNKNOWN_NID 117
#define EC_R_UNKNOWN_ORDER 114
#define EC_R_UNKNOWN_PARAMETERS_TYPE 129
#ifdef __cplusplus
}
......
......@@ -67,13 +67,22 @@
static ERR_STRING_DATA EC_str_functs[]=
{
{ERR_PACK(0,EC_F_COMPUTE_WNAF,0), "COMPUTE_WNAF"},
{ERR_PACK(0,EC_F_D2I_ECDSAPARAMETERS,0), "d2i_ECDSAParameters"},
{ERR_PACK(0,EC_F_D2I_ECPARAMETERS,0), "d2i_ECParameters"},
{ERR_PACK(0,EC_F_D2I_ECPKPARAMETERS,0), "d2i_ECPKParameters"},
{ERR_PACK(0,EC_F_EC_ASN1_GROUP2CURVE,0), "EC_ASN1_GROUP2CURVE"},
{ERR_PACK(0,EC_F_EC_ASN1_GROUP2FIELDID,0), "EC_ASN1_GROUP2FIELDID"},
{ERR_PACK(0,EC_F_EC_ASN1_GROUP2PARAMETERS,0), "EC_ASN1_GROUP2PARAMETERS"},
{ERR_PACK(0,EC_F_EC_ASN1_GROUP2PKPARAMETERS,0), "EC_ASN1_GROUP2PKPARAMETERS"},
{ERR_PACK(0,EC_F_EC_ASN1_PARAMETERS2GROUP,0), "EC_ASN1_PARAMETERS2GROUP"},
{ERR_PACK(0,EC_F_EC_ASN1_PKPARAMETERS2GROUP,0), "EC_ASN1_PKPARAMETERS2GROUP"},
{ERR_PACK(0,EC_F_EC_GFP_MONT_FIELD_DECODE,0), "ec_GFp_mont_field_decode"},
{ERR_PACK(0,EC_F_EC_GFP_MONT_FIELD_ENCODE,0), "ec_GFp_mont_field_encode"},
{ERR_PACK(0,EC_F_EC_GFP_MONT_FIELD_MUL,0), "ec_GFp_mont_field_mul"},
{ERR_PACK(0,EC_F_EC_GFP_MONT_FIELD_SQR,0), "ec_GFp_mont_field_sqr"},
{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT,0), "ec_GFp_simple_group_check_discriminant"},
{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP,0), "ec_GFp_simple_group_set_curve_GFp"},
{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR,0), "ec_GFp_simple_group_set_generator"},
{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR,0), "EC_GFP_SIMPLE_GROUP_SET_GENERATOR"},
{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_MAKE_AFFINE,0), "ec_GFp_simple_make_affine"},
{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_OCT2POINT,0), "ec_GFp_simple_oct2point"},
{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_POINT2OCT,0), "ec_GFp_simple_point2oct"},
......@@ -117,13 +126,26 @@ static ERR_STRING_DATA EC_str_functs[]=
{ERR_PACK(0,EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP,0), "EC_POINT_set_Jprojective_coordinates_GFp"},
{ERR_PACK(0,EC_F_EC_POINT_SET_TO_INFINITY,0), "EC_POINT_set_to_infinity"},
{ERR_PACK(0,EC_F_GFP_MONT_GROUP_SET_CURVE_GFP,0), "GFP_MONT_GROUP_SET_CURVE_GFP"},
{ERR_PACK(0,EC_F_I2D_ECDSAPARAMETERS,0), "i2d_ECDSAParameters"},
{ERR_PACK(0,EC_F_I2D_ECPARAMETERS,0), "i2d_ECParameters"},
{ERR_PACK(0,EC_F_I2D_ECPKPARAMETERS,0), "i2d_ECPKParameters"},
{0,NULL}
};
static ERR_STRING_DATA EC_str_reasons[]=
{
{EC_R_ASN1_ERROR ,"asn1 error"},
{EC_R_ASN1_UNKNOWN_FIELD ,"asn1 unknown field"},
{EC_R_BUFFER_TOO_SMALL ,"buffer too small"},
{EC_R_D2I_ECPARAMETERS_FAILURE ,"d2i ecparameters failure"},
{EC_R_D2I_ECPKPARAMETERS_FAILURE ,"d2i ecpkparameters failure"},
{EC_R_D2I_EC_PARAMETERS_FAILURE ,"d2i ec parameters failure"},
{EC_R_DISCRIMINANT_IS_ZERO ,"discriminant is zero"},
{EC_R_EC_GROUP_NEW_BY_NAME_FAILURE ,"ec group new by name failure"},
{EC_R_GROUP2PARAMETERS_FAILURE ,"group2parameters failure"},
{EC_R_GROUP2PKPARAMETERS_FAILURE ,"group2pkparameters failure"},
{EC_R_I2D_ECPKPARAMETERS_FAILURE ,"i2d ecpkparameters failure"},
{EC_R_I2D_EC_PARAMETERS_FAILURE ,"i2d ec parameters failure"},
{EC_R_INCOMPATIBLE_OBJECTS ,"incompatible objects"},
{EC_R_INVALID_ARGUMENT ,"invalid argument"},
{EC_R_INVALID_COMPRESSED_POINT ,"invalid compressed point"},
......@@ -132,8 +154,12 @@ static ERR_STRING_DATA EC_str_reasons[]=
{EC_R_INVALID_FIELD ,"invalid field"},
{EC_R_INVALID_FORM ,"invalid form"},
{EC_R_INVALID_GROUP_ORDER ,"invalid group order"},
{EC_R_MISSING_PARAMETERS ,"missing parameters"},
{EC_R_NOT_IMPLEMENTED ,"not implemented"},
{EC_R_NOT_INITIALIZED ,"not initialized"},
{EC_R_NO_SUCH_EXTRA_DATA ,"no such extra data"},
{EC_R_PARAMETERS2GROUP_FAILURE ,"parameters2group failure"},
{EC_R_PKPARAMETERS2GROUP_FAILURE ,"pkparameters2group failure"},
{EC_R_POINT_AT_INFINITY ,"point at infinity"},
{EC_R_POINT_IS_NOT_ON_CURVE ,"point is not on curve"},
{EC_R_SLOT_FULL ,"slot full"},
......@@ -142,6 +168,7 @@ static ERR_STRING_DATA EC_str_reasons[]=
{EC_R_UNKNOWN_GROUP ,"unknown group"},
{EC_R_UNKNOWN_NID ,"unknown nid"},
{EC_R_UNKNOWN_ORDER ,"unknown order"},
{EC_R_UNKNOWN_PARAMETERS_TYPE ,"unknown parameters type"},
{0,NULL}
};
......
......@@ -56,6 +56,7 @@
#include <stdlib.h>
#include <openssl/obj_mac.h>
#include <openssl/ec.h>
......@@ -63,6 +64,9 @@
* so all this may change in future versions. */
struct ec_method_st {
/* used by EC_METHOD_get_field_type: */
int field_type; /* a NID */
/* used by EC_GROUP_new, EC_GROUP_free, EC_GROUP_clear_free, EC_GROUP_copy: */
int (*group_init)(EC_GROUP *);
void (*group_finish)(EC_GROUP *);
......@@ -140,13 +144,17 @@ struct ec_group_st {
EC_POINT *generator; /* optional */
BIGNUM order, cofactor;
int nid; /* optional NID for named curve */
int nid; /* optional NID for named curve */
int asn1_flag; /* flag to control the asn1 encoding */
void *extra_data;
void *(*extra_data_dup_func)(void *);
void (*extra_data_free_func)(void *);
void (*extra_data_clear_free_func)(void *);
unsigned char *seed; /* XXX */
size_t seed_len; /* XXX */
/* The following members are handled by the method functions,
* even if they appear generic */
......
......@@ -99,6 +99,10 @@ EC_GROUP *EC_GROUP_new(const EC_METHOD *meth)
BN_init(&ret->cofactor);
ret->nid = 0;
ret->asn1_flag = OPENSSL_EC_EXPLICIT | OPENSSL_EC_COMPRESSED;
ret->seed = NULL;
ret->seed_len = 0;
if (!meth->group_init(ret))
{
......@@ -124,6 +128,9 @@ void EC_GROUP_free(EC_GROUP *group)
BN_free(&group->order);
BN_free(&group->cofactor);
if (group->seed)
OPENSSL_free(group->seed);
OPENSSL_free(group);
}
......@@ -144,6 +151,12 @@ void EC_GROUP_clear_free(EC_GROUP *group)
BN_clear_free(&group->order);
BN_clear_free(&group->cofactor);
if (group->seed)
{
memset(group->seed, 0, group->seed_len);
OPENSSL_free(group->seed);
}
memset(group, 0, sizeof *group);
OPENSSL_free(group);
}
......@@ -202,6 +215,27 @@ int EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src)
if (!BN_copy(&dest->cofactor, &src->cofactor)) return 0;
dest->nid = src->nid;
dest->asn1_flag = src->asn1_flag;
if (src->seed)
{
if (dest->seed)
OPENSSL_free(dest->seed);
dest->seed = OPENSSL_malloc(src->seed_len);
if (dest->seed == NULL)
return 0;
if (!memcpy(dest->seed, src->seed, src->seed_len))
return 0;
dest->seed_len = src->seed_len;
}
else
{
if (dest->seed)
OPENSSL_free(dest->seed);
dest->seed = NULL;
dest->seed_len = 0;
}
return dest->meth->group_copy(dest, src);
}
......@@ -213,6 +247,12 @@ const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group)
}
int EC_METHOD_get_field_type(const EC_METHOD *meth)
{
return meth->field_type;
}
int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofactor)
{
if (generator == NULL)
......@@ -278,6 +318,18 @@ int EC_GROUP_get_nid(const EC_GROUP *group)
}
void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag)
{
group->asn1_flag = flag;
}
int EC_GROUP_get_asn1_flag(const EC_GROUP *group)
{
return group->asn1_flag;
}
int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
{
if (group->meth->group_set_curve_GFp == 0)
......
......@@ -61,6 +61,7 @@
const EC_METHOD *EC_GFp_mont_method(void)
{
static const EC_METHOD ret = {
NID_X9_62_prime_field,
ec_GFp_mont_group_init,
ec_GFp_mont_group_finish,
ec_GFp_mont_group_clear_finish,
......
......@@ -63,6 +63,7 @@
const EC_METHOD *EC_GFp_simple_method(void)
{
static const EC_METHOD ret = {
NID_X9_62_prime_field,
ec_GFp_simple_group_init,
ec_GFp_simple_group_finish,
ec_GFp_simple_group_clear_finish,
......
......@@ -32,7 +32,7 @@ LIBOBJ= ecs_lib.o ecs_gen.o ecs_asn1.o ecs_ossl.o ecs_sign.o ecs_vrf.o \
SRC= $(LIBSRC)
EXHEADER= ecdsa.h
HEADER= ecs_locl.h $(EXHEADER)
HEADER= $(EXHEADER)
ALL= $(GENERAL) $(SRC) $(HEADER)
......@@ -87,12 +87,10 @@ ecs_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
ecs_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
ecs_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
ecs_asn1.o: ../../include/openssl/ec.h ../../include/openssl/err.h
ecs_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
ecs_asn1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
ecs_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
ecs_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
ecs_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
ecs_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h ecdsa.h ecs_asn1.c
ecs_asn1.o: ecs_locl.h
ecs_err.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
ecs_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
ecs_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
......@@ -125,7 +123,7 @@ ecs_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
ecs_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
ecs_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
ecs_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
ecs_lib.o: ../cryptlib.h ecdsa.h ecs_lib.c ecs_locl.h
ecs_lib.o: ../cryptlib.h ecdsa.h ecs_lib.c
ecs_ossl.o: ../../e_os.h ../../include/openssl/asn1.h
ecs_ossl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
ecs_ossl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
......
......@@ -93,9 +93,6 @@ typedef struct ecdsa_method
char *app_data;
} ECDSA_METHOD;
#define ECDSA_FLAG_NAMED_CURVE 1
#define ECDSA_FLAG_IMPLICITLYCA 2
struct ecdsa_st
{
int version;
......@@ -109,11 +106,6 @@ struct ecdsa_st
BIGNUM *kinv; /* signing pre-calc */
BIGNUM *r; /* signing pre-calc */
unsigned char *seed; /* seed for curve generation */
unsigned int seed_len;
int parameter_flags;
int references;
int flags;
CRYPTO_EX_DATA ex_data;
......@@ -161,9 +153,6 @@ int ECDSAParameters_print_fp(FILE *fp, const ECDSA *x);
int ECDSA_print_fp(FILE *fp, const ECDSA *x, int off);
#endif
void ECDSA_set_parameter_flags(ECDSA *, int);
int ECDSA_get_parameter_flags(const ECDSA*);
/* The ECDSA_{set|get}_conversion_type() functions set/get the
* conversion form for ec-points (see ec.h) in a ECDSA-structure */
void ECDSA_set_conversion_form(ECDSA *, const point_conversion_form_t);
......@@ -259,6 +248,7 @@ void ERR_load_ECDSA_strings(void);
#define ECDSA_R_I2D_ECDSA_PRIVATEKEY 115
#define ECDSA_R_I2D_ECDSA_PUBLICKEY 116
#define ECDSA_R_MISSING_PARAMETERS 117
#define ECDSA_R_MISSING_PRIVATE_KEY 139
#define ECDSA_R_NOT_SUPPORTED 118
#define ECDSA_R_NO_CURVE_PARAMETER_A_SPECIFIED 119
#define ECDSA_R_NO_CURVE_PARAMETER_B_SPECIFIED 120
......
此差异已折叠。
/* crypto/ecdsa/ecs_err.c */
/* ====================================================================
* Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
* Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -76,19 +76,19 @@ static ERR_STRING_DATA ECDSA_str_functs[]=
{ERR_PACK(0,ECDSA_F_ECDSA_GET,0), "ECDSA_GET"},
{ERR_PACK(0,ECDSA_F_ECDSA_GET_CURVE_NID,0), "ECDSA_GET_CURVE_NID"},
{ERR_PACK(0,ECDSA_F_ECDSA_GET_ECDSA,0), "ECDSA_GET_ECDSA"},
{ERR_PACK(0,ECDSA_F_ECDSA_GET_EC_PARAMETERS,0), "ECDSA_get_EC_PARAMETERS"},
{ERR_PACK(0,ECDSA_F_ECDSA_GET_X9_62_CURVE,0), "ECDSA_get_X9_62_CURVE"},
{ERR_PACK(0,ECDSA_F_ECDSA_GET_X9_62_EC_PARAMETERS,0), "ECDSA_get_X9_62_EC_PARAMETERS"},
{ERR_PACK(0,ECDSA_F_ECDSA_GET_X9_62_FIELDID,0), "ECDSA_get_X9_62_FIELDID"},
{ERR_PACK(0,ECDSA_F_ECDSA_NEW,0), "ECDSA_NEW"},
{ERR_PACK(0,ECDSA_F_ECDSA_GET_EC_PARAMETERS,0), "ECDSA_GET_EC_PARAMETERS"},
{ERR_PACK(0,ECDSA_F_ECDSA_GET_X9_62_CURVE,0), "ECDSA_GET_X9_62_CURVE"},
{ERR_PACK(0,ECDSA_F_ECDSA_GET_X9_62_EC_PARAMETERS,0), "ECDSA_GET_X9_62_EC_PARAMETERS"},
{ERR_PACK(0,ECDSA_F_ECDSA_GET_X9_62_FIELDID,0), "ECDSA_GET_X9_62_FIELDID"},
{ERR_PACK(0,ECDSA_F_ECDSA_NEW,0), "ECDSA_new"},
{ERR_PACK(0,ECDSA_F_ECDSA_PRINT,0), "ECDSA_print"},
{ERR_PACK(0,ECDSA_F_ECDSA_PRINT_FP,0), "ECDSA_print_fp"},
{ERR_PACK(0,ECDSA_F_ECDSA_SET_GROUP_P,0), "ECDSA_set_group_p"},
{ERR_PACK(0,ECDSA_F_ECDSA_SET_GROUP_P,0), "ECDSA_SET_GROUP_P"},
{ERR_PACK(0,ECDSA_F_ECDSA_SET_PRIME_GROUP,0), "ECDSA_SET_PRIME_GROUP"},
{ERR_PACK(0,ECDSA_F_ECDSA_SIGN_SETUP,0), "ECDSA_sign_setup"},
{ERR_PACK(0,ECDSA_F_I2D_ECDSAPARAMETERS,0), "i2d_ECDSAParameters"},
{ERR_PACK(0,ECDSA_F_I2D_ECDSAPRIVATEKEY,0), "i2d_ECDSAPrivateKey"},
{ERR_PACK(0,ECDSA_F_I2D_ECDSAPUBLICKEY,0), "i2d_ECDSAPublicKey"},
{ERR_PACK(0,ECDSA_F_I2D_ECDSAPUBLICKEY,0), "I2D_ECDSAPUBLICKEY"},
{ERR_PACK(0,ECDSA_F_SIG_CB,0), "SIG_CB"},
{0,NULL}
};
......@@ -118,6 +118,7 @@ static ERR_STRING_DATA ECDSA_str_reasons[]=
{ECDSA_R_I2D_ECDSA_PRIVATEKEY ,"i2d ecdsa privatekey"},
{ECDSA_R_I2D_ECDSA_PUBLICKEY ,"i2d ecdsa publickey"},
{ECDSA_R_MISSING_PARAMETERS ,"missing parameters"},
{ECDSA_R_MISSING_PRIVATE_KEY ,"missing private key"},
{ECDSA_R_NOT_SUPPORTED ,"not supported"},
{ECDSA_R_NO_CURVE_PARAMETER_A_SPECIFIED ,"no curve parameter a specified"},
{ECDSA_R_NO_CURVE_PARAMETER_B_SPECIFIED ,"no curve parameter b specified"},
......
......@@ -110,7 +110,7 @@
*/
#include "cryptlib.h"
#include "ecs_locl.h"
#include "ecdsa.h"
#include <openssl/engine.h>
const char *ECDSA_version="ECDSA" OPENSSL_VERSION_PTEXT;
......@@ -186,11 +186,6 @@ ECDSA *ECDSA_new_method(ENGINE *engine)
ret->kinv = NULL;
ret->r = NULL;
ret->seed = NULL;
ret->seed_len = 0;
ret->parameter_flags = 0;
ret->references = 1;
ret->flags = ret->meth->flags;
CRYPTO_new_ex_data(CRYPTO_EX_INDEX_ECDSA, ret, &ret->ex_data);
......@@ -235,7 +230,6 @@ void ECDSA_free(ECDSA *r)
if (r->priv_key != NULL) BN_clear_free(r->priv_key);
if (r->kinv != NULL) BN_clear_free(r->kinv);
if (r->r != NULL) BN_clear_free(r->r);
if (r->seed != NULL) OPENSSL_free(r->seed);
OPENSSL_free(r);
}
......@@ -301,16 +295,6 @@ int ECDSA_up_ref(ECDSA *ecdsa)
return ((i > 1) ? 1 : 0);
}
void ECDSA_set_parameter_flags(ECDSA *ecdsa, int flag)
{
ecdsa->parameter_flags = flag;
}
int ECDSA_get_parameter_flags(const ECDSA *ecdsa)
{
return ecdsa->parameter_flags;
}
void ECDSA_set_conversion_form(ECDSA *ecdsa, const point_conversion_form_t form)
{
if (ecdsa) ecdsa->conversion_form = form;
......
/* crypto/ecdsa/ecs_locl.h */
/* ====================================================================
* Copyright (c) 1998-2002 The OpenSSL 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 OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* licensing@OpenSSL.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL 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 OpenSSL 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.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/
#include "ecdsa.h"
#ifndef HEADER_ECS_LOCL_H
#define HEADER_ECS_LOCL_H
#ifdef __cplusplus
extern "C" {
#endif
#define OPENSSL_ECDSA_ABORT(r) { reason = (r); goto err; }
/* some structures needed for the asn1 encoding */
typedef struct x9_62_fieldid_st {
ASN1_OBJECT *fieldType;
ASN1_TYPE *parameters;
} X9_62_FIELDID;
typedef struct x9_62_curve_st {
ASN1_OCTET_STRING *a;
ASN1_OCTET_STRING *b;
ASN1_BIT_STRING *seed;
} X9_62_CURVE;
typedef struct x9_62_ec_parameters {
ASN1_INTEGER *version;
X9_62_FIELDID *fieldID;
X9_62_CURVE *curve;
ASN1_OCTET_STRING *base;
ASN1_INTEGER *order;
ASN1_INTEGER *cofactor;
} X9_62_EC_PARAMETERS;
typedef struct ec_parameters {
int type;
union {
ASN1_OBJECT *named_curve;
X9_62_EC_PARAMETERS *parameters;
ASN1_NULL *implicitlyCA;
} value;
} EC_PARAMETERS;
typedef struct ecdsa_priv_key_st {
int version;
EC_PARAMETERS *parameters;
ASN1_OBJECT *named_curve;
ASN1_OCTET_STRING *pub_key;
BIGNUM *priv_key;
} ECDSAPrivateKey;
X9_62_FIELDID *ECDSA_get_X9_62_FIELDID(const ECDSA *ecdsa, X9_62_FIELDID *field);
X9_62_CURVE *ECDSA_get_X9_62_CURVE(const ECDSA *ecdsa, X9_62_CURVE *curve);
X9_62_EC_PARAMETERS *ECDSA_get_X9_62_EC_PARAMETERS(const ECDSA *ecdsa, X9_62_EC_PARAMETERS *params);
EC_PARAMETERS *ECDSA_get_EC_PARAMETERS(const ECDSA *ecdsa, EC_PARAMETERS *params);
ECDSA *ECDSA_x9_62parameters2ecdsa(const X9_62_EC_PARAMETERS *params, ECDSA *ecdsa);
ECDSA *ECDSA_ecparameters2ecdsa(const EC_PARAMETERS *params, ECDSA *ecdsa);
#ifdef __cplusplus
}
#endif
#endif
......@@ -2830,13 +2830,13 @@ EVP_PKEY_set1_ECDSA 3272 EXIST::FUNCTION:ECDSA
EC_GROUP_get_nid 3273 EXIST::FUNCTION:EC
d2i_ECDSA_PUBKEY_fp 3274 EXIST::FUNCTION:ECDSA,FP_API
ECDSA_OpenSSL 3275 EXIST::FUNCTION:ECDSA
ECDSA_get_parameter_flags 3276 EXIST::FUNCTION:ECDSA
ECDSA_get_parameter_flags 3276 NOEXIST::FUNCTION:
PEM_read_ECDSAParameters 3277 EXIST:!WIN16:FUNCTION:ECDSA
ECDSA_get_ex_data 3278 EXIST::FUNCTION:ECDSA
ECDSA_do_verify 3279 EXIST::FUNCTION:ECDSA
ECDSA_do_sign 3280 EXIST::FUNCTION:ECDSA
EC_POINT_point2bn 3281 EXIST::FUNCTION:EC
ECDSA_set_parameter_flags 3282 EXIST::FUNCTION:ECDSA
ECDSA_set_parameter_flags 3282 NOEXIST::FUNCTION:
i2d_ECDSA_SIG 3283 EXIST::FUNCTION:ECDSA
PEM_read_bio_ECDSAParameters 3284 EXIST::FUNCTION:ECDSA
ECDSAPublicKey_get_octet_string 3285 EXIST::FUNCTION:ECDSA
......@@ -2862,3 +2862,20 @@ PEM_write_ECDSAParameters 3304 EXIST:!WIN16:FUNCTION:ECDSA
i2d_ECDSAPrivateKey_fp 3305 EXIST::FUNCTION:ECDSA,FP_API
PEM_read_ECDSAPrivateKey 3306 EXIST:!WIN16:FUNCTION:ECDSA
ECDSAPublicKey_set_octet_string 3307 EXIST::FUNCTION:ECDSA
EC_GROUP_get_asn1_flag 3308 EXIST::FUNCTION:EC
EC_ASN1_group2pkparameters 3309 EXIST::FUNCTION:EC
d2i_ECPARAMETERS 3310 EXIST::FUNCTION:EC
i2d_ECPARAMETERS 3311 EXIST::FUNCTION:EC
d2i_ECPKPARAMETERS 3312 EXIST::FUNCTION:EC
EC_GROUP_set_asn1_flag 3313 EXIST::FUNCTION:EC
ECPKPARAMETERS_it 3314 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:EC
ECPKPARAMETERS_it 3314 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:EC
d2i_ECParameters 3315 EXIST::FUNCTION:EC
EC_METHOD_get_field_type 3316 EXIST::FUNCTION:EC
i2d_ECPKPARAMETERS 3317 EXIST::FUNCTION:EC
i2d_ECParameters 3318 EXIST::FUNCTION:EC
d2i_ECPKParameters 3319 EXIST::FUNCTION:EC
ECPARAMETERS_it 3320 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:EC
ECPARAMETERS_it 3320 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:EC
EC_ASN1_pkparameters2group 3321 EXIST::FUNCTION:EC
i2d_ECPKParameters 3322 EXIST::FUNCTION:EC
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册