aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDavid Reid <dreid@dreid.org>2014-04-30 13:44:36 -0700
committerDavid Reid <dreid@dreid.org>2014-04-30 13:44:36 -0700
commit2fc16f548c2a9e4e82ff1f42abd17583c0bcfb73 (patch)
tree1253a6613401c0d71a4f154c917af6dd4ae1dd24 /docs
parenteda3da648b7c1faa8918879d2d7b34f3ebd1b3f6 (diff)
downloadcryptography-2fc16f548c2a9e4e82ff1f42abd17583c0bcfb73.tar.gz
cryptography-2fc16f548c2a9e4e82ff1f42abd17583c0bcfb73.tar.bz2
cryptography-2fc16f548c2a9e4e82ff1f42abd17583c0bcfb73.zip
Most basic numbers documentation.
Diffstat (limited to 'docs')
-rw-r--r--docs/hazmat/primitives/asymmetric/rsa.rst66
1 files changed, 66 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst
index 68ad089d..d66a339a 100644
--- a/docs/hazmat/primitives/asymmetric/rsa.rst
+++ b/docs/hazmat/primitives/asymmetric/rsa.rst
@@ -329,6 +329,72 @@ RSA
)
+.. class:: RSAPublicNumbers(e, n)
+
+ .. versionadded:: 0.5
+
+ .. 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
+
+
+ .. method:: public_numbers()
+
+ :return: :class:`~cryptography.hazmat.primitives.rsa.RSAPublicNumbers`
+
+ .. 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
---------------------------------