BN_SECURITY_BITS(3SSL)
π BN_SECURITY_BITS(3SSL) π
okay bestie, welcome to section 3SSL of the OpenSSL man pages π¦ β this one's the glow-up guide to BN_security_bits, and honestly? it's giving "how many bits of security am I actually getting" energy, and we're obsessed.
β¨ NAME β¨
BN_security_bits β returns bits of security based on given numbers π
β¨ SYNOPSIS β¨
#include <openssl/bn.h>
int BN_security_bits(int L, int N);
like, that's it. two ints in, one int out. no cap. π
β¨ DESCRIPTION β¨
so BN_security_bits() hands you back the number of bits of security that a specific algorithm + a particular key size is actually serving. and before you ask "bestie, what even is a bit of security" β it's defined in NIST SP800-57, so we're being official about it πβ¨
right now BN_security_bits() supports two types of asymmetric algorithms, and they're both kinda iconic in their own way:
- FFC β that's Finite Field Cryptography. think
DSAandDHπ§ here both parameters,LandN, get used to decide the bits of security.Lis the size of the public key, andNis the size of the private key. two inputs, both main characters. - IFC β that's Integer Factorization Cryptography. think
RSAπ₯ here onlyLis used, and it's commonly considered to be the key size (the modulus).
so yeah, sometimes you feed it two numbers and sometimes one of them is just sitting there being decorative. nature is healing πΈ
β¨ RETURN VALUES β¨
the number of security bits. that's the whole vibe check, that's what you get back π
β¨ NOTES β¨
π¨ real talk, no skips:
- ECC (Elliptic Curve Cryptography) is not covered by the
BN_security_bits()function. ma'am is not on the guest list π - the symmetric algorithms are not covered either. not them, not today β
so if you rolled up here hoping for elliptic curves or AES, bestie this is not the function for you, and that's okay π«Ά
β¨ SEE ALSO β¨
the whole friend group, go say hi π
β¨ HISTORY β¨
BN_security_bits() was added in OpenSSL 1.1.0. a classic, a legend, an icon from day one π
β¨ COPYRIGHT β¨
Copyright 2017-2019 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>.
okay that's the whole page, you ate that reading it fr fr π
β¨ version 4.0.3, dated 2026-09-29 β BN_SECURITY_BITS(3SSL), signing off, mwah ππ
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms