handle negative scalars correctly when doing point multiplication
[openssl.git] / crypto / ec / ecp_recp.c
index 2419a3058e9203cffa682135dae6129053653009..fec843b5c85b7aafb6b94d93456320f91ef5245f 100644 (file)
@@ -55,7 +55,7 @@
 
 #include "ec_lcl.h"
 
-
+#if 0
 const EC_METHOD *EC_GFp_recp_method(void)
        {
        static const EC_METHOD ret = {
@@ -88,21 +88,23 @@ const EC_METHOD *EC_GFp_recp_method(void)
                ec_GFp_simple_is_on_curve,
                ec_GFp_simple_cmp,
                ec_GFp_simple_make_affine,
+               ec_GFp_simple_points_make_affine,
                ec_GFp_recp_field_mul,
                ec_GFp_recp_field_sqr,
-               ec_GFp_recp_field_encode,
-               ec_GFp_recp_field_decode };
+               0 /* field_encode */,
+               0 /* field_decode */,
+               0 /* field_set_to_one */ };
 
        return &ret;
        }
-
+#endif
 
 int ec_GFp_recp_group_init(EC_GROUP *group)
        {
        int ok;
 
        ok = ec_GFp_simple_group_init(group);
-       group->field_data = NULL;
+       group->field_data1 = NULL;
        return ok;
        }
 
@@ -129,11 +131,3 @@ int ec_GFp_recp_field_mul(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, con
 
 int ec_GFp_recp_field_sqr(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
 /* TODO */
-
-
-int ec_GFp_recp_field_encode(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
-/* TODO */
-
-
-int ec_GFp_recp_field_decode(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
-/* TODO */