aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-01-18 17:33:27 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2015-01-18 17:33:27 -0500
commit7b672cace5c59a682e20854eac423e7e8c427531 (patch)
treeb802941c4df92418bc672376bbff0aa80bb86523 /docs/hazmat
parent2ca4a77d99960d225cd1b81d8ae6b8b1b14eda5f (diff)
parent65637eb7dc466e4b715bddf1188a6d04845167a1 (diff)
downloadcryptography-7b672cace5c59a682e20854eac423e7e8c427531.tar.gz
cryptography-7b672cace5c59a682e20854eac423e7e8c427531.tar.bz2
cryptography-7b672cace5c59a682e20854eac423e7e8c427531.zip
Merge pull request #1633 from reaperhulk/fix-975
recover (p, q) given (n, e, d)
Diffstat (limited to 'docs/hazmat')
-rw-r--r--docs/hazmat/primitives/asymmetric/rsa.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst
index fa72cced..3c095a54 100644
--- a/docs/hazmat/primitives/asymmetric/rsa.rst
+++ b/docs/hazmat/primitives/asymmetric/rsa.rst
@@ -391,6 +391,20 @@ this without having to do the math themselves.
Computes the ``dmq1`` parameter from the RSA private exponent and prime
``q``.
+.. function:: rsa_recover_prime_factors(n, e, d)
+
+ .. versionadded:: 0.8
+
+ Computes the prime factors ``(p, q)`` given the modulus, public exponent,
+ and private exponent.
+
+ .. note::
+
+ When recovering prime factors this algorithm will always return ``p``
+ and ``q`` such that ``p < q``.
+
+ :return: A tuple ``(p, q)``
+
.. _`RSA`: https://en.wikipedia.org/wiki/RSA_(cryptosystem)
.. _`public-key`: https://en.wikipedia.org/wiki/Public-key_cryptography