Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/crypto/ec
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2016-06-16 22:01:10 +0300
committerAdam Langley <agl@google.com>2016-06-16 23:25:39 +0300
commit2f02854c24a05d27fc1eb3f5f2fff13ab1610c9f (patch)
tree8f63c224f17bdd5f1a9948ad86ef681edf46421a /crypto/ec
parentc5e372e6ef43d9883eadd255d1f987de2addab2e (diff)
Remove EC_GROUP_new_arbitrary.
The Conscrypt revert cycled in long ago. Change-Id: If3cdb211d7347dca88bd70bdc643f80b19a7e528 Reviewed-on: https://boringssl-review.googlesource.com/8306 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/ec')
-rw-r--r--crypto/ec/ec.c33
-rw-r--r--crypto/ec/ec_test.cc31
2 files changed, 0 insertions, 64 deletions
diff --git a/crypto/ec/ec.c b/crypto/ec/ec.c
index 8f3fa6e1..1d1ebb61 100644
--- a/crypto/ec/ec.c
+++ b/crypto/ec/ec.c
@@ -404,39 +404,6 @@ int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
BN_copy(&group->cofactor, cofactor);
}
-EC_GROUP *EC_GROUP_new_arbitrary(const BIGNUM *p, const BIGNUM *a,
- const BIGNUM *b, const BIGNUM *gx,
- const BIGNUM *gy, const BIGNUM *order,
- const BIGNUM *cofactor) {
- BN_CTX *ctx = BN_CTX_new();
- if (ctx == NULL) {
- return NULL;
- }
-
- EC_POINT *generator = NULL;
- EC_GROUP *ret = EC_GROUP_new_curve_GFp(p, a, b, ctx);
- if (ret == NULL) {
- goto err;
- }
-
- generator = EC_POINT_new(ret);
- if (generator == NULL ||
- !EC_POINT_set_affine_coordinates_GFp(ret, generator, gx, gy, ctx) ||
- !EC_GROUP_set_generator(ret, generator, order, cofactor)) {
- goto err;
- }
-
- EC_POINT_free(generator);
- BN_CTX_free(ctx);
- return ret;
-
-err:
- EC_POINT_free(generator);
- EC_GROUP_free(ret);
- BN_CTX_free(ctx);
- return NULL;
-}
-
static EC_GROUP *ec_group_new_from_data(unsigned built_in_index) {
const struct built_in_curve *curve = &OPENSSL_built_in_curves[built_in_index];
EC_GROUP *group = NULL;
diff --git a/crypto/ec/ec_test.cc b/crypto/ec/ec_test.cc
index ce9d99f3..23befeb2 100644
--- a/crypto/ec/ec_test.cc
+++ b/crypto/ec/ec_test.cc
@@ -404,37 +404,6 @@ static bool TestArbitraryCurve() {
return false;
}
- // Repeat the process for |EC_GROUP_new_arbitrary|.
- group.reset(EC_GROUP_new_arbitrary(p.get(), a.get(), b.get(), gx.get(),
- gy.get(), order.get(), cofactor.get()));
- if (!group) {
- return false;
- }
-
- // |group| should not have a curve name.
- if (EC_GROUP_get_curve_name(group.get()) != NID_undef) {
- return false;
- }
-
- // Copy |key| to |key2| using |group|.
- key2.reset(EC_KEY_new());
- point.reset(EC_POINT_new(group.get()));
- if (!key2 || !point ||
- !EC_KEY_set_group(key2.get(), group.get()) ||
- !EC_KEY_set_private_key(key2.get(), EC_KEY_get0_private_key(key.get())) ||
- !EC_POINT_set_affine_coordinates_GFp(group.get(), point.get(), x.get(),
- y.get(), nullptr) ||
- !EC_KEY_set_public_key(key2.get(), point.get())) {
- fprintf(stderr, "Could not copy key.\n");
- return false;
- }
-
- // The key must be valid according to the new group too.
- if (!EC_KEY_check_key(key2.get())) {
- fprintf(stderr, "Copied key is not valid.\n");
- return false;
- }
-
return true;
}