From 68b509a399b5d24b6e6fe1b707096928a8483c9a Mon Sep 17 00:00:00 2001 From: David Reid Date: Thu, 8 May 2014 10:31:51 -0700 Subject: Document the backend interface. --- docs/hazmat/backends/interfaces.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'docs/hazmat') diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index c1ce621a..341fdc34 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -315,12 +315,28 @@ A specific ``backend`` may provide one or more of these interfaces. :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` provider. +<<<<<<< HEAD :return bytes: The encrypted data. :raises cryptography.exceptions.UnsupportedAlgorithm: If an unsupported MGF, hash function, or padding is chosen. :raises ValueError: When plaintext is too long for the key size. +======= + .. method:: load_rsa_numbers(numbers): + + :param numbers: An instance of + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers` or + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicNumbers`. + + :returns: A provider of + :class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey` or + :class:`~cryptography.hazmat.primitives.interfaces.RSAPublicKey` + depending on if it's input was an + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers` or + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicNumbers`. + +>>>>>>> 70cf9ba... Document the backend interface. .. class:: TraditionalOpenSSLSerializationBackend -- cgit v1.2.3 From 576a15393fd3efb1512926c5ce1884b602104539 Mon Sep 17 00:00:00 2001 From: David Reid Date: Wed, 28 May 2014 14:00:41 -0700 Subject: Resolve conflict. --- docs/hazmat/backends/interfaces.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'docs/hazmat') diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index 341fdc34..c7d5667d 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -315,14 +315,13 @@ A specific ``backend`` may provide one or more of these interfaces. :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` provider. -<<<<<<< HEAD :return bytes: The encrypted data. :raises cryptography.exceptions.UnsupportedAlgorithm: If an unsupported MGF, hash function, or padding is chosen. :raises ValueError: When plaintext is too long for the key size. -======= + .. method:: load_rsa_numbers(numbers): :param numbers: An instance of @@ -336,7 +335,6 @@ A specific ``backend`` may provide one or more of these interfaces. :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers` or :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicNumbers`. ->>>>>>> 70cf9ba... Document the backend interface. .. class:: TraditionalOpenSSLSerializationBackend -- cgit v1.2.3 From a674afef93a23d5cf85e6c86e8c007cc338c37d5 Mon Sep 17 00:00:00 2001 From: David Reid Date: Fri, 30 May 2014 14:15:29 -0700 Subject: Split load_rsa_numbers into load_rsa_private_numbers and load_rsa_public_numbers. --- docs/hazmat/backends/interfaces.rst | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'docs/hazmat') diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index c7d5667d..a32829fc 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -322,18 +322,21 @@ A specific ``backend`` may provide one or more of these interfaces. :raises ValueError: When plaintext is too long for the key size. - .. method:: load_rsa_numbers(numbers): + .. method:: load_rsa_private_numbers(numbers): :param numbers: An instance of - :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers` or - :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicNumbers`. + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers`. :returns: A provider of - :class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey` or - :class:`~cryptography.hazmat.primitives.interfaces.RSAPublicKey` - depending on if it's input was an - :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers` or - :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicNumbers`. + :class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey`. + + .. method:: load_rsa_public_numbers(numbers): + + :param numbers: An instance of + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers`. + + :returns: A provider of + :class:`~cryptography.hazmat.primitives.interfaces.RSAPublicKey`. .. class:: TraditionalOpenSSLSerializationBackend -- cgit v1.2.3 From c57a3761004b364347c9c5d5ce9736b94f7af3d3 Mon Sep 17 00:00:00 2001 From: David Reid Date: Tue, 3 Jun 2014 13:27:50 -0700 Subject: Document the valueerror these might raise. --- docs/hazmat/backends/interfaces.rst | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs/hazmat') diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index a32829fc..769ab989 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -330,6 +330,10 @@ A specific ``backend`` may provide one or more of these interfaces. :returns: A provider of :class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey`. + :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`. + .. method:: load_rsa_public_numbers(numbers): :param numbers: An instance of @@ -338,6 +342,10 @@ A specific ``backend`` may provide one or more of these interfaces. :returns: A provider of :class:`~cryptography.hazmat.primitives.interfaces.RSAPublicKey`. + :raises ValueError: This is raised when the values of + ``public_exponent`` or ``modulus`` do not match the bounds + specified in :rfc:`3447`. + .. class:: TraditionalOpenSSLSerializationBackend -- cgit v1.2.3 From da76ae019e98ef8580b9568bdd59fd27121ff432 Mon Sep 17 00:00:00 2001 From: David Reid Date: Tue, 3 Jun 2014 14:01:18 -0700 Subject: Document UnsupportedAlgorithm in a super vague way. --- docs/hazmat/backends/interfaces.rst | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs/hazmat') diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index 769ab989..1a2603bc 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -334,6 +334,9 @@ A specific ``backend`` may provide one or more of these interfaces. ``private_exponent``, ``public_exponent``, or ``modulus`` do not match the bounds specified in :rfc:`3447`. + :raises cryptography.exceptions.UnsupportedAlgorithm: This raised when + any backend specific criteria are not met. + .. method:: load_rsa_public_numbers(numbers): :param numbers: An instance of @@ -346,6 +349,9 @@ A specific ``backend`` may provide one or more of these interfaces. ``public_exponent`` or ``modulus`` do not match the bounds specified in :rfc:`3447`. + :raises cryptography.exceptions.UnsupportedAlgorithm: This raised when + any backend specific criteria are not met. + .. class:: TraditionalOpenSSLSerializationBackend -- cgit v1.2.3