]>
Commit | Line | Data |
---|---|---|
2186cd8e UM |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
6a2da303 | 5 | RSA_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 | |
6a2da303 | 11 | int RSA_size(const RSA *rsa); |
26c79d56 | 12 | |
6a2da303 PY |
13 | int RSA_bits(const RSA *rsa); |
14 | ||
15 | int RSA_security_bits(const RSA *rsa) | |
2186cd8e UM |
16 | |
17 | =head1 DESCRIPTION | |
18 | ||
26c79d56 | 19 | RSA_size() returns the RSA modulus size in bytes. It can be used to |
2186cd8e UM |
20 | determine how much memory must be allocated for an RSA encrypted |
21 | value. | |
22 | ||
26c79d56 KR |
23 | RSA_bits() returns the number of significant bits. |
24 | ||
25 | B<rsa> and B<rsa-E<gt>n> must not be B<NULL>. | |
2186cd8e | 26 | |
6a2da303 PY |
27 | RSA_security_bits() returns the number of security bits of the given B<rsa> |
28 | key. See L<BN_security_bits(3)>. | |
29 | ||
1f13ad31 | 30 | =head1 RETURN VALUES |
2186cd8e | 31 | |
6a2da303 PY |
32 | RSA_size() returns the size of modulus in bytes. |
33 | ||
34 | DSA_bits() returns the number of bits in the key. | |
35 | ||
36 | RSA_security_bits() returns the number of security bits. | |
2186cd8e UM |
37 | |
38 | =head1 SEE ALSO | |
39 | ||
53934822 | 40 | L<BN_num_bits(3)> |
2186cd8e UM |
41 | |
42 | =head1 HISTORY | |
43 | ||
fc5ecadd | 44 | The RSA_bits() function was added in OpenSSL 1.1.0. |
2186cd8e | 45 | |
e2f92610 RS |
46 | =head1 COPYRIGHT |
47 | ||
61f805c1 | 48 | Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. |
e2f92610 | 49 | |
4746f25a | 50 | Licensed under the Apache License 2.0 (the "License"). You may not use |
e2f92610 RS |
51 | this file except in compliance with the License. You can obtain a copy |
52 | in the file LICENSE in the source distribution or at | |
53 | L<https://www.openssl.org/source/license.html>. | |
54 | ||
55 | =cut |