1=pod 2 3=head1 NAME 4 5RSA_size, RSA_bits, RSA_security_bits - get RSA modulus size or security bits 6 7=head1 SYNOPSIS 8 9 #include <openssl/rsa.h> 10 11 int RSA_bits(const RSA *rsa); 12 13The following functions have been deprecated since OpenSSL 3.0, and can be 14hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value, 15see L<openssl_user_macros(7)>: 16 17 int RSA_size(const RSA *rsa); 18 19 int RSA_security_bits(const RSA *rsa); 20 21=head1 DESCRIPTION 22 23RSA_bits() returns the number of significant bits. 24 25B<rsa> and B<rsa-E<gt>n> must not be B<NULL>. 26 27The remaining functions described on this page are deprecated. 28Applications should instead use L<EVP_PKEY_get_size(3)>, L<EVP_PKEY_get_bits(3)> 29and L<EVP_PKEY_get_security_bits(3)>. 30 31RSA_size() returns the RSA modulus size in bytes. It can be used to 32determine how much memory must be allocated for an RSA encrypted 33value. 34 35RSA_security_bits() returns the number of security bits of the given B<rsa> 36key. See L<BN_security_bits(3)>. 37 38=head1 RETURN VALUES 39 40RSA_bits() returns the number of bits in the key. 41 42RSA_size() returns the size of modulus in bytes. 43 44RSA_security_bits() returns the number of security bits. 45 46=head1 SEE ALSO 47 48L<BN_num_bits(3)> 49 50=head1 HISTORY 51 52The RSA_size() and RSA_security_bits() functions were deprecated in OpenSSL 3.0. 53 54The RSA_bits() function was added in OpenSSL 1.1.0. 55 56=head1 COPYRIGHT 57 58Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. 59 60Licensed under the Apache License 2.0 (the "License"). You may not use 61this file except in compliance with the License. You can obtain a copy 62in the file LICENSE in the source distribution or at 63L<https://www.openssl.org/source/license.html>. 64 65=cut 66