diff options
| author | schwarze <> | 2016-11-05 13:36:33 +0000 |
|---|---|---|
| committer | schwarze <> | 2016-11-05 13:36:33 +0000 |
| commit | 8e62e9aee8c25e21cf4f02d5c4002abb67e7f889 (patch) | |
| tree | 7bf60aef63735e9638d12b0d8302b14d9860466e /src/lib/libcrypto/man/dsa.3 | |
| parent | 3c9c85598dca7f716a0da418c2a8b723bb6f3989 (diff) | |
| download | openbsd-8e62e9aee8c25e21cf4f02d5c4002abb67e7f889.tar.gz openbsd-8e62e9aee8c25e21cf4f02d5c4002abb67e7f889.tar.bz2 openbsd-8e62e9aee8c25e21cf4f02d5c4002abb67e7f889.zip | |
convert the remaining manual pages from pod to mdoc
Diffstat (limited to 'src/lib/libcrypto/man/dsa.3')
| -rw-r--r-- | src/lib/libcrypto/man/dsa.3 | 244 |
1 files changed, 244 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/dsa.3 b/src/lib/libcrypto/man/dsa.3 new file mode 100644 index 0000000000..b374f18d27 --- /dev/null +++ b/src/lib/libcrypto/man/dsa.3 | |||
| @@ -0,0 +1,244 @@ | |||
| 1 | .Dd $Mdocdate: November 5 2016 $ | ||
| 2 | .Dt DSA 3 | ||
| 3 | .Os | ||
| 4 | .Sh NAME | ||
| 5 | .Nm dsa | ||
| 6 | .Nd Digital Signature Algorithm | ||
| 7 | .Sh SYNOPSIS | ||
| 8 | .In openssl/dsa.h | ||
| 9 | .In openssl/engine.h | ||
| 10 | .Ft DSA * | ||
| 11 | .Fn DSA_new void | ||
| 12 | .Ft void | ||
| 13 | .Fo DSA_free | ||
| 14 | .Fa "DSA *dsa" | ||
| 15 | .Fc | ||
| 16 | .Ft int | ||
| 17 | .Fo DSA_size | ||
| 18 | .Fa "const DSA *dsa" | ||
| 19 | .Fc | ||
| 20 | .Ft DSA * | ||
| 21 | .Fo DSA_generate_parameters | ||
| 22 | .Fa "int bits" | ||
| 23 | .Fa "unsigned char *seed" | ||
| 24 | .Fa "int seed_len" | ||
| 25 | .Fa "int *counter_ret" | ||
| 26 | .Fa "unsigned long *h_ret" | ||
| 27 | .Fa "void (*callback)(int, int, void *)" | ||
| 28 | .Fa "void *cb_arg" | ||
| 29 | .Fc | ||
| 30 | .Ft DH * | ||
| 31 | .Fo DSA_dup_DH | ||
| 32 | .Fa "const DSA *r" | ||
| 33 | .Fc | ||
| 34 | .Ft int | ||
| 35 | .Fo DSA_generate_key | ||
| 36 | .Fa "DSA *dsa" | ||
| 37 | .Fc | ||
| 38 | .Ft int | ||
| 39 | .Fo DSA_sign | ||
| 40 | .Fa "int dummy" | ||
| 41 | .Fa "const unsigned char *dgst" | ||
| 42 | .Fa "int len" | ||
| 43 | .Fa "unsigned char *sigret" | ||
| 44 | .Fa "unsigned int *siglen" | ||
| 45 | .Fa "DSA *dsa" | ||
| 46 | .Fc | ||
| 47 | .Ft int | ||
| 48 | .Fo DSA_sign_setup | ||
| 49 | .Fa "DSA *dsa" | ||
| 50 | .Fa "BN_CTX *ctx" | ||
| 51 | .Fa "BIGNUM **kinvp" | ||
| 52 | .Fa "BIGNUM **rp" | ||
| 53 | .Fc | ||
| 54 | .Ft int | ||
| 55 | .Fo DSA_verify | ||
| 56 | .Fa "int dummy" | ||
| 57 | .Fa "const unsigned char *dgst" | ||
| 58 | .Fa "int len" | ||
| 59 | .Fa "const unsigned char *sigbuf" | ||
| 60 | .Fa "int siglen" | ||
| 61 | .Fa "DSA *dsa" | ||
| 62 | .Fc | ||
| 63 | .Ft void | ||
| 64 | .Fo DSA_set_default_method | ||
| 65 | .Fa "const DSA_METHOD *meth" | ||
| 66 | .Fc | ||
| 67 | .Ft const DSA_METHOD * | ||
| 68 | .Fn DSA_get_default_method void | ||
| 69 | .Ft int | ||
| 70 | .Fo DSA_set_method | ||
| 71 | .Fa "DSA *dsa" | ||
| 72 | .Fa "const DSA_METHOD *meth" | ||
| 73 | .Fc | ||
| 74 | .Ft DSA * | ||
| 75 | .Fo DSA_new_method | ||
| 76 | .Fa "ENGINE *engine" | ||
| 77 | .Fc | ||
| 78 | .Ft const DSA_METHOD * | ||
| 79 | .Fn DSA_OpenSSL void | ||
| 80 | .Ft int | ||
| 81 | .Fo DSA_get_ex_new_index | ||
| 82 | .Fa "long argl" | ||
| 83 | .Fa "char *argp" | ||
| 84 | .Fa "int (*new_func)()" | ||
| 85 | .Fa "int (*dup_func)()" | ||
| 86 | .Fa "void (*free_func)()" | ||
| 87 | .Fc | ||
| 88 | .Ft int | ||
| 89 | .Fo DSA_set_ex_data | ||
| 90 | .Fa "DSA *d" | ||
| 91 | .Fa "int idx" | ||
| 92 | .Fa "char *arg" | ||
| 93 | .Fc | ||
| 94 | .Ft char * | ||
| 95 | .Fo DSA_get_ex_data | ||
| 96 | .Fa "DSA *d" | ||
| 97 | .Fa "int idx" | ||
| 98 | .Fc | ||
| 99 | .Ft DSA_SIG * | ||
| 100 | .Fn DSA_SIG_new void | ||
| 101 | .Ft void | ||
| 102 | .Fo DSA_SIG_free | ||
| 103 | .Fa "DSA_SIG *a" | ||
| 104 | .Fc | ||
| 105 | .Ft int | ||
| 106 | .Fo i2d_DSA_SIG | ||
| 107 | .Fa "const DSA_SIG *a" | ||
| 108 | .Fa "unsigned char **pp" | ||
| 109 | .Fc | ||
| 110 | .Ft DSA_SIG * | ||
| 111 | .Fo d2i_DSA_SIG | ||
| 112 | .Fa "DSA_SIG **v" | ||
| 113 | .Fa "unsigned char **pp" | ||
| 114 | .Fa "long length" | ||
| 115 | .Fc | ||
| 116 | .Ft DSA_SIG * | ||
| 117 | .Fo DSA_do_sign | ||
| 118 | .Fa "const unsigned char *dgst" | ||
| 119 | .Fa "int dlen" | ||
| 120 | .Fa "DSA *dsa" | ||
| 121 | .Fc | ||
| 122 | .Ft int | ||
| 123 | .Fo DSA_do_verify | ||
| 124 | .Fa "const unsigned char *dgst" | ||
| 125 | .Fa "int dgst_len" | ||
| 126 | .Fa "DSA_SIG *sig" | ||
| 127 | .Fa "DSA *dsa" | ||
| 128 | .Fc | ||
| 129 | .Ft DSA * | ||
| 130 | .Fo d2i_DSAPublicKey | ||
| 131 | .Fa "DSA **a" | ||
| 132 | .Fa "unsigned char **pp" | ||
| 133 | .Fa "long length" | ||
| 134 | .Fc | ||
| 135 | .Ft DSA * | ||
| 136 | .Fo d2i_DSAPrivateKey | ||
| 137 | .Fa "DSA **a" | ||
| 138 | .Fa "unsigned char **pp" | ||
| 139 | .Fa "long length" | ||
| 140 | .Fc | ||
| 141 | .Ft DSA * | ||
| 142 | .Fo d2i_DSAparams | ||
| 143 | .Fa "DSA **a" | ||
| 144 | .Fa "unsigned char **pp" | ||
| 145 | .Fa "long length" | ||
| 146 | .Fc | ||
| 147 | .Ft int | ||
| 148 | .Fo i2d_DSAPublicKey | ||
| 149 | .Fa "const DSA *a" | ||
| 150 | .Fa "unsigned char **pp" | ||
| 151 | .Fc | ||
| 152 | .Ft int | ||
| 153 | .Fo i2d_DSAPrivateKey | ||
| 154 | .Fa "const DSA *a" | ||
| 155 | .Fa "unsigned char **pp" | ||
| 156 | .Fc | ||
| 157 | .Ft int | ||
| 158 | .Fo i2d_DSAparams | ||
| 159 | .Fa "const DSA *a" | ||
| 160 | .Fa "unsigned char **pp" | ||
| 161 | .Fc | ||
| 162 | .Ft int | ||
| 163 | .Fo DSAparams_print | ||
| 164 | .Fa "BIO *bp" | ||
| 165 | .Fa "const DSA *x" | ||
| 166 | .Fc | ||
| 167 | .Ft int | ||
| 168 | .Fo DSAparams_print_fp | ||
| 169 | .Fa "FILE *fp" | ||
| 170 | .Fa "const DSA *x" | ||
| 171 | .Fc | ||
| 172 | .Ft int | ||
| 173 | .Fo DSA_print | ||
| 174 | .Fa "BIO *bp" | ||
| 175 | .Fa "const DSA *x" | ||
| 176 | .Fa "int off" | ||
| 177 | .Fc | ||
| 178 | .Ft int | ||
| 179 | .Fo DSA_print_fp | ||
| 180 | .Fa "FILE *bp" | ||
| 181 | .Fa "const DSA *x" | ||
| 182 | .Fa "int off" | ||
| 183 | .Fc | ||
| 184 | .Sh DESCRIPTION | ||
| 185 | These functions implement the Digital Signature Algorithm (DSA). | ||
| 186 | The generation of shared DSA parameters is described in | ||
| 187 | .Xr DSA_generate_parameters 3 ; | ||
| 188 | .Xr DSA_generate_key 3 | ||
| 189 | describes how to generate a signature key. | ||
| 190 | Signature generation and verification are described in | ||
| 191 | .Xr DSA_sign 3 . | ||
| 192 | .Pp | ||
| 193 | The | ||
| 194 | .Vt DSA | ||
| 195 | structure consists of several BIGNUM components. | ||
| 196 | .Bd -literal | ||
| 197 | typedef struct { | ||
| 198 | BIGNUM *p; // prime number (public) | ||
| 199 | BIGNUM *q; // 160-bit subprime, q | p-1 (public) | ||
| 200 | BIGNUM *g; // generator of subgroup (public) | ||
| 201 | BIGNUM *priv_key; // private key x | ||
| 202 | BIGNUM *pub_key; // public key y = g^x | ||
| 203 | // ... | ||
| 204 | } DSA; | ||
| 205 | .Ed | ||
| 206 | .Pp | ||
| 207 | In public keys, | ||
| 208 | .Fa priv_key | ||
| 209 | is | ||
| 210 | .Dv NULL . | ||
| 211 | .Pp | ||
| 212 | Note that DSA keys may use non-standard | ||
| 213 | .Vt DSA_METHOD | ||
| 214 | implementations, either directly or by the use of | ||
| 215 | .Vt ENGINE | ||
| 216 | modules. | ||
| 217 | In some cases (eg. an | ||
| 218 | .Vt ENGINE | ||
| 219 | providing support for hardware-embedded keys), these | ||
| 220 | .Vt BIGNUM | ||
| 221 | values will not be used by the implementation or may be used for | ||
| 222 | alternative data storage. | ||
| 223 | For this reason, applications should generally avoid using | ||
| 224 | .Vt DSA | ||
| 225 | structure elements directly and instead use API functions to query | ||
| 226 | or modify keys. | ||
| 227 | .Sh SEE ALSO | ||
| 228 | .Xr bn 3 , | ||
| 229 | .Xr dh 3 , | ||
| 230 | .Xr DSA_dup_DH 3 , | ||
| 231 | .Xr DSA_generate_key 3 , | ||
| 232 | .Xr DSA_generate_parameters 3 , | ||
| 233 | .Xr DSA_get_ex_new_index 3 , | ||
| 234 | .Xr DSA_new 3 , | ||
| 235 | .Xr DSA_set_method 3 , | ||
| 236 | .Xr DSA_sign 3 , | ||
| 237 | .Xr DSA_size 3 , | ||
| 238 | .Xr engine 3 , | ||
| 239 | .Xr err 3 , | ||
| 240 | .Xr rsa 3 , | ||
| 241 | .Xr RSA_print 3 | ||
| 242 | .Sh STANDARDS | ||
| 243 | US Federal Information Processing Standard FIPS 186 (Digital Signature | ||
| 244 | Standard, DSS), ANSI X9.30 | ||
