Sortix
Sortix Download Manual Development Source Code News Blog More
current nightly

Sortix nightly manual

This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.

NAME

DSA_size, DSA_bits — get DSA signature or key size

SYNOPSIS

#include <openssl/dsa.h>
int
DSA_size(const DSA *dsa);
int
DSA_bits(const DSA *dsa);

DESCRIPTION

DSA_size() returns the maximum size of an ASN.1 encoded DSA signature for the key dsa in bytes. It can be used to determine how much memory must be allocated for a DSA signature.
dsa->q must not be NULL.
DSA_bits() returns the number of significant bits in the public domain parameter p contained in dsa. This is also the number of bits in the public key.

RETURN VALUES

DSA_size() returns the size of the signature in bytes.
DSA_bits() returns the size of the public key in bits.

SEE ALSO

DSA_get0_pqg(3), DSA_new(3), DSA_security_bits(3), DSA_sign(3)

HISTORY

DSA_size() first appeared in SSLeay 0.6.0 and has been available since OpenBSD 2.4.
DSA_bits() first appeared in OpenSSL 1.1.0 and has been available since OpenBSD 7.1.
Copyright 2011-2025 Jonas 'Sortie' Termansen and contributors.
Sortix's source code is free software under the ISC license.
#sortix on irc.sortix.org
@sortix_org