aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/asymmetric/rsa.rst
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-15 17:59:27 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-20 16:53:03 -0500
commit27f9ca663def6fdccd97297ef40c55923a43394a (patch)
tree16c242e0515145ea624b7cb0c4096167d523eefe /docs/hazmat/primitives/asymmetric/rsa.rst
parent7bdcdc175675bc78edaa7e0f931676652ab7a427 (diff)
downloadcryptography-27f9ca663def6fdccd97297ef40c55923a43394a.tar.gz
cryptography-27f9ca663def6fdccd97297ef40c55923a43394a.tar.bz2
cryptography-27f9ca663def6fdccd97297ef40c55923a43394a.zip
more docs
Diffstat (limited to 'docs/hazmat/primitives/asymmetric/rsa.rst')
-rw-r--r--docs/hazmat/primitives/asymmetric/rsa.rst33
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst
index c9de2831..e72e8835 100644
--- a/docs/hazmat/primitives/asymmetric/rsa.rst
+++ b/docs/hazmat/primitives/asymmetric/rsa.rst
@@ -116,6 +116,39 @@ RSA
:raises ValueError: This is raised when the chosen hash algorithm is
too large for the key size.
+ .. method:: decrypt(ciphertext, padding, backend)
+
+ .. versionadded:: 0.4
+
+ Decrypt data that was encrypted via the public key.
+
+ :param bytes ciphertext: The ciphertext to decrypt.
+
+ :param padding: An instance of a
+ :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding`
+ provider.
+
+ :param backend: A
+ :class:`~cryptography.hazmat.backends.interfaces.RSABackend`
+ provider.
+
+ :return bytes: Decrypted data.
+
+ :raises cryptography.exceptions.UnsupportedAlgorithm: This is raised if
+ the provided ``backend`` does not implement
+ :class:`~cryptography.hazmat.backends.interfaces.RSABackend` or if
+ the backend does not support the chosen hash or padding algorithm.
+
+ :raises TypeError: This is raised when the padding is not an
+ :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding`
+ provider.
+
+ :raises ValueError: This is raised when the chosen hash algorithm is
+ too large for the key size.
+
+ :raises cryptography.exceptions.InvalidDecryption: This is raised if
+ decryption fails due to invalid ciphertext.
+
.. class:: RSAPublicKey(public_exponent, modulus)