]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/RSA_size.pod
Rename OPENSSL_CTX prefix to OSSL_LIB_CTX
[thirdparty/openssl.git] / doc / man3 / RSA_size.pod
CommitLineData
2186cd8e
UM
1=pod
2
3=head1 NAME
4
6a2da303 5RSA_size, RSA_bits, RSA_security_bits - get RSA modulus size or security bits
2186cd8e
UM
6
7=head1 SYNOPSIS
8
6a2da303 9 #include <openssl/rsa.h>
2186cd8e 10
588d5d01
P
11 int RSA_bits(const RSA *rsa);
12
4fd8a3e1
P
13Deprecated since OpenSSL 3.0, can be hidden entirely by defining
14B<OPENSSL_API_COMPAT> with a suitable version value, see
15L<openssl_user_macros(7)>:
16
6a2da303 17 int RSA_size(const RSA *rsa);
26c79d56 18
f64f17c3 19 int RSA_security_bits(const RSA *rsa);
2186cd8e
UM
20
21=head1 DESCRIPTION
22
588d5d01
P
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.
4fd8a3e1
P
28Applications should instead use L<EVP_PKEY_size(3)>, L<EVP_PKEY_bits(3)>
29and L<EVP_PKEY_security_bits(3)>.
30
26c79d56 31RSA_size() returns the RSA modulus size in bytes. It can be used to
2186cd8e
UM
32determine how much memory must be allocated for an RSA encrypted
33value.
34
6a2da303
PY
35RSA_security_bits() returns the number of security bits of the given B<rsa>
36key. See L<BN_security_bits(3)>.
37
1f13ad31 38=head1 RETURN VALUES
2186cd8e 39
588d5d01 40RSA_bits() returns the number of bits in the key.
6a2da303 41
588d5d01 42RSA_size() returns the size of modulus in bytes.
6a2da303
PY
43
44RSA_security_bits() returns the number of security bits.
2186cd8e
UM
45
46=head1 SEE ALSO
47
53934822 48L<BN_num_bits(3)>
2186cd8e
UM
49
50=head1 HISTORY
51
588d5d01 52The RSA_size() and RSA_security_bits() functions were deprecated in OpenSSL 3.0.
4fd8a3e1 53
fc5ecadd 54The RSA_bits() function was added in OpenSSL 1.1.0.
2186cd8e 55
e2f92610
RS
56=head1 COPYRIGHT
57
33388b44 58Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
e2f92610 59
4746f25a 60Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
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