diff options
author | tb <> | 2023-04-27 09:35:20 +0000 |
---|---|---|
committer | tb <> | 2023-04-27 09:35:20 +0000 |
commit | 269372ad3ec1b301ffbb459aedcbc2d4a196f4f9 (patch) | |
tree | 51342d8d3b5d34aff426c88b9ed034e226ba3c18 /src | |
parent | aca9ca7e5f766a55f64c43f43d85f9cc43772ba4 (diff) | |
download | openbsd-269372ad3ec1b301ffbb459aedcbc2d4a196f4f9.tar.gz openbsd-269372ad3ec1b301ffbb459aedcbc2d4a196f4f9.tar.bz2 openbsd-269372ad3ec1b301ffbb459aedcbc2d4a196f4f9.zip |
EC_GROUP_new() Strip out complications due to binary curves.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/man/EC_GROUP_new.3 | 90 |
1 files changed, 11 insertions, 79 deletions
diff --git a/src/lib/libcrypto/man/EC_GROUP_new.3 b/src/lib/libcrypto/man/EC_GROUP_new.3 index ef7251fa3d..7a539eb92a 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.14 2022/03/31 17:27:16 naddy Exp $ | 1 | .\" $OpenBSD: EC_GROUP_new.3,v 1.15 2023/04/27 09:35:20 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: March 31 2022 $ | 51 | .Dd $Mdocdate: April 27 2023 $ |
52 | .Dt EC_GROUP_NEW 3 | 52 | .Dt EC_GROUP_NEW 3 |
53 | .Os | 53 | .Os |
54 | .Sh NAME | 54 | .Sh NAME |
@@ -56,14 +56,11 @@ | |||
56 | .Nm EC_GROUP_free , | 56 | .Nm EC_GROUP_free , |
57 | .Nm EC_GROUP_clear_free , | 57 | .Nm EC_GROUP_clear_free , |
58 | .Nm EC_GROUP_new_curve_GFp , | 58 | .Nm EC_GROUP_new_curve_GFp , |
59 | .Nm EC_GROUP_new_curve_GF2m , | ||
60 | .Nm EC_GROUP_new_by_curve_name , | 59 | .Nm EC_GROUP_new_by_curve_name , |
61 | .Nm EC_GROUP_set_curve , | 60 | .Nm EC_GROUP_set_curve , |
62 | .Nm EC_GROUP_get_curve , | 61 | .Nm EC_GROUP_get_curve , |
63 | .Nm EC_GROUP_set_curve_GFp , | 62 | .Nm EC_GROUP_set_curve_GFp , |
64 | .Nm EC_GROUP_get_curve_GFp , | 63 | .Nm EC_GROUP_get_curve_GFp , |
65 | .Nm EC_GROUP_set_curve_GF2m , | ||
66 | .Nm EC_GROUP_get_curve_GF2m , | ||
67 | .Nm EC_get_builtin_curves | 64 | .Nm EC_get_builtin_curves |
68 | .Nd create and destroy EC_GROUP objects | 65 | .Nd create and destroy EC_GROUP objects |
69 | .Sh SYNOPSIS | 66 | .Sh SYNOPSIS |
@@ -89,13 +86,6 @@ | |||
89 | .Fa "BN_CTX *ctx" | 86 | .Fa "BN_CTX *ctx" |
90 | .Fc | 87 | .Fc |
91 | .Ft EC_GROUP * | 88 | .Ft EC_GROUP * |
92 | .Fo EC_GROUP_new_curve_GF2m | ||
93 | .Fa "const BIGNUM *p" | ||
94 | .Fa "const BIGNUM *a" | ||
95 | .Fa "const BIGNUM *b" | ||
96 | .Fa "BN_CTX *ctx" | ||
97 | .Fc | ||
98 | .Ft EC_GROUP * | ||
99 | .Fo EC_GROUP_new_by_curve_name | 89 | .Fo EC_GROUP_new_by_curve_name |
100 | .Fa "int nid" | 90 | .Fa "int nid" |
101 | .Fc | 91 | .Fc |
@@ -131,22 +121,6 @@ | |||
131 | .Fa "BIGNUM *b" | 121 | .Fa "BIGNUM *b" |
132 | .Fa "BN_CTX *ctx" | 122 | .Fa "BN_CTX *ctx" |
133 | .Fc | 123 | .Fc |
134 | .Ft int | ||
135 | .Fo EC_GROUP_set_curve_GF2m | ||
136 | .Fa "EC_GROUP *group" | ||
137 | .Fa "const BIGNUM *p" | ||
138 | .Fa "const BIGNUM *a" | ||
139 | .Fa "const BIGNUM *b" | ||
140 | .Fa "BN_CTX *ctx" | ||
141 | .Fc | ||
142 | .Ft int | ||
143 | .Fo EC_GROUP_get_curve_GF2m | ||
144 | .Fa "const EC_GROUP *group" | ||
145 | .Fa "BIGNUM *p" | ||
146 | .Fa "BIGNUM *a" | ||
147 | .Fa "BIGNUM *b" | ||
148 | .Fa "BN_CTX *ctx" | ||
149 | .Fc | ||
150 | .Ft size_t | 124 | .Ft size_t |
151 | .Fo EC_get_builtin_curves | 125 | .Fo EC_get_builtin_curves |
152 | .Fa "EC_builtin_curve *r" | 126 | .Fa "EC_builtin_curve *r" |
@@ -159,27 +133,6 @@ In general, an elliptic curve satisfies an equation of the form: | |||
159 | .Pp | 133 | .Pp |
160 | .Dl y^2 = x^3 + ax + b | 134 | .Dl y^2 = x^3 + ax + b |
161 | .Pp | 135 | .Pp |
162 | Within the library there are two forms of elliptic curves that are of | ||
163 | interest. | ||
164 | The first form is those defined over the prime field Fp. | ||
165 | The elements of Fp are the integers 0 to p-1, where | ||
166 | .Fa p | ||
167 | is a prime number. | ||
168 | This gives us a revised elliptic curve equation as follows: | ||
169 | .Pp | ||
170 | .Dl y^2 mod p = x^3 + ax + b mod p | ||
171 | .Pp | ||
172 | The second form is those defined over a binary field F2^m where the | ||
173 | elements of the field are integers of length at most m bits. | ||
174 | For this form the elliptic curve equation is modified to: | ||
175 | .Pp | ||
176 | .Dl y^2 + xy = x^3 + ax^2 + b (where b != 0) | ||
177 | .Pp | ||
178 | Operations in a binary field are performed relative to an irreducible | ||
179 | polynomial. | ||
180 | All such curves with OpenSSL use a trinomial or a pentanomial for this | ||
181 | parameter. | ||
182 | .Pp | ||
183 | An | 136 | An |
184 | .Vt EC_GROUP | 137 | .Vt EC_GROUP |
185 | structure is used to represent the definition of an elliptic curve. | 138 | structure is used to represent the definition of an elliptic curve. |
@@ -198,46 +151,30 @@ sets the curve parameters | |||
198 | .Fa p , | 151 | .Fa p , |
199 | .Fa a , | 152 | .Fa a , |
200 | and | 153 | and |
201 | .Fa b . | 154 | .Fa b , |
202 | For a curve over Fp, | 155 | where |
203 | .Fa p | ||
204 | is the prime for the field. | ||
205 | For a curve over F2^m | ||
206 | .Fa p | ||
207 | represents the irreducible polynomial - each bit represents a term in | ||
208 | the polynomial. | ||
209 | Therefore, there will either be three or five bits set dependent on | ||
210 | whether the polynomial is a trinomial or a pentanomial. | ||
211 | In either case, | ||
212 | .Fa a | 156 | .Fa a |
213 | and | 157 | and |
214 | .Fa b | 158 | .Fa b |
215 | represent the coefficients of the curve equation. | 159 | represent the coefficients of the curve equation. |
216 | .Pp | 160 | .Pp |
217 | .Fn EC_GROUP_set_curve_GFp | 161 | .Fn EC_GROUP_set_curve_GFp |
218 | and | 162 | is a deprecated synonym for |
219 | .Fn EC_GROUP_set_curve_GF2m | ||
220 | are deprecated synonyms for | ||
221 | .Fn EC_GROUP_set_curve . | 163 | .Fn EC_GROUP_set_curve . |
222 | .Pp | 164 | .Pp |
223 | .Fn EC_GROUP_get_curve | 165 | .Fn EC_GROUP_get_curve |
224 | obtains the previously set curve parameters. | 166 | obtains the previously set curve parameters. |
225 | .Pp | 167 | .Pp |
226 | .Fn EC_GROUP_get_curve_GFp | 168 | .Fn EC_GROUP_get_curve_GFp |
227 | and | 169 | is a deprecated synonym for |
228 | .Fn EC_GROUP_get_curve_GF2m | ||
229 | are deprecated synonyms for | ||
230 | .Fn EC_GROUP_get_curve . | 170 | .Fn EC_GROUP_get_curve . |
231 | .Pp | 171 | .Pp |
232 | The functions | 172 | The function |
233 | .Fn EC_GROUP_new_curve_GFp | 173 | .Fn EC_GROUP_new_curve_GFp |
234 | and | 174 | is a shortcut for calling |
235 | .Fn EC_GROUP_new_curve_GF2m | ||
236 | are shortcuts for calling | ||
237 | .Fn EC_GROUP_new | 175 | .Fn EC_GROUP_new |
238 | and the appropriate | 176 | and |
239 | .Fn EC_GROUP_set_curve_* | 177 | .Fn EC_GROUP_set_curve . |
240 | function. | ||
241 | An appropriate default implementation method will be used. | 178 | An appropriate default implementation method will be used. |
242 | .Pp | 179 | .Pp |
243 | Whilst the library can be used to create any curve using the functions | 180 | Whilst the library can be used to create any curve using the functions |
@@ -325,10 +262,8 @@ returns the number of builtin curves that are available. | |||
325 | .Fn EC_GROUP_set_curve , | 262 | .Fn EC_GROUP_set_curve , |
326 | .Fn EC_GROUP_get_curve , | 263 | .Fn EC_GROUP_get_curve , |
327 | .Fn EC_GROUP_set_curve_GFp , | 264 | .Fn EC_GROUP_set_curve_GFp , |
328 | .Fn EC_GROUP_get_curve_GFp , | ||
329 | .Fn EC_GROUP_set_curve_GF2m , | ||
330 | and | 265 | and |
331 | .Fn EC_GROUP_get_curve_GF2m | 266 | .Fn EC_GROUP_get_curve_GFp |
332 | return 1 on success or 0 on error. | 267 | return 1 on success or 0 on error. |
333 | .Sh SEE ALSO | 268 | .Sh SEE ALSO |
334 | .Xr crypto 3 , | 269 | .Xr crypto 3 , |
@@ -351,10 +286,7 @@ and | |||
351 | first appeared in OpenSSL 0.9.7 and have been available since | 286 | first appeared in OpenSSL 0.9.7 and have been available since |
352 | .Ox 3.2 . | 287 | .Ox 3.2 . |
353 | .Pp | 288 | .Pp |
354 | .Fn EC_GROUP_new_curve_GF2m , | ||
355 | .Fn EC_GROUP_new_by_curve_name , | 289 | .Fn EC_GROUP_new_by_curve_name , |
356 | .Fn EC_GROUP_set_curve_GF2m , | ||
357 | .Fn EC_GROUP_get_curve_GF2m , | ||
358 | and | 290 | and |
359 | .Fn EC_get_builtin_curves | 291 | .Fn EC_get_builtin_curves |
360 | first appeared in OpenSSL 0.9.8 and have been available since | 292 | first appeared in OpenSSL 0.9.8 and have been available since |