diff options
| author | jmc <> | 2016-11-14 18:23:30 +0000 |
|---|---|---|
| committer | jmc <> | 2016-11-14 18:23:30 +0000 |
| commit | 3988573841e47bf4c605c330ff2bd2c40aaa8909 (patch) | |
| tree | c08b7bb999d24496bf06dbba6f23a977628e6d18 /src | |
| parent | 79b109d4b55ab409a45d94d3df5c03963c7bdc2f (diff) | |
| download | openbsd-3988573841e47bf4c605c330ff2bd2c40aaa8909.tar.gz openbsd-3988573841e47bf4c605c330ff2bd2c40aaa8909.tar.bz2 openbsd-3988573841e47bf4c605c330ff2bd2c40aaa8909.zip | |
various cleanup;
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/man/ECDSA_SIG_new.3 | 98 |
1 files changed, 50 insertions, 48 deletions
diff --git a/src/lib/libcrypto/man/ECDSA_SIG_new.3 b/src/lib/libcrypto/man/ECDSA_SIG_new.3 index cc5bcd8d3a..d71d8d6133 100644 --- a/src/lib/libcrypto/man/ECDSA_SIG_new.3 +++ b/src/lib/libcrypto/man/ECDSA_SIG_new.3 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | .\" $OpenBSD: ECDSA_SIG_new.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: ECDSA_SIG_new.3,v 1.3 2016/11/14 18:23:30 jmc Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 14 2016 $ |
| 4 | .Dt ECDSA_SIG_NEW 3 | 4 | .Dt ECDSA_SIG_NEW 3 |
| 5 | .Os | 5 | .Os |
| 6 | .Sh NAME | 6 | .Sh NAME |
| @@ -45,26 +45,9 @@ | |||
| 45 | .Fa "const unsigned char **pp" | 45 | .Fa "const unsigned char **pp" |
| 46 | .Fa "long len" | 46 | .Fa "long len" |
| 47 | .Fc | 47 | .Fc |
| 48 | .Ft ECDSA_SIG* | ||
| 49 | .Fo ECDSA_do_sign | ||
| 50 | .Fa "const unsigned char *dgst" | ||
| 51 | .Fa "int dgst_len" | ||
| 52 | .Fa "EC_KEY *eckey" | ||
| 53 | .Fc | ||
| 54 | .Ft ECDSA_SIG* | ||
| 55 | .Fo ECDSA_do_sign_ex | ||
| 56 | .Fa "const unsigned char *dgst" | ||
| 57 | .Fa "int dgstlen" | ||
| 58 | .Fa "const BIGNUM *kinv" | ||
| 59 | .Fa "const BIGNUM *rp" | ||
| 60 | .Fa "EC_KEY *eckey" | ||
| 61 | .Fc | ||
| 62 | .Ft int | 48 | .Ft int |
| 63 | .Fo ECDSA_do_verify | 49 | .Fo ECDSA_size |
| 64 | .Fa "const unsigned char *dgst" | 50 | .Fa "const EC_KEY *eckey" |
| 65 | .Fa "int dgst_len" | ||
| 66 | .Fa "const ECDSA_SIG *sig" | ||
| 67 | .Fa "EC_KEY* eckey" | ||
| 68 | .Fc | 51 | .Fc |
| 69 | .Ft int | 52 | .Ft int |
| 70 | .Fo ECDSA_sign_setup | 53 | .Fo ECDSA_sign_setup |
| @@ -102,26 +85,39 @@ | |||
| 102 | .Fa "int siglen" | 85 | .Fa "int siglen" |
| 103 | .Fa "EC_KEY *eckey" | 86 | .Fa "EC_KEY *eckey" |
| 104 | .Fc | 87 | .Fc |
| 88 | .Ft ECDSA_SIG* | ||
| 89 | .Fo ECDSA_do_sign | ||
| 90 | .Fa "const unsigned char *dgst" | ||
| 91 | .Fa "int dgst_len" | ||
| 92 | .Fa "EC_KEY *eckey" | ||
| 93 | .Fc | ||
| 94 | .Ft ECDSA_SIG* | ||
| 95 | .Fo ECDSA_do_sign_ex | ||
| 96 | .Fa "const unsigned char *dgst" | ||
| 97 | .Fa "int dgstlen" | ||
| 98 | .Fa "const BIGNUM *kinv" | ||
| 99 | .Fa "const BIGNUM *rp" | ||
| 100 | .Fa "EC_KEY *eckey" | ||
| 101 | .Fc | ||
| 105 | .Ft int | 102 | .Ft int |
| 106 | .Fo ECDSA_size | 103 | .Fo ECDSA_do_verify |
| 107 | .Fa "const EC_KEY *eckey" | 104 | .Fa "const unsigned char *dgst" |
| 105 | .Fa "int dgst_len" | ||
| 106 | .Fa "const ECDSA_SIG *sig" | ||
| 107 | .Fa "EC_KEY* eckey" | ||
| 108 | .Fc | 108 | .Fc |
| 109 | .Ft const ECDSA_METHOD* | 109 | .Ft const ECDSA_METHOD* |
| 110 | .Fo ECDSA_OpenSSL | 110 | .Fo ECDSA_OpenSSL |
| 111 | .Fa void | 111 | .Fa void |
| 112 | .Fc | 112 | .Fc |
| 113 | .Ft void | ||
| 114 | .Fo ECDSA_set_default_method | ||
| 115 | .Fa "const ECDSA_METHOD *meth" | ||
| 116 | .Fc | ||
| 117 | .Ft const ECDSA_METHOD* | 113 | .Ft const ECDSA_METHOD* |
| 118 | .Fo ECDSA_get_default_method | 114 | .Fo ECDSA_get_default_method |
| 119 | .Fa void | 115 | .Fa void |
| 120 | .Fc | 116 | .Fc |
| 121 | .Ft int | 117 | .Ft void* |
| 122 | .Fo ECDSA_set_method | 118 | .Fo ECDSA_get_ex_data |
| 123 | .Fa "EC_KEY *eckey" | 119 | .Fa "EC_KEY *d" |
| 124 | .Fa "const ECDSA_METHOD *meth" | 120 | .Fa "int idx" |
| 125 | .Fc | 121 | .Fc |
| 126 | .Ft int | 122 | .Ft int |
| 127 | .Fo ECDSA_get_ex_new_index | 123 | .Fo ECDSA_get_ex_new_index |
| @@ -131,16 +127,20 @@ | |||
| 131 | .Fa "CRYPTO_EX_dup *dup_func" | 127 | .Fa "CRYPTO_EX_dup *dup_func" |
| 132 | .Fa "CRYPTO_EX_free *free_func" | 128 | .Fa "CRYPTO_EX_free *free_func" |
| 133 | .Fc | 129 | .Fc |
| 130 | .Ft void | ||
| 131 | .Fo ECDSA_set_default_method | ||
| 132 | .Fa "const ECDSA_METHOD *meth" | ||
| 133 | .Fc | ||
| 134 | .Ft int | 134 | .Ft int |
| 135 | .Fo ECDSA_set_ex_data | 135 | .Fo ECDSA_set_ex_data |
| 136 | .Fa "EC_KEY *d" | 136 | .Fa "EC_KEY *d" |
| 137 | .Fa "int idx" | 137 | .Fa "int idx" |
| 138 | .Fa "void *arg" | 138 | .Fa "void *arg" |
| 139 | .Fc | 139 | .Fc |
| 140 | .Ft void* | 140 | .Ft int |
| 141 | .Fo ECDSA_get_ex_data | 141 | .Fo ECDSA_set_method |
| 142 | .Fa "EC_KEY *d" | 142 | .Fa "EC_KEY *eckey" |
| 143 | .Fa "int idx" | 143 | .Fa "const ECDSA_METHOD *meth" |
| 144 | .Fc | 144 | .Fc |
| 145 | .Sh DESCRIPTION | 145 | .Sh DESCRIPTION |
| 146 | The | 146 | The |
| @@ -182,21 +182,21 @@ and writes the encoded signature to | |||
| 182 | is | 182 | is |
| 183 | .Dv NULL , | 183 | .Dv NULL , |
| 184 | .Fn i2d_ECDSA_SIG | 184 | .Fn i2d_ECDSA_SIG |
| 185 | returns the expected length in bytes of the DER encoded signature). | 185 | returns the expected length in bytes of the DER-encoded signature). |
| 186 | .Fn i2d_ECDSA_SIG | 186 | .Fn i2d_ECDSA_SIG |
| 187 | returns the length of the DER encoded signature (or 0 on error). | 187 | returns the length of the DER-encoded signature (or 0 on error). |
| 188 | .Pp | 188 | .Pp |
| 189 | .Fn d2i_ECDSA_SIG | 189 | .Fn d2i_ECDSA_SIG |
| 190 | decodes a DER encoded ECDSA signature and returns the decoded signature | 190 | decodes a DER-encoded ECDSA signature and returns the decoded signature |
| 191 | in a newly allocated | 191 | in a newly allocated |
| 192 | .Vt ECDSA_SIG | 192 | .Vt ECDSA_SIG |
| 193 | structure. | 193 | structure. |
| 194 | .Fa *sig | 194 | .Fa *sig |
| 195 | points to the buffer containing the DER encoded signature of size | 195 | points to the buffer containing the DER-encoded signature of size |
| 196 | .Fa len . | 196 | .Fa len . |
| 197 | .Pp | 197 | .Pp |
| 198 | .Fn ECDSA_size | 198 | .Fn ECDSA_size |
| 199 | returns the maximum length of a DER encoded ECDSA signature created with | 199 | returns the maximum length of a DER-encoded ECDSA signature created with |
| 200 | the private EC key | 200 | the private EC key |
| 201 | .Fa eckey . | 201 | .Fa eckey . |
| 202 | .Pp | 202 | .Pp |
| @@ -209,7 +209,7 @@ is a pointer to a | |||
| 209 | .Vt BN_CTX | 209 | .Vt BN_CTX |
| 210 | structure (or | 210 | structure (or |
| 211 | .Dv NULL ) . | 211 | .Dv NULL ) . |
| 212 | The precomputed values or returned in | 212 | The precomputed values are returned in |
| 213 | .Fa kinv | 213 | .Fa kinv |
| 214 | and | 214 | and |
| 215 | .Fa rp | 215 | .Fa rp |
| @@ -219,7 +219,7 @@ or | |||
| 219 | .Fa ECDSA_do_sign_ex . | 219 | .Fa ECDSA_do_sign_ex . |
| 220 | .Pp | 220 | .Pp |
| 221 | .Fn ECDSA_sign | 221 | .Fn ECDSA_sign |
| 222 | is wrapper function for | 222 | is a wrapper function for |
| 223 | .Fa ECDSA_sign_ex | 223 | .Fa ECDSA_sign_ex |
| 224 | with | 224 | with |
| 225 | .Fa kinv | 225 | .Fa kinv |
| @@ -239,7 +239,7 @@ and the optional pre-computed values | |||
| 239 | .Fa kinv | 239 | .Fa kinv |
| 240 | and | 240 | and |
| 241 | .Fa rp . | 241 | .Fa rp . |
| 242 | The DER encoded signatures is stored in | 242 | The DER-encoded signature is stored in |
| 243 | .Fa sig | 243 | .Fa sig |
| 244 | and its length is returned in | 244 | and its length is returned in |
| 245 | .Fa siglen . | 245 | .Fa siglen . |
| @@ -268,7 +268,9 @@ The parameter | |||
| 268 | is ignored. | 268 | is ignored. |
| 269 | .Pp | 269 | .Pp |
| 270 | .Fn ECDSA_do_sign | 270 | .Fn ECDSA_do_sign |
| 271 | is wrapper function for ECDSA_do_sign_ex with | 271 | is a wrapper function for |
| 272 | .Fn ECDSA_do_sign_ex | ||
| 273 | with | ||
| 272 | .Fa kinv | 274 | .Fa kinv |
| 273 | and | 275 | and |
| 274 | .Fa rp | 276 | .Fa rp |
| @@ -318,10 +320,10 @@ error. | |||
| 318 | The error codes can be obtained by | 320 | The error codes can be obtained by |
| 319 | .Xr ERR_get_error 3 . | 321 | .Xr ERR_get_error 3 . |
| 320 | .Sh EXAMPLES | 322 | .Sh EXAMPLES |
| 321 | Creating a ECDSA signature of given SHA-1 hash value using the named | 323 | Creating an ECDSA signature of given SHA-1 hash value using the named |
| 322 | curve secp192k1. | 324 | curve secp192k1. |
| 323 | .Pp | 325 | .Pp |
| 324 | First step: Create an | 326 | First step: create an |
| 325 | .Vt EC_KEY | 327 | .Vt EC_KEY |
| 326 | object. | 328 | object. |
| 327 | This part is | 329 | This part is |
| @@ -364,7 +366,7 @@ if (!ECDSA_sign(0, dgst, dgstlen, pp, &buf_len, eckey) { | |||
| 364 | } | 366 | } |
| 365 | .Ed | 367 | .Ed |
| 366 | .Pp | 368 | .Pp |
| 367 | Third step: Verify the created ECDSA signature using | 369 | Third step: verify the created ECDSA signature using |
| 368 | .Fn ECDSA_do_verify | 370 | .Fn ECDSA_do_verify |
| 369 | .Pp | 371 | .Pp |
| 370 | .Dl ret = ECDSA_do_verify(digest, 20, sig, eckey); | 372 | .Dl ret = ECDSA_do_verify(digest, 20, sig, eckey); |
| @@ -392,7 +394,7 @@ if (ret == -1) { | |||
| 392 | ANSI X9.62, US Federal Information Processing Standard FIPS 186-2 | 394 | ANSI X9.62, US Federal Information Processing Standard FIPS 186-2 |
| 393 | (Digital Signature Standard, DSS) | 395 | (Digital Signature Standard, DSS) |
| 394 | .Sh HISTORY | 396 | .Sh HISTORY |
| 395 | The ecdsa implementation was first introduced in OpenSSL 0.9.8. | 397 | The ECDSA implementation was first introduced in OpenSSL 0.9.8. |
| 396 | .Sh AUTHORS | 398 | .Sh AUTHORS |
| 397 | .An Nils Larsch | 399 | .An Nils Larsch |
| 398 | for the OpenSSL project. | 400 | for the OpenSSL project. |
