From a9b86905bfc3207aeed99c34ff2d49b5541983c9 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 24 May 2017 15:01:14 -0700 Subject: Put the exchange method on the correct interface (#3591) * Put the exchange method on the correct interface * fixed links in docs --- docs/hazmat/primitives/asymmetric/dh.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'docs/hazmat/primitives/asymmetric/dh.rst') 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 -- cgit v1.2.3