aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/asymmetric/rsa.rst
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-01-18 09:42:58 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-01-18 09:47:30 -0600
commit836b830b155c1b04fbad40ab76f0de4339d8628c (patch)
tree13ca0ec7fc8ecfab82949289866c00938505f790 /docs/hazmat/primitives/asymmetric/rsa.rst
parent2ca4a77d99960d225cd1b81d8ae6b8b1b14eda5f (diff)
downloadcryptography-836b830b155c1b04fbad40ab76f0de4339d8628c.tar.gz
cryptography-836b830b155c1b04fbad40ab76f0de4339d8628c.tar.bz2
cryptography-836b830b155c1b04fbad40ab76f0de4339d8628c.zip
recover (p, q) given (n, e, d). fixes #975
Diffstat (limited to 'docs/hazmat/primitives/asymmetric/rsa.rst')
-rw-r--r--docs/hazmat/primitives/asymmetric/rsa.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst
index fa72cced..7a22c204 100644
--- a/docs/hazmat/primitives/asymmetric/rsa.rst
+++ b/docs/hazmat/primitives/asymmetric/rsa.rst
@@ -391,6 +391,21 @@ 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
+
+ .. note::
+
+ When recovering prime factors this algorithm will always return ``p``
+ and ``q`` such that ``p < q``.
+
+
+ Computes ``(p, q)`` given the modulus, public exponent, and private
+ exponent.
+
+ :return: A tuple ``(p, q)``
+
.. _`RSA`: https://en.wikipedia.org/wiki/RSA_(cryptosystem)
.. _`public-key`: https://en.wikipedia.org/wiki/Public-key_cryptography