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

NAME

6       DSA_sign, DSA_sign_setup, DSA_verify - DSA signatures
7

SYNOPSIS

9        #include <openssl/dsa.h>
10
11       The following functions have been deprecated since OpenSSL 3.0, and can
12       be hidden entirely by defining OPENSSL_API_COMPAT with a suitable
13       version value, see openssl_user_macros(7):
14
15        int DSA_sign(int type, const unsigned char *dgst, int len,
16                     unsigned char *sigret, unsigned int *siglen, DSA *dsa);
17
18        int DSA_sign_setup(DSA *dsa, BN_CTX *ctx, BIGNUM **kinvp, BIGNUM **rp);
19
20        int DSA_verify(int type, const unsigned char *dgst, int len,
21                       unsigned char *sigbuf, int siglen, DSA *dsa);
22

DESCRIPTION

24       All of the functions described on this page are deprecated.
25       Applications should instead use EVP_PKEY_sign_init(3),
26       EVP_PKEY_sign(3), EVP_PKEY_verify_init(3) and EVP_PKEY_verify(3).
27
28       DSA_sign() computes a digital signature on the len byte message digest
29       dgst using the private key dsa and places its ASN.1 DER encoding at
30       sigret. The length of the signature is places in *siglen. sigret must
31       point to DSA_size(dsa) bytes of memory.
32
33       DSA_sign_setup() is defined only for backward binary compatibility and
34       should not be used.  Since OpenSSL 1.1.0 the DSA type is opaque and the
35       output of DSA_sign_setup() cannot be used anyway: calling this function
36       will only cause overhead, and does not affect the actual signature
37       (pre-)computation.
38
39       DSA_verify() verifies that the signature sigbuf of size siglen matches
40       a given message digest dgst of size len.  dsa is the signer's public
41       key.
42
43       The type parameter is ignored.
44
45       The random generator must be seeded when DSA_sign() (or
46       DSA_sign_setup()) is called.  If the automatic seeding or reseeding of
47       the OpenSSL CSPRNG fails due to external circumstances (see RAND(7)),
48       the operation will fail.
49

RETURN VALUES

51       DSA_sign() and DSA_sign_setup() return 1 on success, 0 on error.
52       DSA_verify() returns 1 for a valid signature, 0 for an incorrect
53       signature and -1 on error. The error codes can be obtained by
54       ERR_get_error(3).
55

CONFORMING TO

57       US Federal Information Processing Standard FIPS186-4 (Digital Signature
58       Standard, DSS), ANSI X9.30
59

SEE ALSO

61       DSA_new(3), ERR_get_error(3), RAND_bytes(3), DSA_do_sign(3), RAND(7)
62

HISTORY

64       All of these functions were deprecated in OpenSSL 3.0.
65
67       Copyright 2000-2022 The OpenSSL Project Authors. All Rights Reserved.
68
69       Licensed under the Apache License 2.0 (the "License").  You may not use
70       this file except in compliance with the License.  You can obtain a copy
71       in the file LICENSE in the source distribution or at
72       <https://www.openssl.org/source/license.html>.
73
74
75
763.0.5                             2022-11-01                   DSA_SIGN(3ossl)
Impressum