Optimized EC_METHODs need specific 'set_curve' and 'free' functions.

This commit is contained in:
Bodo Möller 2001-03-07 09:48:38 +00:00
parent 58fc62296f
commit 2e0db07627
6 changed files with 20 additions and 11 deletions

View File

@ -112,7 +112,7 @@ EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM
int EC_GROUP_set_generator(EC_GROUP *, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofactor);
/* TODO: 'get' functions for EC_GROUPs */
/* TODO: 'set' and 'get' functions for EC_GROUPs */
EC_POINT *EC_POINT_new(const EC_GROUP *);

View File

@ -202,6 +202,9 @@ int ec_GFp_simple_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX
/* method functions in ecp_mont.c */
int ec_GFp_mont_group_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
void ec_GFp_mont_group_finish(EC_GROUP *);
void ec_GFp_mont_group_clear_finish(EC_GROUP *);
int ec_GFp_mont_field_mult(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
int ec_GFp_mont_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *);
int ec_GFp_mont_field_encode(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *);
@ -209,6 +212,9 @@ int ec_GFp_mont_field_decode(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CT
/* method functions in ecp_recp.c */
int ec_GFp_recp_group_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
void ec_GFp_recp_group_finish(EC_GROUP *);
void ec_GFp_recp_group_clear_finish(EC_GROUP *);
int ec_GFp_recp_field_mult(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
int ec_GFp_recp_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *);
int ec_GFp_recp_field_encode(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *);
@ -216,6 +222,9 @@ int ec_GFp_recp_field_decode(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CT
/* method functions in ecp_nist.c */
int ec_GFp_nist_group_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
void ec_GFp_nist_group_finish(EC_GROUP *);
void ec_GFp_nist_group_clear_finish(EC_GROUP *);
int ec_GFp_nist_field_mult(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
int ec_GFp_nist_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *);
int ec_GFp_nist_field_encode(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *);

View File

@ -181,7 +181,7 @@ int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator, const BIG
}
/* TODO: 'get' functions for EC_GROUPs */
/* TODO: 'set' and 'get' functions for EC_GROUPs */
/* this has 'package' visibility */

View File

@ -61,9 +61,9 @@ const EC_METHOD *EC_GFp_mont_method(void)
{
static const EC_METHOD ret = {
ec_GFp_simple_group_init,
ec_GFp_simple_group_set_curve_GFp,
ec_GFp_simple_group_finish,
ec_GFp_simple_group_clear_finish,
ec_GFp_mont_group_set_curve_GFp,
ec_GFp_mont_group_finish,
ec_GFp_mont_group_clear_finish,
ec_GFp_simple_group_copy,
ec_GFp_simple_group_set_generator,
/* TODO: 'set' and 'get' functions for EC_GROUPs */

View File

@ -61,9 +61,9 @@ const EC_METHOD *EC_GFp_nist_method(void)
{
static const EC_METHOD ret = {
ec_GFp_simple_group_init,
ec_GFp_simple_group_set_curve_GFp,
ec_GFp_simple_group_finish,
ec_GFp_simple_group_clear_finish,
ec_GFp_nist_group_set_curve_GFp,
ec_GFp_nist_group_finish,
ec_GFp_nist_group_clear_finish,
ec_GFp_simple_group_copy,
ec_GFp_simple_group_set_generator,
/* TODO: 'set' and 'get' functions for EC_GROUPs */

View File

@ -61,9 +61,9 @@ const EC_METHOD *EC_GFp_recp_method(void)
{
static const EC_METHOD ret = {
ec_GFp_simple_group_init,
ec_GFp_simple_group_set_curve_GFp,
ec_GFp_simple_group_finish,
ec_GFp_simple_group_clear_finish,
ec_GFp_recp_group_set_curve_GFp,
ec_GFp_recp_group_finish,
ec_GFp_recp_group_clear_finish,
ec_GFp_simple_group_copy,
ec_GFp_simple_group_set_generator,
/* TODO: 'set' and 'get' functions for EC_GROUPs */