aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cryptography/hazmat/primitives/asymmetric/rsa.py1
-rw-r--r--docs/hazmat/primitives/asymmetric/rsa.rst14
-rw-r--r--tests/hazmat/primitives/test_rsa.py2
3 files changed, 10 insertions, 7 deletions
diff --git a/cryptography/hazmat/primitives/asymmetric/rsa.py b/cryptography/hazmat/primitives/asymmetric/rsa.py
index e84472c7..18fcac26 100644
--- a/cryptography/hazmat/primitives/asymmetric/rsa.py
+++ b/cryptography/hazmat/primitives/asymmetric/rsa.py
@@ -294,6 +294,7 @@ class RSAPrivateNumbers(object):
def iqmp(self):
return self._iqmp
+ @property
def public_numbers(self):
return self._public_numbers
diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst
index 5e6037de..8c34497e 100644
--- a/docs/hazmat/primitives/asymmetric/rsa.rst
+++ b/docs/hazmat/primitives/asymmetric/rsa.rst
@@ -357,14 +357,16 @@ RSA
.. warning::
With the exception of the integers contained in the
- :class:`RSAPublicNumbers` returned by the :meth:`public_numbers`
- method, all attributes of this class must be kept secret. Revealing
- them will compromise the security of any cryptographic operations
- performed with a key derived from them.
+ :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.
- .. method:: public_numbers()
+ .. attribute:: public_numbers
- :return: :class:`~cryptography.hazmat.primitives.rsa.RSAPublicNumbers`
+ :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
diff --git a/tests/hazmat/primitives/test_rsa.py b/tests/hazmat/primitives/test_rsa.py
index e60bfabf..6d3bf2ec 100644
--- a/tests/hazmat/primitives/test_rsa.py
+++ b/tests/hazmat/primitives/test_rsa.py
@@ -1509,4 +1509,4 @@ class TestRSANumbers(object):
assert private_numbers.dmp1 == 1
assert private_numbers.dmq1 == 1
assert private_numbers.iqmp == 2
- assert private_numbers.public_numbers() == public_numbers
+ assert private_numbers.public_numbers == public_numbers