aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/key-exchange-agreements.rst
blob: 8d79fbadfc2ecf5af0ab045aabd3d290c17044ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.. hazmat::

Key Exchange agreements
=======================

.. module:: cryptography.hazmat.primitives.asymmetric.key_exchange

Key exchange agreements are cryptographic operations, like Diffie-Hellman
key exchanges, that allow two parties to use their public-private key pairs
to establish a shared secret key over an insecure channel. Usually the
negotiated key is further derived before using it for symmetric operations.

Interfaces
~~~~~~~~~~

.. class:: KeyExchangeContext

    .. versionadded:: 1.1

    .. method:: agree(public_key)

        :param public_key: The peer public key, the type depends on the
            crypto system used, for example :class:`~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey`