remove redundant functions
authorBodo Möller <bodo@openssl.org>
Mon, 18 Nov 2002 14:37:35 +0000 (14:37 +0000)
committerBodo Möller <bodo@openssl.org>
Mon, 18 Nov 2002 14:37:35 +0000 (14:37 +0000)
crypto/ec/ec_lcl.h
crypto/ec/ecp_nist.c

index e84904b23b627a867ef8d4de4488267f16359d4b..43649e96ada8721714cbb9cc1ba0b4da294b3a9a 100644 (file)
@@ -317,11 +317,7 @@ int ec_GFp_recp_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *
 
 
 /* method functions in ecp_nist.c */
-int ec_GFp_nist_group_init(EC_GROUP *);
 int ec_GFp_nist_group_set_curve(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_group_copy(EC_GROUP *, const EC_GROUP *);
 int ec_GFp_nist_field_mul(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 *);
 
index a6634f9bff645ec9d9e1b9314e8875a8c06ec719..559cb5c4188b5f7d9ba3fe44060a81fb15c2198a 100644 (file)
@@ -69,10 +69,10 @@ const EC_METHOD *EC_GFp_nist_method(void)
        {
        static const EC_METHOD ret = {
                NID_X9_62_prime_field,
-               ec_GFp_nist_group_init,
-               ec_GFp_nist_group_finish,
-               ec_GFp_nist_group_clear_finish,
-               ec_GFp_nist_group_copy,
+               ec_GFp_simple_group_init,
+               ec_GFp_simple_group_finish,
+               ec_GFp_simple_group_clear_finish,
+               ec_GFp_simple_group_copy,
                ec_GFp_nist_group_set_curve,
                ec_GFp_simple_group_get_curve,
                ec_GFp_simple_group_get_degree,
@@ -113,47 +113,6 @@ const EC_METHOD *EC_GFp_nist_method(void)
 #define        NO_32_BIT_TYPE
 #endif
 
-int ec_GFp_nist_group_init(EC_GROUP *group)
-       {
-       int ok;
-
-       ok = ec_GFp_simple_group_init(group);
-       return ok;
-       }
-
-void ec_GFp_nist_group_finish(EC_GROUP *group)
-       {
-       BN_free(&group->field);
-       BN_free(&group->a);
-       BN_free(&group->b);
-       }
-
-void ec_GFp_nist_group_clear_finish(EC_GROUP *group)
-       {
-       BN_clear_free(&group->field);
-       BN_clear_free(&group->a);
-       BN_clear_free(&group->b);
-       }
-
-int ec_GFp_nist_group_copy(EC_GROUP *dest, const EC_GROUP *src)
-       {
-       if (dest == NULL || src == NULL)
-               return 0;
-
-       if (!BN_copy(&dest->field, &src->field))
-               return 0;
-       if (!BN_copy(&dest->a, &src->a))
-               return 0;
-       if (!BN_copy(&dest->b, &src->b))
-               return 0;
-
-       dest->curve_name  = src->curve_name;
-
-       dest->a_is_minus3 = src->a_is_minus3;
-
-       return 1;
-       }
-
 
 int ec_GFp_nist_group_set_curve(EC_GROUP *group, const BIGNUM *p,
        const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
@@ -229,6 +188,7 @@ int ec_GFp_nist_group_set_curve(EC_GROUP *group, const BIGNUM *p,
        return ret;
        }
 
+
 int ec_GFp_nist_field_mul(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a,
        const BIGNUM *b, BN_CTX *ctx)
        {
@@ -254,6 +214,7 @@ err:
        return ret;
        }
 
+
 int ec_GFp_nist_field_sqr(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a,
        BN_CTX *ctx)
        {