75 #include <openssl/obj_mac.h>
76 #include <openssl/ec.h>
77 #include <openssl/bn.h>
79 #if defined(__SUNPRO_C)
80 # if __SUNPRO_C >= 0x520
81 # pragma error_messages (off,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
95 void (*group_clear_finish)(
EC_GROUP *);
104 int (*group_get_degree)(
const EC_GROUP *);
112 void (*point_clear_finish)(
EC_POINT *);
125 int (*point_get_Jprojective_coordinates_GFp)(
const EC_GROUP *,
const EC_POINT *,
127 int (*point_set_affine_coordinates)(
const EC_GROUP *, EC_POINT *,
129 int (*point_get_affine_coordinates)(
const EC_GROUP *,
const EC_POINT *,
131 int (*point_set_compressed_coordinates)(
const EC_GROUP *, EC_POINT *,
135 size_t (*point2oct)(
const EC_GROUP *,
const EC_POINT *, point_conversion_form_t form,
136 unsigned char *buf,
size_t len,
BN_CTX *);
137 int (*oct2point)(
const EC_GROUP *, EC_POINT *,
138 const unsigned char *buf,
size_t len,
BN_CTX *);
141 int (*add)(
const EC_GROUP *, EC_POINT *r,
const EC_POINT *a,
const EC_POINT *b,
BN_CTX *);
142 int (*dbl)(
const EC_GROUP *, EC_POINT *r,
const EC_POINT *a,
BN_CTX *);
146 int (*is_at_infinity)(
const EC_GROUP *,
const EC_POINT *);
148 int (*point_cmp)(
const EC_GROUP *,
const EC_POINT *a,
const EC_POINT *b,
BN_CTX *);
152 int (*points_make_affine)(
const EC_GROUP *,
size_t num, EC_POINT *[],
BN_CTX *);
156 int (*mul)(
const EC_GROUP *group, EC_POINT *r,
const BIGNUM *scalar,
157 size_t num,
const EC_POINT *points[],
const BIGNUM *scalars[],
BN_CTX *);
159 int (*have_precompute_mult)(
const EC_GROUP *group);
179 void *(*dup_func)(
void *);
180 void (*free_func)(
void *);
181 void (*clear_free_func)(
void *);
192 point_conversion_form_t asn1_form;
208 unsigned int poly[5];
240 unsigned int enc_flag;
241 point_conversion_form_t conv_form;
254 void *(*dup_func)(
void *),
void (*free_func)(
void *),
void (*clear_free_func)(
void *));
256 void *(*dup_func)(
void *),
void (*free_func)(
void *),
void (*clear_free_func)(
void *));
258 void *(*dup_func)(
void *),
void (*free_func)(
void *),
void (*clear_free_func)(
void *));
260 void *(*dup_func)(
void *),
void (*free_func)(
void *),
void (*clear_free_func)(
void *));
286 int ec_wNAF_have_precompute_mult(
const EC_GROUP *group);
290 int ec_GFp_simple_group_init(
EC_GROUP *);
291 void ec_GFp_simple_group_finish(
EC_GROUP *);
292 void ec_GFp_simple_group_clear_finish(
EC_GROUP *);
296 int ec_GFp_simple_group_get_degree(
const EC_GROUP *);
297 int ec_GFp_simple_group_check_discriminant(
const EC_GROUP *,
BN_CTX *);
298 int ec_GFp_simple_point_init(
EC_POINT *);
299 void ec_GFp_simple_point_finish(
EC_POINT *);
300 void ec_GFp_simple_point_clear_finish(
EC_POINT *);
303 int ec_GFp_simple_set_Jprojective_coordinates_GFp(
const EC_GROUP *,
EC_POINT *,
305 int ec_GFp_simple_get_Jprojective_coordinates_GFp(
const EC_GROUP *,
const EC_POINT *,
307 int ec_GFp_simple_point_set_affine_coordinates(
const EC_GROUP *,
EC_POINT *,
309 int ec_GFp_simple_point_get_affine_coordinates(
const EC_GROUP *,
const EC_POINT *,
313 size_t ec_GFp_simple_point2oct(
const EC_GROUP *,
const EC_POINT *, point_conversion_form_t form,
314 unsigned char *buf,
size_t len,
BN_CTX *);
316 const unsigned char *buf,
size_t len,
BN_CTX *);
330 int ec_GFp_mont_group_init(
EC_GROUP *);
332 void ec_GFp_mont_group_finish(
EC_GROUP *);
333 void ec_GFp_mont_group_clear_finish(
EC_GROUP *);
350 int ec_GF2m_simple_group_init(
EC_GROUP *);
351 void ec_GF2m_simple_group_finish(
EC_GROUP *);
352 void ec_GF2m_simple_group_clear_finish(
EC_GROUP *);
356 int ec_GF2m_simple_group_get_degree(
const EC_GROUP *);
357 int ec_GF2m_simple_group_check_discriminant(
const EC_GROUP *,
BN_CTX *);
358 int ec_GF2m_simple_point_init(
EC_POINT *);
359 void ec_GF2m_simple_point_finish(
EC_POINT *);
360 void ec_GF2m_simple_point_clear_finish(
EC_POINT *);
363 int ec_GF2m_simple_point_set_affine_coordinates(
const EC_GROUP *,
EC_POINT *,
365 int ec_GF2m_simple_point_get_affine_coordinates(
const EC_GROUP *,
const EC_POINT *,
369 size_t ec_GF2m_simple_point2oct(
const EC_GROUP *,
const EC_POINT *, point_conversion_form_t form,
370 unsigned char *buf,
size_t len,
BN_CTX *);
372 const unsigned char *buf,
size_t len,
BN_CTX *);
390 int ec_GF2m_have_precompute_mult(
const EC_GROUP *group);