diff options
| author | cvs2svn <admin@example.com> | 2002-05-15 02:29:24 +0000 |
|---|---|---|
| committer | cvs2svn <admin@example.com> | 2002-05-15 02:29:24 +0000 |
| commit | 027351f729b9e837200dae6e1520cda6577ab930 (patch) | |
| tree | e25a717057aa4529e433fc3b1fac8d4df8db3a5c /src/lib/libcrypto/doc/dsa.pod | |
| parent | aeeae06a79815dc190061534d47236cec09f9e32 (diff) | |
| download | openbsd-027351f729b9e837200dae6e1520cda6577ab930.tar.gz openbsd-027351f729b9e837200dae6e1520cda6577ab930.tar.bz2 openbsd-027351f729b9e837200dae6e1520cda6577ab930.zip | |
This commit was manufactured by cvs2git to create branch 'unlabeled-1.1.1'.
Diffstat (limited to 'src/lib/libcrypto/doc/dsa.pod')
| -rw-r--r-- | src/lib/libcrypto/doc/dsa.pod | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/src/lib/libcrypto/doc/dsa.pod b/src/lib/libcrypto/doc/dsa.pod new file mode 100644 index 0000000000..2c09244899 --- /dev/null +++ b/src/lib/libcrypto/doc/dsa.pod | |||
| @@ -0,0 +1,104 @@ | |||
| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | dsa - Digital Signature Algorithm | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | #include <openssl/dsa.h> | ||
| 10 | |||
| 11 | DSA * DSA_new(void); | ||
| 12 | void DSA_free(DSA *dsa); | ||
| 13 | |||
| 14 | int DSA_size(DSA *dsa); | ||
| 15 | |||
| 16 | DSA * DSA_generate_parameters(int bits, unsigned char *seed, | ||
| 17 | int seed_len, int *counter_ret, unsigned long *h_ret, | ||
| 18 | void (*callback)(int, int, void *), void *cb_arg); | ||
| 19 | |||
| 20 | DH * DSA_dup_DH(DSA *r); | ||
| 21 | |||
| 22 | int DSA_generate_key(DSA *dsa); | ||
| 23 | |||
| 24 | int DSA_sign(int dummy, const unsigned char *dgst, int len, | ||
| 25 | unsigned char *sigret, unsigned int *siglen, DSA *dsa); | ||
| 26 | int DSA_sign_setup(DSA *dsa, BN_CTX *ctx, BIGNUM **kinvp, | ||
| 27 | BIGNUM **rp); | ||
| 28 | int DSA_verify(int dummy, const unsigned char *dgst, int len, | ||
| 29 | unsigned char *sigbuf, int siglen, DSA *dsa); | ||
| 30 | |||
| 31 | void DSA_set_default_method(DSA_METHOD *meth); | ||
| 32 | DSA_METHOD *DSA_get_default_method(void); | ||
| 33 | DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *meth); | ||
| 34 | DSA *DSA_new_method(DSA_METHOD *meth); | ||
| 35 | DSA_METHOD *DSA_OpenSSL(void); | ||
| 36 | |||
| 37 | int DSA_get_ex_new_index(long argl, char *argp, int (*new_func)(), | ||
| 38 | int (*dup_func)(), void (*free_func)()); | ||
| 39 | int DSA_set_ex_data(DSA *d, int idx, char *arg); | ||
| 40 | char *DSA_get_ex_data(DSA *d, int idx); | ||
| 41 | |||
| 42 | DSA_SIG *DSA_SIG_new(void); | ||
| 43 | void DSA_SIG_free(DSA_SIG *a); | ||
| 44 | int i2d_DSA_SIG(DSA_SIG *a, unsigned char **pp); | ||
| 45 | DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, unsigned char **pp, long length); | ||
| 46 | |||
| 47 | DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa); | ||
| 48 | int DSA_do_verify(const unsigned char *dgst, int dgst_len, | ||
| 49 | DSA_SIG *sig, DSA *dsa); | ||
| 50 | |||
| 51 | DSA * d2i_DSAPublicKey(DSA **a, unsigned char **pp, long length); | ||
| 52 | DSA * d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length); | ||
| 53 | DSA * d2i_DSAparams(DSA **a, unsigned char **pp, long length); | ||
| 54 | int i2d_DSAPublicKey(DSA *a, unsigned char **pp); | ||
| 55 | int i2d_DSAPrivateKey(DSA *a, unsigned char **pp); | ||
| 56 | int i2d_DSAparams(DSA *a,unsigned char **pp); | ||
| 57 | |||
| 58 | int DSAparams_print(BIO *bp, DSA *x); | ||
| 59 | int DSAparams_print_fp(FILE *fp, DSA *x); | ||
| 60 | int DSA_print(BIO *bp, DSA *x, int off); | ||
| 61 | int DSA_print_fp(FILE *bp, DSA *x, int off); | ||
| 62 | |||
| 63 | =head1 DESCRIPTION | ||
| 64 | |||
| 65 | These functions implement the Digital Signature Algorithm (DSA). The | ||
| 66 | generation of shared DSA parameters is described in | ||
| 67 | L<DSA_generate_parameters(3)|DSA_generate_parameters(3)>; | ||
| 68 | L<DSA_generate_key(3)|DSA_generate_key(3)> describes how to | ||
| 69 | generate a signature key. Signature generation and verification are | ||
| 70 | described in L<DSA_sign(3)|DSA_sign(3)>. | ||
| 71 | |||
| 72 | The B<DSA> structure consists of several BIGNUM components. | ||
| 73 | |||
| 74 | struct | ||
| 75 | { | ||
| 76 | BIGNUM *p; // prime number (public) | ||
| 77 | BIGNUM *q; // 160-bit subprime, q | p-1 (public) | ||
| 78 | BIGNUM *g; // generator of subgroup (public) | ||
| 79 | BIGNUM *priv_key; // private key x | ||
| 80 | BIGNUM *pub_key; // public key y = g^x | ||
| 81 | // ... | ||
| 82 | } | ||
| 83 | DSA; | ||
| 84 | |||
| 85 | In public keys, B<priv_key> is NULL. | ||
| 86 | |||
| 87 | =head1 CONFORMING TO | ||
| 88 | |||
| 89 | US Federal Information Processing Standard FIPS 186 (Digital Signature | ||
| 90 | Standard, DSS), ANSI X9.30 | ||
| 91 | |||
| 92 | =head1 SEE ALSO | ||
| 93 | |||
| 94 | L<bn(3)|bn(3)>, L<dh(3)|dh(3)>, L<err(3)|err(3)>, L<rand(3)|rand(3)>, | ||
| 95 | L<rsa(3)|rsa(3)>, L<sha(3)|sha(3)>, L<DSA_new(3)|DSA_new(3)>, | ||
| 96 | L<DSA_size(3)|DSA_size(3)>, | ||
| 97 | L<DSA_generate_parameters(3)|DSA_generate_parameters(3)>, | ||
| 98 | L<DSA_dup_DH(3)|DSA_dup_DH(3)>, | ||
| 99 | L<DSA_generate_key(3)|DSA_generate_key(3)>, | ||
| 100 | L<DSA_sign(3)|DSA_sign(3)>, L<DSA_set_method(3)|DSA_set_method(3)>, | ||
| 101 | L<DSA_get_ex_new_index(3)|DSA_get_ex_new_index(3)>, | ||
| 102 | L<RSA_print(3)|RSA_print(3)> | ||
| 103 | |||
| 104 | =cut | ||
