aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/asymmetric
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-10-17 18:09:03 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2015-10-17 18:09:03 -0400
commit68b3441d90fa4230b62d19a43c49dd2aa155db47 (patch)
treed1eb7ecb77e8adaf21b0bcb82531912fadccefe8 /docs/hazmat/primitives/asymmetric
parentd29498902d40a446c65de1cafd567a79a4bbf84e (diff)
downloadcryptography-68b3441d90fa4230b62d19a43c49dd2aa155db47.tar.gz
cryptography-68b3441d90fa4230b62d19a43c49dd2aa155db47.tar.bz2
cryptography-68b3441d90fa4230b62d19a43c49dd2aa155db47.zip
better document hte iface
Diffstat (limited to 'docs/hazmat/primitives/asymmetric')
-rw-r--r--docs/hazmat/primitives/asymmetric/ec.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/asymmetric/ec.rst b/docs/hazmat/primitives/asymmetric/ec.rst
index 9b2e61fb..525bd6cb 100644
--- a/docs/hazmat/primitives/asymmetric/ec.rst
+++ b/docs/hazmat/primitives/asymmetric/ec.rst
@@ -132,6 +132,9 @@ Elliptic Curve Key Exchange algorithm
The Elliptic Curve Diffie-Hellman Key Exchange algorithm first standardized
in NIST publication `800-56A`_, and later in `800-56Ar2`_.
+ For most applications the ``shared_key`` should be passed to a key
+ derivation function.
+
.. doctest::
>>> from cryptography.hazmat.backends import default_backend
@@ -337,6 +340,22 @@ Key Interfaces
:returns:
:class:`~cryptography.hazmat.primitives.asymmetric.AsymmetricSignatureContext`
+ .. method:: exchange(algorithm, peer_public_key)
+
+ Perform's a key exchange operation using the provided algorithm with
+ the peer's public key.
+
+ For most applications the result should be passed to a key derivation
+ function.
+
+ :param algorithm: The key exchange algorithm, currently only
+ :class:`~cryptography.hazmat.primitives.asymmetric.ec.ECDH` is
+ supported.
+ :param EllipticCurvePublicKey peer_public_key: The public key for the
+ peer.
+
+ :returns bytes: A shared key.
+
.. method:: public_key()
:return: :class:`EllipticCurvePublicKey`