summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2021-05-10 20:20:50 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2021-05-10 20:20:50 +0000
commit3cf5bcd4e1f2e2e86e454268c2a0dc0977191421 (patch)
tree8407a3903add43f32f2c10b477aab4c795d433fe /lib/libcrypto
parent48fd35b9ef3a981c932437a65fc08255f7f748a0 (diff)
Merge documentation for EC_GROUP_{set,get}_curve(3) from OpenSSL 1.1.1.
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/man/EC_GROUP_new.377
1 files changed, 57 insertions, 20 deletions
diff --git a/lib/libcrypto/man/EC_GROUP_new.3 b/lib/libcrypto/man/EC_GROUP_new.3
index 3e005117ff5..75b5a9faec9 100644
--- a/lib/libcrypto/man/EC_GROUP_new.3
+++ b/lib/libcrypto/man/EC_GROUP_new.3
@@ -1,5 +1,5 @@
-.\" $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.
@@ -48,7 +48,7 @@
.\" 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
@@ -58,6 +58,8 @@
.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 ,
@@ -98,6 +100,22 @@
.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"
@@ -171,34 +189,46 @@ using the implementation provided by
.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
@@ -292,6 +322,8 @@ on error.
.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 ,
@@ -327,3 +359,8 @@ and
.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 .