]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/DSA_sign.pod
Clarify the deprecation warnings in the docs
[thirdparty/openssl.git] / doc / man3 / DSA_sign.pod
CommitLineData
38e33cef
UM
1=pod
2
3=head1 NAME
4
5DSA_sign, DSA_sign_setup, DSA_verify - DSA signatures
6
7=head1 SYNOPSIS
8
9 #include <openssl/dsa.h>
10
3dbf8243
MC
11The following functions have been deprecated since OpenSSL 3.0, and can be
12hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
13see L<openssl_user_macros(7)>:
e52b4215 14
e9b77246
BB
15 int DSA_sign(int type, const unsigned char *dgst, int len,
16 unsigned char *sigret, unsigned int *siglen, DSA *dsa);
38e33cef 17
e9b77246 18 int DSA_sign_setup(DSA *dsa, BN_CTX *ctx, BIGNUM **kinvp, BIGNUM **rp);
38e33cef 19
e9b77246 20 int DSA_verify(int type, const unsigned char *dgst, int len,
1bc74519 21 unsigned char *sigbuf, int siglen, DSA *dsa);
38e33cef
UM
22
23=head1 DESCRIPTION
24
e52b4215
SL
25All of the functions described on this page are deprecated.
26Applications should instead use L<EVP_PKEY_sign_init(3)>, L<EVP_PKEY_sign(3)>,
27L<EVP_PKEY_verify_init(3)> and L<EVP_PKEY_verify(3)>.
28
38e33cef
UM
29DSA_sign() computes a digital signature on the B<len> byte message
30digest B<dgst> using the private key B<dsa> and places its ASN.1 DER
31encoding at B<sigret>. The length of the signature is places in
32*B<siglen>. B<sigret> must point to DSA_size(B<dsa>) bytes of memory.
33
8fe4c0b0
NT
34DSA_sign_setup() is defined only for backward binary compatibility and
35should not be used.
36Since OpenSSL 1.1.0 the DSA type is opaque and the output of
37DSA_sign_setup() cannot be used anyway: calling this function will only
38cause overhead, and does not affect the actual signature
39(pre-)computation.
38e33cef
UM
40
41DSA_verify() verifies that the signature B<sigbuf> of size B<siglen>
42matches a given message digest B<dgst> of size B<len>.
43B<dsa> is the signer's public key.
44
45The B<type> parameter is ignored.
46
262c0088 47The random generator must be seeded when DSA_sign() (or DSA_sign_setup())
74235cc9 48is called.
262c0088
DMSP
49If the automatic seeding or reseeding of the OpenSSL CSPRNG fails due to
50external circumstances (see L<RAND(7)>), the operation will fail.
74235cc9 51
38e33cef
UM
52=head1 RETURN VALUES
53
54DSA_sign() and DSA_sign_setup() return 1 on success, 0 on error.
55DSA_verify() returns 1 for a valid signature, 0 for an incorrect
56signature and -1 on error. The error codes can be obtained by
9b86974e 57L<ERR_get_error(3)>.
38e33cef
UM
58
59=head1 CONFORMING TO
60
61US Federal Information Processing Standard FIPS 186 (Digital Signature
62Standard, DSS), ANSI X9.30
63
64=head1 SEE ALSO
65
b97fdb57 66L<DSA_new(3)>, L<ERR_get_error(3)>, L<RAND_bytes(3)>,
262c0088
DMSP
67L<DSA_do_sign(3)>,
68L<RAND(7)>
38e33cef 69
e52b4215
SL
70=head1 HISTORY
71
72All of these functions were deprecated in OpenSSL 3.0.
73
e2f92610
RS
74=head1 COPYRIGHT
75
3c2bdd7d 76Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
e2f92610 77
4746f25a 78Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
79this file except in compliance with the License. You can obtain a copy
80in the file LICENSE in the source distribution or at
81L<https://www.openssl.org/source/license.html>.
82
83=cut