diff options
author | schwarze <> | 2016-11-05 13:36:33 +0000 |
---|---|---|
committer | schwarze <> | 2016-11-05 13:36:33 +0000 |
commit | 71b431bd059aaefaa67b54a34adfaadc4014902c (patch) | |
tree | 7bf60aef63735e9638d12b0d8302b14d9860466e /src/lib/libcrypto/man/ec.3 | |
parent | 5074288f0801a2b426584402e81b5953f706a44f (diff) | |
download | openbsd-71b431bd059aaefaa67b54a34adfaadc4014902c.tar.gz openbsd-71b431bd059aaefaa67b54a34adfaadc4014902c.tar.bz2 openbsd-71b431bd059aaefaa67b54a34adfaadc4014902c.zip |
convert the remaining manual pages from pod to mdoc
Diffstat (limited to 'src/lib/libcrypto/man/ec.3')
-rw-r--r-- | src/lib/libcrypto/man/ec.3 | 710 |
1 files changed, 710 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/ec.3 b/src/lib/libcrypto/man/ec.3 new file mode 100644 index 0000000000..3ecdd5dd8d --- /dev/null +++ b/src/lib/libcrypto/man/ec.3 | |||
@@ -0,0 +1,710 @@ | |||
1 | .Dd $Mdocdate: November 5 2016 $ | ||
2 | .Dt EC 3 | ||
3 | .Os | ||
4 | .Sh NAME | ||
5 | .Nm ec | ||
6 | .Nd Elliptic Curve functions | ||
7 | .Sh SYNOPSIS | ||
8 | .In openssl/ec.h | ||
9 | .In openssl/bn.h | ||
10 | .Ft const EC_METHOD * | ||
11 | .Fn EC_GFp_simple_method void | ||
12 | .Ft const EC_METHOD * | ||
13 | .Fn EC_GFp_mont_method void | ||
14 | .Ft const EC_METHOD * | ||
15 | .Fn EC_GFp_nist_method void | ||
16 | .Ft const EC_METHOD * | ||
17 | .Fn EC_GFp_nistp224_method void | ||
18 | .Ft const EC_METHOD * | ||
19 | .Fn EC_GFp_nistp256_method void | ||
20 | .Ft const EC_METHOD * | ||
21 | .Fn EC_GFp_nistp521_method void | ||
22 | .Ft const EC_METHOD * | ||
23 | .Fn EC_GF2m_simple_method void | ||
24 | .Ft EC_GROUP * | ||
25 | .Fo EC_GROUP_new | ||
26 | .Fa "const EC_METHOD *meth" | ||
27 | .Fc | ||
28 | .Ft void | ||
29 | .Fo EC_GROUP_free | ||
30 | .Fa "EC_GROUP *group" | ||
31 | .Fc | ||
32 | .Ft void | ||
33 | .Fo EC_GROUP_clear_free | ||
34 | .Fa "EC_GROUP *group" | ||
35 | .Fc | ||
36 | .Ft int | ||
37 | .Fo EC_GROUP_copy | ||
38 | .Fa "EC_GROUP *dst" | ||
39 | .Fa "const EC_GROUP *src" | ||
40 | .Fc | ||
41 | .Ft EC_GROUP * | ||
42 | .Fo EC_GROUP_dup | ||
43 | .Fa "const EC_GROUP *src" | ||
44 | .Fc | ||
45 | .Ft const EC_METHOD * | ||
46 | .Fo EC_GROUP_method_of | ||
47 | .Fa "const EC_GROUP *group" | ||
48 | .Fc | ||
49 | .Ft int | ||
50 | .Fo EC_METHOD_get_field_type | ||
51 | .Fa "const EC_METHOD *meth" | ||
52 | .Fc | ||
53 | .Ft int | ||
54 | .Fo EC_GROUP_set_generator | ||
55 | .Fa "EC_GROUP *group" | ||
56 | .Fa "const EC_POINT *generator" | ||
57 | .Fa "const BIGNUM *order" | ||
58 | .Fa "const BIGNUM *cofactor" | ||
59 | .Fc | ||
60 | .Ft const EC_POINT * | ||
61 | .Fo EC_GROUP_get0_generator | ||
62 | .Fa "const EC_GROUP *group" | ||
63 | .Fc | ||
64 | .Ft int | ||
65 | .Fo EC_GROUP_get_order | ||
66 | .Fa "const EC_GROUP *group" | ||
67 | .Fa "BIGNUM *order" | ||
68 | .Fa "BN_CTX *ctx" | ||
69 | .Fc | ||
70 | .Ft int | ||
71 | .Fo EC_GROUP_get_cofactor | ||
72 | .Fa "const EC_GROUP *group" | ||
73 | .Fa "BIGNUM *cofactor" | ||
74 | .Fa "BN_CTX *ctx" | ||
75 | .Fc | ||
76 | .Ft void | ||
77 | .Fo EC_GROUP_set_curve_name | ||
78 | .Fa "EC_GROUP *group" | ||
79 | .Fa "int nid" | ||
80 | .Fc | ||
81 | .Ft int | ||
82 | .Fo EC_GROUP_get_curve_name | ||
83 | .Fa "const EC_GROUP *group" | ||
84 | .Fc | ||
85 | .Ft void | ||
86 | .Fo EC_GROUP_set_asn1_flag | ||
87 | .Fa "EC_GROUP *group" | ||
88 | .Fa "int flag" | ||
89 | .Fc | ||
90 | .Ft int | ||
91 | .Fo EC_GROUP_get_asn1_flag | ||
92 | .Fa "const EC_GROUP *group" | ||
93 | .Fc | ||
94 | .Ft void | ||
95 | .Fo EC_GROUP_set_point_conversion_form | ||
96 | .Fa "EC_GROUP *group" | ||
97 | .Fa "point_conversion_form_t form" | ||
98 | .Fc | ||
99 | .Ft point_conversion_form_t | ||
100 | .Fo EC_GROUP_get_point_conversion_form | ||
101 | .Fa "const EC_GROUP *" | ||
102 | .Fc | ||
103 | .Ft unsigned char * | ||
104 | .Fo EC_GROUP_get0_seed | ||
105 | .Fa "const EC_GROUP *x" | ||
106 | .Fc | ||
107 | .Ft size_t | ||
108 | .Fo EC_GROUP_get_seed_len | ||
109 | .Fa "const EC_GROUP *" | ||
110 | .Fc | ||
111 | .Ft size_t | ||
112 | .Fo EC_GROUP_set_seed | ||
113 | .Fa "EC_GROUP *" | ||
114 | .Fa "const unsigned char *" | ||
115 | .Fa "size_t len" | ||
116 | .Fc | ||
117 | .Ft int | ||
118 | .Fo EC_GROUP_set_curve_GFp | ||
119 | .Fa "EC_GROUP *group" | ||
120 | .Fa "const BIGNUM *p" | ||
121 | .Fa "const BIGNUM *a" | ||
122 | .Fa "const BIGNUM *b" | ||
123 | .Fa "BN_CTX *ctx" | ||
124 | .Fc | ||
125 | .Ft int | ||
126 | .Fo EC_GROUP_get_curve_GFp | ||
127 | .Fa "const EC_GROUP *group" | ||
128 | .Fa "BIGNUM *p" | ||
129 | .Fa "BIGNUM *a" | ||
130 | .Fa "BIGNUM *b" | ||
131 | .Fa "BN_CTX *ctx" | ||
132 | .Fc | ||
133 | .Ft int | ||
134 | .Fo EC_GROUP_set_curve_GF2m | ||
135 | .Fa "EC_GROUP *group" | ||
136 | .Fa "const BIGNUM *p" | ||
137 | .Fa "const BIGNUM *a" | ||
138 | .Fa "const BIGNUM *b" | ||
139 | .Fa "BN_CTX *ctx" | ||
140 | .Fc | ||
141 | .Ft int | ||
142 | .Fo EC_GROUP_get_curve_GF2m | ||
143 | .Fa "const EC_GROUP *group" | ||
144 | .Fa "BIGNUM *p" | ||
145 | .Fa "BIGNUM *a" | ||
146 | .Fa "BIGNUM *b" | ||
147 | .Fa "BN_CTX *ctx" | ||
148 | .Fc | ||
149 | .Ft int | ||
150 | .Fo EC_GROUP_get_degree | ||
151 | .Fa "const EC_GROUP *group" | ||
152 | .Fc | ||
153 | .Ft int | ||
154 | .Fo EC_GROUP_check | ||
155 | .Fa "const EC_GROUP *group" | ||
156 | .Fa "BN_CTX *ctx" | ||
157 | .Fc | ||
158 | .Ft int | ||
159 | .Fo EC_GROUP_check_discriminant | ||
160 | .Fa "const EC_GROUP *group" | ||
161 | .Fa "BN_CTX *ctx" | ||
162 | .Fc | ||
163 | .Ft int | ||
164 | .Fo EC_GROUP_cmp | ||
165 | .Fa "const EC_GROUP *a" | ||
166 | .Fa "const EC_GROUP *b" | ||
167 | .Fa "BN_CTX *ctx" | ||
168 | .Fc | ||
169 | .Ft EC_GROUP * | ||
170 | .Fo EC_GROUP_new_curve_GFp | ||
171 | .Fa "const BIGNUM *p" | ||
172 | .Fa "const BIGNUM *a" | ||
173 | .Fa "const BIGNUM *b" | ||
174 | .Fa "BN_CTX *ctx" | ||
175 | .Fc | ||
176 | .Ft EC_GROUP * | ||
177 | .Fo EC_GROUP_new_curve_GF2m | ||
178 | .Fa "const BIGNUM *p" | ||
179 | .Fa "const BIGNUM *a" | ||
180 | .Fa "const BIGNUM *b" | ||
181 | .Fa "BN_CTX *ctx" | ||
182 | .Fc | ||
183 | .Ft EC_GROUP * | ||
184 | .Fo EC_GROUP_new_by_curve_name | ||
185 | .Fa "int nid" | ||
186 | .Fc | ||
187 | .Ft size_t | ||
188 | .Fo EC_get_builtin_curves | ||
189 | .Fa "EC_builtin_curve *r" | ||
190 | .Fa "size_t nitems" | ||
191 | .Fc | ||
192 | .Ft EC_POINT * | ||
193 | .Fo EC_POINT_new | ||
194 | .Fa "const EC_GROUP *group" | ||
195 | .Fc | ||
196 | .Ft void | ||
197 | .Fo EC_POINT_free | ||
198 | .Fa "EC_POINT *point" | ||
199 | .Fc | ||
200 | .Ft void | ||
201 | .Fo EC_POINT_clear_free | ||
202 | .Fa "EC_POINT *point" | ||
203 | .Fc | ||
204 | .Ft int | ||
205 | .Fo EC_POINT_copy | ||
206 | .Fa "EC_POINT *dst" | ||
207 | .Fa "const EC_POINT *src" | ||
208 | .Fc | ||
209 | .Ft EC_POINT * | ||
210 | .Fo EC_POINT_dup | ||
211 | .Fa "const EC_POINT *src" | ||
212 | .Fa "const EC_GROUP *group" | ||
213 | .Fc | ||
214 | .Ft const EC_METHOD * | ||
215 | .Fo EC_POINT_method_of | ||
216 | .Fa "const EC_POINT *point" | ||
217 | .Fc | ||
218 | .Ft int | ||
219 | .Fo EC_POINT_set_to_infinity | ||
220 | .Fa "const EC_GROUP *group" | ||
221 | .Fa "EC_POINT *point" | ||
222 | .Fc | ||
223 | .Ft int | ||
224 | .Fo EC_POINT_set_Jprojective_coordinates_GFp | ||
225 | .Fa "const EC_GROUP *group" | ||
226 | .Fa "EC_POINT *p" | ||
227 | .Fa "const BIGNUM *x" | ||
228 | .Fa "const BIGNUM *y" | ||
229 | .Fa "const BIGNUM *z" | ||
230 | .Fa "BN_CTX *ctx" | ||
231 | .Fc | ||
232 | .Ft int | ||
233 | .Fo EC_POINT_get_Jprojective_coordinates_GFp | ||
234 | .Fa "const EC_GROUP *group" | ||
235 | .Fa "const EC_POINT *p" | ||
236 | .Fa "BIGNUM *x" | ||
237 | .Fa "BIGNUM *y" | ||
238 | .Fa "BIGNUM *z" | ||
239 | .Fa "BN_CTX *ctx" | ||
240 | .Fc | ||
241 | .Ft int | ||
242 | .Fo EC_POINT_set_affine_coordinates_GFp | ||
243 | .Fa "const EC_GROUP *group" | ||
244 | .Fa "EC_POINT *p" | ||
245 | .Fa "const BIGNUM *x" | ||
246 | .Fa "const BIGNUM *y" | ||
247 | .Fa "BN_CTX *ctx" | ||
248 | .Fc | ||
249 | .Ft int | ||
250 | .Fo EC_POINT_get_affine_coordinates_GFp | ||
251 | .Fa "const EC_GROUP *group" | ||
252 | .Fa "const EC_POINT *p" | ||
253 | .Fa "BIGNUM *x" | ||
254 | .Fa "BIGNUM *y" | ||
255 | .Fa "BN_CTX *ctx" | ||
256 | .Fc | ||
257 | .Ft int | ||
258 | .Fo EC_POINT_set_compressed_coordinates_GFp | ||
259 | .Fa "const EC_GROUP *group" | ||
260 | .Fa "EC_POINT *p" | ||
261 | .Fa "const BIGNUM *x" | ||
262 | .Fa "int y_bit" | ||
263 | .Fa "BN_CTX *ctx" | ||
264 | .Fc | ||
265 | .Ft int | ||
266 | .Fo EC_POINT_set_affine_coordinates_GF2m | ||
267 | .Fa "const EC_GROUP *group" | ||
268 | .Fa "EC_POINT *p" | ||
269 | .Fa "const BIGNUM *x" | ||
270 | .Fa "const BIGNUM *y" | ||
271 | .Fa "BN_CTX *ctx" | ||
272 | .Fc | ||
273 | .Ft int | ||
274 | .Fo EC_POINT_get_affine_coordinates_GF2m | ||
275 | .Fa "const EC_GROUP *group" | ||
276 | .Fa "const EC_POINT *p" | ||
277 | .Fa "BIGNUM *x" | ||
278 | .Fa "BIGNUM *y" | ||
279 | .Fa "BN_CTX *ctx" | ||
280 | .Fc | ||
281 | .Ft int | ||
282 | .Fo EC_POINT_set_compressed_coordinates_GF2m | ||
283 | .Fa "const EC_GROUP *group" | ||
284 | .Fa "EC_POINT *p" | ||
285 | .Fa "const BIGNUM *x" | ||
286 | .Fa "int y_bit" | ||
287 | .Fa "BN_CTX *ctx" | ||
288 | .Fc | ||
289 | .Ft size_t | ||
290 | .Fo EC_POINT_point2oct | ||
291 | .Fa "const EC_GROUP *group" | ||
292 | .Fa "const EC_POINT *p" | ||
293 | .Fa "point_conversion_form_t form" | ||
294 | .Fa "unsigned char *buf" | ||
295 | .Fa "size_t len" | ||
296 | .Fa "BN_CTX *ctx" | ||
297 | .Fc | ||
298 | .Ft int | ||
299 | .Fo EC_POINT_oct2point | ||
300 | .Fa "const EC_GROUP *group" | ||
301 | .Fa "EC_POINT *p" | ||
302 | .Fa "const unsigned char *buf" | ||
303 | .Fa "size_t len" | ||
304 | .Fa "BN_CTX *ctx" | ||
305 | .Fc | ||
306 | .Ft BIGNUM * | ||
307 | .Fo EC_POINT_point2bn | ||
308 | .Fa "const EC_GROUP *" | ||
309 | .Fa "const EC_POINT *" | ||
310 | .Fa "point_conversion_form_t form" | ||
311 | .Fa "BIGNUM *" | ||
312 | .Fa "BN_CTX *" | ||
313 | .Fc | ||
314 | .Ft EC_POINT * | ||
315 | .Fo EC_POINT_bn2point | ||
316 | .Fa "const EC_GROUP *" | ||
317 | .Fa "const BIGNUM *" | ||
318 | .Fa "EC_POINT *" | ||
319 | .Fa "BN_CTX *" | ||
320 | .Fc | ||
321 | .Ft char * | ||
322 | .Fo EC_POINT_point2hex | ||
323 | .Fa "const EC_GROUP *" | ||
324 | .Fa "const EC_POINT *" | ||
325 | .Fa "point_conversion_form_t form" | ||
326 | .Fa "BN_CTX *" | ||
327 | .Fc | ||
328 | .Ft EC_POINT * | ||
329 | .Fo EC_POINT_hex2point | ||
330 | .Fa "const EC_GROUP *" | ||
331 | .Fa "const char *" | ||
332 | .Fa "EC_POINT *" | ||
333 | .Fa "BN_CTX *" | ||
334 | .Fc | ||
335 | .Ft int | ||
336 | .Fo EC_POINT_add | ||
337 | .Fa "const EC_GROUP *group" | ||
338 | .Fa "EC_POINT *r" | ||
339 | .Fa "const EC_POINT *a" | ||
340 | .Fa "const EC_POINT *b" | ||
341 | .Fa "BN_CTX *ctx" | ||
342 | .Fc | ||
343 | .Ft int | ||
344 | .Fo EC_POINT_dbl | ||
345 | .Fa "const EC_GROUP *group" | ||
346 | .Fa "EC_POINT *r" | ||
347 | .Fa "const EC_POINT *a" | ||
348 | .Fa "BN_CTX *ctx" | ||
349 | .Fc | ||
350 | .Ft int | ||
351 | .Fo EC_POINT_invert | ||
352 | .Fa "const EC_GROUP *group" | ||
353 | .Fa "EC_POINT *a" | ||
354 | .Fa "BN_CTX *ctx" | ||
355 | .Fc | ||
356 | .Ft int | ||
357 | .Fo EC_POINT_is_at_infinity | ||
358 | .Fa "const EC_GROUP *group" | ||
359 | .Fa "const EC_POINT *p" | ||
360 | .Fc | ||
361 | .Ft int | ||
362 | .Fo EC_POINT_is_on_curve | ||
363 | .Fa "const EC_GROUP *group" | ||
364 | .Fa "const EC_POINT *point" | ||
365 | .Fa "BN_CTX *ctx" | ||
366 | .Fc | ||
367 | .Ft int | ||
368 | .Fo EC_POINT_cmp | ||
369 | .Fa "const EC_GROUP *group" | ||
370 | .Fa "const EC_POINT *a" | ||
371 | .Fa "const EC_POINT *b" | ||
372 | .Fa "BN_CTX *ctx" | ||
373 | .Fc | ||
374 | .Ft int | ||
375 | .Fo EC_POINT_make_affine | ||
376 | .Fa "const EC_GROUP *group" | ||
377 | .Fa "EC_POINT *point" | ||
378 | .Fa "BN_CTX *ctx" | ||
379 | .Fc | ||
380 | .Ft int | ||
381 | .Fo EC_POINTs_make_affine | ||
382 | .Fa "const EC_GROUP *group" | ||
383 | .Fa "size_t num" | ||
384 | .Fa "EC_POINT *points[]" | ||
385 | .Fa "BN_CTX *ctx" | ||
386 | .Fc | ||
387 | .Ft int | ||
388 | .Fo EC_POINTs_mul | ||
389 | .Fa "const EC_GROUP *group" | ||
390 | .Fa "EC_POINT *r" | ||
391 | .Fa "const BIGNUM *n" | ||
392 | .Fa "size_t num" | ||
393 | .Fa "const EC_POINT *p[]" | ||
394 | .Fa "const BIGNUM *m[]" | ||
395 | .Fa "BN_CTX *ctx" | ||
396 | .Fc | ||
397 | .Ft int | ||
398 | .Fo EC_POINT_mul | ||
399 | .Fa "const EC_GROUP *group" | ||
400 | .Fa "EC_POINT *r" | ||
401 | .Fa "const BIGNUM *n" | ||
402 | .Fa "const EC_POINT *q" | ||
403 | .Fa "const BIGNUM *m" | ||
404 | .Fa "BN_CTX *ctx" | ||
405 | .Fc | ||
406 | .Ft int | ||
407 | .Fo EC_GROUP_precompute_mult | ||
408 | .Fa "EC_GROUP *group" | ||
409 | .Fa "BN_CTX *ctx" | ||
410 | .Fc | ||
411 | .Ft int | ||
412 | .Fo EC_GROUP_have_precompute_mult | ||
413 | .Fa "const EC_GROUP *group" | ||
414 | .Fc | ||
415 | .Ft int | ||
416 | .Fo EC_GROUP_get_basis_type | ||
417 | .Fa "const EC_GROUP *" | ||
418 | .Fc | ||
419 | .Ft int | ||
420 | .Fo EC_GROUP_get_trinomial_basis | ||
421 | .Fa "const EC_GROUP *" | ||
422 | .Fa "unsigned int *k" | ||
423 | .Fc | ||
424 | .Ft int | ||
425 | .Fo EC_GROUP_get_pentanomial_basis | ||
426 | .Fa "const EC_GROUP *" | ||
427 | .Fa "unsigned int *k1" | ||
428 | .Fa "unsigned int *k2" | ||
429 | .Fa "unsigned int *k3" | ||
430 | .Fc | ||
431 | .Ft EC_GROUP * | ||
432 | .Fo d2i_ECPKParameters | ||
433 | .Fa "EC_GROUP **" | ||
434 | .Fa "const unsigned char **in" | ||
435 | .Fa "long len" | ||
436 | .Fc | ||
437 | .Ft int | ||
438 | .Fo i2d_ECPKParameters | ||
439 | .Fa "const EC_GROUP *" | ||
440 | .Fa "unsigned char **out" | ||
441 | .Fc | ||
442 | .Fd #define d2i_ECPKParameters_bio(bp,x)\ | ||
443 | ASN1_d2i_bio_of(EC_GROUP,NULL,d2i_ECPKParameters,bp,x) | ||
444 | .Fd #define i2d_ECPKParameters_bio(bp,x)\ | ||
445 | ASN1_i2d_bio_of_const(EC_GROUP,i2d_ECPKParameters,bp,x) | ||
446 | .Fd #define d2i_ECPKParameters_fp(fp,x) (EC_GROUP *)ASN1_d2i_fp(NULL,\ | ||
447 | (char *(*)())d2i_ECPKParameters,(fp),(unsigned char **)(x)) | ||
448 | .Fd #define i2d_ECPKParameters_fp(fp,x)\ | ||
449 | ASN1_i2d_fp(i2d_ECPKParameters,(fp), (unsigned char *)(x)) | ||
450 | .Ft int | ||
451 | .Fo ECPKParameters_print | ||
452 | .Fa "BIO *bp" | ||
453 | .Fa "const EC_GROUP *x" | ||
454 | .Fa "int off" | ||
455 | .Fc | ||
456 | .Ft int | ||
457 | .Fo ECPKParameters_print_fp | ||
458 | .Fa "FILE *fp" | ||
459 | .Fa "const EC_GROUP *x" | ||
460 | .Fa "int off" | ||
461 | .Fc | ||
462 | .Ft EC_KEY * | ||
463 | .Fn EC_KEY_new void | ||
464 | .Ft int | ||
465 | .Fo EC_KEY_get_flags | ||
466 | .Fa "const EC_KEY *key" | ||
467 | .Fc | ||
468 | .Ft void | ||
469 | .Fo EC_KEY_set_flags | ||
470 | .Fa "EC_KEY *key" | ||
471 | .Fa "int flags" | ||
472 | .Fc | ||
473 | .Ft void | ||
474 | .Fo EC_KEY_clear_flags | ||
475 | .Fa "EC_KEY *key" | ||
476 | .Fa "int flags" | ||
477 | .Fc | ||
478 | .Ft EC_KEY * | ||
479 | .Fo EC_KEY_new_by_curve_name | ||
480 | .Fa "int nid" | ||
481 | .Fc | ||
482 | .Ft void | ||
483 | .Fo EC_KEY_free | ||
484 | .Fa "EC_KEY *key" | ||
485 | .Fc | ||
486 | .Ft EC_KEY * | ||
487 | .Fo EC_KEY_copy | ||
488 | .Fa "EC_KEY *dst" | ||
489 | .Fa "const EC_KEY *src" | ||
490 | .Fc | ||
491 | .Ft EC_KEY * | ||
492 | .Fo EC_KEY_dup | ||
493 | .Fa "const EC_KEY *src" | ||
494 | .Fc | ||
495 | .Ft int | ||
496 | .Fo EC_KEY_up_ref | ||
497 | .Fa "EC_KEY *key" | ||
498 | .Fc | ||
499 | .Ft const EC_GROUP * | ||
500 | .Fo EC_KEY_get0_group | ||
501 | .Fa "const EC_KEY *key" | ||
502 | .Fc | ||
503 | .Ft int | ||
504 | .Fo EC_KEY_set_group | ||
505 | .Fa "EC_KEY *key" | ||
506 | .Fa "const EC_GROUP *group" | ||
507 | .Fc | ||
508 | .Ft const BIGNUM * | ||
509 | .Fo EC_KEY_get0_private_key | ||
510 | .Fa "const EC_KEY *key" | ||
511 | .Fc | ||
512 | .Ft int | ||
513 | .Fo EC_KEY_set_private_key | ||
514 | .Fa "EC_KEY *key" | ||
515 | .Fa "const BIGNUM *prv" | ||
516 | .Fc | ||
517 | .Ft const EC_POINT * | ||
518 | .Fo EC_KEY_get0_public_key | ||
519 | .Fa "const EC_KEY *key" | ||
520 | .Fc | ||
521 | .Ft int | ||
522 | .Fo EC_KEY_set_public_key | ||
523 | .Fa "EC_KEY *key" | ||
524 | .Fa "const EC_POINT *pub" | ||
525 | .Fc | ||
526 | .Ft unsigned | ||
527 | .Fo EC_KEY_get_enc_flags | ||
528 | .Fa "const EC_KEY *key" | ||
529 | .Fc | ||
530 | .Ft void | ||
531 | .Fo EC_KEY_set_enc_flags | ||
532 | .Fa "EC_KEY *eckey" | ||
533 | .Fa "unsigned int flags" | ||
534 | .Fc | ||
535 | .Ft point_conversion_form_t | ||
536 | .Fo EC_KEY_get_conv_form | ||
537 | .Fa "const EC_KEY *key" | ||
538 | .Fc | ||
539 | .Ft void | ||
540 | .Fo EC_KEY_set_conv_form | ||
541 | .Fa "EC_KEY *eckey" | ||
542 | .Fa "point_conversion_form_t cform" | ||
543 | .Fc | ||
544 | .Ft void * | ||
545 | .Fo EC_KEY_get_key_method_data | ||
546 | .Fa "EC_KEY *key" | ||
547 | .Fa "void *(*dup_func)(void *)" | ||
548 | .Fa "void (*free_func)(void *)" | ||
549 | .Fa "void (*clear_free_func)(void *)" | ||
550 | .Fc | ||
551 | .Ft void | ||
552 | .Fo EC_KEY_insert_key_method_data | ||
553 | .Fa "EC_KEY *key" | ||
554 | .Fa "void *data" | ||
555 | .Fa "void *(*dup_func)(void *)" | ||
556 | .Fa "void (*free_func)(void *)" | ||
557 | .Fa "void (*clear_free_func)(void *)" | ||
558 | .Fc | ||
559 | .Ft void | ||
560 | .Fo EC_KEY_set_asn1_flag | ||
561 | .Fa "EC_KEY *eckey" | ||
562 | .Fa "int asn1_flag" | ||
563 | .Fc | ||
564 | .Ft int | ||
565 | .Fo EC_KEY_precompute_mult | ||
566 | .Fa "EC_KEY *key" | ||
567 | .Fa "BN_CTX *ctx" | ||
568 | .Fc | ||
569 | .Ft int | ||
570 | .Fo EC_KEY_generate_key | ||
571 | .Fa "EC_KEY *key" | ||
572 | .Fc | ||
573 | .Ft int | ||
574 | .Fo EC_KEY_check_key | ||
575 | .Fa "const EC_KEY *key" | ||
576 | .Fc | ||
577 | .Ft int | ||
578 | .Fo EC_KEY_set_public_key_affine_coordinates | ||
579 | .Fa "EC_KEY *key" | ||
580 | .Fa "BIGNUM *x" | ||
581 | .Fa "BIGNUM *y" | ||
582 | .Fc | ||
583 | .Ft EC_KEY * | ||
584 | .Fo d2i_ECPrivateKey | ||
585 | .Fa "EC_KEY **key" | ||
586 | .Fa "const unsigned char **in" | ||
587 | .Fa "long len" | ||
588 | .Fc | ||
589 | .Ft int | ||
590 | .Fo i2d_ECPrivateKey | ||
591 | .Fa "EC_KEY *key" | ||
592 | .Fa "unsigned char **out" | ||
593 | .Fc | ||
594 | .Ft EC_KEY * | ||
595 | .Fo d2i_ECParameters | ||
596 | .Fa "EC_KEY **key" | ||
597 | .Fa "const unsigned char **in" | ||
598 | .Fa "long len" | ||
599 | .Fc | ||
600 | .Ft int | ||
601 | .Fo i2d_ECParameters | ||
602 | .Fa "EC_KEY *key" | ||
603 | .Fa "unsigned char **out" | ||
604 | .Fc | ||
605 | .Ft EC_KEY * | ||
606 | .Fo o2i_ECPublicKey | ||
607 | .Fa "EC_KEY **key" | ||
608 | .Fa "const unsigned char **in" | ||
609 | .Fa "long len" | ||
610 | .Fc | ||
611 | .Ft int | ||
612 | .Fo i2o_ECPublicKey | ||
613 | .Fa "EC_KEY *key" | ||
614 | .Fa "unsigned char **out" | ||
615 | .Fc | ||
616 | .Ft int | ||
617 | .Fo ECParameters_print | ||
618 | .Fa "BIO *bp" | ||
619 | .Fa "const EC_KEY *key" | ||
620 | .Fc | ||
621 | .Ft int | ||
622 | .Fo EC_KEY_print | ||
623 | .Fa "BIO *bp" | ||
624 | .Fa "const EC_KEY *key" | ||
625 | .Fa "int off" | ||
626 | .Fc | ||
627 | .Ft int | ||
628 | .Fo ECParameters_print_fp | ||
629 | .Fa "FILE *fp" | ||
630 | .Fa "const EC_KEY *key" | ||
631 | .Fc | ||
632 | .Ft int | ||
633 | .Fo EC_KEY_print_fp | ||
634 | .Fa "FILE *fp" | ||
635 | .Fa "const EC_KEY *key" | ||
636 | .Fa "int off" | ||
637 | .Fc | ||
638 | .Ft EC_KEY * | ||
639 | .Fo ECParameters_dup | ||
640 | .Fa "EC_KEY *key" | ||
641 | .Fc | ||
642 | .Fd #define EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid)\ | ||
643 | EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, EVP_PKEY_OP_PARAMGEN,\ | ||
644 | EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID, nid, NULL) | ||
645 | .Sh DESCRIPTION | ||
646 | This library provides an extensive set of functions for performing | ||
647 | operations on elliptic curves over finite fields. | ||
648 | In general an elliptic curve is one with an equation of the form: | ||
649 | .Pp | ||
650 | .Dl y^2 = x^3 + ax + b | ||
651 | .Pp | ||
652 | An | ||
653 | .Vt EC_GROUP | ||
654 | structure is used to represent the definition of an elliptic curve. | ||
655 | Points on a curve are stored using an | ||
656 | .Vt EC_POINT | ||
657 | structure. | ||
658 | An | ||
659 | .Vt EC_KEY | ||
660 | is used to hold a private/public key pair, where a private key is simply a | ||
661 | .Vt BIGNUM | ||
662 | and a public key is a point on a curve represented by an | ||
663 | .Vt EC_POINT . | ||
664 | .Pp | ||
665 | The library contains a number of alternative implementations of the | ||
666 | different functions. | ||
667 | Each implementation is optimised for different scenarios. | ||
668 | No matter which implementation is being used, the interface remains the | ||
669 | same. | ||
670 | The library handles calling the correct implementation when an interface | ||
671 | function is invoked. | ||
672 | An implementation is represented by an | ||
673 | .Vt EC_METHOD | ||
674 | structure. | ||
675 | .Pp | ||
676 | The creation and destruction of | ||
677 | .Vt EC_GROUP | ||
678 | objects is described in | ||
679 | .Xr EC_GROUP_new 3 . | ||
680 | Functions for manipulating | ||
681 | .Vt EC_GROUP | ||
682 | objects are described in | ||
683 | .Xr EC_GROUP_copy 3 . | ||
684 | .Pp | ||
685 | Functions for creating, destroying and manipulating | ||
686 | .Vt EC_POINT | ||
687 | objects are explained in | ||
688 | .Xr EC_POINT_new 3 , | ||
689 | whilst functions for performing mathematical operations and tests on | ||
690 | .Vt EC_POINT Ns s | ||
691 | are coverd in | ||
692 | .Xr EC_POINT_add 3 . | ||
693 | .Pp | ||
694 | For working with private and public keys refer to | ||
695 | .Xr EC_KEY_new 3 . | ||
696 | Implementations are covered in | ||
697 | .Xr EC_GFp_simple_method 3 . | ||
698 | .Pp | ||
699 | For information on encoding and decoding curve parameters to and | ||
700 | from ASN.1 see | ||
701 | .Xr d2i_ECPKParameters 3 . | ||
702 | .Sh SEE ALSO | ||
703 | .Xr crypto 3 , | ||
704 | .Xr d2i_ECPKParameters 3 , | ||
705 | .Xr EC_GFp_simple_method 3 , | ||
706 | .Xr EC_GROUP_copy 3 , | ||
707 | .Xr EC_GROUP_new 3 , | ||
708 | .Xr EC_KEY_new 3 , | ||
709 | .Xr EC_POINT_add 3 , | ||
710 | .Xr EC_POINT_new 3 | ||