-.\" $OpenBSD: EC_GROUP_new.3,v 1.11 2019/08/19 13:08:26 schwarze Exp $
-.\" OpenSSL 9b86974e Mon Aug 17 15:21:33 2015 -0400
+.\" $OpenBSD: EC_GROUP_new.3,v 1.12 2021/05/10 20:20:49 tb Exp $
+.\" OpenSSL 6328d367 Sat Jul 4 21:58:30 2020 +0200
.\"
.\" This file was written by Matt Caswell <matt@openssl.org>.
.\" Copyright (c) 2013 The OpenSSL Project. All rights reserved.
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: August 19 2019 $
+.Dd $Mdocdate: May 10 2021 $
.Dt EC_GROUP_NEW 3
.Os
.Sh NAME
.Nm EC_GROUP_new_curve_GFp ,
.Nm EC_GROUP_new_curve_GF2m ,
.Nm EC_GROUP_new_by_curve_name ,
+.Nm EC_GROUP_set_curve ,
+.Nm EC_GROUP_get_curve ,
.Nm EC_GROUP_set_curve_GFp ,
.Nm EC_GROUP_get_curve_GFp ,
.Nm EC_GROUP_set_curve_GF2m ,
.Fa "int nid"
.Fc
.Ft int
+.Fo EC_GROUP_set_curve
+.Fa "EC_GROUP *group"
+.Fa "const BIGNUM *p"
+.Fa "const BIGNUM *a"
+.Fa "const BIGNUM *b"
+.Fa "BN_CTX *ctx"
+.Fc
+.Ft int
+.Fo EC_GROUP_get_curve
+.Fa "const EC_GROUP *group"
+.Fa "BIGNUM *p"
+.Fa "BIGNUM *a"
+.Fa "BIGNUM *b"
+.Fa "BN_CTX *ctx"
+.Fc
+.Ft int
.Fo EC_GROUP_set_curve_GFp
.Fa "EC_GROUP *group"
.Fa "const BIGNUM *p"
.Fa meth
(see
.Xr EC_GFp_simple_method 3 ) .
-It is then necessary to call either
-.Fn EC_GROUP_set_curve_GFp
-or
-.Fn EC_GROUP_set_curve_GF2m
-as appropriate to create a curve defined over Fp or over F2^m, respectively.
+It is then necessary to call
+.Fn EC_GROUP_set_curve
+to set the curve parameters.
.Pp
-.Fn EC_GROUP_set_curve_GFp
+.Fn EC_GROUP_set_curve
sets the curve parameters
.Fa p ,
.Fa a ,
and
-.Fa b
-for a curve over Fp stored in
-.Fa group .
-.Fn EC_GROUP_get_curve_GFp
-obtains the previously set curve parameters.
-.Pp
-.Fn EC_GROUP_set_curve_GF2m
-sets the equivalent curve parameters for a curve over F2^m.
-In this case
+.Fa b .
+For a curve over Fp,
+.Fa p
+is the prime for the field.
+For a curve over F2^m
.Fa p
represents the irreducible polynomial - each bit represents a term in
the polynomial.
-Therefore there will either be three or five bits set dependent on
+Therefore, there will either be three or five bits set dependent on
whether the polynomial is a trinomial or a pentanomial.
-.Fn EC_GROUP_get_curve_GF2m
+In either case,
+.Fa a
+and
+.Fa b
+represent the coefficients of the curve equation.
+.Pp
+.Fn EC_GROUP_set_curve_GFp
+and
+.Fn EC_GROUP_set_curve_GF2m
+are deprecated synonyms for
+.Fn EC_GROUP_set_curve .
+.Pp
+.Fn EC_GROUP_get_curve
obtains the previously set curve parameters.
.Pp
+.Fn EC_GROUP_get_curve_GFp
+and
+.Fn EC_GROUP_get_curve_GF2m
+are deprecated synonyms for
+.Fn EC_GROUP_get_curve .
+.Pp
The functions
.Fn EC_GROUP_new_curve_GFp
and
.Fn EC_get_builtin_curves
returns the number of builtin curves that are available.
.Pp
+.Fn EC_GROUP_set_curve ,
+.Fn EC_GROUP_get_curve ,
.Fn EC_GROUP_set_curve_GFp ,
.Fn EC_GROUP_get_curve_GFp ,
.Fn EC_GROUP_set_curve_GF2m ,
.Fn EC_get_builtin_curves
first appeared in OpenSSL 0.9.8 and have been available since
.Ox 4.5 .
+.Fn EC_GROUP_set_curve
+and
+.Fn EC_GROUP_get_curve ,
+first appeared in OpenSSL 1.1.1 and have been available since
+.Ox 7.0 .