diff options
author | David Reid <dreid@dreid.org> | 2014-06-27 14:25:25 -0700 |
---|---|---|
committer | David Reid <dreid@dreid.org> | 2014-06-27 14:25:25 -0700 |
commit | 0e2ee9b15b78fb2e7e08643b1adcdabb63f441e3 (patch) | |
tree | f69429233cc61a5962e37b997944e1439dffca31 /docs/hazmat/primitives/asymmetric/dsa.rst | |
parent | 9371dbfbaa61b17b6996c6fe43ee426e3092af04 (diff) | |
parent | 298effd54c11ed47077f580f74d9204f7acce3f5 (diff) | |
download | cryptography-0e2ee9b15b78fb2e7e08643b1adcdabb63f441e3.tar.gz cryptography-0e2ee9b15b78fb2e7e08643b1adcdabb63f441e3.tar.bz2 cryptography-0e2ee9b15b78fb2e7e08643b1adcdabb63f441e3.zip |
Merge pull request #1179 from reaperhulk/dsa-numbers-opaque-backend
DSA Opaque Keys for OpenSSL
Diffstat (limited to 'docs/hazmat/primitives/asymmetric/dsa.rst')
-rw-r--r-- | docs/hazmat/primitives/asymmetric/dsa.rst | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/asymmetric/dsa.rst b/docs/hazmat/primitives/asymmetric/dsa.rst index 2167e528..095c49b9 100644 --- a/docs/hazmat/primitives/asymmetric/dsa.rst +++ b/docs/hazmat/primitives/asymmetric/dsa.rst @@ -7,6 +7,51 @@ DSA `DSA`_ is a `public-key`_ algorithm for signing messages. +.. function:: generate_private_key(key_size, backend) + + .. versionadded:: 0.5 + + 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 bits. It should be + either 1024, 2048 or 3072. For keys generated in 2014 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. + + :param backend: A + :class:`~cryptography.hazmat.backends.interfaces.DSABackend` + provider. + + :return: A :class:`~cryptography.hazmat.primitives.interfaces.DSAPrivateKey` + provider. + +.. function:: generate_parameters(key_size, backend) + + .. versionadded:: 0.5 + + Generate DSA parameters using the provided ``backend``. + + :param int key_size: The length of the modulus in bits. It should be + either 1024, 2048 or 3072. For keys generated in 2014 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. + + :param backend: A + :class:`~cryptography.hazmat.backends.interfaces.DSABackend` + provider. + + :return: A :class:`~cryptography.hazmat.primitives.interfaces.DSAParameters` + provider. + + :raises cryptography.exceptions.UnsupportedAlgorithm: This is raised if + the provided ``backend`` does not implement + :class:`~cryptography.hazmat.backends.interfaces.DSABackend` + .. class:: DSAParameters(modulus, subgroup_order, generator) .. versionadded:: 0.4 |