aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/asymmetric
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-06-03 08:06:53 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-06-03 08:06:53 -0500
commit395be8ba6b482f52c76713e2d01f29c824ae96de (patch)
treefbe8f8f8b5a5ef096cc4e61682fbc68d9056f007 /docs/hazmat/primitives/asymmetric
parenta4a462dd3b9cee4c42f8d03352009a7461db2403 (diff)
parentd2a69d27d0440d37eb00578527058fc535d621ba (diff)
downloadcryptography-395be8ba6b482f52c76713e2d01f29c824ae96de.tar.gz
cryptography-395be8ba6b482f52c76713e2d01f29c824ae96de.tar.bz2
cryptography-395be8ba6b482f52c76713e2d01f29c824ae96de.zip
Merge pull request #984 from dreid/rsa-numbers
RSA numbers
Diffstat (limited to 'docs/hazmat/primitives/asymmetric')
-rw-r--r--docs/hazmat/primitives/asymmetric/rsa.rst79
1 files changed, 79 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst
index 234a5c66..54839119 100644
--- a/docs/hazmat/primitives/asymmetric/rsa.rst
+++ b/docs/hazmat/primitives/asymmetric/rsa.rst
@@ -355,6 +355,85 @@ RSA
... )
+.. class:: RSAPublicNumbers(e, n)
+
+ .. versionadded:: 0.5
+
+ The collection of integers that make up an RSA public key.
+
+ .. attribute:: n
+
+ :type: int
+
+ The public modulus.
+
+ .. attribute:: e
+
+ :type: int
+
+ The public exponent.
+
+
+.. class:: RSAPrivateNumbers(p, q, d, dmp1, dmq1, iqmp, public_numbers)
+
+ .. versionadded:: 0.5
+
+ The collection of integers that make up an RSA private key.
+
+ .. warning::
+
+ With the exception of the integers contained in the
+ :class:`RSAPublicNumbers` all attributes of this class must be kept
+ secret. Revealing them will compromise the security of any
+ cryptographic operations performed with a key loaded from them.
+
+ .. attribute:: public_numbers
+
+ :type: :class:`~cryptography.hazmat.primitives.rsa.RSAPublicNumbers`
+
+ The :class:`RSAPublicNumbers` which makes up the RSA public key
+ associated with this RSA private key.
+
+ .. attribute:: p
+
+ :type: int
+
+ ``p``, one of the two primes composing the :attr:`modulus`.
+
+ .. attribute:: q
+
+ :type: int
+
+ ``q``, one of the two primes composing the :attr:`modulus`.
+
+ .. attribute:: d
+
+ :type: int
+
+ The private exponent. Alias for :attr:`private_exponent`.
+
+ .. attribute:: dmp1
+
+ :type: int
+
+ A `Chinese remainder theorem`_ coefficient used to speed up RSA
+ operations. Calculated as: d mod (p-1)
+
+ .. attribute:: dmq1
+
+ :type: int
+
+ A `Chinese remainder theorem`_ coefficient used to speed up RSA
+ operations. Calculated as: d mod (q-1)
+
+ .. attribute:: iqmp
+
+ :type: int
+
+ A `Chinese remainder theorem`_ coefficient used to speed up RSA
+ operations. Calculated as: q\ :sup:`-1` mod p
+
+
Handling partial RSA private keys
---------------------------------