OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Macros | Typedefs | Enumerations | Functions
ec.h File Reference
#include <openssl/opensslconf.h>
#include <openssl/asn1.h>
#include <openssl/symhacks.h>
#include <openssl/bn.h>

Go to the source code of this file.

Classes

struct  EC_builtin_curve
 

Macros

#define OPENSSL_ECC_MAX_FIELD_BITS   661
 
#define OPENSSL_EC_NAMED_CURVE   0x001
 
#define d2i_ECPKParameters_bio(bp, x)   ASN1_d2i_bio_of(EC_GROUP,NULL,d2i_ECPKParameters,bp,x)
 
#define i2d_ECPKParameters_bio(bp, x)   ASN1_i2d_bio_of_const(EC_GROUP,i2d_ECPKParameters,bp,x)
 
#define d2i_ECPKParameters_fp(fp, x)
 
#define i2d_ECPKParameters_fp(fp, x)
 
#define EC_PKEY_NO_PARAMETERS   0x001
 
#define EC_PKEY_NO_PUBKEY   0x002
 
#define EC_FLAG_NON_FIPS_ALLOW   0x1
 
#define EC_FLAG_FIPS_CHECKED   0x2
 
#define ECParameters_dup(x)   ASN1_dup_of(EC_KEY,i2d_ECParameters,d2i_ECParameters,x)
 
#define EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid)
 
#define EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID   (EVP_PKEY_ALG_CTRL + 1)
 
#define EC_F_BN_TO_FELEM   224
 
#define EC_F_COMPUTE_WNAF   143
 
#define EC_F_D2I_ECPARAMETERS   144
 
#define EC_F_D2I_ECPKPARAMETERS   145
 
#define EC_F_D2I_ECPRIVATEKEY   146
 
#define EC_F_DO_EC_KEY_PRINT   221
 
#define EC_F_ECKEY_PARAM2TYPE   223
 
#define EC_F_ECKEY_PARAM_DECODE   212
 
#define EC_F_ECKEY_PRIV_DECODE   213
 
#define EC_F_ECKEY_PRIV_ENCODE   214
 
#define EC_F_ECKEY_PUB_DECODE   215
 
#define EC_F_ECKEY_PUB_ENCODE   216
 
#define EC_F_ECKEY_TYPE2PARAM   220
 
#define EC_F_ECPARAMETERS_PRINT   147
 
#define EC_F_ECPARAMETERS_PRINT_FP   148
 
#define EC_F_ECPKPARAMETERS_PRINT   149
 
#define EC_F_ECPKPARAMETERS_PRINT_FP   150
 
#define EC_F_ECP_NIST_MOD_192   203
 
#define EC_F_ECP_NIST_MOD_224   204
 
#define EC_F_ECP_NIST_MOD_256   205
 
#define EC_F_ECP_NIST_MOD_521   206
 
#define EC_F_EC_ASN1_GROUP2CURVE   153
 
#define EC_F_EC_ASN1_GROUP2FIELDID   154
 
#define EC_F_EC_ASN1_GROUP2PARAMETERS   155
 
#define EC_F_EC_ASN1_GROUP2PKPARAMETERS   156
 
#define EC_F_EC_ASN1_PARAMETERS2GROUP   157
 
#define EC_F_EC_ASN1_PKPARAMETERS2GROUP   158
 
#define EC_F_EC_EX_DATA_SET_DATA   211
 
#define EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY   208
 
#define EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT   159
 
#define EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE   195
 
#define EC_F_EC_GF2M_SIMPLE_OCT2POINT   160
 
#define EC_F_EC_GF2M_SIMPLE_POINT2OCT   161
 
#define EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES   162
 
#define EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES   163
 
#define EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES   164
 
#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
 
#define EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE   209
 
#define EC_F_EC_GFP_MONT_FIELD_SQR   132
 
#define EC_F_EC_GFP_MONT_GROUP_SET_CURVE   189
 
#define EC_F_EC_GFP_MONT_GROUP_SET_CURVE_GFP   135
 
#define EC_F_EC_GFP_NISTP224_GROUP_SET_CURVE   225
 
#define EC_F_EC_GFP_NISTP224_POINTS_MUL   228
 
#define EC_F_EC_GFP_NISTP224_POINT_GET_AFFINE_COORDINATES   226
 
#define EC_F_EC_GFP_NISTP256_GROUP_SET_CURVE   230
 
#define EC_F_EC_GFP_NISTP256_POINTS_MUL   231
 
#define EC_F_EC_GFP_NISTP256_POINT_GET_AFFINE_COORDINATES   232
 
#define EC_F_EC_GFP_NISTP521_GROUP_SET_CURVE   233
 
#define EC_F_EC_GFP_NISTP521_POINTS_MUL   234
 
#define EC_F_EC_GFP_NISTP521_POINT_GET_AFFINE_COORDINATES   235
 
#define EC_F_EC_GFP_NIST_FIELD_MUL   200
 
#define EC_F_EC_GFP_NIST_FIELD_SQR   201
 
#define EC_F_EC_GFP_NIST_GROUP_SET_CURVE   202
 
#define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT   165
 
#define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE   166
 
#define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP   100
 
#define EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR   101
 
#define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE   102
 
#define EC_F_EC_GFP_SIMPLE_OCT2POINT   103
 
#define EC_F_EC_GFP_SIMPLE_POINT2OCT   104
 
#define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE   137
 
#define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES   167
 
#define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP   105
 
#define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES   168
 
#define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP   128
 
#define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES   169
 
#define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP   129
 
#define EC_F_EC_GROUP_CHECK   170
 
#define EC_F_EC_GROUP_CHECK_DISCRIMINANT   171
 
#define EC_F_EC_GROUP_COPY   106
 
#define EC_F_EC_GROUP_GET0_GENERATOR   139
 
#define EC_F_EC_GROUP_GET_COFACTOR   140
 
#define EC_F_EC_GROUP_GET_CURVE_GF2M   172
 
#define EC_F_EC_GROUP_GET_CURVE_GFP   130
 
#define EC_F_EC_GROUP_GET_DEGREE   173
 
#define EC_F_EC_GROUP_GET_ORDER   141
 
#define EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS   193
 
#define EC_F_EC_GROUP_GET_TRINOMIAL_BASIS   194
 
#define EC_F_EC_GROUP_NEW   108
 
#define EC_F_EC_GROUP_NEW_BY_CURVE_NAME   174
 
#define EC_F_EC_GROUP_NEW_FROM_DATA   175
 
#define EC_F_EC_GROUP_PRECOMPUTE_MULT   142
 
#define EC_F_EC_GROUP_SET_CURVE_GF2M   176
 
#define EC_F_EC_GROUP_SET_CURVE_GFP   109
 
#define EC_F_EC_GROUP_SET_EXTRA_DATA   110
 
#define EC_F_EC_GROUP_SET_GENERATOR   111
 
#define EC_F_EC_KEY_CHECK_KEY   177
 
#define EC_F_EC_KEY_COPY   178
 
#define EC_F_EC_KEY_GENERATE_KEY   179
 
#define EC_F_EC_KEY_NEW   182
 
#define EC_F_EC_KEY_PRINT   180
 
#define EC_F_EC_KEY_PRINT_FP   181
 
#define EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES   229
 
#define EC_F_EC_POINTS_MAKE_AFFINE   136
 
#define EC_F_EC_POINT_ADD   112
 
#define EC_F_EC_POINT_CMP   113
 
#define EC_F_EC_POINT_COPY   114
 
#define EC_F_EC_POINT_DBL   115
 
#define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M   183
 
#define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP   116
 
#define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP   117
 
#define EC_F_EC_POINT_INVERT   210
 
#define EC_F_EC_POINT_IS_AT_INFINITY   118
 
#define EC_F_EC_POINT_IS_ON_CURVE   119
 
#define EC_F_EC_POINT_MAKE_AFFINE   120
 
#define EC_F_EC_POINT_MUL   184
 
#define EC_F_EC_POINT_NEW   121
 
#define EC_F_EC_POINT_OCT2POINT   122
 
#define EC_F_EC_POINT_POINT2OCT   123
 
#define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M   185
 
#define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP   124
 
#define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M   186
 
#define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP   125
 
#define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP   126
 
#define EC_F_EC_POINT_SET_TO_INFINITY   127
 
#define EC_F_EC_PRE_COMP_DUP   207
 
#define EC_F_EC_PRE_COMP_NEW   196
 
#define EC_F_EC_WNAF_MUL   187
 
#define EC_F_EC_WNAF_PRECOMPUTE_MULT   188
 
#define EC_F_I2D_ECPARAMETERS   190
 
#define EC_F_I2D_ECPKPARAMETERS   191
 
#define EC_F_I2D_ECPRIVATEKEY   192
 
#define EC_F_I2O_ECPUBLICKEY   151
 
#define EC_F_NISTP224_PRE_COMP_NEW   227
 
#define EC_F_NISTP256_PRE_COMP_NEW   236
 
#define EC_F_NISTP521_PRE_COMP_NEW   237
 
#define EC_F_O2I_ECPUBLICKEY   152
 
#define EC_F_OLD_EC_PRIV_DECODE   222
 
#define EC_F_PKEY_EC_CTRL   197
 
#define EC_F_PKEY_EC_CTRL_STR   198
 
#define EC_F_PKEY_EC_DERIVE   217
 
#define EC_F_PKEY_EC_KEYGEN   199
 
#define EC_F_PKEY_EC_PARAMGEN   219
 
#define EC_F_PKEY_EC_SIGN   218
 
#define EC_R_ASN1_ERROR   115
 
