DH_SIZE(3)
π DH_SIZE(3) β get the Diffie-Hellman prime size, bestie π
okay so this is the libcrypto page from the Library Functions Manual, and it is literally here to answer the iconic question: how big is this Diffie-Hellman prime? no cap, that's the whole vibe. π
πΈ NAME πΈ
DH_size, DH_bits β get Diffie-Hellman prime size
β¨ SYNOPSIS β¨
library βlibcryptoβ #include <openssl/dh.h>
int
DH_size(const DH *dh);
int
DH_bits(const DH *dh);
π¦ DESCRIPTION π¦
DH_size() returns the Diffie-Hellman prime size in bytes. bestie, it can be used to determine how much memory must be allocated for the shared secret computed by DH_compute_key(3). so like, it's giving βhow much room do I need for this secret?β energy. π
DH_bits() returns the number of significant bits in the key. slay. β¨
β οΈ real talk:dhanddh->pmust not beNULL. do not play with that, fr fr. π
π«Ά SEE ALSO π«Ά
go read those if you want the full lore, iykyk. π
π HISTORY π
DH_size() first appeared in SSLeay 0.5.1 and has been available since OpenBSD 2.4. iconic behavior. π
DH_bits() first appeared in OpenSSL 1.1.0 and has been available since OpenBSD 6.3. main character entrance, honestly. β
mwah π this cutie little page is from Debian, dated June 8, 2025 β bye bestie, go check your prime sizes responsibly! π«Άπ
π¦ 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, 2015 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