From e0f0f34c0c86f1fb729404bb87d637de9a4795ce Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 17 Feb 2014 19:20:51 -0600 Subject: + docs for AsymmetricSignContext, AsymmetricVerifyContext, AsymmetricPadding --- docs/hazmat/primitives/interfaces.rst | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'docs/hazmat/primitives/interfaces.rst') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index df17e59d..c0ddd79c 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -231,6 +231,39 @@ Asymmetric Interfaces The public exponent. Alias for :attr:`public_exponent`. +.. class:: AsymmetricSignContext + + .. versionadded:: 0.2 + + .. method:: update(data) + + :param bytes data: The data you wish to pass into the context. + + .. method:: finalize() + + :return bytes signature: The signature. + + +.. class:: AsymmetricVerifyContext + + .. versionadded:: 0.2 + + .. method:: update(data) + + :param bytes data: The data you wish to pass into the context. + + .. method:: finalize() + + :raises cryptography.exceptions.InvalidSignature: If signature does not + validate. + + +.. class:: AsymmetricPadding + + A named asymmetric padding. + + .. attribute:: name + Hash Algorithms ~~~~~~~~~~~~~~~ -- cgit v1.2.3 From 19f32d5502ec938047d3d46dc440d8fe9481caa8 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 17 Feb 2014 19:23:06 -0600 Subject: add versionadded to AsymmetricPadding --- docs/hazmat/primitives/interfaces.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/hazmat/primitives/interfaces.rst') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index c0ddd79c..e4ae3e93 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -260,7 +260,7 @@ Asymmetric Interfaces .. class:: AsymmetricPadding - A named asymmetric padding. + .. versionadded:: 0.2 .. attribute:: name -- cgit v1.2.3 From eda558ce9ffca610ee628884041832da4afb7645 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 17 Feb 2014 21:18:13 -0600 Subject: more renaming --- docs/hazmat/primitives/interfaces.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/hazmat/primitives/interfaces.rst') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index e4ae3e93..e97f40f4 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -231,13 +231,13 @@ Asymmetric Interfaces The public exponent. Alias for :attr:`public_exponent`. -.. class:: AsymmetricSignContext +.. class:: AsymmetricSignatureContext .. versionadded:: 0.2 .. method:: update(data) - :param bytes data: The data you wish to pass into the context. + :param bytes data: The data you want to sign. .. method:: finalize() @@ -250,7 +250,7 @@ Asymmetric Interfaces .. method:: update(data) - :param bytes data: The data you wish to pass into the context. + :param bytes data: The data you wish to verify using the signature. .. method:: finalize() -- 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/primitives/interfaces.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/hazmat/primitives/interfaces.rst') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index e97f40f4..6fbc61b0 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -252,7 +252,7 @@ Asymmetric Interfaces :param bytes data: The data you wish to verify using the signature. - .. method:: finalize() + .. method:: verify() :raises cryptography.exceptions.InvalidSignature: If signature does not validate. -- 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/primitives/interfaces.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/hazmat/primitives/interfaces.rst') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index 6fbc61b0..5be3dd95 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -244,7 +244,7 @@ Asymmetric Interfaces :return bytes signature: The signature. -.. class:: AsymmetricVerifyContext +.. class:: AsymmetricVerificationContext .. versionadded:: 0.2 -- cgit v1.2.3 From 42b3713eede3f5b417b0ce123fdcc9c4c24009d3 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sun, 23 Feb 2014 19:13:19 -0600 Subject: add RSA verification support --- docs/hazmat/primitives/interfaces.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/hazmat/primitives/interfaces.rst') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index 5be3dd95..53113223 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -254,8 +254,8 @@ Asymmetric Interfaces .. method:: verify() - :raises cryptography.exceptions.InvalidSignature: If signature does not - validate. + :raises :class:`~cryptography.exceptions.InvalidAsymmetricSignature`: If + the signature does not validate. .. class:: AsymmetricPadding -- cgit v1.2.3 From fef1fbd1187b7fc80589553fb192210dd15a3a1c Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Wed, 26 Feb 2014 23:39:37 -0400 Subject: address some review comments --- docs/hazmat/primitives/interfaces.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/hazmat/primitives/interfaces.rst') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index 53113223..15ad1d1b 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -254,8 +254,8 @@ Asymmetric Interfaces .. method:: verify() - :raises :class:`~cryptography.exceptions.InvalidAsymmetricSignature`: If - the signature does not validate. + :raises cryptography.exceptions.InvalidSignature: If the signature does + not validate. .. class:: AsymmetricPadding -- cgit v1.2.3 From b416715b8ee96c445587d444a4684bc7817e4638 Mon Sep 17 00:00:00 2001 From: Mohammed Attia Date: Tue, 4 Mar 2014 03:29:56 +0200 Subject: Added documentation for the DSA interfaces --- docs/hazmat/primitives/interfaces.rst | 107 ++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) (limited to 'docs/hazmat/primitives/interfaces.rst') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index 15ad1d1b..b119bc5b 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -231,6 +231,113 @@ Asymmetric Interfaces The public exponent. Alias for :attr:`public_exponent`. +.. class:: DSAParams + + .. versionadded:: 0.3 + + `DSA`_ parameters. + + .. attribute:: modulus + + :type: int + + The prime modulus that's used in generating the DSA keypair and used + in the DSA signing and verification processes. + + .. attribute:: subgroup_order + + :type: int + + The subgroup order that's used in generating the DSA keypair + by the generator and used in the DSA signing and verification + processes. + + .. attribute:: generator + + :type: int + + The generator that is used in generating the DSA keypair and used + in the DSA signing and verification processes." + + .. attribute:: p + + :type: int + + The prime modulus that's used in generating the DSA keypair and used + in the DSA signing and verification processes. Alias for modulus. + + .. attribute:: q + + :type: int + + The subgroup order that's used in generating the DSA keypair + by the generator and used in the DSA signing and verification + processes. Alias for subgroup_order. + + .. attribute:: g + + :type: int + + The generator that is used in generating the DSA keypair and used + in the DSA signing and verification processes. Alias for generator. + + +.. class:: DSAPrivateKey + + .. versionadded:: 0.3 + + An `DSA`_ private key. + + .. method:: public_key() + + :return: :class:`~cryptography.hazmat.primitives.interfaces.DSAPublicKey` + + An DSA public key object corresponding to the values of the private key. + + .. method:: parameters() + + :return: :class:`~cryptography.hazmat.primitives.interfaces.DSAParams` + + The DSAParams object associated with this private key. + + .. attribute:: key_size + + :type: int + + The bit length of the modulus. + + .. attribute:: x + + :type: int + + The private key. + + .. attribute:: y + + :type: int + + The public key. + + +.. class:: DSAPublicKey + + .. versionadded:: 0.3 + + An `DSA`_ private key. + + .. method:: parameters() + + :return: :class:`~cryptography.hazmat.primitives.interfaces.DSAParams` + + The DSAParams object associated with this public key. + + .. attribute:: y + + :type: int + + The public key. + + .. class:: AsymmetricSignatureContext .. versionadded:: 0.2 -- cgit v1.2.3 From 7032451fb442f3e4c5dd590c54aa7532b1197f5c Mon Sep 17 00:00:00 2001 From: Mohammed Attia Date: Tue, 4 Mar 2014 03:34:39 +0200 Subject: Annotate aliases in the DSA documentation --- docs/hazmat/primitives/interfaces.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/hazmat/primitives/interfaces.rst') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index b119bc5b..bbaeb5e7 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -264,7 +264,7 @@ Asymmetric Interfaces :type: int The prime modulus that's used in generating the DSA keypair and used - in the DSA signing and verification processes. Alias for modulus. + in the DSA signing and verification processes. Alias for :attr:`modulus`. .. attribute:: q @@ -272,14 +272,14 @@ Asymmetric Interfaces The subgroup order that's used in generating the DSA keypair by the generator and used in the DSA signing and verification - processes. Alias for subgroup_order. + processes. Alias for :attr:`subgroup_order`. .. attribute:: g :type: int The generator that is used in generating the DSA keypair and used - in the DSA signing and verification processes. Alias for generator. + in the DSA signing and verification processes. Alias for :attr:`generator`. .. class:: DSAPrivateKey -- cgit v1.2.3 From 604c78f75ca1c0a5b6a340dd5067182487f1b65d Mon Sep 17 00:00:00 2001 From: Mohammed Attia Date: Tue, 4 Mar 2014 03:56:08 +0200 Subject: Define DSA in the documentation --- docs/hazmat/primitives/interfaces.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/hazmat/primitives/interfaces.rst') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index bbaeb5e7..2ea4b583 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -442,3 +442,4 @@ Key Derivation Functions .. _`RSA`: https://en.wikipedia.org/wiki/RSA_(cryptosystem) .. _`Chinese remainder theorem`: https://en.wikipedia.org/wiki/Chinese_remainder_theorem +.. _`DSA`: https://en.wikipedia.org/wiki/Digital_Signature_Algorithm -- cgit v1.2.3 From cb9a6c24ea2165b25e4129a440871ce7bcab3de4 Mon Sep 17 00:00:00 2001 From: Mohammed Attia Date: Tue, 4 Mar 2014 04:16:35 +0200 Subject: Change keypair to key pair to pass the sphinx spelling test --- docs/hazmat/primitives/interfaces.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/hazmat/primitives/interfaces.rst') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index 2ea4b583..c1a2d23a 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -241,14 +241,14 @@ Asymmetric Interfaces :type: int - The prime modulus that's used in generating the DSA keypair and used + The prime modulus that's used in generating the DSA key pair and used in the DSA signing and verification processes. .. attribute:: subgroup_order :type: int - The subgroup order that's used in generating the DSA keypair + The subgroup order that's used in generating the DSA key pair by the generator and used in the DSA signing and verification processes. @@ -256,21 +256,21 @@ Asymmetric Interfaces :type: int - The generator that is used in generating the DSA keypair and used + The generator that is used in generating the DSA key pair and used in the DSA signing and verification processes." .. attribute:: p :type: int - The prime modulus that's used in generating the DSA keypair and used + The prime modulus that's used in generating the DSA key pair and used in the DSA signing and verification processes. Alias for :attr:`modulus`. .. attribute:: q :type: int - The subgroup order that's used in generating the DSA keypair + The subgroup order that's used in generating the DSA key pair by the generator and used in the DSA signing and verification processes. Alias for :attr:`subgroup_order`. @@ -278,7 +278,7 @@ Asymmetric Interfaces :type: int - The generator that is used in generating the DSA keypair and used + The generator that is used in generating the DSA key pair and used in the DSA signing and verification processes. Alias for :attr:`generator`. -- cgit v1.2.3 From 7a1738a1b8b3da2a215f2ea3aff73a67eaaab406 Mon Sep 17 00:00:00 2001 From: Mohammed Attia Date: Tue, 4 Mar 2014 19:17:24 +0200 Subject: Typo fixes --- docs/hazmat/primitives/interfaces.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'docs/hazmat/primitives/interfaces.rst') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index c1a2d23a..d94aee83 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -241,14 +241,14 @@ Asymmetric Interfaces :type: int - The prime modulus that's used in generating the DSA key pair and used + The prime modulus that is used in generating the DSA key pair and used in the DSA signing and verification processes. .. attribute:: subgroup_order :type: int - The subgroup order that's used in generating the DSA key pair + The subgroup order that is used in generating the DSA key pair by the generator and used in the DSA signing and verification processes. @@ -257,20 +257,20 @@ Asymmetric Interfaces :type: int The generator that is used in generating the DSA key pair and used - in the DSA signing and verification processes." + in the DSA signing and verification processes. .. attribute:: p :type: int - The prime modulus that's used in generating the DSA key pair and used + The prime modulus that is used in generating the DSA key pair and used in the DSA signing and verification processes. Alias for :attr:`modulus`. .. attribute:: q :type: int - The subgroup order that's used in generating the DSA key pair + The subgroup order that is used in generating the DSA key pair by the generator and used in the DSA signing and verification processes. Alias for :attr:`subgroup_order`. @@ -286,7 +286,7 @@ Asymmetric Interfaces .. versionadded:: 0.3 - An `DSA`_ private key. + A `DSA`_ private key. .. method:: public_key() @@ -323,7 +323,7 @@ Asymmetric Interfaces .. versionadded:: 0.3 - An `DSA`_ private key. + A `DSA`_ private key. .. method:: parameters() -- cgit v1.2.3 From 71acc67e71013f8660a16d78520da22ec379e259 Mon Sep 17 00:00:00 2001 From: Mohammed Attia Date: Tue, 4 Mar 2014 19:20:45 +0200 Subject: Change DSAParams to DSAParameters --- docs/hazmat/primitives/interfaces.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs/hazmat/primitives/interfaces.rst') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index d94aee83..cc2a3000 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -231,7 +231,7 @@ Asymmetric Interfaces The public exponent. Alias for :attr:`public_exponent`. -.. class:: DSAParams +.. class:: DSAParameters .. versionadded:: 0.3 @@ -296,9 +296,9 @@ Asymmetric Interfaces .. method:: parameters() - :return: :class:`~cryptography.hazmat.primitives.interfaces.DSAParams` + :return: :class:`~cryptography.hazmat.primitives.interfaces.DSAParameters` - The DSAParams object associated with this private key. + The DSAParameters object associated with this private key. .. attribute:: key_size @@ -327,9 +327,9 @@ Asymmetric Interfaces .. method:: parameters() - :return: :class:`~cryptography.hazmat.primitives.interfaces.DSAParams` + :return: :class:`~cryptography.hazmat.primitives.interfaces.DSAParameters` - The DSAParams object associated with this public key. + The DSAParameters object associated with this public key. .. attribute:: y -- cgit v1.2.3