#define EC_R_ASN1_UNKNOWN_FIELD   116
 
#define EC_R_BIGNUM_OUT_OF_RANGE   144
 
#define EC_R_BUFFER_TOO_SMALL   100
 
#define EC_R_COORDINATES_OUT_OF_RANGE   146
 
#define EC_R_D2I_ECPKPARAMETERS_FAILURE   117
 
#define EC_R_DECODE_ERROR   142
 
#define EC_R_DISCRIMINANT_IS_ZERO   118
 
#define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE   119
 
#define EC_R_FIELD_TOO_LARGE   143
 
#define EC_R_GF2M_NOT_SUPPORTED   147
 
#define EC_R_GROUP2PKPARAMETERS_FAILURE   120
 
#define EC_R_I2D_ECPKPARAMETERS_FAILURE   121
 
#define EC_R_INCOMPATIBLE_OBJECTS   101
 
#define EC_R_INVALID_ARGUMENT   112
 
#define EC_R_INVALID_COMPRESSED_POINT   110
 
#define EC_R_INVALID_COMPRESSION_BIT   109
 
#define EC_R_INVALID_CURVE   141
 
#define EC_R_INVALID_DIGEST_TYPE   138
 
#define EC_R_INVALID_ENCODING   102
 
#define EC_R_INVALID_FIELD   103
 
#define EC_R_INVALID_FORM   104
 
#define EC_R_INVALID_GROUP_ORDER   122
 
#define EC_R_INVALID_PENTANOMIAL_BASIS   132
 
#define EC_R_INVALID_PRIVATE_KEY   123
 
#define EC_R_INVALID_TRINOMIAL_BASIS   137
 
#define EC_R_KEYS_NOT_SET   140
 
#define EC_R_MISSING_PARAMETERS   124
 
#define EC_R_MISSING_PRIVATE_KEY   125
 
#define EC_R_NOT_A_NIST_PRIME   135
 
#define EC_R_NOT_A_SUPPORTED_NIST_PRIME   136
 
#define EC_R_NOT_IMPLEMENTED   126
 
#define EC_R_NOT_INITIALIZED   111
 
#define EC_R_NO_FIELD_MOD   133
 
#define EC_R_NO_PARAMETERS_SET   139
 
#define EC_R_PASSED_NULL_PARAMETER   134
 
#define EC_R_PKPARAMETERS2GROUP_FAILURE   127
 
#define EC_R_POINT_AT_INFINITY   106
 
#define EC_R_POINT_IS_NOT_ON_CURVE   107
 
#define EC_R_SLOT_FULL   108
 
#define EC_R_UNDEFINED_GENERATOR   113
 
#define EC_R_UNDEFINED_ORDER   128
 
#define EC_R_UNKNOWN_GROUP   129
 
#define EC_R_UNKNOWN_ORDER   114
 
#define EC_R_UNSUPPORTED_FIELD   131
 
#define EC_R_WRONG_CURVE_PARAMETERS   145
 
#define EC_R_WRONG_ORDER   130
 

Typedefs

typedef struct ec_method_st EC_METHOD
 
typedef struct ec_group_st EC_GROUP
 
typedef struct ec_point_st EC_POINT
 
typedef struct ecpk_parameters_st ECPKPARAMETERS
 
typedef struct ec_key_st EC_KEY
 

Enumerations

enum  point_conversion_form_t {
  POINT_CONVERSION_COMPRESSED = 2, POINT_CONVERSION_UNCOMPRESSED = 4, POINT_CONVERSION_HYBRID = 6, POINT_CONVERSION_COMPRESSED = 2,
  POINT_CONVERSION_UNCOMPRESSED = 4, POINT_CONVERSION_HYBRID = 6
}
 

Functions

const EC_METHODEC_GFp_simple_method (void)
 
const EC_METHODEC_GFp_mont_method (void)
 
const EC_METHODEC_GFp_nist_method (void)
 
const EC_METHODEC_GFp_nistp224_method (void)
 
const EC_METHODEC_GFp_nistp256_method (void)
 
const EC_METHODEC_GFp_nistp521_method (void)
 
const EC_METHODEC_GF2m_simple_method (void)
 
EC_GROUPEC_GROUP_new (const EC_METHOD *meth)
 
void EC_GROUP_free (EC_GROUP *group)
 
void EC_GROUP_clear_free (EC_GROUP *group)
 
int EC_GROUP_copy (EC_GROUP *dst, const EC_GROUP *src)
 
EC_GROUPEC_GROUP_dup (const EC_GROUP *src)
 
const EC_METHODEC_GROUP_method_of (const EC_GROUP *group)
 
int EC_METHOD_get_field_type (const EC_METHOD *meth)
 
int EC_GROUP_set_generator (EC_GROUP *group, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofactor)
 
const EC_POINTEC_GROUP_get0_generator (const EC_GROUP *group)
 
int EC_GROUP_get_order (const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx)
 
int EC_GROUP_get_cofactor (const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx)
 
void EC_GROUP_set_curve_name (EC_GROUP *group, int nid)
 
int EC_GROUP_get_curve_name (const EC_GROUP *group)
 
void EC_GROUP_set_asn1_flag (EC_GROUP *group, int flag)
 
int EC_GROUP_get_asn1_flag (const EC_GROUP *group)
 
void EC_GROUP_set_point_conversion_form (EC_GROUP *, point_conversion_form_t)
 
point_conversion_form_t EC_GROUP_get_point_conversion_form (const EC_GROUP *)
 
unsigned char * EC_GROUP_get0_seed (const EC_GROUP *)
 
size_t EC_GROUP_get_seed_len (const EC_GROUP *)
 
size_t EC_GROUP_set_seed (EC_GROUP *, const unsigned char *, size_t len)
 
