aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-06-25 08:44:30 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-06-25 08:44:30 -0600
commit125857f8ce6a7fc09d0e208d9bcd8321cc5ac2d4 (patch)
tree673362dc9f61703182f1deb82a35fc397629ea4d /docs/hazmat
parent0197ed8dedcd24d3b690d1b76eb6866df14f56dd (diff)
downloadcryptography-125857f8ce6a7fc09d0e208d9bcd8321cc5ac2d4.tar.gz
cryptography-125857f8ce6a7fc09d0e208d9bcd8321cc5ac2d4.tar.bz2
cryptography-125857f8ce6a7fc09d0e208d9bcd8321cc5ac2d4.zip
dsa docs
Diffstat (limited to 'docs/hazmat')
-rw-r--r--docs/hazmat/primitives/asymmetric/dsa.rst37
1 files changed, 37 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/asymmetric/dsa.rst b/docs/hazmat/primitives/asymmetric/dsa.rst
index 2167e528..42e3af2e 100644
--- a/docs/hazmat/primitives/asymmetric/dsa.rst
+++ b/docs/hazmat/primitives/asymmetric/dsa.rst
@@ -7,6 +7,43 @@ DSA
`DSA`_ is a `public-key`_ algorithm for signing messages.
+.. 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`
+
+.. function:: generate_private_key(parameters)
+
+ .. versionadded:: 0.5
+
+ Generate an DSA private key using the provided parameters.
+
+ :param parameters: A
+ :class:`~cryptography.hazmat.primitives.interfaces.DSAParameters`
+ provider.
+
+ :return: A :class:`~cryptography.hazmat.primitives.interfaces.DSAPrivateKey`
+ provider.
+
.. class:: DSAParameters(modulus, subgroup_order, generator)
.. versionadded:: 0.4