diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-01-23 08:25:07 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-01-23 08:25:07 -0600 |
commit | b9690abdb3b8afc0599a30deddd06a1681286d47 (patch) | |
tree | 7f4b92ddd0c694818718ec28a1e3c6d527ec5cd2 /docs | |
parent | 418053a577b00a99d45036dc87d711e19d3867e9 (diff) | |
parent | d76aa47f9797b9bfa02e1f22b593f1c16a3edc13 (diff) | |
download | cryptography-b9690abdb3b8afc0599a30deddd06a1681286d47.tar.gz cryptography-b9690abdb3b8afc0599a30deddd06a1681286d47.tar.bz2 cryptography-b9690abdb3b8afc0599a30deddd06a1681286d47.zip |
Merge pull request #1634 from public/deprecate-dsa
Move DSA* interfaces to interfaces.dsa module
Diffstat (limited to 'docs')
-rw-r--r-- | docs/hazmat/backends/interfaces.rst | 12 | ||||
-rw-r--r-- | docs/hazmat/primitives/asymmetric/dsa.rst | 177 | ||||
-rw-r--r-- | docs/hazmat/primitives/interfaces.rst | 156 |
3 files changed, 172 insertions, 173 deletions
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index 8efe2ce9..9afbcb67 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -306,17 +306,17 @@ A specific ``backend`` may provide one or more of these interfaces. restricted to only the 1024-bit keys specified in FIPS 186-2. :return: A new instance of a - :class:`~cryptography.hazmat.primitives.interfaces.DSAParameters` + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameters` provider. .. method:: generate_dsa_private_key(parameters) :param parameters: A - :class:`~cryptography.hazmat.primitives.interfaces.DSAParameters` + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameters` provider. :return: A new instance of a - :class:`~cryptography.hazmat.primitives.interfaces.DSAPrivateKey` + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey` provider. :raises ValueError: This is raised if the key size is not one of 1024, @@ -366,7 +366,7 @@ A specific ``backend`` may provide one or more of these interfaces. :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameterNumbers`. :returns: A provider of - :class:`~cryptography.hazmat.primitives.interfaces.DSAParameters`. + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameters`. :raises cryptography.exceptions.UnsupportedAlgorithm: This is raised when any backend specific criteria are not met. @@ -377,7 +377,7 @@ A specific ``backend`` may provide one or more of these interfaces. :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateNumbers`. :returns: A provider of - :class:`~cryptography.hazmat.primitives.interfaces.DSAPrivateKey`. + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey`. :raises cryptography.exceptions.UnsupportedAlgorithm: This is raised when any backend specific criteria are not met. @@ -388,7 +388,7 @@ A specific ``backend`` may provide one or more of these interfaces. :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicNumbers`. :returns: A provider of - :class:`~cryptography.hazmat.primitives.interfaces.DSAPublicKey`. + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicKey`. :raises cryptography.exceptions.UnsupportedAlgorithm: This is raised when any backend specific criteria are not met. diff --git a/docs/hazmat/primitives/asymmetric/dsa.rst b/docs/hazmat/primitives/asymmetric/dsa.rst index c2197d10..ff934a6a 100644 --- a/docs/hazmat/primitives/asymmetric/dsa.rst +++ b/docs/hazmat/primitives/asymmetric/dsa.rst @@ -28,7 +28,7 @@ Generation :class:`~cryptography.hazmat.backends.interfaces.DSABackend` provider. - :return: A :class:`~cryptography.hazmat.primitives.interfaces.DSAPrivateKey` + :return: A :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey` provider. :raises cryptography.exceptions.UnsupportedAlgorithm: This is raised if @@ -52,7 +52,7 @@ Generation :class:`~cryptography.hazmat.backends.interfaces.DSABackend` provider. - :return: A :class:`~cryptography.hazmat.primitives.interfaces.DSAParameters` + :return: A :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameters` provider. :raises cryptography.exceptions.UnsupportedAlgorithm: This is raised if @@ -62,7 +62,7 @@ Generation Signing ~~~~~~~ -Using a :class:`~cryptography.hazmat.primitives.interfaces.DSAPrivateKey` +Using a :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey` provider. .. doctest:: @@ -86,7 +86,7 @@ described in :rfc:`6979`. This can be decoded using Verification ~~~~~~~~~~~~ -Using a :class:`~cryptography.hazmat.primitives.interfaces.DSAPublicKey` +Using a :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicKey` provider. .. doctest:: @@ -136,7 +136,7 @@ Numbers provider. :returns: A new instance of a - :class:`~cryptography.hazmat.primitives.interfaces.DSAParameters` + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameters` provider. .. class:: DSAPublicNumbers(y, parameter_numbers) @@ -153,9 +153,9 @@ Numbers .. attribute:: parameter_numbers - :type: :class:`~cryptography.hazmat.primitives.dsa.DSAParameterNumbers` + :type: :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameterNumbers` - The :class:`~cryptography.hazmat.primitives.dsa.DSAParameterNumbers` + The :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameterNumbers` associated with the public key. .. method:: public_key(backend) @@ -165,7 +165,7 @@ Numbers provider. :returns: A new instance of a - :class:`~cryptography.hazmat.primitives.interfaces.DSAPublicKey` + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicKey` provider. .. class:: DSAPrivateNumbers(x, public_numbers) @@ -187,9 +187,9 @@ Numbers .. attribute:: public_numbers - :type: :class:`~cryptography.hazmat.primitives.dsa.DSAPublicNumbers` + :type: :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicNumbers` - The :class:`~cryptography.hazmat.primitives.dsa.DSAPublicNumbers` + The :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicNumbers` associated with the private key. .. method:: private_key(backend) @@ -199,9 +199,164 @@ Numbers provider. :returns: A new instance of a - :class:`~cryptography.hazmat.primitives.interfaces.DSAPrivateKey` + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey` provider. +Key interfaces +~~~~~~~~~~~~~~ + +.. class:: DSAParameters + + .. versionadded:: 0.3 + + `DSA`_ parameters. + + .. method:: generate_private_key() + + .. versionadded:: 0.5 + + Generate a DSA private key. This method can be used to generate many + new private keys from a single set of parameters. + + :return: A + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey` + provider. + + +.. class:: DSAParametersWithNumbers + + .. versionadded:: 0.5 + + Extends :class:`DSAParameters`. + + .. method:: parameter_numbers() + + Create a + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameterNumbers` + object. + + :returns: A + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameterNumbers` + instance. + + +.. class:: DSAPrivateKey + + .. versionadded:: 0.3 + + A `DSA`_ private key. + + .. method:: public_key() + + :return: :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicKey` + + An DSA public key object corresponding to the values of the private key. + + .. method:: parameters() + + :return: :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameters` + + The DSAParameters object associated with this private key. + + .. method:: signer(algorithm, backend) + + .. versionadded:: 0.4 + + Sign data which can be verified later by others using the public key. + The signature is formatted as DER-encoded bytes, as specified in + :rfc:`6979`. + + :param algorithm: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` + provider. + + :param backend: A + :class:`~cryptography.hazmat.backends.interfaces.DSABackend` + provider. + + :returns: + :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricSignatureContext` + + .. attribute:: key_size + + :type: int + + The bit length of the modulus. + + +.. class:: DSAPrivateKeyWithNumbers + + .. versionadded:: 0.5 + + Extends :class:`DSAPrivateKey`. + + .. method:: private_numbers() + + Create a + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateNumbers` + object. + + :returns: A + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateNumbers` + instance. + + +.. class:: DSAPublicKey + + .. versionadded:: 0.3 + + A `DSA`_ public key. + + .. attribute:: key_size + + :type: int + + The bit length of the modulus. + + .. method:: parameters() + + :return: :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameters` + + The DSAParameters object associated with this public key. + + .. method:: verifier(signature, algorithm, backend) + + .. versionadded:: 0.4 + + Verify data was signed by the private key associated with this public + key. + + :param bytes signature: The signature to verify. DER encoded as + specified in :rfc:`6979`. + + :param algorithm: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` + provider. + + :param backend: A + :class:`~cryptography.hazmat.backends.interfaces.DSABackend` + provider. + + :returns: + :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricVerificationContext` + + +.. class:: DSAPublicKeyWithNumbers + + .. versionadded:: 0.5 + + Extends :class:`DSAPublicKey`. + + .. method:: public_numbers() + + Create a + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicNumbers` + object. + + :returns: A + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicNumbers` + instance. + .. _`DSA`: https://en.wikipedia.org/wiki/Digital_Signature_Algorithm .. _`public-key`: https://en.wikipedia.org/wiki/Public-key_cryptography diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index 2dea46d2..2ba140bd 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -273,162 +273,6 @@ RSA instance. -DSA -~~~ - -.. class:: DSAParameters - - .. versionadded:: 0.3 - - `DSA`_ parameters. - - .. method:: generate_private_key() - - .. versionadded:: 0.5 - - Generate a DSA private key. This method can be used to generate many - new private keys from a single set of parameters. - - :return: A - :class:`~cryptography.hazmat.primitives.interfaces.DSAPrivateKey` - provider. - - -.. class:: DSAParametersWithNumbers - - .. versionadded:: 0.5 - - Extends :class:`DSAParameters`. - - .. method:: parameter_numbers() - - Create a - :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameterNumbers` - object. - - :returns: A - :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameterNumbers` - instance. - - -.. class:: DSAPrivateKey - - .. versionadded:: 0.3 - - A `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.DSAParameters` - - The DSAParameters object associated with this private key. - - .. method:: signer(algorithm, backend) - - .. versionadded:: 0.4 - - Sign data which can be verified later by others using the public key. - The signature is formatted as DER-encoded bytes, as specified in - :rfc:`6979`. - - :param algorithm: An instance of a - :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` - provider. - - :param backend: A - :class:`~cryptography.hazmat.backends.interfaces.DSABackend` - provider. - - :returns: - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricSignatureContext` - - .. attribute:: key_size - - :type: int - - The bit length of the modulus. - - -.. class:: DSAPrivateKeyWithNumbers - - .. versionadded:: 0.5 - - Extends :class:`DSAPrivateKey`. - - .. method:: private_numbers() - - Create a - :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateNumbers` - object. - - :returns: A - :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateNumbers` - instance. - - -.. class:: DSAPublicKey - - .. versionadded:: 0.3 - - A `DSA`_ public key. - - .. attribute:: key_size - - :type: int - - The bit length of the modulus. - - .. method:: parameters() - - :return: :class:`~cryptography.hazmat.primitives.interfaces.DSAParameters` - - The DSAParameters object associated with this public key. - - .. method:: verifier(signature, algorithm, backend) - - .. versionadded:: 0.4 - - Verify data was signed by the private key associated with this public - key. - - :param bytes signature: The signature to verify. DER encoded as - specified in :rfc:`6979`. - - :param algorithm: An instance of a - :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` - provider. - - :param backend: A - :class:`~cryptography.hazmat.backends.interfaces.DSABackend` - provider. - - :returns: - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricVerificationContext` - - -.. class:: DSAPublicKeyWithNumbers - - .. versionadded:: 0.5 - - Extends :class:`DSAPublicKey`. - - .. method:: public_numbers() - - Create a - :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicNumbers` - object. - - :returns: A - :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicNumbers` - instance. - - .. class:: EllipticCurve .. versionadded:: 0.5 |