int EC_GROUP_set_curve_GFp (EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
 
int EC_GROUP_get_curve_GFp (const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx)
 
int EC_GROUP_set_curve_GF2m (EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
 
int EC_GROUP_get_curve_GF2m (const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx)
 
int EC_GROUP_get_degree (const EC_GROUP *group)
 
int EC_GROUP_check (const EC_GROUP *group, BN_CTX *ctx)
 
int EC_GROUP_check_discriminant (const EC_GROUP *group, BN_CTX *ctx)
 
int EC_GROUP_cmp (const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx)
 
EC_GROUPEC_GROUP_new_curve_GFp (const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
 
EC_GROUPEC_GROUP_new_curve_GF2m (const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
 
EC_GROUPEC_GROUP_new_by_curve_name (int nid)
 
size_t EC_get_builtin_curves (EC_builtin_curve *r, size_t nitems)
 
EC_POINTEC_POINT_new (const EC_GROUP *group)
 
void EC_POINT_free (EC_POINT *point)
 
void EC_POINT_clear_free (EC_POINT *point)
 
int EC_POINT_copy (EC_POINT *dst, const EC_POINT *src)
 
EC_POINTEC_POINT_dup (const EC_POINT *src, const EC_GROUP *group)
 
const EC_METHODEC_POINT_method_of (const EC_POINT *point)
 
int EC_POINT_set_to_infinity (const EC_GROUP *group, EC_POINT *point)
 
int EC_POINT_set_Jprojective_coordinates_GFp (const EC_GROUP *group, EC_POINT *p, const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx)
 
int EC_POINT_get_Jprojective_coordinates_GFp (const EC_GROUP *group, const EC_POINT *p, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx)
 
int EC_POINT_set_affine_coordinates_GFp (const EC_GROUP *group, EC_POINT *p, const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx)
 
int EC_POINT_get_affine_coordinates_GFp (const EC_GROUP *group, const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx)
 
int EC_POINT_set_compressed_coordinates_GFp (const EC_GROUP *group, EC_POINT *p, const BIGNUM *x, int y_bit, BN_CTX *ctx)
 
int EC_POINT_set_affine_coordinates_GF2m (const EC_GROUP *group, EC_POINT *p, const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx)
 
int EC_POINT_get_affine_coordinates_GF2m (const EC_GROUP *group, const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx)
 
int EC_POINT_set_compressed_coordinates_GF2m (const EC_GROUP *group, EC_POINT *p, const BIGNUM *x, int y_bit, BN_CTX *ctx)
 
size_t EC_POINT_point2oct (const EC_GROUP *group, const EC_POINT *p, point_conversion_form_t form, unsigned char *buf, size_t len, BN_CTX *ctx)
 
int EC_POINT_oct2point (const EC_GROUP *group, EC_POINT *p, const unsigned char *buf, size_t len, BN_CTX *ctx)
 
BIGNUMEC_POINT_point2bn (const EC_GROUP *, const EC_POINT *, point_conversion_form_t form, BIGNUM *, BN_CTX *)
 
EC_POINTEC_POINT_bn2point (const EC_GROUP *, const BIGNUM *, EC_POINT *, BN_CTX *)
 
char * EC_POINT_point2hex (const EC_GROUP *, const EC_POINT *, point_conversion_form_t form, BN_CTX *)
 
EC_POINTEC_POINT_hex2point (const EC_GROUP *, const char *, EC_POINT *, BN_CTX *)
 
int EC_POINT_add (const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx)
 
int EC_POINT_dbl (const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *ctx)
 
int EC_POINT_invert (const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx)
 
int EC_POINT_is_at_infinity (const EC_GROUP *group, const EC_POINT *p)
 
int EC_POINT_is_on_curve (const EC_GROUP *group, const EC_POINT *point, BN_CTX *ctx)
 
int EC_POINT_cmp (const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx)
 
int EC_POINT_make_affine (const EC_GROUP *, EC_POINT *, BN_CTX *)
 
int EC_POINTs_make_affine (const EC_GROUP *, size_t num, EC_POINT *[], BN_CTX *)
 
int EC_POINTs_mul (const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, size_t num, const EC_POINT *p[], const BIGNUM *m[], BN_CTX *ctx)
 
int EC_POINT_mul (const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx)
 
int EC_GROUP_precompute_mult (EC_GROUP *group, BN_CTX *ctx)
 
int EC_GROUP_have_precompute_mult (const EC_GROUP *group)
 
int EC_GROUP_get_basis_type (const EC_GROUP *)
 
int EC_GROUP_get_trinomial_basis (const EC_GROUP *, unsigned int *k)
 
int EC_GROUP_get_pentanomial_basis (const EC_GROUP *, unsigned int *k1, unsigned int *k2, unsigned int *k3)
 
EC_GROUPd2i_ECPKParameters (EC_GROUP **, const unsigned char **in, long len)
 
int i2d_ECPKParameters (const EC_GROUP *, unsigned char **out)
 
int ECPKParameters_print (BIO *bp, const EC_GROUP *x, int off)
 
int ECPKParameters_print_fp (FILE *fp, const EC_GROUP *x, int off)
 
EC_KEYEC_KEY_new (void)
 
int EC_KEY_get_flags (const EC_KEY *key)
 
void EC_KEY_set_flags (EC_KEY *key, int flags)
 
void EC_KEY_clear_flags (EC_KEY *key, int flags)
 
EC_KEYEC_KEY_new_by_curve_name (int nid)
 
void EC_KEY_free (EC_KEY *key)
 
EC_KEYEC_KEY_copy (EC_KEY *dst, const EC_KEY *src)
 
EC_KEYEC_KEY_dup (const EC_KEY *src)
 
int EC_KEY_up_ref (EC_KEY *key)
 
const EC_GROUPEC_KEY_get0_group (const EC_KEY *key)
 
int EC_KEY_set_group (EC_KEY *key, const EC_GROUP *group)
 
const BIGNUMEC_KEY_get0_private_key (const EC_KEY *key)
 
int EC_KEY_set_private_key (EC_KEY *key, const BIGNUM *prv)
 
const EC_POINTEC_KEY_get0_public_key (const EC_KEY *key)
 
int EC_KEY_set_public_key (EC_KEY *key, const EC_POINT *pub)
 
unsigned EC_KEY_get_enc_flags (const EC_KEY *key)
 
void EC_KEY_set_enc_flags (EC_KEY *, unsigned int)
 
point_conversion_form_t EC_KEY_get_conv_form (const EC_KEY *)
 
void EC_KEY_set_conv_form (EC_KEY *, point_conversion_form_t)
 
voidEC_KEY_get_key_method_data (EC_KEY *, void *(*dup_func)(void *), void(*free_func)(void *), void(*clear_free_func)(void *))
 
void EC_KEY_insert_key_method_data (EC_KEY *, void *data, void *(*dup_func)(void *), void(*free_func)(void *), void(*clear_free_func)(void *))
 
void EC_KEY_set_asn1_flag (EC_KEY *, int)
 
int EC_KEY_precompute_mult (EC_KEY *key, BN_CTX *ctx)
 
int EC_KEY_generate_key (EC_KEY *key)
 
int EC_KEY_check_key (const EC_KEY *key)
 
int EC_KEY_set_public_key_affine_coordinates (EC_KEY *key, BIGNUM *x, BIGNUM *y)
 
EC_KEYd2i_ECPrivateKey (EC_KEY **key, const unsigned char **in, long len)
 
int i2d_ECPrivateKey (EC_KEY *key, unsigned char **out)
 
EC_KEYd2i_ECParameters (EC_KEY **key, const unsigned char **in, long len)
 
int i2d_ECParameters (EC_KEY *key, unsigned char **out)
 
EC_KEYo2i_ECPublicKey (EC_KEY **key, const unsigned char **in, long len)
 
int i2o_ECPublicKey (EC_KEY *key, unsigned char **out)
 
int ECParameters_print (BIO *bp, const EC_KEY *key)
 
int EC_KEY_print (BIO *bp, const EC_KEY *key, int off)
 
int ECParameters_print_fp (FILE *fp, const EC_KEY *key)
 
int EC_KEY_print_fp (FILE *fp, const EC_KEY *key, int off)
 
void ERR_load_EC_strings (void)
 

Detailed Description

Include file for the OpenSSL EC functions

Author
Originally written by Bodo Moeller for the OpenSSL project

Definition in file ec.h.

Macro Definition Documentation

#define d2i_ECPKParameters_bio (   bp,
 
)    ASN1_d2i_bio_of(EC_GROUP,NULL,d2i_ECPKParameters,bp,x)

Definition at line 689 of file ec.h.

#define d2i_ECPKParameters_fp (   fp,
 
)
Value:
(char *(*)())d2i_ECPKParameters,(fp),(unsigned char **)(x))

Definition at line 691 of file ec.h.

#define EC_F_BN_TO_FELEM   224

Definition at line 970 of file ec.h.

#define EC_F_COMPUTE_WNAF   143

Definition at line 971 of file ec.h.

#define EC_F_D2I_ECPARAMETERS   144

Definition at line 972 of file ec.h.

#define EC_F_D2I_ECPKPARAMETERS   145

Definition at line 973 of file ec.h.

#define EC_F_D2I_ECPRIVATEKEY   146

Definition at line 974 of file ec.h.

#define EC_F_DO_EC_KEY_PRINT   221

Definition at line 975 of file ec.h.

#define EC_F_EC_ASN1_GROUP2CURVE   153

Definition at line 991 of file ec.h.

#define EC_F_EC_ASN1_GROUP2FIELDID   154

Definition at line 992 of file ec.h.

#define EC_F_EC_ASN1_GROUP2PARAMETERS   155

Definition at line 993 of file ec.h.

#define EC_F_EC_ASN1_GROUP2PKPARAMETERS   156

Definition at line 994 of file ec.h.

#define EC_F_EC_ASN1_PARAMETERS2GROUP   157

Definition at line 995 of file ec.h.

#define EC_F_EC_ASN1_PKPARAMETERS2GROUP   158

Definition at line 996 of file ec.h.

#define EC_F_EC_EX_DATA_SET_DATA   211

Definition at line 997 of file ec.h.

#define EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY   208

Definition at line 998 of file ec.h.

#define EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT   159

Definition at line 999 of file ec.h.

#define EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE   195

Definition at line 1000 of file ec.h.

#define EC_F_EC_GF2M_SIMPLE_OCT2POINT   160

Definition at line 1001 of file ec.h.

#define EC_F_EC_GF2M_SIMPLE_POINT2OCT   161

Definition at line 1002 of file ec.h.

#define EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES   162

Definition at line 1003 of file ec.h.

#define EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES   163

Definition at line 1004 of file ec.h.

#define EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES   164

Definition at line 1005 of file ec.h.

#define EC_F_EC_GFP_MONT_FIELD_DECODE   133

Definition at line 1006 of file ec.h.

#define EC_F_EC_GFP_MONT_FIELD_ENCODE   134

Definition at line 1007 of file ec.h.

#define EC_F_EC_GFP_MONT_FIELD_MUL   131

Definition at line 1008 of file ec.h.

#define EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE   209

Definition at line 1009 of file ec.h.

#define EC_F_EC_GFP_MONT_FIELD_SQR   132

Definition at line 1010 of file ec.h.

#define EC_F_EC_GFP_MONT_GROUP_SET_CURVE   189

Definition at line 1011 of file ec.h.

#define EC_F_EC_GFP_MONT_GROUP_SET_CURVE_GFP   135

Definition at line 1012 of file ec.h.

#define EC_F_EC_GFP_NIST_FIELD_MUL   200

Definition at line 1022 of file ec.h.

#define EC_F_EC_GFP_NIST_FIELD_SQR   201

Definition at line 1023 of file ec.h.

#define EC_F_EC_GFP_NIST_GROUP_SET_CURVE   202

Definition at line 1024 of file ec.h.

#define EC_F_EC_GFP_NISTP224_GROUP_SET_CURVE   225

Definition at line 1013 of file ec.h.

#define EC_F_EC_GFP_NISTP224_POINT_GET_AFFINE_COORDINATES   226

Definition at line 1015 of file ec.h.

#define EC_F_EC_GFP_NISTP224_POINTS_MUL   228

Definition at line 1014 of file ec.h.

#define EC_F_EC_GFP_NISTP256_GROUP_SET_CURVE   230

Definition at line 1016 of file ec.h.

#define EC_F_EC_GFP_NISTP256_POINT_GET_AFFINE_COORDINATES   232

Definition at line 1018 of file ec.h.

#define EC_F_EC_GFP_NISTP256_POINTS_MUL   231

Definition at line 1017 of file ec.h.

#define EC_F_EC_GFP_NISTP521_GROUP_SET_CURVE   233

Definition at line 1019 of file ec.h.

#define EC_F_EC_GFP_NISTP521_POINT_GET_AFFINE_COORDINATES   235

Definition at line 1021 of file ec.h.

#define EC_F_EC_GFP_NISTP521_POINTS_MUL   234

Definition at line 1020 of file ec.h.

#define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT   165

Definition at line 1025 of file ec.h.

#define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE   166

Definition at line 1026 of file ec.h.

#define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP   100

Definition at line 1027 of file ec.h.

#define EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR   101

Definition at line 1028 of file ec.h.

#define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE   102

Definition at line 1029 of file ec.h.

#define EC_F_EC_GFP_SIMPLE_OCT2POINT   103

Definition at line 1030 of file ec.h.

#define EC_F_EC_GFP_SIMPLE_POINT2OCT   104

Definition at line 1031 of file ec.h.

#define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES   167

Definition at line 1033 of file ec.h.

#define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP   105

Definition at line 1034 of file ec.h.

#define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES   168

Definition at line 1035 of file ec.h.

#define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP   128

Definition at line 1036 of file ec.h.

#define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE   137

Definition at line 1032 of file ec.h.

#define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES   169

Definition at line 1037 of file ec.h.

#define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP   129

Definition at line 1038 of file ec.h.

#define EC_F_EC_GROUP_CHECK   170

Definition at line 1039 of file ec.h.

#define EC_F_EC_GROUP_CHECK_DISCRIMINANT   171

Definition at line 1040 of file ec.h.

#define EC_F_EC_GROUP_COPY   106

Definition at line 1041 of file ec.h.

#define EC_F_EC_GROUP_GET0_GENERATOR   139

Definition at line 1042 of file ec.h.

#define EC_F_EC_GROUP_GET_COFACTOR   140

Definition at line 1043 of file ec.h.

#define EC_F_EC_GROUP_GET_CURVE_GF2M   172

Definition at line 1044 of file ec.h.

#define EC_F_EC_GROUP_GET_CURVE_GFP   130

Definition at line 1045 of file ec.h.

#define EC_F_EC_GROUP_GET_DEGREE   173

Definition at line 1046 of file ec.h.

#define EC_F_EC_GROUP_GET_ORDER   141

Definition at line 1047 of file ec.h.

#define EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS   193

Definition at line 1048 of file ec.h.

#define EC_F_EC_GROUP_GET_TRINOMIAL_BASIS   194

Definition at line 1049 of file ec.h.

#define EC_F_EC_GROUP_NEW   108

Definition at line 1050 of file ec.h.

#define EC_F_EC_GROUP_NEW_BY_CURVE_NAME   174

Definition at line 1051 of file ec.h.

#define EC_F_EC_GROUP_NEW_FROM_DATA   175

Definition at line 1052 of file ec.h.

#define EC_F_EC_GROUP_PRECOMPUTE_MULT   142

Definition at line 1053 of file ec.h.

#define EC_F_EC_GROUP_SET_CURVE_GF2M   176

Definition at line 1054 of file ec.h.

#define EC_F_EC_GROUP_SET_CURVE_GFP   109

Definition at line 1055 of file ec.h.

#define EC_F_EC_GROUP_SET_EXTRA_DATA   110

Definition at line 1056 of file ec.h.

#define EC_F_EC_GROUP_SET_GENERATOR   111

Definition at line 1057 of file ec.h.

#define EC_F_EC_KEY_CHECK_KEY   177

Definition at line 1058 of file ec.h.

#define EC_F_EC_KEY_COPY   178

Definition at line 1059 of file ec.h.

#define EC_F_EC_KEY_GENERATE_KEY   179

Definition at line 1060 of file ec.h.

#define EC_F_EC_KEY_NEW   182

Definition at line 1061 of file ec.h.

#define EC_F_EC_KEY_PRINT   180

Definition at line 1062 of file ec.h.

#define EC_F_EC_KEY_PRINT_FP   181

Definition at line 1063 of file ec.h.

#define EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES   229

Definition at line 1064 of file ec.h.

#define EC_F_EC_POINT_ADD   112

Definition at line 1066 of file ec.h.

#define EC_F_EC_POINT_CMP   113

Definition at line 1067 of file ec.h.

#define EC_F_EC_POINT_COPY   114

Definition at line 1068 of file ec.h.

#define EC_F_EC_POINT_DBL   115

Definition at line 1069 of file ec.h.

#define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M   183

Definition at line 1070 of file ec.h.

#define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP   116

Definition at line 1071 of file ec.h.

#define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP   117

Definition at line 1072 of file ec.h.

#define EC_F_EC_POINT_INVERT   210

Definition at line 1073 of file ec.h.

#define EC_F_EC_POINT_IS_AT_INFINITY   118

Definition at line 1074 of file ec.h.

#define EC_F_EC_POINT_IS_ON_CURVE   119

Definition at line 1075 of file ec.h.

#define EC_F_EC_POINT_MAKE_AFFINE   120

Definition at line 1076 of file ec.h.

#define EC_F_EC_POINT_MUL   184

Definition at line 1077 of file ec.h.

#define EC_F_EC_POINT_NEW   121

Definition at line 1078 of file ec.h.

#define EC_F_EC_POINT_OCT2POINT   122

Definition at line 1079 of file ec.h.

#define EC_F_EC_POINT_POINT2OCT   123

Definition at line 1080 of file ec.h.

#define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M   185

Definition at line 1081 of file ec.h.

#define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP   124

Definition at line 1082 of file ec.h.

#define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M   186

Definition at line 1083 of file ec.h.

#define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP   125

Definition at line 1084 of file ec.h.

#define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP   126

Definition at line 1085 of file ec.h.

#define EC_F_EC_POINT_SET_TO_INFINITY   127

Definition at line 1086 of file ec.h.

#define EC_F_EC_POINTS_MAKE_AFFINE   136

Definition at line 1065 of file ec.h.

#define EC_F_EC_PRE_COMP_DUP   207

Definition at line 1087 of file ec.h.

#define EC_F_EC_PRE_COMP_NEW   196

Definition at line 1088 of file ec.h.

#define EC_F_EC_WNAF_MUL   187

Definition at line 1089 of file ec.h.

#define EC_F_EC_WNAF_PRECOMPUTE_MULT   188

Definition at line 1090 of file ec.h.

#define EC_F_ECKEY_PARAM2TYPE   223

Definition at line 976 of file ec.h.

#define EC_F_ECKEY_PARAM_DECODE   212

Definition at line 977 of file ec.h.

#define EC_F_ECKEY_PRIV_DECODE   213

Definition at line 978 of file ec.h.

#define EC_F_ECKEY_PRIV_ENCODE   214

Definition at line 979 of file ec.h.

#define EC_F_ECKEY_PUB_DECODE   215

Definition at line 980 of file ec.h.

#define EC_F_ECKEY_PUB_ENCODE   216

Definition at line 981 of file ec.h.

#define EC_F_ECKEY_TYPE2PARAM   220

Definition at line 982 of file ec.h.

#define EC_F_ECP_NIST_MOD_192   203

Definition at line 987 of file ec.h.

#define EC_F_ECP_NIST_MOD_224   204

Definition at line 988 of file ec.h.

#define EC_F_ECP_NIST_MOD_256   205

Definition at line 989 of file ec.h.

#define EC_F_ECP_NIST_MOD_521   206

Definition at line 990 of file ec.h.

#define EC_F_ECPARAMETERS_PRINT   147

Definition at line 983 of file ec.h.

#define EC_F_ECPARAMETERS_PRINT_FP   148

Definition at line 984 of file ec.h.

#define EC_F_ECPKPARAMETERS_PRINT   149

Definition at line 985 of file ec.h.

#define EC_F_ECPKPARAMETERS_PRINT_FP   150

Definition at line 986 of file ec.h.

#define EC_F_I2D_ECPARAMETERS   190

Definition at line 1091 of file ec.h.

#define EC_F_I2D_ECPKPARAMETERS   191

Definition at line 1092 of file ec.h.

#define EC_F_I2D_ECPRIVATEKEY   192

Definition at line 1093 of file ec.h.

#define EC_F_I2O_ECPUBLICKEY   151

Definition at line 1094 of file ec.h.

#define EC_F_NISTP224_PRE_COMP_NEW   227

Definition at line 1095 of file ec.h.

#define EC_F_NISTP256_PRE_COMP_NEW   236

Definition at line 1096 of file ec.h.

#define EC_F_NISTP521_PRE_COMP_NEW   237

Definition at line 1097 of file ec.h.

#define EC_F_O2I_ECPUBLICKEY   152

Definition at line 1098 of file ec.h.

#define EC_F_OLD_EC_PRIV_DECODE   222

Definition at line 1099 of file ec.h.

#define EC_F_PKEY_EC_CTRL   197

Definition at line 1100 of file ec.h.

#define EC_F_PKEY_EC_CTRL_STR   198

Definition at line 1101 of file ec.h.

#define EC_F_PKEY_EC_DERIVE   217

Definition at line 1102 of file ec.h.

#define EC_F_PKEY_EC_KEYGEN   199

Definition at line 1103 of file ec.h.

#define EC_F_PKEY_EC_PARAMGEN   219

Definition at line 1104 of file ec.h.

#define EC_F_PKEY_EC_SIGN   218

Definition at line 1105 of file ec.h.

#define EC_FLAG_FIPS_CHECKED   0x2

Definition at line 716 of file ec.h.

#define EC_FLAG_NON_FIPS_ALLOW   0x1

Definition at line 715 of file ec.h.

#define EC_PKEY_NO_PARAMETERS   0x001

Definition at line 711 of file ec.h.

#define EC_PKEY_NO_PUBKEY   0x002

Definition at line 712 of file ec.h.

#define EC_R_ASN1_ERROR   115

Definition at line 1108 of file ec.h.

#define EC_R_ASN1_UNKNOWN_FIELD   116

Definition at line 1109 of file ec.h.

#define EC_R_BIGNUM_OUT_OF_RANGE   144

Definition at line 1110 of file ec.h.

#define EC_R_BUFFER_TOO_SMALL   100

Definition at line 1111 of file ec.h.

#define EC_R_COORDINATES_OUT_OF_RANGE   146

Definition at line 1112 of file ec.h.

#define EC_R_D2I_ECPKPARAMETERS_FAILURE   117

Definition at line 1113 of file ec.h.

#define EC_R_DECODE_ERROR   142

Definition at line 1114 of file ec.h.

#define EC_R_DISCRIMINANT_IS_ZERO   118

Definition at line 1115 of file ec.h.

#define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE   119

Definition at line 1116 of file ec.h.

#define EC_R_FIELD_TOO_LARGE   143

Definition at line 1117 of file ec.h.

#define EC_R_GF2M_NOT_SUPPORTED   147

Definition at line 1118 of file ec.h.

#define EC_R_GROUP2PKPARAMETERS_FAILURE   120

Definition at line 1119 of file ec.h.

#define EC_R_I2D_ECPKPARAMETERS_FAILURE   121

Definition at line 1120 of file ec.h.

#define EC_R_INCOMPATIBLE_OBJECTS   101

Definition at line 1121 of file ec.h.

#define EC_R_INVALID_ARGUMENT   112

Definition at line 1122 of file ec.h.

#define EC_R_INVALID_COMPRESSED_POINT   110

Definition at line 1123 of file ec.h.

#define EC_R_INVALID_COMPRESSION_BIT   109

Definition at line 1124 of file ec.h.

#define EC_R_INVALID_CURVE   141

Definition at line 1125 of file ec.h.

#define EC_R_INVALID_DIGEST_TYPE   138

Definition at line 1126 of file ec.h.

#define EC_R_INVALID_ENCODING   102

Definition at line 1127 of file ec.h.

#define EC_R_INVALID_FIELD   103

Definition at line 1128 of file ec.h.

#define EC_R_INVALID_FORM   104

Definition at line 1129 of file ec.h.

#define EC_R_INVALID_GROUP_ORDER   122

Definition at line 1130 of file ec.h.

#define EC_R_INVALID_PENTANOMIAL_BASIS   132

Definition at line 1131 of file ec.h.

#define EC_R_INVALID_PRIVATE_KEY   123

Definition at line 1132 of file ec.h.

#define EC_R_INVALID_TRINOMIAL_BASIS   137

Definition at line 1133 of file ec.h.

#define EC_R_KEYS_NOT_SET   140

Definition at line 1134 of file ec.h.

#define EC_R_MISSING_PARAMETERS   124

Definition at line 1135 of file ec.h.

#define EC_R_MISSING_PRIVATE_KEY   125

Definition at line 1136 of file ec.h.

#define EC_R_NO_FIELD_MOD   133

Definition at line 1141 of file ec.h.

#define EC_R_NO_PARAMETERS_SET   139

Definition at line 1142 of file ec.h.

#define EC_R_NOT_A_NIST_PRIME   135

Definition at line 1137 of file ec.h.

#define EC_R_NOT_A_SUPPORTED_NIST_PRIME   136

Definition at line 1138 of file ec.h.

#define EC_R_NOT_IMPLEMENTED   126

Definition at line 1139 of file ec.h.

#define EC_R_NOT_INITIALIZED   111

Definition at line 1140 of file ec.h.

#define EC_R_PASSED_NULL_PARAMETER   134

Definition at line 1143 of file ec.h.

#define EC_R_PKPARAMETERS2GROUP_FAILURE   127

Definition at line 1144 of file ec.h.

#define EC_R_POINT_AT_INFINITY   106

Definition at line 1145 of file ec.h.

#define EC_R_POINT_IS_NOT_ON_CURVE   107

Definition at line 1146 of file ec.h.

#define EC_R_SLOT_FULL   108

Definition at line 1147 of file ec.h.

#define EC_R_UNDEFINED_GENERATOR   113

Definition at line 1148 of file ec.h.

#define EC_R_UNDEFINED_ORDER   128

Definition at line 1149 of file ec.h.

#define EC_R_UNKNOWN_GROUP   129

Definition at line 1150 of file ec.h.

#define EC_R_UNKNOWN_ORDER   114

Definition at line 1151 of file ec.h.

#define EC_R_UNSUPPORTED_FIELD   131

Definition at line 1152 of file ec.h.

#define EC_R_WRONG_CURVE_PARAMETERS   145

Definition at line 1153 of file ec.h.

#define EC_R_WRONG_ORDER   130

Definition at line 1154 of file ec.h.

#define ECParameters_dup (   x)    ASN1_dup_of(EC_KEY,i2d_ECParameters,d2i_ECParameters,x)

Definition at line 944 of file ec.h.

#define EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID   (EVP_PKEY_ALG_CTRL + 1)

Definition at line 959 of file ec.h.

#define EVP_PKEY_CTX_set_ec_paramgen_curve_nid (   ctx,
  nid 
)
#define i2d_ECPKParameters_bio (   bp,
 
)    ASN1_i2d_bio_of_const(EC_GROUP,i2d_ECPKParameters,bp,x)

