From 74a58ac2e9cd1c882ebe4db3d3b6c1f387cf5d2e Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sun, 22 Jun 2014 11:44:42 -0600 Subject: DSA*Numbers classes --- docs/hazmat/primitives/asymmetric/dsa.rst | 74 +++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) (limited to 'docs/hazmat/primitives') diff --git a/docs/hazmat/primitives/asymmetric/dsa.rst b/docs/hazmat/primitives/asymmetric/dsa.rst index 6848d84c..713fdeb8 100644 --- a/docs/hazmat/primitives/asymmetric/dsa.rst +++ b/docs/hazmat/primitives/asymmetric/dsa.rst @@ -210,6 +210,80 @@ DSA :returns: :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricVerificationContext` +.. class:: DSAParameterNumbers(p, q, g) + + .. versionadded:: 0.5 + + The collection of integers that make up a set of DSA parameters. + + .. attribute:: p + + :type: int + + The public modulus. + + .. attribute:: q + + :type: int + + The sub group order. + + .. attribute:: g + + :type: int + + The generator. + +.. class:: DSAPublicNumbers(y, parameter_numbers) + + .. versionadded:: 0.5 + + The collection of integers that make up a DSA public key. + + .. attribute:: y + + :type: int + + The public value ``y``. + + .. attribute:: parameter_numbers + + :type: :class:`~cryptography.hazmat.primitives.dsa.DSAParameterNumbers` + + The :class:`~cryptography.hazmat.primitives.dsa.DSAParameterNumbers` + associated with the public key. + +.. class:: DSAPrivateNumbers(x, public_numbers, parameter_numbers) + + .. versionadded:: 0.5 + + The collection of integers that make up a DSA private key. + + .. warning:: + + Revealing the value of ``x`` will compromise the security of any + cryptographic operations performed. + + .. attribute:: x + + :type: int + + The private value ``x``. + + .. attribute:: public_numbers + + :type: :class:`~cryptography.hazmat.primitives.dsa.DSAPublicNumbers` + + The :class:`~cryptography.hazmat.primitives.dsa.DSAPublicNumbers` + associated with the private key. + + .. attribute:: parameter_numbers + + :type: :class:`~cryptography.hazmat.primitives.dsa.DSAParameterNumbers` + + The :class:`~cryptography.hazmat.primitives.dsa.DSAParameterNumbers` + associated with the public key. + .. _`DSA`: https://en.wikipedia.org/wiki/Digital_Signature_Algorithm .. _`public-key`: https://en.wikipedia.org/wiki/Public-key_cryptography .. _`FIPS 186-4`: http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf -- cgit v1.2.3 From 8c73a7bf86260dd7bd5edea99369a6ae27cc9936 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 23 Jun 2014 09:29:32 -0600 Subject: remove parameter_numbers from DSAPrivateNumbers since it's on public --- docs/hazmat/primitives/asymmetric/dsa.rst | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'docs/hazmat/primitives') diff --git a/docs/hazmat/primitives/asymmetric/dsa.rst b/docs/hazmat/primitives/asymmetric/dsa.rst index 713fdeb8..ea913dd3 100644 --- a/docs/hazmat/primitives/asymmetric/dsa.rst +++ b/docs/hazmat/primitives/asymmetric/dsa.rst @@ -253,7 +253,7 @@ DSA The :class:`~cryptography.hazmat.primitives.dsa.DSAParameterNumbers` associated with the public key. -.. class:: DSAPrivateNumbers(x, public_numbers, parameter_numbers) +.. class:: DSAPrivateNumbers(x, public_numbers) .. versionadded:: 0.5 @@ -277,13 +277,6 @@ DSA The :class:`~cryptography.hazmat.primitives.dsa.DSAPublicNumbers` associated with the private key. - .. attribute:: parameter_numbers - - :type: :class:`~cryptography.hazmat.primitives.dsa.DSAParameterNumbers` - - The :class:`~cryptography.hazmat.primitives.dsa.DSAParameterNumbers` - associated with the public key. - .. _`DSA`: https://en.wikipedia.org/wiki/Digital_Signature_Algorithm .. _`public-key`: https://en.wikipedia.org/wiki/Public-key_cryptography .. _`FIPS 186-4`: http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf -- cgit v1.2.3 From 36782837676e82eac063146d6e794cb4e51a24db Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 23 Jun 2014 12:05:25 -0600 Subject: fix some language --- docs/hazmat/primitives/asymmetric/dsa.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/hazmat/primitives') diff --git a/docs/hazmat/primitives/asymmetric/dsa.rst b/docs/hazmat/primitives/asymmetric/dsa.rst index ea913dd3..2167e528 100644 --- a/docs/hazmat/primitives/asymmetric/dsa.rst +++ b/docs/hazmat/primitives/asymmetric/dsa.rst @@ -226,7 +226,7 @@ DSA :type: int - The sub group order. + The sub-group order. .. attribute:: g -- cgit v1.2.3