1DSA_SIGN(3)                         OpenSSL                        DSA_SIGN(3)
2
3
4

NAME

6       DSA_sign, DSA_sign_setup, DSA_verify - DSA signatures
7

SYNOPSIS

9        #include <openssl/dsa.h>
10
11        int DSA_sign(int type, const unsigned char *dgst, int len,
12                     unsigned char *sigret, unsigned int *siglen, DSA *dsa);
13
14        int DSA_sign_setup(DSA *dsa, BN_CTX *ctx, BIGNUM **kinvp, BIGNUM **rp);
15
16        int DSA_verify(int type, const unsigned char *dgst, int len,
17                       unsigned char *sigbuf, int siglen, DSA *dsa);
18

DESCRIPTION

20       DSA_sign() computes a digital signature on the len byte message digest
21       dgst using the private key dsa and places its ASN.1 DER encoding at
22       sigret. The length of the signature is places in *siglen. sigret must
23       point to DSA_size(dsa) bytes of memory.
24
25       DSA_sign_setup() is defined only for backward binary compatibility and
26       should not be used.  Since OpenSSL 1.1.0 the DSA type is opaque and the
27       output of DSA_sign_setup() cannot be used anyway: calling this function
28       will only cause overhead, and does not affect the actual signature
29       (pre-)computation.
30
31       DSA_verify() verifies that the signature sigbuf of size siglen matches
32       a given message digest dgst of size len.  dsa is the signer's public
33       key.
34
35       The type parameter is ignored.
36
37       The PRNG must be seeded before DSA_sign() (or DSA_sign_setup()) is
38       called.
39

RETURN VALUES

41       DSA_sign() and DSA_sign_setup() return 1 on success, 0 on error.
42       DSA_verify() returns 1 for a valid signature, 0 for an incorrect
43       signature and -1 on error. The error codes can be obtained by
44       ERR_get_error(3).
45

CONFORMING TO

47       US Federal Information Processing Standard FIPS 186 (Digital Signature
48       Standard, DSS), ANSI X9.30
49

SEE ALSO

51       DSA_new(3), ERR_get_error(3), RAND_bytes(3), DSA_do_sign(3)
52
54       Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
55
56       Licensed under the OpenSSL license (the "License").  You may not use
57       this file except in compliance with the License.  You can obtain a copy
58       in the file LICENSE in the source distribution or at
59       <https://www.openssl.org/source/license.html>.
60
61
62
631.1.1                             2018-09-11                       DSA_SIGN(3)
Impressum