diff options
author | jmc <> | 2016-11-15 09:25:45 +0000 |
---|---|---|
committer | jmc <> | 2016-11-15 09:25:45 +0000 |
commit | 922da778c547aca7b016abc727670321d5df6d46 (patch) | |
tree | cf36370a04527a8f7cee159901a22b366a8ab698 /src/lib/libcrypto | |
parent | 19856caeaf0d2604d70b239a4528136aadac9390 (diff) | |
download | openbsd-922da778c547aca7b016abc727670321d5df6d46.tar.gz openbsd-922da778c547aca7b016abc727670321d5df6d46.tar.bz2 openbsd-922da778c547aca7b016abc727670321d5df6d46.zip |
various cleanup;
Diffstat (limited to 'src/lib/libcrypto')
-rw-r--r-- | src/lib/libcrypto/man/EC_GFp_simple_method.3 | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/man/EC_GROUP_copy.3 | 20 | ||||
-rw-r--r-- | src/lib/libcrypto/man/EC_GROUP_new.3 | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/man/EC_KEY_new.3 | 17 | ||||
-rw-r--r-- | src/lib/libcrypto/man/EC_POINT_add.3 | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/man/EC_POINT_new.3 | 48 |
6 files changed, 54 insertions, 53 deletions
diff --git a/src/lib/libcrypto/man/EC_GFp_simple_method.3 b/src/lib/libcrypto/man/EC_GFp_simple_method.3 index c8c5e9883f..a019e43093 100644 --- a/src/lib/libcrypto/man/EC_GFp_simple_method.3 +++ b/src/lib/libcrypto/man/EC_GFp_simple_method.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: EC_GFp_simple_method.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: EC_GFp_simple_method.3,v 1.3 2016/11/15 09:25:45 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 15 2016 $ |
4 | .Dt EC_GFP_SIMPLE_METHOD 3 | 4 | .Dt EC_GFP_SIMPLE_METHOD 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
@@ -42,7 +42,7 @@ an implementation method must be provided. | |||
42 | The functions described here all return a const pointer to an | 42 | The functions described here all return a const pointer to an |
43 | .Sy EC_METHOD | 43 | .Sy EC_METHOD |
44 | structure that can be passed to | 44 | structure that can be passed to |
45 | .Xr EC_GROUP_new . | 45 | .Xr EC_GROUP_new 3 . |
46 | It is important that the correct implementation type for the form | 46 | It is important that the correct implementation type for the form |
47 | of curve selected is used. | 47 | of curve selected is used. |
48 | .Pp | 48 | .Pp |
@@ -54,7 +54,7 @@ For Fp curves the lowest common denominator implementation is the | |||
54 | implementation. | 54 | implementation. |
55 | All other implementations are based on this one. | 55 | All other implementations are based on this one. |
56 | .Fn EC_GFp_mont_method | 56 | .Fn EC_GFp_mont_method |
57 | adds the use of montgomery multiplication (see | 57 | adds the use of Montgomery multiplication (see |
58 | .Xr BN_mod_mul_montgomery 3 ) . | 58 | .Xr BN_mod_mul_montgomery 3 ) . |
59 | .Fn EC_GFp_nist_method | 59 | .Fn EC_GFp_nist_method |
60 | offers an implementation optimised for use with NIST recommended | 60 | offers an implementation optimised for use with NIST recommended |
@@ -67,7 +67,7 @@ The functions | |||
67 | .Fn EC_GFp_nistp256_method , | 67 | .Fn EC_GFp_nistp256_method , |
68 | and | 68 | and |
69 | .Fn EC_GFp_nistp521_method | 69 | .Fn EC_GFp_nistp521_method |
70 | offer 64 bit optimised implementations for the NIST P224, P256 and | 70 | offer 64-bit optimised implementations for the NIST P224, P256 and |
71 | P521 curves respectively. | 71 | P521 curves respectively. |
72 | Note, however, that these implementations are not available on all | 72 | Note, however, that these implementations are not available on all |
73 | platforms. | 73 | platforms. |
diff --git a/src/lib/libcrypto/man/EC_GROUP_copy.3 b/src/lib/libcrypto/man/EC_GROUP_copy.3 index 25ef67344d..37b3d089bc 100644 --- a/src/lib/libcrypto/man/EC_GROUP_copy.3 +++ b/src/lib/libcrypto/man/EC_GROUP_copy.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: EC_GROUP_copy.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: EC_GROUP_copy.3,v 1.3 2016/11/15 09:25:45 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 15 2016 $ |
4 | .Dt EC_GROUP_COPY 3 | 4 | .Dt EC_GROUP_COPY 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
@@ -173,9 +173,9 @@ of | |||
173 | .Fa group . | 173 | .Fa group . |
174 | .Pp | 174 | .Pp |
175 | .Fn EC_GROUP_set_generator | 175 | .Fn EC_GROUP_set_generator |
176 | sets curve paramaters that must be agreed by all participants using | 176 | sets curve parameters that must be agreed by all participants using |
177 | the curve. | 177 | the curve. |
178 | These paramaters include the | 178 | These parameters include the |
179 | .Fa generator , | 179 | .Fa generator , |
180 | the | 180 | the |
181 | .Fa order | 181 | .Fa order |
@@ -219,8 +219,8 @@ If a curve does not have a NID associated with it, then | |||
219 | will return 0. | 219 | will return 0. |
220 | .Pp | 220 | .Pp |
221 | The asn1_flag value on a curve is used to determine whether there is a | 221 | The asn1_flag value on a curve is used to determine whether there is a |
222 | specific ASN1 OID to describe the curve or not. | 222 | specific ASN.1 OID to describe the curve or not. |
223 | If the asn1_flag is 1 then this is a named curve with an associated ASN1 OID. | 223 | If the asn1_flag is 1 then this is a named curve with an associated ASN.1 OID. |
224 | If not then asn1_flag is 0. | 224 | If not then asn1_flag is 0. |
225 | The functions | 225 | The functions |
226 | .Fn EC_GROUP_get_asn1_flag | 226 | .Fn EC_GROUP_get_asn1_flag |
@@ -231,7 +231,7 @@ If set, then the curve_name must also be set. | |||
231 | .Pp | 231 | .Pp |
232 | The point_conversion_form for a curve controls how | 232 | The point_conversion_form for a curve controls how |
233 | .Vt EC_POINT | 233 | .Vt EC_POINT |
234 | data is encoded as ASN1 as defined in X9.62 (ECDSA). | 234 | data is encoded as ASN.1 as defined in X9.62 (ECDSA). |
235 | .Vt point_conversion_form_t | 235 | .Vt point_conversion_form_t |
236 | is an enum defined as follows: | 236 | is an enum defined as follows: |
237 | .Bd -literal | 237 | .Bd -literal |
@@ -253,7 +253,7 @@ the point is encoded as an octet signifying the UNCOMPRESSED form | |||
253 | has been used followed by the octets for x, followed by the octets | 253 | has been used followed by the octets for x, followed by the octets |
254 | for y. | 254 | for y. |
255 | .Pp | 255 | .Pp |
256 | For any given x co-ordinate for a point on a curve it is possible to | 256 | For any given x coordinate for a point on a curve it is possible to |
257 | derive two possible y values. | 257 | derive two possible y values. |
258 | For | 258 | For |
259 | .Dv POINT_CONVERSION_COMPRESSED | 259 | .Dv POINT_CONVERSION_COMPRESSED |
@@ -294,7 +294,7 @@ It is also possible to set a custom seed using | |||
294 | and passing a pointer to a memory block, along with the length of | 294 | and passing a pointer to a memory block, along with the length of |
295 | the seed. | 295 | the seed. |
296 | Again, the EC library will not use this seed value, although it will be | 296 | Again, the EC library will not use this seed value, although it will be |
297 | preserved in any ASN1 based communications. | 297 | preserved in any ASN.1 based communications. |
298 | .Pp | 298 | .Pp |
299 | .Fn EC_GROUP_get_degree | 299 | .Fn EC_GROUP_get_degree |
300 | gets the degree of the field. | 300 | gets the degree of the field. |
@@ -391,7 +391,7 @@ on error. | |||
391 | .Fn EC_GROUP_get_point_conversion_form , | 391 | .Fn EC_GROUP_get_point_conversion_form , |
392 | and | 392 | and |
393 | .Fn EC_GROUP_get_degree | 393 | .Fn EC_GROUP_get_degree |
394 | return the order, cofactor, curve name (NID), ASN1 flag, | 394 | return the order, cofactor, curve name (NID), ASN.1 flag, |
395 | point_conversion_form and degree for the specified curve, respectively. | 395 | point_conversion_form and degree for the specified curve, respectively. |
396 | If there is no curve name associated with a curve then | 396 | If there is no curve name associated with a curve then |
397 | .Fn EC_GROUP_get_curve_name | 397 | .Fn EC_GROUP_get_curve_name |
diff --git a/src/lib/libcrypto/man/EC_GROUP_new.3 b/src/lib/libcrypto/man/EC_GROUP_new.3 index 6534e8fc99..7fc2b21980 100644 --- a/src/lib/libcrypto/man/EC_GROUP_new.3 +++ b/src/lib/libcrypto/man/EC_GROUP_new.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: EC_GROUP_new.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: EC_GROUP_new.3,v 1.3 2016/11/15 09:25:45 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 15 2016 $ |
4 | .Dt EC_GROUP_NEW 3 | 4 | .Dt EC_GROUP_NEW 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
@@ -197,7 +197,7 @@ typedef struct { | |||
197 | .Pp | 197 | .Pp |
198 | Each | 198 | Each |
199 | .Vt EC_builtin_curve | 199 | .Vt EC_builtin_curve |
200 | item has a unique integer id | 200 | item has a unique integer ID |
201 | .Pq Fa nid | 201 | .Pq Fa nid |
202 | and a human readable comment string describing the curve. | 202 | and a human readable comment string describing the curve. |
203 | .Pp | 203 | .Pp |
diff --git a/src/lib/libcrypto/man/EC_KEY_new.3 b/src/lib/libcrypto/man/EC_KEY_new.3 index dd283cbb80..20fefc7caf 100644 --- a/src/lib/libcrypto/man/EC_KEY_new.3 +++ b/src/lib/libcrypto/man/EC_KEY_new.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: EC_KEY_new.3,v 1.4 2016/11/06 16:54:58 jmc Exp $ | 1 | .\" $OpenBSD: EC_KEY_new.3,v 1.5 2016/11/15 09:25:45 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 15 2016 $ |
4 | .Dt EC_KEY_NEW 3 | 4 | .Dt EC_KEY_NEW 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
@@ -204,7 +204,7 @@ Calling | |||
204 | .Fn EC_KEY_free | 204 | .Fn EC_KEY_free |
205 | decrements the reference count for the | 205 | decrements the reference count for the |
206 | .Vt EC_KEY | 206 | .Vt EC_KEY |
207 | object, and if it has dropped to zero, then frees the memory associated | 207 | object and, if it has dropped to zero, then frees the memory associated |
208 | with it. | 208 | with it. |
209 | .Pp | 209 | .Pp |
210 | .Fn EC_KEY_copy | 210 | .Fn EC_KEY_copy |
@@ -291,7 +291,7 @@ and | |||
291 | .Dv EC_PKEY_NO_PUBKEY . | 291 | .Dv EC_PKEY_NO_PUBKEY . |
292 | These flags define the behaviour of how the | 292 | These flags define the behaviour of how the |
293 | .Fa key | 293 | .Fa key |
294 | is converted into ASN1 in a call to | 294 | is converted into ASN.1 in a call to |
295 | .Fn i2d_ECPrivateKey . | 295 | .Fn i2d_ECPrivateKey . |
296 | If | 296 | If |
297 | .Dv EC_PKEY_NO_PARAMETERS | 297 | .Dv EC_PKEY_NO_PARAMETERS |
@@ -308,8 +308,8 @@ and | |||
308 | .Fn EC_KEY_set_conv_form | 308 | .Fn EC_KEY_set_conv_form |
309 | get and set the point_conversion_form for the | 309 | get and set the point_conversion_form for the |
310 | .Fa key . | 310 | .Fa key . |
311 | For a description of point_conversion_forms please refer to | 311 | For a description of point_conversion_form please refer to |
312 | .Xr EC_POINT_new 3 . | 312 | .Xr EC_GROUP_copy 3 . |
313 | .Pp | 313 | .Pp |
314 | .Fn EC_KEY_insert_key_method_data | 314 | .Fn EC_KEY_insert_key_method_data |
315 | and | 315 | and |
@@ -318,7 +318,7 @@ enable the caller to associate arbitrary additional data specific | |||
318 | to the elliptic curve scheme being used with the | 318 | to the elliptic curve scheme being used with the |
319 | .Vt EC_KEY | 319 | .Vt EC_KEY |
320 | object. | 320 | object. |
321 | This data is treated as a "black box" by the ec library. | 321 | This data is treated as a "black box" by the EC library. |
322 | The data to be stored by | 322 | The data to be stored by |
323 | .Fn EC_KEY_insert_key_method_data | 323 | .Fn EC_KEY_insert_key_method_data |
324 | is provided in the | 324 | is provided in the |
@@ -392,7 +392,8 @@ spaces. | |||
392 | and | 392 | and |
393 | .Fn EC_KEY_dup | 393 | .Fn EC_KEY_dup |
394 | return a pointer to the newly created | 394 | return a pointer to the newly created |
395 | .Vt EC_KEY object or | 395 | .Vt EC_KEY object |
396 | or | ||
396 | .Dv NULL | 397 | .Dv NULL |
397 | on error. | 398 | on error. |
398 | .Pp | 399 | .Pp |
diff --git a/src/lib/libcrypto/man/EC_POINT_add.3 b/src/lib/libcrypto/man/EC_POINT_add.3 index e432dd5757..782bf5a578 100644 --- a/src/lib/libcrypto/man/EC_POINT_add.3 +++ b/src/lib/libcrypto/man/EC_POINT_add.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: EC_POINT_add.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: EC_POINT_add.3,v 1.3 2016/11/15 09:25:45 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 15 2016 $ |
4 | .Dt EC_POINT_ADD 3 | 4 | .Dt EC_POINT_ADD 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
@@ -143,7 +143,7 @@ The functions | |||
143 | and | 143 | and |
144 | .Fn EC_POINTs_make_affine | 144 | .Fn EC_POINTs_make_affine |
145 | force the internal representation of the | 145 | force the internal representation of the |
146 | .Vt EC_POINT Ns (s) | 146 | .Vt EC_POINT Ns s |
147 | into the affine coordinate system. | 147 | into the affine coordinate system. |
148 | In the case of | 148 | In the case of |
149 | .Fn EC_POINTs_make_affine , | 149 | .Fn EC_POINTs_make_affine , |
diff --git a/src/lib/libcrypto/man/EC_POINT_new.3 b/src/lib/libcrypto/man/EC_POINT_new.3 index 7ece11bb6a..f31b2f881c 100644 --- a/src/lib/libcrypto/man/EC_POINT_new.3 +++ b/src/lib/libcrypto/man/EC_POINT_new.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: EC_POINT_new.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: EC_POINT_new.3,v 1.3 2016/11/15 09:25:45 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 15 2016 $ |
4 | .Dt EC_POINT_NEW 3 | 4 | .Dt EC_POINT_NEW 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
@@ -11,13 +11,13 @@ | |||
11 | .Nm EC_POINT_dup , | 11 | .Nm EC_POINT_dup , |
12 | .Nm EC_POINT_method_of , | 12 | .Nm EC_POINT_method_of , |
13 | .Nm EC_POINT_set_to_infinity , | 13 | .Nm EC_POINT_set_to_infinity , |
14 | .Nm EC_POINT_set_Jprojective_coordinates , | ||
15 | .Nm EC_POINT_get_Jprojective_coordinates_GFp , | ||
16 | .Nm EC_POINT_set_affine_coordinates_GFp , | 14 | .Nm EC_POINT_set_affine_coordinates_GFp , |
17 | .Nm EC_POINT_get_affine_coordinates_GFp , | ||
18 | .Nm EC_POINT_set_compressed_coordinates_GFp , | ||
19 | .Nm EC_POINT_set_affine_coordinates_GF2m , | 15 | .Nm EC_POINT_set_affine_coordinates_GF2m , |
16 | .Nm EC_POINT_get_affine_coordinates_GFp , | ||
20 | .Nm EC_POINT_get_affine_coordinates_GF2m , | 17 | .Nm EC_POINT_get_affine_coordinates_GF2m , |
18 | .Nm EC_POINT_set_Jprojective_coordinates , | ||
19 | .Nm EC_POINT_get_Jprojective_coordinates_GFp , | ||
20 | .Nm EC_POINT_set_compressed_coordinates_GFp , | ||
21 | .Nm EC_POINT_set_compressed_coordinates_GF2m , | 21 | .Nm EC_POINT_set_compressed_coordinates_GF2m , |
22 | .Nm EC_POINT_point2oct , | 22 | .Nm EC_POINT_point2oct , |
23 | .Nm EC_POINT_oct2point , | 23 | .Nm EC_POINT_oct2point , |
@@ -61,25 +61,15 @@ | |||
61 | .Fa "EC_POINT *point" | 61 | .Fa "EC_POINT *point" |
62 | .Fc | 62 | .Fc |
63 | .Ft int | 63 | .Ft int |
64 | .Fo EC_POINT_set_Jprojective_coordinates_GFp | 64 | .Fo EC_POINT_set_affine_coordinates_GFp |
65 | .Fa "const EC_GROUP *group" | 65 | .Fa "const EC_GROUP *group" |
66 | .Fa "EC_POINT *p" | 66 | .Fa "EC_POINT *p" |
67 | .Fa "const BIGNUM *x" | 67 | .Fa "const BIGNUM *x" |
68 | .Fa "const BIGNUM *y" | 68 | .Fa "const BIGNUM *y" |
69 | .Fa "const BIGNUM *z" | ||
70 | .Fa "BN_CTX *ctx" | 69 | .Fa "BN_CTX *ctx" |
71 | .Fc | 70 | .Fc |
72 | .Ft int | 71 | .Ft int |
73 | .Fo EC_POINT_get_Jprojective_coordinates_GFp | 72 | .Fo EC_POINT_set_affine_coordinates_GF2m |
74 | .Fa "const EC_GROUP *group" | ||
75 | .Fa "const EC_POINT *p" | ||
76 | .Fa "BIGNUM *x" | ||
77 | .Fa "BIGNUM *y" | ||
78 | .Fa "BIGNUM *z" | ||
79 | .Fa "BN_CTX *ctx" | ||
80 | .Fc | ||
81 | .Ft int | ||
82 | .Fo EC_POINT_set_affine_coordinates_GFp | ||
83 | .Fa "const EC_GROUP *group" | 73 | .Fa "const EC_GROUP *group" |
84 | .Fa "EC_POINT *p" | 74 | .Fa "EC_POINT *p" |
85 | .Fa "const BIGNUM *x" | 75 | .Fa "const BIGNUM *x" |
@@ -95,27 +85,37 @@ | |||
95 | .Fa "BN_CTX *ctx" | 85 | .Fa "BN_CTX *ctx" |
96 | .Fc | 86 | .Fc |
97 | .Ft int | 87 | .Ft int |
98 | .Fo EC_POINT_set_compressed_coordinates_GFp | 88 | .Fo EC_POINT_get_affine_coordinates_GF2m |
99 | .Fa "const EC_GROUP *group" | 89 | .Fa "const EC_GROUP *group" |
100 | .Fa "EC_POINT *p" | 90 | .Fa "const EC_POINT *p" |
101 | .Fa "const BIGNUM *x" | 91 | .Fa "BIGNUM *x" |
102 | .Fa "int y_bit" | 92 | .Fa "BIGNUM *y" |
103 | .Fa "BN_CTX *ctx" | 93 | .Fa "BN_CTX *ctx" |
104 | .Fc | 94 | .Fc |
105 | .Ft int | 95 | .Ft int |
106 | .Fo EC_POINT_set_affine_coordinates_GF2m | 96 | .Fo EC_POINT_set_Jprojective_coordinates_GFp |
107 | .Fa "const EC_GROUP *group" | 97 | .Fa "const EC_GROUP *group" |
108 | .Fa "EC_POINT *p" | 98 | .Fa "EC_POINT *p" |
109 | .Fa "const BIGNUM *x" | 99 | .Fa "const BIGNUM *x" |
110 | .Fa "const BIGNUM *y" | 100 | .Fa "const BIGNUM *y" |
101 | .Fa "const BIGNUM *z" | ||
111 | .Fa "BN_CTX *ctx" | 102 | .Fa "BN_CTX *ctx" |
112 | .Fc | 103 | .Fc |
113 | .Ft int | 104 | .Ft int |
114 | .Fo EC_POINT_get_affine_coordinates_GF2m | 105 | .Fo EC_POINT_get_Jprojective_coordinates_GFp |
115 | .Fa "const EC_GROUP *group" | 106 | .Fa "const EC_GROUP *group" |
116 | .Fa "const EC_POINT *p" | 107 | .Fa "const EC_POINT *p" |
117 | .Fa "BIGNUM *x" | 108 | .Fa "BIGNUM *x" |
118 | .Fa "BIGNUM *y" | 109 | .Fa "BIGNUM *y" |
110 | .Fa "BIGNUM *z" | ||
111 | .Fa "BN_CTX *ctx" | ||
112 | .Fc | ||
113 | .Ft int | ||
114 | .Fo EC_POINT_set_compressed_coordinates_GFp | ||
115 | .Fa "const EC_GROUP *group" | ||
116 | .Fa "EC_POINT *p" | ||
117 | .Fa "const BIGNUM *x" | ||
118 | .Fa "int y_bit" | ||
119 | .Fa "BN_CTX *ctx" | 119 | .Fa "BN_CTX *ctx" |
120 | .Fc | 120 | .Fc |
121 | .Ft int | 121 | .Ft int |