diff options
author | tb <> | 2024-04-26 14:23:03 +0000 |
---|---|---|
committer | tb <> | 2024-04-26 14:23:03 +0000 |
commit | 36e09afd712071f21f4058ed358c212995507b6b (patch) | |
tree | 97d43406ab9c7e6dd10bfe710723f62315a60afd /src | |
parent | 77aa3746ee4628931114c01379f6e5679ee994ef (diff) | |
download | openbsd-36e09afd712071f21f4058ed358c212995507b6b.tar.gz openbsd-36e09afd712071f21f4058ed358c212995507b6b.tar.bz2 openbsd-36e09afd712071f21f4058ed358c212995507b6b.zip |
Document EC_curve_{nid2nist,nist2nid}()
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/man/EC_GROUP_new.3 | 61 |
1 files changed, 57 insertions, 4 deletions
diff --git a/src/lib/libcrypto/man/EC_GROUP_new.3 b/src/lib/libcrypto/man/EC_GROUP_new.3 index 7a539eb92a..d0e95c9858 100644 --- a/src/lib/libcrypto/man/EC_GROUP_new.3 +++ b/src/lib/libcrypto/man/EC_GROUP_new.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: EC_GROUP_new.3,v 1.15 2023/04/27 09:35:20 tb Exp $ | 1 | .\" $OpenBSD: EC_GROUP_new.3,v 1.16 2024/04/26 14:23:03 tb Exp $ |
2 | .\" OpenSSL 6328d367 Sat Jul 4 21:58:30 2020 +0200 | 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>. |
@@ -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: April 27 2023 $ | 51 | .Dd $Mdocdate: April 26 2024 $ |
52 | .Dt EC_GROUP_NEW 3 | 52 | .Dt EC_GROUP_NEW 3 |
53 | .Os | 53 | .Os |
54 | .Sh NAME | 54 | .Sh NAME |
@@ -61,7 +61,9 @@ | |||
61 | .Nm EC_GROUP_get_curve , | 61 | .Nm EC_GROUP_get_curve , |
62 | .Nm EC_GROUP_set_curve_GFp , | 62 | .Nm EC_GROUP_set_curve_GFp , |
63 | .Nm EC_GROUP_get_curve_GFp , | 63 | .Nm EC_GROUP_get_curve_GFp , |
64 | .Nm EC_get_builtin_curves | 64 | .Nm EC_get_builtin_curves , |
65 | .Nm EC_curve_nid2nist , | ||
66 | .Nm EC_curve_nist2nid | ||
65 | .Nd create and destroy EC_GROUP objects | 67 | .Nd create and destroy EC_GROUP objects |
66 | .Sh SYNOPSIS | 68 | .Sh SYNOPSIS |
67 | .In openssl/ec.h | 69 | .In openssl/ec.h |
@@ -126,6 +128,14 @@ | |||
126 | .Fa "EC_builtin_curve *r" | 128 | .Fa "EC_builtin_curve *r" |
127 | .Fa "size_t nitems" | 129 | .Fa "size_t nitems" |
128 | .Fc | 130 | .Fc |
131 | .Ft "const char *" | ||
132 | .Fo EC_curve_nid2nist | ||
133 | .Fa "int nid" | ||
134 | .Fc | ||
135 | .Ft int | ||
136 | .Fo EC_curve_nist2nid | ||
137 | .Fa "const char *name" | ||
138 | .Fc | ||
129 | .Sh DESCRIPTION | 139 | .Sh DESCRIPTION |
130 | The EC library provides functions for performing operations on | 140 | The EC library provides functions for performing operations on |
131 | elliptic curves over finite fields. | 141 | elliptic curves over finite fields. |
@@ -249,6 +259,30 @@ If | |||
249 | is a | 259 | is a |
250 | .Dv NULL | 260 | .Dv NULL |
251 | pointer, no action occurs. | 261 | pointer, no action occurs. |
262 | .Pp | ||
263 | Some builtin curves can be identified by their NIST name | ||
264 | in addition to a numerical identifier (NID). | ||
265 | .Fn EC_curve_nid2nist | ||
266 | and | ||
267 | .Fn EC_curve_nist2nid | ||
268 | translate between the two. | ||
269 | The five built-in prime curves are: | ||
270 | .Pp | ||
271 | .Bl -column "NIST name" NID_X9_62_prime256v1 "deprecated in SP800-186" -compact | ||
272 | .It No NIST Fa name Ta Em ASN.1 NID Ta Em notes | ||
273 | .It Qq P-192 Ta Dv NID_X9_62_prime192v1 Ta No deprecated in SP800-186 | ||
274 | .It Qq P-224 Ta Dv NID_secp224r1 Ta | ||
275 | .It Qq P-256 Ta Dv NID_X9_62_prime256v1 Ta | ||
276 | .It Qq P-384 Ta Dv NID_secp384r1 Ta | ||
277 | .It Qq P-521 Ta Dv NID_secp521r1 Ta | ||
278 | .El | ||
279 | .Pp | ||
280 | .Fn EC_curve_nid2nist | ||
281 | and | ||
282 | .Fn EC_curve_nist2nid | ||
283 | also accept the ten binary curves defined in FIPS\& 186-4 | ||
284 | and deprecated in SP800-186, | ||
285 | although they no longer correspond to builtin curves in LibreSSL. | ||
252 | .Sh RETURN VALUES | 286 | .Sh RETURN VALUES |
253 | All | 287 | All |
254 | .Fn EC_GROUP_new* | 288 | .Fn EC_GROUP_new* |
@@ -259,6 +293,19 @@ on error. | |||
259 | .Fn EC_get_builtin_curves | 293 | .Fn EC_get_builtin_curves |
260 | returns the number of builtin curves that are available. | 294 | returns the number of builtin curves that are available. |
261 | .Pp | 295 | .Pp |
296 | .Fn EC_curve_nid2nist | ||
297 | returns a string constant containing the NIST name if | ||
298 | .Fa nid | ||
299 | identifies a NIST curve or | ||
300 | .Dv NULL | ||
301 | otherwise. | ||
302 | .Pp | ||
303 | .Fn EC_curve_nist2nid | ||
304 | returns the NID corresponding to the NIST curve | ||
305 | .Fa name , | ||
306 | or | ||
307 | .Dv NID_undef . | ||
308 | .Pp | ||
262 | .Fn EC_GROUP_set_curve , | 309 | .Fn EC_GROUP_set_curve , |
263 | .Fn EC_GROUP_get_curve , | 310 | .Fn EC_GROUP_get_curve , |
264 | .Fn EC_GROUP_set_curve_GFp , | 311 | .Fn EC_GROUP_set_curve_GFp , |
@@ -286,11 +333,17 @@ and | |||
286 | first appeared in OpenSSL 0.9.7 and have been available since | 333 | first appeared in OpenSSL 0.9.7 and have been available since |
287 | .Ox 3.2 . | 334 | .Ox 3.2 . |
288 | .Pp | 335 | .Pp |
289 | .Fn EC_GROUP_new_by_curve_name , | 336 | .Fn EC_GROUP_new_by_curve_name |
290 | and | 337 | and |
291 | .Fn EC_get_builtin_curves | 338 | .Fn EC_get_builtin_curves |
292 | first appeared in OpenSSL 0.9.8 and have been available since | 339 | first appeared in OpenSSL 0.9.8 and have been available since |
293 | .Ox 4.5 . | 340 | .Ox 4.5 . |
341 | .Fn EC_curve_nid2nist , | ||
342 | and | ||
343 | .Fn EC_curve_nist2nid | ||
344 | first appeared in OpenSSL 1.1.0 and have been available since | ||
345 | .Ox 5.8 . | ||
346 | .Pp | ||
294 | .Fn EC_GROUP_set_curve | 347 | .Fn EC_GROUP_set_curve |
295 | and | 348 | and |
296 | .Fn EC_GROUP_get_curve | 349 | .Fn EC_GROUP_get_curve |