-.\" $OpenBSD: RSA_size.3,v 1.5 2018/02/17 16:59:48 schwarze Exp $
-.\" OpenSSL 5bf73873 Aug 5 16:27:01 2002 +0000
+.\" $OpenBSD: RSA_size.3,v 1.6 2018/02/19 12:14:11 schwarze Exp $
+.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\"
-.\" This file was written by Ulf Moeller <ulf@openssl.org>.
+.\" This file was written by Ulf Moeller <ulf@openssl.org> and
+.\" Kurt Roeckx <kurt@roeckx.be>.
.\" Copyright (c) 2000, 2002, 2015 The OpenSSL Project. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: February 17 2018 $
+.Dd $Mdocdate: February 19 2018 $
.Dt RSA_SIZE 3
.Os
.Sh NAME
-.Nm RSA_size
-.Nd get RSA modulus size
+.Nm RSA_size ,
+.Nm RSA_bits
+.Nd get the RSA modulus size
.Sh SYNOPSIS
.In openssl/rsa.h
.Ft int
.Fo RSA_size
.Fa "const RSA *rsa"
.Fc
+.Ft int
+.Fo RSA_bits
+.Fa "const RSA *rsa"
+.Fc
.Sh DESCRIPTION
-This function returns the RSA modulus size in bytes.
-It can be used to determine how much memory must be allocated for an RSA
-encrypted value.
+.Fn RSA_size
+returns the RSA modulus size in bytes.
+It can be used to determine how much memory must be allocated for
+an RSA encrypted value.
+.Pp
+.Fn RSA_bits
+returns the number of significant bits.
.Pp
.Fa rsa
and
must not be
.Dv NULL .
.Sh RETURN VALUES
-The size in bytes.
+The size.
.Sh SEE ALSO
+.Xr BN_num_bits 3 ,
.Xr RSA_get0_key 3 ,
.Xr RSA_new 3
.Sh HISTORY
.Fn RSA_size
is available in all versions of SSLeay and OpenSSL.
+.Pp
+.Fn RSA_bits
+first appeared in OpenSSL 1.1.0.