aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/asymmetric/dh.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/hazmat/primitives/asymmetric/dh.rst')
-rw-r--r--docs/hazmat/primitives/asymmetric/dh.rst24
1 files changed, 12 insertions, 12 deletions
diff --git a/docs/hazmat/primitives/asymmetric/dh.rst b/docs/hazmat/primitives/asymmetric/dh.rst
index 759b265b..58ff663d 100644
--- a/docs/hazmat/primitives/asymmetric/dh.rst
+++ b/docs/hazmat/primitives/asymmetric/dh.rst
@@ -29,8 +29,7 @@ derivation function.
DHE (or EDH), the ephemeral form of this exchange, is **strongly
preferred** over simple DH and provides `forward secrecy`_ when used.
You must generate a new private key using :func:`~DHParameters.generate_private_key` for
-each :meth:`~DHPrivateKeyWithSerialization.exchange` when performing an DHE key
-exchange.
+each :meth:`~DHPrivateKey.exchange` when performing an DHE key exchange.
To assemble a :class:`~DHParameters` and a :class:`~DHPublicKey` from
primitive integers, you must first create the
@@ -123,12 +122,22 @@ Key interfaces
:return: A :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHParameters`.
+ .. method:: exchange(peer_public_key)
+
+ .. versionadded:: 1.7
+
+ :param DHPublicKeyWithSerialization peer_public_key: The public key for
+ the peer.
+
+ :return bytes: The agreed key. The bytes are ordered in 'big' endian.
+
.. class:: DHPrivateKeyWithSerialization
.. versionadded:: 0.9
- Inherits from :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateKey`.
+ Inherits from
+ :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateKey`.
.. method:: private_numbers()
@@ -136,15 +145,6 @@ Key interfaces
:return: A :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateNumbers`.
- .. method:: exchange(peer_public_key)
-
- .. versionadded:: 1.7
-
- :param DHPublicKeyWithSerialization peer_public_key: The public key for the
- peer.
-
- :return bytes: The agreed key. The bytes are ordered in 'big' endian.
-
.. method:: private_bytes(encoding, format, encryption_algorithm)
.. versionadded:: 1.8