Definition at line 690 of file ec.h.

#define i2d_ECPKParameters_fp (   fp,
 
)
Value:
(unsigned char *)(x))

Definition at line 693 of file ec.h.

#define OPENSSL_EC_NAMED_CURVE   0x001

Definition at line 682 of file ec.h.

#define OPENSSL_ECC_MAX_FIELD_BITS   661

Definition at line 101 of file ec.h.

Typedef Documentation

typedef struct ec_group_st EC_GROUP

Definition at line 120 of file ec.h.

typedef struct ec_key_st EC_KEY

Definition at line 708 of file ec.h.

typedef struct ec_method_st EC_METHOD

Definition at line 118 of file ec.h.

typedef struct ec_point_st EC_POINT

Definition at line 131 of file ec.h.

Definition at line 684 of file ec.h.

Enumeration Type Documentation

Enum for the point conversion form as defined in X9.62 (ECDSA) for the encoding of a elliptic curve point (x,y)

Enumerator:
POINT_CONVERSION_COMPRESSED 

the point is encoded as z||x, where the octet z specifies which solution of the quadratic equation y is

POINT_CONVERSION_UNCOMPRESSED 

the point is encoded as z||x||y, where z is the octet 0x02

POINT_CONVERSION_HYBRID 

the point is encoded as z||x||y, where the octet z specifies which solution of the quadratic equation y is

POINT_CONVERSION_COMPRESSED 

the point is encoded as z||x, where the octet z specifies which solution of the quadratic equation y is

POINT_CONVERSION_UNCOMPRESSED 

the point is encoded as z||x||y, where z is the octet 0x02

POINT_CONVERSION_HYBRID 

the point is encoded as z||x||y, where the octet z specifies which solution of the quadratic equation y is

Definition at line 106 of file ec.h.

Function Documentation

EC_KEY* d2i_ECParameters ( EC_KEY **  key,
const unsigned char **  in,
long  len 
)

Decodes ec parameter from a memory buffer.

Parameters
keya pointer to a EC_KEY object which should be used (or NULL)
inpointer to memory with the DER encoded ec parameters
lenlength of the DER encoded ec parameters
Returns
a EC_KEY object with the decoded parameters or NULL if an error occurred.

Definition at line 1344 of file ec_asn1.c.

EC_GROUP* d2i_ECPKParameters ( EC_GROUP **  ,
const unsigned char **  in,
long  len 
)

Definition at line 1066 of file ec_asn1.c.

EC_KEY* d2i_ECPrivateKey ( EC_KEY **  key,
const unsigned char **  in,
long  len 
)

Decodes a private key from a memory buffer.

Parameters
keya pointer to a EC_KEY object which should be used (or NULL)
inpointer to memory with the DER encoded private key
lenlength of the DER encoded private key
Returns
the decoded private key or NULL if an error occurred.

Definition at line 1116 of file ec_asn1.c.

size_t EC_get_builtin_curves ( EC_builtin_curve r,
size_t  nitems 
)

Definition at line 2084 of file ec_curve.c.

const EC_METHOD* EC_GF2m_simple_method ( void  )

Returns the basic GF2m ec method

Returns
EC_METHOD object

Definition at line 81 of file ec2_smpl.c.

const EC_METHOD* EC_GFp_mont_method ( void  )

Returns GFp methods using montgomery multiplication.

Returns
EC_METHOD object

Definition at line 73 of file ecp_mont.c.

const EC_METHOD* EC_GFp_nist_method ( void  )

Returns GFp methods using optimized methods for NIST recommended curves

Returns
EC_METHOD object

Definition at line 74 of file ecp_nist.c.

const EC_METHOD* EC_GFp_nistp224_method ( void  )

Returns 64-bit optimized methods for nistp224

Returns
EC_METHOD object

Definition at line 236 of file ecp_nistp224.c.

const EC_METHOD* EC_GFp_nistp256_method ( void  )

Returns 64-bit optimized methods for nistp256

Returns
EC_METHOD object

Definition at line 1616 of file ecp_nistp256.c.

const EC_METHOD* EC_GFp_nistp521_method ( void  )

Returns 64-bit optimized methods for nistp521

Returns
EC_METHOD object

Definition at line 1482 of file ecp_nistp521.c.

const EC_METHOD* EC_GFp_simple_method ( void  )

Returns the basic GFp ec methods which provides the basis for the optimized methods.

Returns
EC_METHOD object

Definition at line 74 of file ecp_smpl.c.

int EC_GROUP_check ( const EC_GROUP group,
BN_CTX ctx 
)

Checks whether the parameter in the EC_GROUP define a valid ec group

Parameters
groupEC_GROUP object
ctxBN_CTX object (optional)
Returns
1 if group is a valid ec group and 0 otherwise

Definition at line 59 of file ec_check.c.

int EC_GROUP_check_discriminant ( const EC_GROUP group,
BN_CTX ctx 
)

Checks whether the discriminant of the elliptic curve is zero or not

