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