2
0

DH_size.pod 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. =pod
  2. =head1 NAME
  3. DH_size, DH_bits, DH_security_bits - get Diffie-Hellman prime size and
  4. security bits
  5. =head1 SYNOPSIS
  6. #include <openssl/dh.h>
  7. int DH_size(const DH *dh);
  8. int DH_bits(const DH *dh);
  9. int DH_security_bits(const DH *dh);
  10. =head1 DESCRIPTION
  11. DH_size() returns the Diffie-Hellman prime size in bytes. It can be used
  12. to determine how much memory must be allocated for the shared secret
  13. computed by L<DH_compute_key(3)>.
  14. DH_bits() returns the number of significant bits.
  15. B<dh> and B<dh-E<gt>p> must not be B<NULL>.
  16. DH_security_bits() returns the number of security bits of the given B<dh>
  17. key. See L<BN_security_bits(3)>.
  18. =head1 RETURN VALUES
  19. DH_size() returns the prime size of Diffie-Hellman in bytes.
  20. DH_bits() returns the number of bits in the key.
  21. DH_security_bits() returns the number of security bits.
  22. =head1 SEE ALSO
  23. L<DH_new(3)>, L<DH_generate_key(3)>,
  24. L<BN_num_bits(3)>
  25. =head1 HISTORY
  26. DH_bits() was added in OpenSSL 1.1.0.
  27. =head1 COPYRIGHT
  28. Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
  29. Licensed under the OpenSSL license (the "License"). You may not use
  30. this file except in compliance with the License. You can obtain a copy
  31. in the file LICENSE in the source distribution or at
  32. L<https://www.openssl.org/source/license.html>.
  33. =cut