BN_SECURITY_BITS(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’… BN_SECURITY_BITS(3ossl)

okay so bestie, welcome to BN_security_bits(3ossl) β€” the OpenSSL manpage that answers the eternal question: "how many bits of security does this key actually give me?" ✨


🌸 NAME

BN_security_bits β€” returns bits of security based on given numbers. that's it. that's the whole vibe. πŸŽ€


πŸ¦‹ SYNOPSIS

#include <openssl/bn.h>

int BN_security_bits(int L, int N);

literally just include the header and call it with two ints. slay. πŸ’…


πŸ‘‘ DESCRIPTION

okay so BN_security_bits() returns the number of bits of security provided by a specific algorithm and a particular key size. and before you ask β€” yes, "bits of security" is a real, official thing, defined in NIST SP800-57. not us making it up for the aesthetic. πŸ”₯

currently, BN_security_bits() supports two types of asymmetric algorithms:

  • FFC (Finite Field Cryptography) β€” think DSA and DH. for these, both L and N are used to decide the bits of security, where L is the size of the public key and N is the size of the private key. two inputs, both matter, main character energy. πŸ’œ
  • IFC (Integer Factorization Cryptography) β€” think RSA. here only L gets used, and it's commonly considered to be the key size (modulus). N is just kinda there. πŸ™ˆ

🌈 RETURN VALUES

Number of security bits. that's the return value. that's the whole tea. ⭐


πŸ’€ NOTES

bestie, important caveat time: ECC (Elliptic Curve Cryptography) is NOT covered by the BN_security_bits() function. and nope, the symmetric algorithms aren't covered neither. 😭

like if you came here looking for elliptic curve vibes or AES numbers, this function is not the one. it said "not my department" and honestly? respect. 🫢


🧚 SEE ALSO

the little family of security-bits functions. iykyk. πŸ’–


⭐ HISTORY

The BN_security_bits() function was added in OpenSSL 1.1.0. so it's been iconic since 1.1.0, no cap. 🌸


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>.


and that's the page, bestie!! πŸ¦‹ OpenSSL 3.5.0, dated 2026-09-25 β€” BN_SECURITY_BITS(3ossl), out. πŸ’…βœ¨πŸ‘‘

πŸ“¦ where this page comes from