Parameters
groupEC_GROUP object
ctxBN_CTX object (optional)
Returns
1 if the discriminant is not zero and 0 otherwise

Definition at line 462 of file ec_lib.c.

void EC_GROUP_clear_free ( EC_GROUP group)

Clears and frees a EC_GROUP object

Parameters
groupEC_GROUP object to be cleared and freed.

Definition at line 144 of file ec_lib.c.

int EC_GROUP_cmp ( const EC_GROUP a,
const EC_GROUP b,
BN_CTX ctx 
)

Compares two EC_GROUP objects

Parameters
afirst EC_GROUP object
bsecond EC_GROUP object
ctxBN_CTX object (optional)
Returns
0 if both groups are equal and 1 otherwise

Definition at line 473 of file ec_lib.c.

int EC_GROUP_copy ( EC_GROUP dst,
const EC_GROUP src 
)

Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD.

Parameters
dstdestination EC_GROUP object
srcsource EC_GROUP object
Returns
1 on success and 0 if an error occurred.

Definition at line 171 of file ec_lib.c.

EC_GROUP* EC_GROUP_dup ( const EC_GROUP src)

Creates a new EC_GROUP object and copies the copies the content form src to the newly created EC_KEY object

Parameters
srcsource EC_GROUP object
Returns
newly created EC_GROUP object or NULL in case of an error.

Definition at line 250 of file ec_lib.c.

void EC_GROUP_free ( EC_GROUP group)

Frees a EC_GROUP object

Parameters
groupEC_GROUP object to be freed.

Definition at line 123 of file ec_lib.c.

const EC_POINT* EC_GROUP_get0_generator ( const EC_GROUP group)

Returns the generator of a EC_GROUP object.

Parameters
groupEC_GROUP object
Returns
the currently used generator (possibly NULL).

Definition at line 313 of file ec_lib.c.

unsigned char* EC_GROUP_get0_seed ( const EC_GROUP )

Definition at line 395 of file ec_lib.c.

int EC_GROUP_get_asn1_flag ( const EC_GROUP group)

Definition at line 355 of file ec_lib.c.

int EC_GROUP_get_basis_type ( const EC_GROUP )

Definition at line 66 of file ec_asn1.c.

int EC_GROUP_get_cofactor ( const EC_GROUP group,
BIGNUM cofactor,
BN_CTX ctx 
)

Gets the cofactor of a EC_GROUP

Parameters
groupEC_GROUP object
cofactorBIGNUM to which the cofactor is copied
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 328 of file ec_lib.c.

int EC_GROUP_get_curve_GF2m ( const EC_GROUP group,
BIGNUM p,
BIGNUM a,
BIGNUM b,
BN_CTX ctx 
)

Gets the parameter of the ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b

Parameters
groupEC_GROUP object
pBIGNUM for the polynomial defining the underlying field
aBIGNUM for parameter a of the equation
bBIGNUM for parameter b of the equation
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 440 of file ec_lib.c.

int EC_GROUP_get_curve_GFp ( const EC_GROUP group,
BIGNUM p,
BIGNUM a,
BIGNUM b,
BN_CTX ctx 
)

Gets the parameter of the ec over GFp defined by y^2 = x^3 + a*x + b

Parameters
groupEC_GROUP object
pBIGNUM for the prime number
aBIGNUM for parameter a of the equation
bBIGNUM for parameter b of the equation
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 418 of file ec_lib.c.

int EC_GROUP_get_curve_name ( const EC_GROUP group)

Returns the curve name of a EC_GROUP object

Parameters
groupEC_GROUP object
Returns
NID of the curve name OID or 0 if not set.

Definition at line 343 of file ec_lib.c.

int EC_GROUP_get_degree ( const EC_GROUP group)

Returns the number of bits needed to represent a field element

Parameters
groupEC_GROUP object
Returns
number of bits needed to represent a field element

Definition at line 451 of file ec_lib.c.

int EC_GROUP_get_order ( const EC_GROUP group,
BIGNUM order,
BN_CTX ctx 
)

Gets the order of a EC_GROUP

Parameters
groupEC_GROUP object
orderBIGNUM to which the order is copied
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 319 of file ec_lib.c.

int EC_GROUP_get_pentanomial_basis ( const EC_GROUP ,
unsigned int *  k1,
unsigned int *  k2,
unsigned int *  k3 
)

Definition at line 104 of file ec_asn1.c.

point_conversion_form_t EC_GROUP_get_point_conversion_form ( const EC_GROUP )

Definition at line 368 of file ec_lib.c.

size_t EC_GROUP_get_seed_len ( const EC_GROUP )

Definition at line 401 of file ec_lib.c.

int EC_GROUP_get_trinomial_basis ( const EC_GROUP ,
unsigned int *  k 
)

Definition at line 87 of file ec_asn1.c.

int EC_GROUP_have_precompute_mult ( const EC_GROUP group)

Reports whether a precomputation has been done

Parameters
groupEC_GROUP object
Returns
1 if a pre-computation has been done and 0 otherwise

Definition at line 1086 of file ec_lib.c.

const EC_METHOD* EC_GROUP_method_of ( const EC_GROUP group)

Returns the EC_METHOD of the EC_GROUP object.

Parameters
groupEC_GROUP object
Returns
EC_METHOD used in this EC_GROUP object.

Definition at line 272 of file ec_lib.c.

EC_GROUP* EC_GROUP_new ( const EC_METHOD meth)

Creates a new EC_GROUP object

Parameters
methEC_METHOD to use
Returns
newly created EC_GROUP object or NULL in case of an error.

Definition at line 76 of file ec_lib.c.

EC_GROUP* EC_GROUP_new_by_curve_name ( int  nid)

Creates a EC_GROUP object with a curve specified by a NID

Parameters
nidNID of the OID of the curve name
Returns
newly created EC_GROUP object with specified curve or NULL if an error occurred

Definition at line 2058 of file ec_curve.c.

EC_GROUP* EC_GROUP_new_curve_GF2m ( const BIGNUM p,
const BIGNUM a,
const BIGNUM b,
BN_CTX ctx 
)

Creates a new EC_GROUP object with the specified parameters defined over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b)

Parameters
pBIGNUM with the polynomial defining the underlying field
aBIGNUM with the parameter a of the equation
bBIGNUM with the parameter b of the equation
ctxBN_CTX object (optional)
Returns
newly created EC_GROUP object with the specified parameters

Definition at line 151 of file ec_cvt.c.

EC_GROUP* EC_GROUP_new_curve_GFp ( const BIGNUM p,
const BIGNUM a,
const BIGNUM b,
BN_CTX ctx 
)

Creates a new EC_GROUP object with the specified parameters defined over GFp (defined by the equation y^2 = x^3 + a*x + b)

Parameters
pBIGNUM with the prime number
aBIGNUM with the parameter a of the equation
bBIGNUM with the parameter b of the equation
ctxBN_CTX object (optional)
Returns
newly created EC_GROUP object with the specified parameters

Definition at line 76 of file ec_cvt.c.

int EC_GROUP_precompute_mult ( EC_GROUP group,
BN_CTX ctx 
)

Stores multiples of generator for faster point multiplication

Parameters
groupEC_GROUP object
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 1074 of file ec_lib.c.

void EC_GROUP_set_asn1_flag ( EC_GROUP group,
int  flag 
)

Definition at line 349 of file ec_lib.c.

int EC_GROUP_set_curve_GF2m ( EC_GROUP group,
const BIGNUM p,
const BIGNUM a,
const BIGNUM b,
BN_CTX ctx 
)

Sets the parameter of a ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b

Parameters
groupEC_GROUP object
pBIGNUM with the polynomial defining the underlying field
aBIGNUM with parameter a of the equation
bBIGNUM with parameter b of the equation
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 429 of file ec_lib.c.

int EC_GROUP_set_curve_GFp ( EC_GROUP group,
const BIGNUM p,
const BIGNUM a,
const BIGNUM b,
BN_CTX ctx 
)

Sets the parameter of a ec over GFp defined by y^2 = x^3 + a*x + b

Parameters
groupEC_GROUP object
pBIGNUM with the prime number
aBIGNUM with parameter a of the equation
bBIGNUM with parameter b of the equation
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 407 of file ec_lib.c.

void EC_GROUP_set_curve_name ( EC_GROUP group,
int  nid 
)

Sets the name of a EC_GROUP object

Parameters
groupEC_GROUP object
nidNID of the curve name OID

Definition at line 337 of file ec_lib.c.

int EC_GROUP_set_generator ( EC_GROUP group,
const EC_POINT generator,
const BIGNUM order,
const BIGNUM cofactor 
)

Sets the generator and it's order/cofactor of a EC_GROUP object.

Parameters
groupEC_GROUP object
generatorEC_POINT object with the generator.
orderthe order of the group generated by the generator.
cofactorthe index of the sub-group generated by the generator in the group of all points on the elliptic curve.
Returns
1 on success and 0 if an error occured

Definition at line 284 of file ec_lib.c.

void EC_GROUP_set_point_conversion_form ( EC_GROUP ,
point_conversion_form_t   
)

Definition at line 361 of file ec_lib.c.

size_t EC_GROUP_set_seed ( EC_GROUP ,
const unsigned char *  ,
size_t  len 
)

Definition at line 374 of file ec_lib.c.

int EC_KEY_check_key ( const EC_KEY key)

Verifies that a private and/or public key is valid.

Parameters
keythe EC_KEY object
Returns
1 on success and 0 otherwise.

Definition at line 304 of file ec_key.c.

void EC_KEY_clear_flags ( EC_KEY key,
int  flags 
)

Definition at line 560 of file ec_key.c.

