aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/backends/interfaces.rst
diff options
context:
space:
mode:
authorMohammed Attia <skeuomorf@gmail.com>2014-04-02 04:03:09 +0200
committerMohammed Attia <skeuomorf@gmail.com>2014-04-04 20:19:32 +0200
commit29474ac7dab3f5c8b664463ed28ec83b7b77250b (patch)
tree4a58420d14561994eeeb38c7b95403765d74f30b /docs/hazmat/backends/interfaces.rst
parent97c27c698dc5325aff3887cf13e0e58bcfd1acfe (diff)
downloadcryptography-29474ac7dab3f5c8b664463ed28ec83b7b77250b.tar.gz
cryptography-29474ac7dab3f5c8b664463ed28ec83b7b77250b.tar.bz2
cryptography-29474ac7dab3f5c8b664463ed28ec83b7b77250b.zip
Add docs for DSA parameters and key generation
Diffstat (limited to 'docs/hazmat/backends/interfaces.rst')
-rw-r--r--docs/hazmat/backends/interfaces.rst34
1 files changed, 34 insertions, 0 deletions
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst
index c38f818f..9c401d28 100644
--- a/docs/hazmat/backends/interfaces.rst
+++ b/docs/hazmat/backends/interfaces.rst
@@ -285,3 +285,37 @@ A specific ``backend`` may provide one or more of these interfaces.
:raises cryptography.exceptions.UnsupportedAlgorithm: If the data is
encrypted with an unsupported algorithm.
+
+
+.. class:: DSABackend
+
+ .. versionadded:: 0.4
+
+ A backend with methods for using DSA.
+
+ .. method:: generate_dsa_parameters(key_size)
+
+ :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.
+ 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.
+
+ :return: A new instance of a
+ :class:`~cryptography.hazmat.primitives.interfaces.DSAParameters`
+ provider.
+
+ .. method:: generate_dsa_private_key(parameters)
+
+ :param parameters: A
+ :class:`~cryptography.hazmat.primitives.interfaces.DSAParameters`
+ provider.
+
+ :return: A new instance of a
+ :class:`~cryptography.hazmat.primitives.interfaces.DSAPrivateKey`
+ provider.
+
+ :raises ValueError: This is raised if the key size is not (1024 or 2048 or 3072)
+ or if the OpenSSL version is older than 1.0.0 and the key size is larger than 1024
+ because older OpenSSL versions don't support a key size larger than 1024.