DSA_SIZE(3ossl)
π DSA_SIZE(3ossl) β your lil' guide to DSA sizes & bits
okay so bestie, this is the DSA_SIZE(3ossl) page from the OpenSSL manual set, and before you get excited β yes, everything on it is deprecated. like, deprecated deprecated. but you still gotta know what it does, so let's go π
β¨ NAME β¨
DSA_size, DSA_bits, DSA_security_bits β the girlies that tell you a DSA signature size, a key's bits, or its security bits π
πΈ SYNOPSIS πΈ
First things first, you gotta pull in the header:
#include <openssl/dsa.h>
Now, hear me out β the following functions have been deprecated since OpenSSL 3.0, and you can hide them entirely by defining OPENSSL_API_COMPAT with a suitable version value, see openssl_user_macros(7):
int DSA_bits(const DSA *dsa);
int DSA_size(const DSA *dsa);
int DSA_security_bits(const DSA *dsa);
π¦ DESCRIPTION π¦
So. All of the functions described on this page are deprecated. every single one. π Applications should instead use EVP_PKEY_get_bits(3), EVP_PKEY_get_security_bits(3) and EVP_PKEY_get_size(3). that's the vibe, that's the main character API now β¨
DSA_bits()β returns the number of bits in key dsa: literally the number of bits in thepparameter. no cap, that's it.DSA_size()β returns the maximum size of an ASN.1 encoded DSA signature for key dsa, in bytes. it's giving "how much memory do I need to allocate for a DSA signature" energy π«ΆDSA_security_bits()β returns the number of security bits of the given dsa key. seeBN_security_bits(3)for the deets.
π₯ RETURN VALUES π₯
DSA_security_bits()β returns the number of security bits in the key, or-1if dsa doesn't hold any key parameters. (that-1is the "no keys, no thoughts, head empty" answer π)DSA_bits()β returns the number of bits in the key, or-1if dsa doesn't hold any key parameters.DSA_size()β returns the signature size in bytes, or-1if dsa doesn't hold any key parameters.
π SEE ALSO π
EVP_PKEY_get_bits(3), EVP_PKEY_get_security_bits(3), EVP_PKEY_get_size(3), DSA_new(3), DSA_sign(3)
go read these, bestie, they're the glow-up versions π
π§ HISTORY π§
All of these functions were deprecated in OpenSSL 3.0. that's the whole history lesson, short and iconic π
π COPYRIGHT π
Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
ok that's the whole page π«Ά don't come for me, I just report the deprecations π
and that's a wrap, bestie β page DSA_SIZE(3ossl) from the OpenSSL 3.5.0 release, dated 2026-09-25. mwah π β
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms