diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-02-07 16:07:55 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-02-07 16:07:55 -0600 |
commit | 41ace0a57d8e45b8034237a617ccc9fcaf45f4d4 (patch) | |
tree | c7d1f625ad79724b77ff55a80dabd37376403325 /docs/hazmat/primitives/rsa.rst | |
parent | de0019fe6943215746d385f65f6fa4e7e2725dd1 (diff) | |
parent | bc29f5b7741f1593234c6cae9df58e2ed8345f92 (diff) | |
download | cryptography-41ace0a57d8e45b8034237a617ccc9fcaf45f4d4.tar.gz cryptography-41ace0a57d8e45b8034237a617ccc9fcaf45f4d4.tar.bz2 cryptography-41ace0a57d8e45b8034237a617ccc9fcaf45f4d4.zip |
Merge pull request #559 from public/rsa-keys
RSA keys
Diffstat (limited to 'docs/hazmat/primitives/rsa.rst')
-rw-r--r-- | docs/hazmat/primitives/rsa.rst | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/rsa.rst b/docs/hazmat/primitives/rsa.rst new file mode 100644 index 00000000..7c6356c1 --- /dev/null +++ b/docs/hazmat/primitives/rsa.rst @@ -0,0 +1,58 @@ +.. hazmat:: + +RSA +=== + +.. currentmodule:: cryptography.hazmat.primitives.asymmetric.rsa + +`RSA`_ is a `public-key`_ algorithm for encrypting and signing messages. + +.. class:: RSAPrivateKey(p, q, private_exponent, public_exponent, modulus) + + .. versionadded:: 0.2 + + An RSA private key is required for decryption and signing of messages. + + Normally you do not need to directly construct private keys because you'll + be loading them from a file or generating them automatically. + + .. warning:: + This method only checks a limited set of properties of its arguments. + Using an RSA that you do not trust or with incorrect parameters may + lead to insecure operation, crashes, and other undefined behavior. We + recommend that you only ever load private keys that were generated with + software you trust. + + This class conforms to the + :class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey` + interface. + + :raises TypeError: This is raised when the arguments are not all integers. + + :raises ValueError: This is raised when the values of `p`, `q`, + `private_exponent`, `public_exponent` or `modulus` do + not match the bounds specified in `RFC 3447`_. + +.. class:: RSAPublicKey(public_exponent, modulus) + + .. versionadded:: 0.2 + + An RSA public key is required for encryption and verification of messages. + + Normally you do not need to directly construct public keys because you'll + be loading them from a file, generating them automatically or receiving + them from a 3rd party. + + This class conforms to the + :class:`~cryptography.hazmat.primitives.interfaces.RSAPublicKey` + interface. + + :raises TypeError: This is raised when the arguments are not all integers. + + :raises ValueError: This is raised when the values of `public_exponent` or + `modulus` do not match the bounds specified in + `RFC 3447`_. + +.. _`RSA`: https://en.wikipedia.org/wiki/RSA_(cryptosystem) +.. _`public-key`: https://en.wikipedia.org/wiki/Public-key_cryptography +.. _`RFC 3447`: https://tools.ietf.org/html/rfc3447 |