RSA_size.pod 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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_size(const RSA *rsa);
  7. int RSA_bits(const RSA *rsa);
  8. int RSA_security_bits(const RSA *rsa)
  9. =head1 DESCRIPTION
  10. RSA_size() returns the RSA modulus size in bytes. It can be used to
  11. determine how much memory must be allocated for an RSA encrypted
  12. value.
  13. RSA_bits() returns the number of significant bits.
  14. B<rsa> and B<rsa-E<gt>n> must not be B<NULL>.
  15. RSA_security_bits() returns the number of security bits of the given B<rsa>
  16. key. See L<BN_security_bits(3)>.
  17. =head1 RETURN VALUES
  18. RSA_size() returns the size of modulus in bytes.
  19. DSA_bits() returns the number of bits in the key.
  20. RSA_security_bits() returns the number of security bits.
  21. =head1 SEE ALSO
  22. L<BN_num_bits(3)>
  23. =head1 HISTORY
  24. The RSA_bits() function was added in OpenSSL 1.1.0.
  25. =head1 COPYRIGHT
  26. Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
  27. Licensed under the Apache License 2.0 (the "License"). You may not use
  28. this file except in compliance with the License. You can obtain a copy
  29. in the file LICENSE in the source distribution or at
  30. L<https://www.openssl.org/source/license.html>.
  31. =cut