From: tb Date: Mon, 10 May 2021 20:20:49 +0000 (+0000) Subject: Merge documentation for EC_GROUP_{set,get}_curve(3) from OpenSSL 1.1.1. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=dbe87f670fc96752189e233eb1ac3c329cf81b11;p=openbsd Merge documentation for EC_GROUP_{set,get}_curve(3) from OpenSSL 1.1.1. --- 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 . .\" 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 .