From 2b3f0fc4d6641d040056466adc6dca7cfc75d3d5 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 17 Feb 2014 19:20:14 -0600 Subject: add docs for sign/verify ctx creation interface --- docs/hazmat/backends/interfaces.rst | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'docs/hazmat/backends') diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index e6bf8f69..72b64910 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -212,3 +212,39 @@ A specific ``backend`` may provide one or more of these interfaces. provider. :raises ValueError: If the public_exponent is not valid. + + .. method:: create_rsa_sign_ctx(private_key, padding, algorithm) + + :param private_key: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey` + provider. + + :param padding: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` + provider. + + :param algorithm: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` + provider. + + :returns: + :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricSignContext` + + .. method:: create_rsa_verify_ctx(public_key, signature, padding, algorithm) + + :param public_key: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.RSAPublicKey` + provider. + + :param bytes signature: The signature to verify. + + :param padding: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` + provider. + + :param algorithm: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` + provider. + + :returns: + :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricVerifyContext` -- cgit v1.2.3 From 3292c994ba0516c59cc3e003f910a9f3c2bc0c54 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 17 Feb 2014 21:12:38 -0600 Subject: create_rsa_sign_ctx->create_rsa_signature_ctx --- docs/hazmat/backends/interfaces.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/hazmat/backends') diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index 72b64910..1879336f 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -213,7 +213,7 @@ A specific ``backend`` may provide one or more of these interfaces. :raises ValueError: If the public_exponent is not valid. - .. method:: create_rsa_sign_ctx(private_key, padding, algorithm) + .. method:: create_rsa_signature_ctx(private_key, padding, algorithm) :param private_key: An instance of a :class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey` -- cgit v1.2.3 From dd3780a0e516b2c07e02f5b3afc02a79bfe44c6f Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Tue, 18 Feb 2014 13:17:53 -0600 Subject: some grammar fixes, rename a method or two --- docs/hazmat/backends/interfaces.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs/hazmat/backends') diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index 1879336f..c54340b6 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -215,11 +215,11 @@ A specific ``backend`` may provide one or more of these interfaces. .. method:: create_rsa_signature_ctx(private_key, padding, algorithm) - :param private_key: An instance of a + :param private_key: An instance of an :class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey` provider. - :param padding: An instance of a + :param padding: An instance of an :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` provider. @@ -228,9 +228,9 @@ A specific ``backend`` may provide one or more of these interfaces. provider. :returns: - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricSignContext` + :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricSignatureContext` - .. method:: create_rsa_verify_ctx(public_key, signature, padding, algorithm) + .. method:: create_rsa_verification_ctx(public_key, signature, padding, algorithm) :param public_key: An instance of a :class:`~cryptography.hazmat.primitives.interfaces.RSAPublicKey` @@ -238,7 +238,7 @@ A specific ``backend`` may provide one or more of these interfaces. :param bytes signature: The signature to verify. - :param padding: An instance of a + :param padding: An instance of an :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` provider. -- cgit v1.2.3 From 430202dfba9a3c97abc80955752e5b9e4d430911 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Tue, 18 Feb 2014 13:36:53 -0600 Subject: let's try renaming everything I said I'd rename --- docs/hazmat/backends/interfaces.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/hazmat/backends') diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index c54340b6..bd38ed50 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -247,4 +247,4 @@ A specific ``backend`` may provide one or more of these interfaces. provider. :returns: - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricVerifyContext` + :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricVerificationContext` -- cgit v1.2.3 From 2fb76a3d39ae3ab189bb08336fc4eb42950771a6 Mon Sep 17 00:00:00 2001 From: Alex Stapleton Date: Sat, 15 Feb 2014 11:10:57 +0000 Subject: OpenSSL "traditional" key format loading... Backend interface only. --- docs/hazmat/backends/interfaces.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'docs/hazmat/backends') diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index bd38ed50..af19fbc6 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -248,3 +248,26 @@ A specific ``backend`` may provide one or more of these interfaces. :returns: :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricVerificationContext` + + +.. class:: OpenSSLSerializationBackend + + .. versionadded:: 0.3 + + A backend with methods for working with OpenSSL's "traditional" PKCS #1 + style key serialization. + + .. method:: load_openssl_pem_private_key(data, password) + + :param bytes data: PEM data to deserialize. + + :param bytes password: The password to use if this data is encrypted. + Should be None if the data is not encrypted. + + :return: A new instance of + :class:`~cryptography.hazmat.primitives.serialization.OpenSSLPrivateKey` + + :raises ValueError: If the data could not be deserialized correctly. + + :raises cryptography.exceptions.UnsupportedAlgorithm: If the data is + encrypted with an unsupported algorithm. -- cgit v1.2.3 From c6a6f317fca2aa368943870ecc3854bb53399f06 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 6 Mar 2014 14:22:56 -0800 Subject: Convert stuff --- docs/hazmat/backends/interfaces.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/hazmat/backends') diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index af19fbc6..a7a9661b 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -258,7 +258,7 @@ A specific ``backend`` may provide one or more of these interfaces. style key serialization. .. method:: load_openssl_pem_private_key(data, password) - + :param bytes data: PEM data to deserialize. :param bytes password: The password to use if this data is encrypted. -- cgit v1.2.3