aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/backends
diff options
context:
space:
mode:
authorAlex Stapleton <alexs@prol.etari.at>2014-02-07 20:26:44 +0000
committerAlex Stapleton <alexs@prol.etari.at>2014-02-08 09:36:05 +0000
commit209a132abcfbcbe70a0864d664ab7a4fce136ef9 (patch)
tree695fb1a65b99f89d438c13124aefbb1e84d778c0 /docs/hazmat/backends
parentf970eaa676eb0cd89cdb2389f03d365899812822 (diff)
downloadcryptography-209a132abcfbcbe70a0864d664ab7a4fce136ef9.tar.gz
cryptography-209a132abcfbcbe70a0864d664ab7a4fce136ef9.tar.bz2
cryptography-209a132abcfbcbe70a0864d664ab7a4fce136ef9.zip
Start of an RSABackend interface
Only has key generation for now.
Diffstat (limited to 'docs/hazmat/backends')
-rw-r--r--docs/hazmat/backends/interfaces.rst21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst
index 5131ca12..444ecb46 100644
--- a/docs/hazmat/backends/interfaces.rst
+++ b/docs/hazmat/backends/interfaces.rst
@@ -191,3 +191,24 @@ A specific ``backend`` may provide one or more of these interfaces.
the derived key. This is typically a password.
:return bytes: Derived key.
+
+
+.. class:: RSABackend
+
+ .. versionadded:: 0.2
+
+ A backend with methods for using RSA.
+
+ .. method:: generate_rsa_private_key(public_exponent, bit_length)
+
+ :param int public_exponent: The public exponent of the new key.
+ Often one of the small Fermat primes 3, 5, 17, 257 or 65537.
+
+ :param int bit_length: The length in bits of the modulus. Should be
+ at least 2048.
+
+ :return: A new instance of a
+ :class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey`
+ provider.
+
+ :raises ValueError: If the public_exponent is not valid.