xref: /freebsd/crypto/openssl/doc/man3/DSA_size.pod (revision ba3c1f5972d7b90feb6e6da47905ff2757e0fe57)
1=pod
2
3=head1 NAME
4
5DSA_size, DSA_bits, DSA_security_bits - get DSA signature size, key bits or security bits
6
7=head1 SYNOPSIS
8
9 #include <openssl/dsa.h>
10
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)>:
14
15 int DSA_bits(const DSA *dsa);
16
17 int DSA_size(const DSA *dsa);
18
19 int DSA_security_bits(const DSA *dsa);
20
21=head1 DESCRIPTION
22
23All of the functions described on this page are deprecated.
24Applications should instead use L<EVP_PKEY_get_bits(3)>,
25L<EVP_PKEY_get_security_bits(3)> and L<EVP_PKEY_get_size(3)>.
26
27DSA_bits() returns the number of bits in key I<dsa>: this is the number
28of bits in the I<p> parameter.
29
30DSA_size() returns the maximum size of an ASN.1 encoded DSA signature
31for key I<dsa> in bytes. It can be used to determine how much memory must
32be allocated for a DSA signature.
33
34DSA_security_bits() returns the number of security bits of the given I<dsa>
35key. See L<BN_security_bits(3)>.
36
37=head1 RETURN VALUES
38
39DSA_security_bits() returns the number of security bits in the key, or -1 if
40I<dsa> doesn't hold any key parameters.
41
42DSA_bits() returns the number of bits in the key, or -1 if I<dsa> doesn't
43hold any key parameters.
44
45DSA_size() returns the signature size in bytes, or -1 if I<dsa> doesn't
46hold any key parameters.
47
48=head1 SEE ALSO
49
50L<EVP_PKEY_get_bits(3)>,
51L<EVP_PKEY_get_security_bits(3)>,
52L<EVP_PKEY_get_size(3)>,
53L<DSA_new(3)>, L<DSA_sign(3)>
54
55=head1 HISTORY
56
57All of these functions were deprecated in OpenSSL 3.0.
58
59=head1 COPYRIGHT
60
61Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
62
63Licensed under the Apache License 2.0 (the "License").  You may not use
64this file except in compliance with the License.  You can obtain a copy
65in the file LICENSE in the source distribution or at
66L<https://www.openssl.org/source/license.html>.
67
68=cut
69