RSA_size.pod 1.7 KB

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