diff options
| author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2020-07-05 20:19:39 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-05 21:19:39 -0400 |
| commit | 7a233b9a602d76684e17d509d9a5378eeee6a362 (patch) | |
| tree | d60808a532177952e8abe2b3185bce4eda54bd2d /docs | |
| parent | c8689610332ff444580f1cdf08d50909290af008 (diff) | |
| download | cryptography-7a233b9a602d76684e17d509d9a5378eeee6a362.tar.gz | |
support 4096 bit DSA parsing from numbers classes (#5301)
* support 4096 bit DSA parsing from numbers classes
* need to get local linting fixed.
* reorder
* add a link to more reasons why DSA sucks
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/development/test-vectors.rst | 2 | ||||
| -rw-r--r-- | docs/hazmat/primitives/asymmetric/dsa.rst | 34 |
2 files changed, 26 insertions, 10 deletions
diff --git a/docs/development/test-vectors.rst b/docs/development/test-vectors.rst index 48f7bb3a9..2e3acaab4 100644 --- a/docs/development/test-vectors.rst +++ b/docs/development/test-vectors.rst @@ -78,6 +78,8 @@ Custom asymmetric vectors * ``asymmetric/PEM_Serialization/rsa_public_key.pem`` and ``asymmetric/DER_Serialization/rsa_public_key.der``- Contains an RSA 2048 bit public generated using OpenSSL from ``rsa_private_key.pem``. +* ``asymmetric/PEM_Serialization/dsa_4096.pem`` - Contains a 4096-bit DSA + private key generated using OpenSSL. * ``asymmetric/PEM_Serialization/dsaparam.pem`` - Contains 2048-bit DSA parameters generated using OpenSSL; contains no keys. * ``asymmetric/PEM_Serialization/dsa_private_key.pem`` - Contains a DSA 2048 diff --git a/docs/hazmat/primitives/asymmetric/dsa.rst b/docs/hazmat/primitives/asymmetric/dsa.rst index 1456de454..142ce1aeb 100644 --- a/docs/hazmat/primitives/asymmetric/dsa.rst +++ b/docs/hazmat/primitives/asymmetric/dsa.rst @@ -5,6 +5,13 @@ DSA .. module:: cryptography.hazmat.primitives.asymmetric.dsa +.. note:: + + DSA is a **legacy algorithm** and should generally be avoided in favor of + choices like + :doc:`EdDSA using curve25519</hazmat/primitives/asymmetric/ed25519>` or + :doc:`ECDSA</hazmat/primitives/asymmetric/ec>`. + `DSA`_ is a `public-key`_ algorithm for signing messages. Generation @@ -14,15 +21,18 @@ Generation .. versionadded:: 0.5 + .. versionchanged:: 3.0 + + Added support for 4096-bit keys for some legacy applications that + continue to use DSA despite the wider cryptographic community's + `ongoing protestations`_. + Generate a DSA private key from the given key size. This function will generate a new set of parameters and key in one step. :param int key_size: The length of the modulus in :term:`bits`. It should - be either 1024, 2048 or 3072. For keys generated in 2015 this should - be `at least 2048`_ (See page 41). Note that some applications - (such as SSH) have not yet gained support for larger key sizes - specified in FIPS 186-3 and are still restricted to only the - 1024-bit keys specified in FIPS 186-2. + be either 1024, 2048, 3072, or 4096. For keys generated in 2015 this + should be `at least 2048`_ (See page 41). :param backend: An instance of :class:`~cryptography.hazmat.backends.interfaces.DSABackend`. @@ -38,14 +48,17 @@ Generation .. versionadded:: 0.5 + .. versionchanged:: 3.0 + + Added support for 4096-bit keys for some legacy applications that + continue to use DSA despite the wider cryptographic community's + `ongoing protestations`_. + Generate DSA parameters using the provided ``backend``. :param int key_size: The length of :attr:`~DSAParameterNumbers.q`. It - should be either 1024, 2048 or 3072. For keys generated in 2015 this - should be `at least 2048`_ (See page 41). Note that some applications - (such as SSH) have not yet gained support for larger key sizes - specified in FIPS 186-3 and are still restricted to only the - 1024-bit keys specified in FIPS 186-2. + should be either 1024, 2048, 3072, or 4096. For keys generated in 2015 + this should be `at least 2048`_ (See page 41). :param backend: An instance of :class:`~cryptography.hazmat.backends.interfaces.DSABackend`. @@ -446,3 +459,4 @@ Key interfaces .. _`public-key`: https://en.wikipedia.org/wiki/Public-key_cryptography .. _`FIPS 186-4`: https://csrc.nist.gov/publications/detail/fips/186/4/final .. _`at least 2048`: https://www.cosic.esat.kuleuven.be/ecrypt/ecrypt2/documents/D.SPA.20.pdf +.. _`ongoing protestations`: https://buttondown.email/cryptography-dispatches/archive/cryptography-dispatches-dsa-is-past-its-prime/ |
