diff options
author | Adam Langley <agl@google.com> | 2015-05-12 19:09:47 -0700 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-05-12 19:11:05 -0700 |
commit | 430091c556d1086167da3320cbb60aa0079486e7 (patch) | |
tree | 6c319a1d4273c8272838548f773b9201cdb0a522 /src/include/openssl | |
parent | 62d05888d1cf178d900b54e7e035928abea512b1 (diff) | |
download | external_boringssl-430091c556d1086167da3320cbb60aa0079486e7.zip external_boringssl-430091c556d1086167da3320cbb60aa0079486e7.tar.gz external_boringssl-430091c556d1086167da3320cbb60aa0079486e7.tar.bz2 |
external/boringssl: support arbitrary elliptic curve groups.
This change exposes the functions needed to support arbitrary elliptic
curve groups for Android.
Change-Id: I66a3662d393deadd718e43d91420fecf050502c2
Diffstat (limited to 'src/include/openssl')
-rw-r--r-- | src/include/openssl/ec.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/include/openssl/ec.h b/src/include/openssl/ec.h index 633b11b..617cb19 100644 --- a/src/include/openssl/ec.h +++ b/src/include/openssl/ec.h @@ -286,6 +286,21 @@ OPENSSL_EXPORT int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, /* Deprecated functions. */ +/* EC_GROUP_new_curve_GFp creates a new, arbitrary elliptic curve group based + * on the equation y² = x³ + a·x + b. It returns the new group or NULL on + * error. */ +OPENSSL_EXPORT EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, + const BIGNUM *a, + const BIGNUM *b, BN_CTX *ctx); + +/* EC_GROUP_set_generator sets the generator for |group| to |generator|, which + * must have the given order and cofactor. This should only be used with + * |EC_GROUP| objects returned by |EC_GROUP_new_curve_GFp|. */ +OPENSSL_EXPORT int EC_GROUP_set_generator(EC_GROUP *group, + const EC_POINT *generator, + const BIGNUM *order, + const BIGNUM *cofactor); + /* EC_GROUP_set_asn1_flag does nothing. */ OPENSSL_EXPORT void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag); @@ -381,6 +396,7 @@ OPENSSL_EXPORT void EC_GROUP_set_point_conversion_form( #define EC_F_ec_group_copy 163 #define EC_F_nistp256_pre_comp_new 164 #define EC_F_EC_KEY_new_by_curve_name 165 +#define EC_F_EC_GROUP_new_curve_GFp 166 #define EC_R_BUFFER_TOO_SMALL 100 #define EC_R_COORDINATES_OUT_OF_RANGE 101 #define EC_R_D2I_ECPKPARAMETERS_FAILURE 102 |