EC_KEY* EC_KEY_copy ( EC_KEY dst,
const EC_KEY src 
)

Copies a EC_KEY object.

Parameters
dstdestination EC_KEY object
srcsrc EC_KEY object
Returns
dst or NULL if an error occurred.

Definition at line 141 of file ec_key.c.

EC_KEY* EC_KEY_dup ( const EC_KEY src)

Creates a new EC_KEY object and copies the content from src to it.

Parameters
srcthe source EC_KEY object
Returns
newly created EC_KEY object or NULL if an error occurred.

Definition at line 208 of file ec_key.c.

void EC_KEY_free ( EC_KEY key)

Frees a EC_KEY object.

Parameters
keyEC_KEY object to be freed.

Definition at line 108 of file ec_key.c.

int EC_KEY_generate_key ( EC_KEY key)

Creates a new ec private (and optional a new public) key.

Parameters
keyEC_KEY object
Returns
1 on success and 0 if an error occurred.

Definition at line 237 of file ec_key.c.

const EC_GROUP* EC_KEY_get0_group ( const EC_KEY key)

Returns the EC_GROUP object of a EC_KEY object

Parameters
keyEC_KEY object
Returns
the EC_GROUP object (possibly NULL).

Definition at line 459 of file ec_key.c.

const BIGNUM* EC_KEY_get0_private_key ( const EC_KEY key)

Returns the private key of a EC_KEY object.

Parameters
keyEC_KEY object
Returns
a BIGNUM with the private key (possibly NULL).

Definition at line 472 of file ec_key.c.

const EC_POINT* EC_KEY_get0_public_key ( const EC_KEY key)

Returns the public key of a EC_KEY object.

Parameters
keythe EC_KEY object
Returns
a EC_POINT object with the public key (possibly NULL)

Definition at line 485 of file ec_key.c.

point_conversion_form_t EC_KEY_get_conv_form ( const EC_KEY )

Definition at line 508 of file ec_key.c.

unsigned EC_KEY_get_enc_flags ( const EC_KEY key)

Definition at line 498 of file ec_key.c.

int EC_KEY_get_flags ( const EC_KEY key)

Definition at line 550 of file ec_key.c.

void* EC_KEY_get_key_method_data ( EC_KEY ,
void *(*)(void *)  dup_func,
void(*)(void *)  free_func,
void(*)(void *)  clear_free_func 
)

Definition at line 520 of file ec_key.c.

void EC_KEY_insert_key_method_data ( EC_KEY ,
void data,
void *(*)(void *)  dup_func,
void(*)(void *)  free_func,
void(*)(void *)  clear_free_func 
)

Definition at line 526 of file ec_key.c.

EC_KEY* EC_KEY_new ( void  )

Creates a new EC_KEY object.

Returns
EC_KEY object or NULL if an error occurred.

Definition at line 71 of file ec_key.c.

EC_KEY* EC_KEY_new_by_curve_name ( int  nid)

Creates a new EC_KEY object using a named curve as underlying EC_GROUP object.

Parameters
nidNID of the named curve.
Returns
EC_KEY object or NULL if an error occurred.

Definition at line 94 of file ec_key.c.

int EC_KEY_precompute_mult ( EC_KEY key,
BN_CTX ctx 
)

Creates a table of pre-computed multiples of the generator to accelerate further EC_KEY operations.

Parameters
keyEC_KEY object
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occurred.

Definition at line 543 of file ec_key.c.

int EC_KEY_print ( BIO bp,
const EC_KEY key,
int  off 
)

Prints out the contents of a EC_KEY object

Parameters
bpBIO object to which the information is printed
keyEC_KEY object
offline offset
Returns
1 on success and 0 if an error occurred

Definition at line 120 of file eck_prn.c.

int EC_KEY_print_fp ( FILE *  fp,
const EC_KEY key,
int  off 
)

Prints out the contents of a EC_KEY object

Parameters
fpfile descriptor to which the information is printed
keyEC_KEY object
offline offset
Returns
1 on success and 0 if an error occurred

Definition at line 87 of file eck_prn.c.

void EC_KEY_set_asn1_flag ( EC_KEY ,
int   
)

Definition at line 537 of file ec_key.c.

void EC_KEY_set_conv_form ( EC_KEY ,
point_conversion_form_t   
)

Definition at line 513 of file ec_key.c.

void EC_KEY_set_enc_flags ( EC_KEY ,
unsigned  int 
)

Definition at line 503 of file ec_key.c.

void EC_KEY_set_flags ( EC_KEY key,
int  flags 
)

Definition at line 555 of file ec_key.c.

int EC_KEY_set_group ( EC_KEY key,
const EC_GROUP group 
)

Sets the EC_GROUP of a EC_KEY object.

Parameters
keyEC_KEY object
groupEC_GROUP to use in the EC_KEY object (note: the EC_KEY object will use an own copy of the EC_GROUP).
Returns
1 on success and 0 if an error occurred.

Definition at line 464 of file ec_key.c.

int EC_KEY_set_private_key ( EC_KEY key,
const BIGNUM prv 
)

Sets the private key of a EC_KEY object.

Parameters
keyEC_KEY object
prvBIGNUM with the private key (note: the EC_KEY object will use an own copy of the BIGNUM).
Returns
1 on success and 0 if an error occurred.

Definition at line 477 of file ec_key.c.

int EC_KEY_set_public_key ( EC_KEY key,
const EC_POINT pub 
)

Sets the public key of a EC_KEY object.

Parameters
keyEC_KEY object
pubEC_POINT object with the public key (note: the EC_KEY object will use an own copy of the EC_POINT object).
Returns
1 on success and 0 if an error occurred.

Definition at line 490 of file ec_key.c.

int EC_KEY_set_public_key_affine_coordinates ( EC_KEY key,
BIGNUM x,
BIGNUM y 
)

Sets a public key from affine coordindates performing neccessary NIST PKV tests.

Parameters
keythe EC_KEY object
xpublic key x coordinate
ypublic key y coordinate
Returns
1 on success and 0 otherwise.

Definition at line 383 of file ec_key.c.

int EC_KEY_up_ref ( EC_KEY key)

Increases the internal reference count of a EC_KEY object.

Parameters
keyEC_KEY object
Returns
1 on success and 0 if an error occurred.

Definition at line 221 of file ec_key.c.

int EC_METHOD_get_field_type ( const EC_METHOD meth)

Returns the field type of the EC_METHOD.

Parameters
methEC_METHOD object
Returns
NID of the underlying field type OID.

Definition at line 278 of file ec_lib.c.

int EC_POINT_add ( const EC_GROUP group,
EC_POINT r,
const EC_POINT a,
const EC_POINT b,
BN_CTX ctx 
)

Computes the sum of two EC_POINT

Parameters
groupunderlying EC_GROUP object
rEC_POINT object for the result (r = a + b)
aEC_POINT object with the first summand
bEC_POINT object with the second summand
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 911 of file ec_lib.c.

EC_POINT* EC_POINT_bn2point ( const EC_GROUP ,
const BIGNUM ,
EC_POINT ,
BN_CTX  
)

Definition at line 89 of file ec_print.c.

void EC_POINT_clear_free ( EC_POINT point)

Clears and frees a EC_POINT object

Parameters
pointEC_POINT object to be cleared and freed

Definition at line 737 of file ec_lib.c.

int EC_POINT_cmp ( const EC_GROUP group,
const EC_POINT a,
const EC_POINT b,
BN_CTX ctx 
)

Compares two EC_POINTs

Parameters
groupunderlying EC_GROUP object
afirst EC_POINT object
bsecond EC_POINT object
ctxBN_CTX object (optional)
Returns
0 if both points are equal and a value != 0 otherwise

Definition at line 991 of file ec_lib.c.

int EC_POINT_copy ( EC_POINT dst,
const EC_POINT src 
)

Copies EC_POINT object

Parameters
dstdestination EC_POINT object
srcsource EC_POINT object
Returns
1 on success and 0 if an error occured

Definition at line 750 of file ec_lib.c.

int EC_POINT_dbl ( const EC_GROUP group,
EC_POINT r,
const EC_POINT a,
BN_CTX ctx 
)

Computes the double of a EC_POINT

Parameters
groupunderlying EC_GROUP object
rEC_POINT object for the result (r = 2 * a)
aEC_POINT object
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 927 of file ec_lib.c.

EC_POINT* EC_POINT_dup ( const EC_POINT src,
const EC_GROUP group 
)

Creates a new EC_POINT object and copies the content of the supplied EC_POINT

Parameters
srcsource EC_POINT object
groupunderlying the EC_GROUP object
Returns
newly created EC_POINT object or NULL if an error occurred

Definition at line 768 of file ec_lib.c.

void EC_POINT_free ( EC_POINT point)

Frees a EC_POINT object

Parameters
pointEC_POINT object to be freed

Definition at line 727 of file ec_lib.c.

int EC_POINT_get_affine_coordinates_GF2m ( const EC_GROUP group,
const EC_POINT p,
BIGNUM x,
BIGNUM y,
BN_CTX ctx 
)

Gets the affine coordinates of a EC_POINT over GF2m

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
xBIGNUM for the x-coordinate
yBIGNUM for the y-coordinate
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 894 of file ec_lib.c.

int EC_POINT_get_affine_coordinates_GFp ( const EC_GROUP group,
const EC_POINT p,
BIGNUM x,
BIGNUM y,
BN_CTX ctx 
)

Gets the affine coordinates of a EC_POINT over GFp

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
xBIGNUM for the x-coordinate
yBIGNUM for the y-coordinate
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 877 of file ec_lib.c.

