Skip to content

Commit

Permalink
add some words about separating ECDH and ECDSA (#5423)
Browse files Browse the repository at this point in the history
* add some words about separating ECDH and ECDSA

* Thomas Pornin wrote some good words about why you should try not to mix
your ECDH and ECDSA keys.
  • Loading branch information
reaperhulk committed Aug 24, 2020
1 parent ed3ded4 commit b9d26d2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/hazmat/primitives/asymmetric/ec.rst
Expand Up @@ -47,6 +47,10 @@ Elliptic Curve Signature Algorithms
The ECDSA signature algorithm first standardized in NIST publication
`FIPS 186-3`_, and later in `FIPS 186-4`_.

Note that while elliptic curve keys can be used for both signing and key
exchange, this is `bad cryptographic practice`_. Instead, users should
generate separate signing and ECDH keys.

:param algorithm: An instance of
:class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`.

Expand Down Expand Up @@ -254,6 +258,10 @@ Elliptic Curve Key Exchange algorithm
key, derivation of multiple keys, and destroys any structure that may be
present.

Note that while elliptic curve keys can be used for both signing and key
exchange, this is `bad cryptographic practice`_. Instead, users should
generate separate signing and ECDH keys.

.. warning::

This example does not give `forward secrecy`_ and is only provided as a
Expand Down Expand Up @@ -972,3 +980,4 @@ Elliptic Curve Object Identifiers
.. _`EdDSA`: https://en.wikipedia.org/wiki/EdDSA
.. _`forward secrecy`: https://en.wikipedia.org/wiki/Forward_secrecy
.. _`SEC 1 v2.0`: https://www.secg.org/sec1-v2.pdf
.. _`bad cryptographic practice`: https://crypto.stackexchange.com/a/3313

0 comments on commit b9d26d2

Please sign in to comment.