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