DH_size.pod 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. The following functions have been deprecated since OpenSSL 3.0, and can be
  8. hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
  9. see L<openssl_user_macros(7)>:
  10. int DH_bits(const DH *dh);
  11. int DH_size(const DH *dh);
  12. int DH_security_bits(const DH *dh);
  13. =head1 DESCRIPTION
  14. The functions described on this page are deprecated.
  15. Applications should instead use L<EVP_PKEY_get_bits(3)>,
  16. L<EVP_PKEY_get_security_bits(3)> and L<EVP_PKEY_get_size(3)>.
  17. DH_bits() returns the number of significant bits.
  18. B<dh> and B<dh-E<gt>p> must not be B<NULL>.
  19. DH_size() returns the Diffie-Hellman prime size in bytes. It can be used
  20. to determine how much memory must be allocated for the shared secret
  21. computed by L<DH_compute_key(3)>.
  22. DH_security_bits() returns the number of security bits of the given B<dh>
  23. key. See L<BN_security_bits(3)>.
  24. =head1 RETURN VALUES
  25. DH_bits() returns the number of bits in the key, or -1 if
  26. B<dh> doesn't hold any key parameters.
  27. DH_size() returns the prime size of Diffie-Hellman in bytes, or -1 if
  28. B<dh> doesn't hold any key parameters.
  29. DH_security_bits() returns the number of security bits, or -1 if
  30. B<dh> doesn't hold any key parameters.
  31. =head1 SEE ALSO
  32. L<EVP_PKEY_get_bits(3)>,
  33. L<DH_new(3)>, L<DH_generate_key(3)>,
  34. L<BN_num_bits(3)>
  35. =head1 HISTORY
  36. All functions were deprecated in OpenSSL 3.0.
  37. =head1 COPYRIGHT
  38. Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
  39. Licensed under the Apache License 2.0 (the "License"). You may not use
  40. this file except in compliance with the License. You can obtain a copy
  41. in the file LICENSE in the source distribution or at
  42. L<https://www.openssl.org/source/license.html>.
  43. =cut