1RSA_SIZE(3ossl)                     OpenSSL                    RSA_SIZE(3ossl)
2
3
4

NAME

6       RSA_size, RSA_bits, RSA_security_bits - get RSA modulus size or
7       security bits
8

SYNOPSIS

10        #include <openssl/rsa.h>
11
12        int RSA_bits(const RSA *rsa);
13
14       The following functions have been deprecated since OpenSSL 3.0, and can
15       be hidden entirely by defining OPENSSL_API_COMPAT with a suitable
16       version value, see openssl_user_macros(7):
17
18        int RSA_size(const RSA *rsa);
19
20        int RSA_security_bits(const RSA *rsa);
21

DESCRIPTION

23       RSA_bits() returns the number of significant bits.
24
25       rsa and rsa->n must not be NULL.
26
27       The remaining functions described on this page are deprecated.
28       Applications should instead use EVP_PKEY_get_size(3),
29       EVP_PKEY_get_bits(3) and 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 value.
33
34       RSA_security_bits() returns the number of security bits of the given
35       rsa key. See BN_security_bits(3).
36

RETURN VALUES

38       RSA_bits() returns the number of bits in the key.
39
40       RSA_size() returns the size of modulus in bytes.
41
42       RSA_security_bits() returns the number of security bits.
43

SEE ALSO

45       BN_num_bits(3)
46

HISTORY

48       The RSA_size() and RSA_security_bits() functions were deprecated in
49       OpenSSL 3.0.
50
51       The RSA_bits() function was added in OpenSSL 1.1.0.
52
54       Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
55
56       Licensed under the Apache License 2.0 (the "License").  You may not use
57       this file except in compliance with the License.  You can obtain a copy
58       in the file LICENSE in the source distribution or at
59       <https://www.openssl.org/source/license.html>.
60
61
62
633.0.5                             2022-11-01                   RSA_SIZE(3ossl)
Impressum