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
diff options
context:
space:
mode:
authorAdam Langley <agl@chromium.org>2014-08-22 23:24:16 +0400
committerAdam Langley <agl@google.com>2014-08-27 01:52:12 +0400
commit0eb1aae207dadee053ece5edfd404bf176c6a7ce (patch)
tree10418f0a78fe0baee5f204124670980acf1bf2b6 /include/openssl/ec.h
parent539112fd4447ba9a2c6f669edd16129d824b8b34 (diff)
Readd EC_GROUP_get_curve_GFp.
wpa_supplicant needs this in order to get the order of the coordinate field, apparently so that they can hash to a point. Change-Id: I92d5df7b37b67ace5f497c25f53f16bbe134aced Reviewed-on: https://boringssl-review.googlesource.com/1622 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'include/openssl/ec.h')
-rw-r--r--include/openssl/ec.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/openssl/ec.h b/include/openssl/ec.h
index 55f1adfe..47ecfca9 100644
--- a/include/openssl/ec.h
+++ b/include/openssl/ec.h
@@ -133,6 +133,15 @@ OPENSSL_EXPORT int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order,
OPENSSL_EXPORT int EC_GROUP_get_cofactor(const EC_GROUP *group,
BIGNUM *cofactor, BN_CTX *ctx);
+/* EC_GROUP_get_curve_GFp gets various parameters about a group. It sets
+ * |*out_p| to the order of the coordinate field and |*out_a| and |*out_b| to
+ * the parameters of the curve when expressed as y² = x³ + ax + b. Any of the
+ * output parameters can be NULL. It returns one on success and zero on
+ * error. */
+OPENSSL_EXPORT int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *out_p,
+ BIGNUM *out_a, BIGNUM *out_b,
+ BN_CTX *ctx);
+
/* EC_GROUP_get_curve_name returns a NID that identifies |group|. */
OPENSSL_EXPORT int EC_GROUP_get_curve_name(const EC_GROUP *group);
@@ -351,6 +360,7 @@ OPENSSL_EXPORT int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r,
#define EC_F_EC_KEY_generate_key 155
#define EC_F_ec_GFp_simple_set_compressed_coordinates 156
#define EC_F_EC_POINT_add 157
+#define EC_F_EC_GROUP_get_curve_GFp 158
#define EC_R_PKPARAMETERS2GROUP_FAILURE 100
#define EC_R_NON_NAMED_CURVE 101
#define EC_R_COORDINATES_OUT_OF_RANGE 102