int EC_POINT_get_Jprojective_coordinates_GFp ( const EC_GROUP group,
const EC_POINT p,
BIGNUM x,
BIGNUM y,
BIGNUM z,
BN_CTX ctx 
)

Gets the jacobian projective coordinates of a EC_POINT over GFp

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
xBIGNUM for the x-coordinate
yBIGNUM for the y-coordinate
zBIGNUM for the z-coordinate
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 826 of file ec_lib.c.

EC_POINT* EC_POINT_hex2point ( const EC_GROUP ,
const char *  ,
EC_POINT ,
BN_CTX  
)

Definition at line 179 of file ec_print.c.

int EC_POINT_invert ( const EC_GROUP group,
EC_POINT a,
BN_CTX ctx 
)

Computes the inverse of a EC_POINT

Parameters
groupunderlying EC_GROUP object
aEC_POINT object to be inverted (it's used for the result as well)
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 943 of file ec_lib.c.

int EC_POINT_is_at_infinity ( const EC_GROUP group,
const EC_POINT p 
)

Checks whether the point is the neutral element of the group

Parameters
groupthe underlying EC_GROUP object
pEC_POINT object
Returns
1 if the point is the neutral element and 0 otherwise

Definition at line 959 of file ec_lib.c.

int EC_POINT_is_on_curve ( const EC_GROUP group,
const EC_POINT point,
BN_CTX ctx 
)

Checks whether the point is on the curve

Parameters
groupunderlying EC_GROUP object
pointEC_POINT object to check
ctxBN_CTX object (optional)
Returns
1 if point if on the curve and 0 otherwise

Definition at line 975 of file ec_lib.c.

int EC_POINT_make_affine ( const EC_GROUP ,
EC_POINT ,
BN_CTX  
)

Definition at line 1007 of file ec_lib.c.

const EC_METHOD* EC_POINT_method_of ( const EC_POINT point)

Returns the EC_METHOD used in EC_POINT object

Parameters
pointEC_POINT object
Returns
the EC_METHOD used

Definition at line 787 of file ec_lib.c.

int EC_POINT_mul ( const EC_GROUP group,
EC_POINT r,
const BIGNUM n,
const EC_POINT q,
const BIGNUM m,
BN_CTX ctx 
)

Computes r = generator * n + q * m

Parameters
groupunderlying EC_GROUP object
rEC_POINT object for the result
nBIGNUM with the multiplier for the group generator (optional)
qEC_POINT object with the first factor of the second summand
mBIGNUM with the second factor of the second summand
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 1060 of file ec_lib.c.

EC_POINT* EC_POINT_new ( const EC_GROUP group)

Creates a new EC_POINT object for the specified EC_GROUP

Parameters
groupEC_GROUP the underlying EC_GROUP object
Returns
newly created EC_POINT object or NULL if an error occurred

Definition at line 693 of file ec_lib.c.

int EC_POINT_oct2point ( const EC_GROUP group,
EC_POINT p,
const unsigned char *  buf,
size_t  len,
BN_CTX ctx 
)

Decodes a EC_POINT from a octet string

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
bufmemory buffer with the encoded ec point
lenlength of the encoded ec point
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 167 of file ec_oct.c.

BIGNUM* EC_POINT_point2bn ( const EC_GROUP ,
const EC_POINT ,
point_conversion_form_t  form,
BIGNUM ,
BN_CTX  
)

Definition at line 59 of file ec_print.c.

char* EC_POINT_point2hex ( const EC_GROUP ,
const EC_POINT ,
point_conversion_form_t  form,
BN_CTX  
)

Definition at line 135 of file ec_print.c.

size_t EC_POINT_point2oct ( const EC_GROUP group,
const EC_POINT p,
point_conversion_form_t  form,
unsigned char *  buf,
size_t  len,
BN_CTX ctx 
)

Encodes a EC_POINT object to a octet string

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
formpoint conversion form
bufmemory buffer for the result. If NULL the function returns required buffer size.
lenlength of the memory buffer
ctxBN_CTX object (optional)
Returns
the length of the encoded octet string or 0 if an error occurred

Definition at line 132 of file ec_oct.c.

int EC_POINT_set_affine_coordinates_GF2m ( const EC_GROUP group,
EC_POINT p,
const BIGNUM x,
const BIGNUM y,
BN_CTX ctx 
)

Sets the affine coordinates of a EC_POINT over GF2m

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
xBIGNUM with the x-coordinate
yBIGNUM with the y-coordinate
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 860 of file ec_lib.c.

int EC_POINT_set_affine_coordinates_GFp ( const EC_GROUP group,
EC_POINT p,
const BIGNUM x,
const BIGNUM y,
BN_CTX ctx 
)

Sets the affine coordinates of a EC_POINT over GFp

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
xBIGNUM with the x-coordinate
yBIGNUM with the y-coordinate
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 843 of file ec_lib.c.

int EC_POINT_set_compressed_coordinates_GF2m ( const EC_GROUP group,
EC_POINT p,
const BIGNUM x,
int  y_bit,
BN_CTX ctx 
)

Sets the x9.62 compressed coordinates of a EC_POINT over GF2m

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
xBIGNUM with x-coordinate
y_bitinteger with the y-Bit (either 0 or 1)
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 105 of file ec_oct.c.

int EC_POINT_set_compressed_coordinates_GFp ( const EC_GROUP group,
EC_POINT p,
const BIGNUM x,
int  y_bit,
BN_CTX ctx 
)

Sets the x9.62 compressed coordinates of a EC_POINT over GFp

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
xBIGNUM with x-coordinate
y_bitinteger with the y-Bit (either 0 or 1)
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 71 of file ec_oct.c.

int EC_POINT_set_Jprojective_coordinates_GFp ( const EC_GROUP group,
EC_POINT p,
const BIGNUM x,
const BIGNUM y,
const BIGNUM z,
BN_CTX ctx 
)

Sets the jacobian projective coordinates of a EC_POINT over GFp

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
xBIGNUM with the x-coordinate
yBIGNUM with the y-coordinate
zBIGNUM with the z-coordinate
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 809 of file ec_lib.c.

int EC_POINT_set_to_infinity ( const EC_GROUP group,
EC_POINT point 
)

Sets a point to infinity (neutral element)

Parameters
groupunderlying EC_GROUP object
pointEC_POINT to set to infinity
Returns
1 on success and 0 if an error occured

Definition at line 793 of file ec_lib.c.

int EC_POINTs_make_affine ( const EC_GROUP ,
size_t  num,
EC_POINT [],
BN_CTX  
)

Definition at line 1023 of file ec_lib.c.

int EC_POINTs_mul ( const EC_GROUP group,
EC_POINT r,
const BIGNUM n,
size_t  num,
const EC_POINT p[],
const BIGNUM m[],
BN_CTX ctx 
)

Computes r = generator * n sum_{i=0}^num p[i] * m[i]

Parameters
groupunderlying EC_GROUP object
rEC_POINT object for the result
nBIGNUM with the multiplier for the group generator (optional)
numnumber futher summands
parray of size num of EC_POINT objects
marray of size num of BIGNUM objects
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 1050 of file ec_lib.c.

int ECParameters_print ( BIO bp,
const EC_KEY key 
)

Prints out the ec parameters on human readable form.

Parameters
bpBIO object to which the information is printed
keyEC_KEY object
Returns
1 on success and 0 if an error occurred

Definition at line 132 of file eck_prn.c.

int ECParameters_print_fp ( FILE *  fp,
const EC_KEY key 
)

Prints out the ec parameters on human readable form.

Parameters
fpfile descriptor to which the information is printed
keyEC_KEY object
Returns
1 on success and 0 if an error occurred

Definition at line 103 of file eck_prn.c.

int ECPKParameters_print ( BIO bp,
const EC_GROUP x,
int  off 
)

Definition at line 147 of file eck_prn.c.

int ECPKParameters_print_fp ( FILE *  fp,
const EC_GROUP x,
int  off 
)

Definition at line 71 of file eck_prn.c.

void ERR_load_EC_strings ( void  )

Definition at line 266 of file ec_err.c.

int i2d_ECParameters ( EC_KEY key,
unsigned char **  out 
)

Encodes ec parameter and stores the result in a buffer.

Parameters
keythe EC_KEY object with ec paramters to encode
outthe buffer for the result (if NULL the function returns number of bytes needed).
Returns
1 on success and 0 if an error occurred.

Definition at line 1334 of file ec_asn1.c.

int i2d_ECPKParameters ( const EC_GROUP ,
unsigned char **  out 
)

Definition at line 1095 of file ec_asn1.c.

int i2d_ECPrivateKey ( EC_KEY key,
unsigned char **  out 
)

Encodes a private key object and stores the result in a buffer.

Parameters
keythe EC_KEY object to encode
outthe buffer for the result (if NULL the function returns number of bytes needed).
Returns
1 on success and 0 if an error occurred.

Definition at line 1224 of file ec_asn1.c.

int i2o_ECPublicKey ( EC_KEY key,
unsigned char **  out 
)

Encodes a ec public key in an octet string.

Parameters
keythe EC_KEY object with the public key
outthe buffer for the result (if NULL the function returns number of bytes needed).
Returns
1 on success and 0 if an error occurred

Definition at line 1405 of file ec_asn1.c.

EC_KEY* o2i_ECPublicKey ( EC_KEY **  key,
const unsigned char **  in,
long  len 
)

Decodes a ec public key from a octet string.

Parameters
keya pointer to a EC_KEY object which should be used
inmemory buffer with the encoded public key
lenlength of the encoded public key
Returns
EC_KEY object with decoded public key or NULL if an error occurred.

Definition at line 1376 of file ec_asn1.c.