diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-10-17 16:33:04 -0400 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2015-10-17 16:33:04 -0400 |
commit | 5cdfba5c8d06ed10510310de03e1df0265a89bcc (patch) | |
tree | 066d8f715bd275874ff86e9986f74520b4ecadda /docs | |
parent | 9aaeee0dc62189204f38097c815a0913fabe006c (diff) | |
download | cryptography-5cdfba5c8d06ed10510310de03e1df0265a89bcc.tar.gz cryptography-5cdfba5c8d06ed10510310de03e1df0265a89bcc.tar.bz2 cryptography-5cdfba5c8d06ed10510310de03e1df0265a89bcc.zip |
a refactor to the API
Diffstat (limited to 'docs')
-rw-r--r-- | docs/hazmat/primitives/asymmetric/ec.rst | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/docs/hazmat/primitives/asymmetric/ec.rst b/docs/hazmat/primitives/asymmetric/ec.rst index 910ce5d8..9b2e61fb 100644 --- a/docs/hazmat/primitives/asymmetric/ec.rst +++ b/docs/hazmat/primitives/asymmetric/ec.rst @@ -125,14 +125,12 @@ Elliptic Curve Signature Algorithms Elliptic Curve Key Exchange algorithm ------------------------------------- -.. class:: ECDH(private_key) +.. class:: ECDH() .. versionadded:: 1.1 - The ECDH Key Exchange algorithm first standardized in NIST publication - `800-56A`_, and later in `800-56Ar2`_. - - :param private_key: An instance of :class:`EllipticCurvePrivateKey`. + The Elliptic Curve Diffie-Hellman Key Exchange algorithm first standardized + in NIST publication `800-56A`_, and later in `800-56Ar2`_. .. doctest:: @@ -144,24 +142,7 @@ Elliptic Curve Key Exchange algorithm >>> peer_public_key = ec.generate_private_key( ... ec.SECP384R1(), default_backend() ... ).public_key() - >>> ecdh = ec.ECDH(private_key) - >>> sharedkey = ecdh.compute_key(peer_public_key) - - .. attribute:: private_key - - :type: :class:`EllipticCurvePrivateKey` - - The private key associated to this object - - .. method:: public_key() - - The public key associated to the object's private key. - - .. method:: compute_key(peer_public_key) - - :param peer_public_key: A :class:`EllipticCurvePublicKey` object. - - :returns: A ``bytes`` object containing the computed key. + >>> shared_key = private_key.exchange(ec.ECDH(), peer_public_key) Elliptic Curves |