1DH_SIZE(3) OpenSSL DH_SIZE(3)
2
3
4
6 DH_size, DH_bits, DH_security_bits - get Diffie-Hellman prime size and
7 security bits
8
10 #include <openssl/dh.h>
11
12 int DH_size(const DH *dh);
13
14 int DH_bits(const DH *dh);
15
16 int DH_security_bits(const DH *dh);
17
19 DH_size() returns the Diffie-Hellman prime size in bytes. It can be
20 used to determine how much memory must be allocated for the shared
21 secret computed by DH_compute_key(3).
22
23 DH_bits() returns the number of significant bits.
24
25 dh and dh->p must not be NULL.
26
27 DH_security_bits() returns the number of security bits of the given dh
28 key. See BN_security_bits(3).
29
31 DH_size() returns the prime size of Diffie-Hellman in bytes.
32
33 DH_bits() returns the number of bits in the key.
34
35 DH_security_bits() returns the number of security bits.
36
38 DH_new(3), DH_generate_key(3), BN_num_bits(3)
39
41 The DH_bits() function was added in OpenSSL 1.1.0.
42
44 Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
45
46 Licensed under the OpenSSL license (the "License"). You may not use
47 this file except in compliance with the License. You can obtain a copy
48 in the file LICENSE in the source distribution or at
49 <https://www.openssl.org/source/license.html>.
50
51
52
531.1.1q 2023-07-20 DH_SIZE(3)