aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/backends/interfaces.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/hazmat/backends/interfaces.rst')
-rw-r--r--docs/hazmat/backends/interfaces.rst37
1 files changed, 25 insertions, 12 deletions
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst
index 394d060b..11ff9305 100644
--- a/docs/hazmat/backends/interfaces.rst
+++ b/docs/hazmat/backends/interfaces.rst
@@ -9,7 +9,7 @@ Backend interfaces
Backend implementations may provide a number of interfaces to support operations
such as :doc:`/hazmat/primitives/symmetric-encryption`,
:doc:`/hazmat/primitives/cryptographic-hashes`, and
-:doc:`/hazmat/primitives/hmac`.
+:doc:`/hazmat/primitives/mac/hmac`.
A specific ``backend`` may provide one or more of these interfaces.
@@ -263,8 +263,20 @@ A specific ``backend`` may provide one or more of these interfaces.
:returns: ``True`` if the specified ``algorithm`` is supported by this
backend, otherwise ``False``.
+ .. method:: decrypt_rsa(private_key, ciphertext, padding)
-.. class:: OpenSSLSerializationBackend
+ :param private_key: An instance of an
+ :class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey`
+ provider.
+
+ :param bytes ciphertext: The ciphertext to decrypt.
+
+ :param padding: An instance of an
+ :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding`
+ provider.
+
+
+.. class:: TraditionalOpenSSLSerializationBackend
.. versionadded:: 0.3
@@ -278,8 +290,8 @@ A specific ``backend`` may provide one or more of these interfaces.
:param bytes password: The password to use if this data is encrypted.
Should be None if the data is not encrypted.
- :return: A new instance of
- :class:`~cryptography.hazmat.primitives.serialization.OpenSSLPrivateKey`
+ :return: A new instance of the appropriate private key or public key
+ that the serialized data contains.
:raises ValueError: If the data could not be deserialized correctly.
@@ -295,12 +307,12 @@ A specific ``backend`` may provide one or more of these interfaces.
.. 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
+ :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.
+ 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`
@@ -316,9 +328,10 @@ A specific ``backend`` may provide one or more of these interfaces.
: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.
+ :raises ValueError: This is raised if the key size is not one of 1024,
+ 2048, or 3072. It is also raised when OpenSSL is older than version
+ 1.0.0 and the key size is larger than 1024; older OpenSSL versions
+ do not support keys larger than 1024 bits.
.. class:: CMACBackend