diff options
author | tb <> | 2021-05-10 20:20:49 +0000 |
---|---|---|
committer | tb <> | 2021-05-10 20:20:49 +0000 |
commit | 67590f51332b70c6a7225e87068f0871193353f3 (patch) | |
tree | 3f2bacfab8e397510b18442ed2de0c2614ada788 | |
parent | 360c531ab3c6ca99c8ed449ad917ed4e119621c0 (diff) | |
download | openbsd-67590f51332b70c6a7225e87068f0871193353f3.tar.gz openbsd-67590f51332b70c6a7225e87068f0871193353f3.tar.bz2 openbsd-67590f51332b70c6a7225e87068f0871193353f3.zip |
Merge documentation for EC_GROUP_{set,get}_curve(3) from OpenSSL 1.1.1.
-rw-r--r-- | src/lib/libcrypto/man/EC_GROUP_new.3 | 77 |
1 files changed, 57 insertions, 20 deletions
diff --git a/src/lib/libcrypto/man/EC_GROUP_new.3 b/src/lib/libcrypto/man/EC_GROUP_new.3 index 3e005117ff..75b5a9faec 100644 --- a/src/lib/libcrypto/man/EC_GROUP_new.3 +++ b/src/lib/libcrypto/man/EC_GROUP_new.3 | |||
@@ -1,5 +1,5 @@ | |||
1 | .\" $OpenBSD: EC_GROUP_new.3,v 1.11 2019/08/19 13:08:26 schwarze Exp $ | 1 | .\" $OpenBSD: EC_GROUP_new.3,v 1.12 2021/05/10 20:20:49 tb Exp $ |
2 | .\" OpenSSL 9b86974e Mon Aug 17 15:21:33 2015 -0400 | 2 | .\" OpenSSL 6328d367 Sat Jul 4 21:58:30 2020 +0200 |
3 | .\" | 3 | .\" |
4 | .\" This file was written by Matt Caswell <matt@openssl.org>. | 4 | .\" This file was written by Matt Caswell <matt@openssl.org>. |
5 | .\" Copyright (c) 2013 The OpenSSL Project. All rights reserved. | 5 | .\" Copyright (c) 2013 The OpenSSL Project. All rights reserved. |
@@ -48,7 +48,7 @@ | |||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
50 | .\" | 50 | .\" |
51 | .Dd $Mdocdate: August 19 2019 $ | 51 | .Dd $Mdocdate: May 10 2021 $ |
52 | .Dt EC_GROUP_NEW 3 | 52 | .Dt EC_GROUP_NEW 3 |
53 | .Os | 53 | .Os |
54 | .Sh NAME | 54 | .Sh NAME |
@@ -58,6 +58,8 @@ | |||
58 | .Nm EC_GROUP_new_curve_GFp , | 58 | .Nm EC_GROUP_new_curve_GFp , |
59 | .Nm EC_GROUP_new_curve_GF2m , | 59 | .Nm EC_GROUP_new_curve_GF2m , |
60 | .Nm EC_GROUP_new_by_curve_name , | 60 | .Nm EC_GROUP_new_by_curve_name , |
61 | .Nm EC_GROUP_set_curve , | ||
62 | .Nm EC_GROUP_get_curve , | ||
61 | .Nm EC_GROUP_set_curve_GFp , | 63 | .Nm EC_GROUP_set_curve_GFp , |
62 | .Nm EC_GROUP_get_curve_GFp , | 64 | .Nm EC_GROUP_get_curve_GFp , |
63 | .Nm EC_GROUP_set_curve_GF2m , | 65 | .Nm EC_GROUP_set_curve_GF2m , |
@@ -98,6 +100,22 @@ | |||
98 | .Fa "int nid" | 100 | .Fa "int nid" |
99 | .Fc | 101 | .Fc |
100 | .Ft int | 102 | .Ft int |
103 | .Fo EC_GROUP_set_curve | ||
104 | .Fa "EC_GROUP *group" | ||
105 | .Fa "const BIGNUM *p" | ||
106 | .Fa "const BIGNUM *a" | ||
107 | .Fa "const BIGNUM *b" | ||
108 | .Fa "BN_CTX *ctx" | ||
109 | .Fc | ||
110 | .Ft int | ||
111 | .Fo EC_GROUP_get_curve | ||
112 | .Fa "const EC_GROUP *group" | ||
113 | .Fa "BIGNUM *p" | ||
114 | .Fa "BIGNUM *a" | ||
115 | .Fa "BIGNUM *b" | ||
116 | .Fa "BN_CTX *ctx" | ||
117 | .Fc | ||
118 | .Ft int | ||
101 | .Fo EC_GROUP_set_curve_GFp | 119 | .Fo EC_GROUP_set_curve_GFp |
102 | .Fa "EC_GROUP *group" | 120 | .Fa "EC_GROUP *group" |
103 | .Fa "const BIGNUM *p" | 121 | .Fa "const BIGNUM *p" |
@@ -171,34 +189,46 @@ using the implementation provided by | |||
171 | .Fa meth | 189 | .Fa meth |
172 | (see | 190 | (see |
173 | .Xr EC_GFp_simple_method 3 ) . | 191 | .Xr EC_GFp_simple_method 3 ) . |
174 | It is then necessary to call either | 192 | It is then necessary to call |
175 | .Fn EC_GROUP_set_curve_GFp | 193 | .Fn EC_GROUP_set_curve |
176 | or | 194 | to set the curve parameters. |
177 | .Fn EC_GROUP_set_curve_GF2m | ||
178 | as appropriate to create a curve defined over Fp or over F2^m, respectively. | ||
179 | .Pp | 195 | .Pp |
180 | .Fn EC_GROUP_set_curve_GFp | 196 | .Fn EC_GROUP_set_curve |
181 | sets the curve parameters | 197 | sets the curve parameters |
182 | .Fa p , | 198 | .Fa p , |
183 | .Fa a , | 199 | .Fa a , |
184 | and | 200 | and |
185 | .Fa b | 201 | .Fa b . |
186 | for a curve over Fp stored in | 202 | For a curve over Fp, |
187 | .Fa group . | 203 | .Fa p |
188 | .Fn EC_GROUP_get_curve_GFp | 204 | is the prime for the field. |
189 | obtains the previously set curve parameters. | 205 | For a curve over F2^m |
190 | .Pp | ||
191 | .Fn EC_GROUP_set_curve_GF2m | ||
192 | sets the equivalent curve parameters for a curve over F2^m. | ||
193 | In this case | ||
194 | .Fa p | 206 | .Fa p |
195 | represents the irreducible polynomial - each bit represents a term in | 207 | represents the irreducible polynomial - each bit represents a term in |
196 | the polynomial. | 208 | the polynomial. |
197 | Therefore there will either be three or five bits set dependent on | 209 | Therefore, there will either be three or five bits set dependent on |
198 | whether the polynomial is a trinomial or a pentanomial. | 210 | whether the polynomial is a trinomial or a pentanomial. |
199 | .Fn EC_GROUP_get_curve_GF2m | 211 | In either case, |
212 | .Fa a | ||
213 | and | ||
214 | .Fa b | ||
215 | represent the coefficients of the curve equation. | ||
216 | .Pp | ||
217 | .Fn EC_GROUP_set_curve_GFp | ||
218 | and | ||
219 | .Fn EC_GROUP_set_curve_GF2m | ||
220 | are deprecated synonyms for | ||
221 | .Fn EC_GROUP_set_curve . | ||
222 | .Pp | ||
223 | .Fn EC_GROUP_get_curve | ||
200 | obtains the previously set curve parameters. | 224 | obtains the previously set curve parameters. |
201 | .Pp | 225 | .Pp |
226 | .Fn EC_GROUP_get_curve_GFp | ||
227 | and | ||
228 | .Fn EC_GROUP_get_curve_GF2m | ||
229 | are deprecated synonyms for | ||
230 | .Fn EC_GROUP_get_curve . | ||
231 | .Pp | ||
202 | The functions | 232 | The functions |
203 | .Fn EC_GROUP_new_curve_GFp | 233 | .Fn EC_GROUP_new_curve_GFp |
204 | and | 234 | and |
@@ -292,6 +322,8 @@ on error. | |||
292 | .Fn EC_get_builtin_curves | 322 | .Fn EC_get_builtin_curves |
293 | returns the number of builtin curves that are available. | 323 | returns the number of builtin curves that are available. |
294 | .Pp | 324 | .Pp |
325 | .Fn EC_GROUP_set_curve , | ||
326 | .Fn EC_GROUP_get_curve , | ||
295 | .Fn EC_GROUP_set_curve_GFp , | 327 | .Fn EC_GROUP_set_curve_GFp , |
296 | .Fn EC_GROUP_get_curve_GFp , | 328 | .Fn EC_GROUP_get_curve_GFp , |
297 | .Fn EC_GROUP_set_curve_GF2m , | 329 | .Fn EC_GROUP_set_curve_GF2m , |
@@ -327,3 +359,8 @@ and | |||
327 | .Fn EC_get_builtin_curves | 359 | .Fn EC_get_builtin_curves |
328 | first appeared in OpenSSL 0.9.8 and have been available since | 360 | first appeared in OpenSSL 0.9.8 and have been available since |
329 | .Ox 4.5 . | 361 | .Ox 4.5 . |
362 | .Fn EC_GROUP_set_curve | ||
363 | and | ||
364 | .Fn EC_GROUP_get_curve , | ||
365 | first appeared in OpenSSL 1.1.1 and have been available since | ||
366 | .Ox 7.0 . | ||