DSA_GENERATE_KEY(3)
π DSA_GENERATE_KEY(3) π
okay so bestie, this one lives in the Library Functions Manual and it's literally the page for DSA_generate_key β yes, the whole entire slay that makes you a DSA key pair β¨
πΈ NAME πΈ
DSA_generate_key β generate a DSA key pair, no cap π
π SYNOPSIS π
like, pull it in from libcrypto first:
library βlibcryptoβ
#include <openssl/dsa.h>
int
DSA_generate_key(DSA *a);
π¦ DESCRIPTION π¦
okay so DSA_generate_key() is gonna need a to already be holding DSA parameters β like, that's the vibe check it does first, it's not doing that part for you π
then it generates a whole new key pair and stores it in a->pub_key and a->priv_key. both of them. that's the entire personality of this function and honestly? iconic π
β RETURN VALUES β
DSA_generate_key()returns1on success π- or
0otherwise π
and if you got a 0 and you're like "okay but why", the error codes are literally obtainable via ERR_get_error(3) β go ask, she'll tell you π«Ά
π SEE ALSO π
(the whole friend group, fr fr π§)
π HISTORY π
so DSA_generate_key() first appeared in SSLeay 0.6.0 and has been available since OpenBSD 2.4 β she's been serving since before most of us were born, we stan a legacy queen π
and that's the page!! this little beauty is from Debian, dated June 8, 2025, and yes the footer still says DSA_GENERATE_KEY(3) because we keep the branding consistent πβ¨ bye bestie, go make some keys π
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2000 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms