1e71b7053SJung-uk Kim=pod 2e71b7053SJung-uk Kim 3e71b7053SJung-uk Kim=head1 NAME 4e71b7053SJung-uk Kim 5e71b7053SJung-uk KimBN_security_bits - returns bits of security based on given numbers 6e71b7053SJung-uk Kim 7e71b7053SJung-uk Kim=head1 SYNOPSIS 8e71b7053SJung-uk Kim 9e71b7053SJung-uk Kim #include <openssl/bn.h> 10e71b7053SJung-uk Kim 11e71b7053SJung-uk Kim int BN_security_bits(int L, int N); 12e71b7053SJung-uk Kim 13e71b7053SJung-uk Kim=head1 DESCRIPTION 14e71b7053SJung-uk Kim 15e71b7053SJung-uk KimBN_security_bits() returns the number of bits of security provided by a 16e71b7053SJung-uk Kimspecific algorithm and a particular key size. The bits of security is 17e71b7053SJung-uk Kimdefined in NIST SP800-57. Currently, BN_security_bits() support two types 18e71b7053SJung-uk Kimof asymmetric algorithms: the FFC (Finite Field Cryptography) and IFC 19e71b7053SJung-uk Kim(Integer Factorization Cryptography). For FFC, e.g., DSA and DH, both 20e71b7053SJung-uk Kimparameters B<L> and B<N> are used to decide the bits of security, where 21e71b7053SJung-uk KimB<L> is the size of the public key and B<N> is the size of the private 22e71b7053SJung-uk Kimkey. For IFC, e.g., RSA, only B<L> is used and it's commonly considered 23e71b7053SJung-uk Kimto be the key size (modulus). 24e71b7053SJung-uk Kim 25e71b7053SJung-uk Kim=head1 RETURN VALUES 26e71b7053SJung-uk Kim 27e71b7053SJung-uk KimNumber of security bits. 28e71b7053SJung-uk Kim 29e71b7053SJung-uk Kim=head1 NOTES 30e71b7053SJung-uk Kim 31e71b7053SJung-uk KimECC (Elliptic Curve Cryptography) is not covered by the BN_security_bits() 32e71b7053SJung-uk Kimfunction. The symmetric algorithms are not covered neither. 33e71b7053SJung-uk Kim 34e71b7053SJung-uk Kim=head1 SEE ALSO 35e71b7053SJung-uk Kim 36e71b7053SJung-uk KimL<DH_security_bits(3)>, L<DSA_security_bits(3)>, L<RSA_security_bits(3)> 37e71b7053SJung-uk Kim 38610a21fdSJung-uk Kim=head1 HISTORY 39610a21fdSJung-uk Kim 40610a21fdSJung-uk KimThe BN_security_bits() function was added in OpenSSL 1.1.0. 41610a21fdSJung-uk Kim 42e71b7053SJung-uk Kim=head1 COPYRIGHT 43e71b7053SJung-uk Kim 44610a21fdSJung-uk KimCopyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved. 45e71b7053SJung-uk Kim 46*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License"). You may not use 47e71b7053SJung-uk Kimthis file except in compliance with the License. You can obtain a copy 48e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at 49e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>. 50e71b7053SJung-uk Kim 51e71b7053SJung-uk Kim=cut 52