diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-26 11:38:23 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-26 11:38:23 -0800 |
commit | 77d63d39b58fa97943fda0e391a3e43b5f84f9ea (patch) | |
tree | 32962d487be31639764aaae16c3b54eec509b6f0 /docs | |
parent | d062dc8a617f95e4e0b1893f384c482e16f10550 (diff) | |
parent | 46688b11ed7b4f8c53a61feb1bf355a38d3e939c (diff) | |
download | cryptography-77d63d39b58fa97943fda0e391a3e43b5f84f9ea.tar.gz cryptography-77d63d39b58fa97943fda0e391a3e43b5f84f9ea.tar.bz2 cryptography-77d63d39b58fa97943fda0e391a3e43b5f84f9ea.zip |
Merge pull request #509 from reaperhulk/rsa-interface-only
RSA private/public key interface
Diffstat (limited to 'docs')
-rw-r--r-- | docs/hazmat/primitives/interfaces.rst | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index edb24cd9..4739680a 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -102,3 +102,105 @@ Interfaces used by the symmetric cipher modes described in Exact requirements of the nonce are described by the documentation of individual modes. + +Asymmetric Interfaces +~~~~~~~~~~~~~~~~~~~~~ + +.. class:: RSAPrivateKey + + .. versionadded:: 0.2 + + An `RSA`_ private key. + + .. method:: public_key() + + :return: :class:`~cryptography.hazmat.primitives.interfaces.RSAPublicKey` + + An RSA public key object corresponding to the values of the private key. + + .. attribute:: modulus + + :type: int + + The public modulus. + + .. attribute:: public_exponent + + :type: int + + The public exponent. + + .. attribute:: key_length + + :type: int + + The bit length of the modulus. + + .. attribute:: p + + :type: int + + ``p``, one of the two primes composing ``n``. + + .. attribute:: q + + :type: int + + ``q``, one of the two primes composing ``n``. + + .. attribute:: d + + :type: int + + The private exponent. + + .. attribute:: n + + :type: int + + The public modulus. Alias for ``modulus``. + + .. attribute:: e + + :type: int + + The public exponent. Alias for ``public_exponent``. + + +.. class:: RSAPublicKey + + .. versionadded:: 0.2 + + An `RSA`_ public key. + + .. attribute:: modulus + + :type: int + + The public modulus. + + .. attribute:: key_length + + :type: int + + The bit length of the modulus. + + .. attribute:: public_exponent + + :type: int + + The public exponent. + + .. attribute:: n + + :type: int + + The public modulus. Alias for ``modulus``. + + .. attribute:: e + + :type: int + + The public exponent. Alias for ``public_exponent``. + +.. _`RSA`: http://en.wikipedia.org/wiki/RSA_(cryptosystem) |