aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ec/ecp_mont.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2002-08-02 14:28:37 +0000
committerBodo Möller <bodo@openssl.org>2002-08-02 14:28:37 +0000
commit35b73a1f2069f17c6cde57ff534d5b09a5e4be02 (patch)
treea2f64e9506ac289ce226471174f6f858f9b9640d /crypto/ec/ecp_mont.c
parent9e4f9b36fc64146382f1023526bba8d98bf53125 (diff)
downloadopenssl-35b73a1f2069f17c6cde57ff534d5b09a5e4be02.tar.gz
Rename implementations of method functions so that they match
the new method names where _GF... suffixes have been removed. Revert changes to ..._{get/set}_Jprojective_coordinates_...: The current implementation for ECC over binary fields does not use projective coordinates, and if it did, it would not use Jacobian projective coordinates; so it's OK to use the ..._GFp prefix for all this. Add author attributions to some files so that it doesn't look as if Sun wrote all of this :-)
Diffstat (limited to 'crypto/ec/ecp_mont.c')
-rw-r--r--crypto/ec/ecp_mont.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/crypto/ec/ecp_mont.c b/crypto/ec/ecp_mont.c
index 21592d007a..900228d8af 100644
--- a/crypto/ec/ecp_mont.c
+++ b/crypto/ec/ecp_mont.c
@@ -1,4 +1,7 @@
/* crypto/ec/ecp_mont.c */
+/*
+ * Originally written by Bodo Moeller for the OpenSSL project.
+ */
/* ====================================================================
* Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
*
@@ -71,8 +74,8 @@ const EC_METHOD *EC_GFp_mont_method(void)
ec_GFp_mont_group_finish,
ec_GFp_mont_group_clear_finish,
ec_GFp_mont_group_copy,
- ec_GFp_mont_group_set_curve_GFp,
- ec_GFp_simple_group_get_curve_GFp,
+ ec_GFp_mont_group_set_curve,
+ ec_GFp_simple_group_get_curve,
ec_GFp_simple_group_get_degree,
ec_GFp_simple_group_check_discriminant,
ec_GFp_simple_point_init,
@@ -82,9 +85,9 @@ const EC_METHOD *EC_GFp_mont_method(void)
ec_GFp_simple_point_set_to_infinity,
ec_GFp_simple_set_Jprojective_coordinates_GFp,
ec_GFp_simple_get_Jprojective_coordinates_GFp,
- ec_GFp_simple_point_set_affine_coordinates_GFp,
- ec_GFp_simple_point_get_affine_coordinates_GFp,
- ec_GFp_simple_set_compressed_coordinates_GFp,
+ ec_GFp_simple_point_set_affine_coordinates,
+ ec_GFp_simple_point_get_affine_coordinates,
+ ec_GFp_simple_set_compressed_coordinates,
ec_GFp_simple_point2oct,
ec_GFp_simple_oct2point,
ec_GFp_simple_add,
@@ -119,7 +122,7 @@ int ec_GFp_mont_group_init(EC_GROUP *group)
}
-int ec_GFp_mont_group_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
+int ec_GFp_mont_group_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
{
BN_CTX *new_ctx = NULL;
BN_MONT_CTX *mont = NULL;
@@ -148,7 +151,7 @@ int ec_GFp_mont_group_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGN
if (mont == NULL) goto err;
if (!BN_MONT_CTX_set(mont, p, ctx))
{
- ECerr(EC_F_GFP_MONT_GROUP_SET_CURVE_GFP, ERR_R_BN_LIB);
+ ECerr(EC_F_GFP_MONT_GROUP_SET_CURVE, ERR_R_BN_LIB);
goto err;
}
one = BN_new();
@@ -160,7 +163,7 @@ int ec_GFp_mont_group_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGN
group->field_data2 = one;
one = NULL;
- ret = ec_GFp_simple_group_set_curve_GFp(group, p, a, b, ctx);
+ ret = ec_GFp_simple_group_set_curve(group, p, a, b, ctx);
if (!ret)
{