From e055b27c73c9fec263212c384de514a2a934186e Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 29 Sep 2014 22:38:42 -0500 Subject: remove docs for fully deprecated classes/methods --- docs/hazmat/backends/interfaces.rst | 100 ------------- docs/hazmat/primitives/asymmetric/rsa.rst | 237 ------------------------------ 2 files changed, 337 deletions(-) diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index 77de4ac8..4f4c5680 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -240,63 +240,6 @@ A specific ``backend`` may provide one or more of these interfaces. :raises ValueError: If the public_exponent is not valid. - .. method:: create_rsa_signature_ctx(private_key, padding, algorithm) - - .. deprecated:: 0.5 - - :param private_key: An instance of an - :class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey` - provider. - - :param padding: An instance of an - :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.AsymmetricSignatureContext` - - .. method:: create_rsa_verification_ctx(public_key, signature, padding, algorithm) - - .. deprecated:: 0.5 - - :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 an - :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.AsymmetricVerificationContext` - - .. method:: mgf1_hash_supported(algorithm) - - ..deprecated:: 0.5 - - Check if the specified ``algorithm`` is supported for use with - :class:`~cryptography.hazmat.primitives.asymmetric.padding.MGF1` - inside :class:`~cryptography.hazmat.primitives.asymmetric.padding.PSS` - padding. This method is deprecated in favor of - ``rsa_padding_supported``. - - :param algorithm: An instance of a - :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` - provider. - - :returns: ``True`` if the specified ``algorithm`` is supported by this - backend, otherwise ``False``. - .. method:: rsa_padding_supported(padding) Check if the specified ``padding`` is supported by the backend. @@ -317,49 +260,6 @@ A specific ``backend`` may provide one or more of these interfaces. :param int key_size: The bit length of the generated modulus. - .. method:: decrypt_rsa(private_key, ciphertext, padding) - - .. deprecated:: 0.5 - - :param private_key: An instance of an - :class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey` - provider. - - :param bytes ciphertext: The ciphertext to decrypt. - - :param padding: An instance of an - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` - provider. - - :return bytes: The decrypted data. - - :raises cryptography.exceptions.UnsupportedAlgorithm: If an unsupported - MGF, hash function, or padding is chosen. - - :raises ValueError: When decryption fails or key size does not match - ciphertext length. - - .. method:: encrypt_rsa(public_key, plaintext, padding) - - .. deprecated:: 0.5 - - :param public_key: An instance of an - :class:`~cryptography.hazmat.primitives.interfaces.RSAPublicKey` - provider. - - :param bytes plaintext: The plaintext to encrypt. - - :param padding: An instance of an - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` - provider. - - :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_private_numbers(numbers): :param numbers: An instance of diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst index a9637523..a5cebb1d 100644 --- a/docs/hazmat/primitives/asymmetric/rsa.rst +++ b/docs/hazmat/primitives/asymmetric/rsa.rst @@ -265,243 +265,6 @@ this without having to do the math themselves. Generates the ``dmq1`` parameter from the RSA private exponent and prime ``q``. -Deprecated Concrete Classes -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -These classes were deprecated in version 0.5 in favor of backend specific -providers of the -:class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey` and -:class:`~cryptography.hazmat.primitives.interfaces.RSAPublicKey` interfaces. - -.. class:: RSAPrivateKey(p, q, private_exponent, dmp1, dmq1, iqmp, public_exponent, modulus) - - .. versionadded:: 0.2 - - .. deprecated:: 0.5 - - An RSA private key is required for decryption and signing of messages. - - You should use :func:`generate_private_key` to generate new keys. - - .. warning:: - This method only checks a limited set of properties of its arguments. - Using an RSA private key that you do not trust or with incorrect - parameters may lead to insecure operation, crashes, and other undefined - behavior. We recommend that you only ever load private keys that were - generated with software you trust. - - - :raises TypeError: This is raised when the arguments are not all integers. - - :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`. - - .. classmethod:: generate(public_exponent, key_size, backend) - - Generate a new ``RSAPrivateKey`` instance using ``backend``. - - :param int public_exponent: The public exponent of the new key. - Usually one of the small Fermat primes 3, 5, 17, 257, 65537. If in - doubt you should `use 65537`_. - :param int key_size: The length of the modulus in bits. For keys - generated in 2014 it is strongly recommended to be - `at least 2048`_ (See page 41). It must not be less than 512. - Some backends may have additional limitations. - :param backend: A - :class:`~cryptography.hazmat.backends.interfaces.RSABackend` - provider. - :return: A new instance of ``RSAPrivateKey``. - - :raises cryptography.exceptions.UnsupportedAlgorithm: This is raised if - the provided ``backend`` does not implement - :class:`~cryptography.hazmat.backends.interfaces.RSABackend` - - - .. method:: signer(padding, algorithm, backend) - - .. versionadded:: 0.3 - - Sign data which can be verified later by others using the public key. - - :param padding: An instance of a - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` - provider. Valid values are - :class:`~cryptography.hazmat.primitives.asymmetric.padding.PSS` and - :class:`~cryptography.hazmat.primitives.asymmetric.padding.PKCS1v15` - (``PSS`` is recommended for all new applications). - - :param algorithm: An instance of a - :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` - provider. - - :param backend: A - :class:`~cryptography.hazmat.backends.interfaces.RSABackend` - provider. - - :returns: - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricSignatureContext` - - :raises cryptography.exceptions.UnsupportedAlgorithm: This is raised if - the provided ``backend`` does not implement - :class:`~cryptography.hazmat.backends.interfaces.RSABackend` or if - the backend does not support the chosen hash or padding algorithm. - If the padding is - :class:`~cryptography.hazmat.primitives.asymmetric.padding.PSS` - with the - :class:`~cryptography.hazmat.primitives.asymmetric.padding.MGF1` - mask generation function it may also refer to the ``MGF1`` hash - algorithm. - - :raises TypeError: This is raised when the padding is not an - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` - provider. - - :raises ValueError: This is raised when the chosen hash algorithm is - too large for the key size. - - .. method:: decrypt(ciphertext, padding, backend) - - .. versionadded:: 0.4 - - Decrypt data that was encrypted with the public key. - - :param bytes ciphertext: The ciphertext to decrypt. - - :param padding: An instance of a - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` - provider. - - :param backend: A - :class:`~cryptography.hazmat.backends.interfaces.RSABackend` - provider. - - :return bytes: Decrypted data. - - :raises cryptography.exceptions.UnsupportedAlgorithm: This is raised if - the provided ``backend`` does not implement - :class:`~cryptography.hazmat.backends.interfaces.RSABackend` or if - the backend does not support the chosen hash or padding algorithm. - If the padding is - :class:`~cryptography.hazmat.primitives.asymmetric.padding.OAEP` - with the - :class:`~cryptography.hazmat.primitives.asymmetric.padding.MGF1` - mask generation function it may also refer to the ``MGF1`` hash - algorithm. - - :raises TypeError: This is raised when the padding is not an - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` - provider. - - :raises ValueError: This is raised when decryption fails or the data - is too large for the key size. If the padding is - :class:`~cryptography.hazmat.primitives.asymmetric.padding.OAEP` - it may also be raised for invalid label values. - - -.. class:: RSAPublicKey(public_exponent, modulus) - - .. versionadded:: 0.2 - - .. deprecated:: 0.5 - - An RSA public key is required for encryption and verification of messages. - - Normally you do not need to directly construct public keys because you'll - be loading them from a file, generating them automatically or receiving - them from a 3rd party. - - :raises TypeError: This is raised when the arguments are not all integers. - - :raises ValueError: This is raised when the values of ``public_exponent`` - or ``modulus`` do not match the bounds specified in - :rfc:`3447`. - - .. method:: verifier(signature, padding, algorithm, backend) - - .. versionadded:: 0.3 - - Verify data was signed by the private key associated with this public - key. - - :param bytes signature: The signature to verify. - - :param padding: An instance of a - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` - provider. Valid values are - :class:`~cryptography.hazmat.primitives.asymmetric.padding.PSS` and - :class:`~cryptography.hazmat.primitives.asymmetric.padding.PKCS1v15` - (``PSS`` is recommended for all new applications). - - :param algorithm: An instance of a - :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` - provider. - - :param backend: A - :class:`~cryptography.hazmat.backends.interfaces.RSABackend` - provider. - - :returns: - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricVerificationContext` - - :raises cryptography.exceptions.UnsupportedAlgorithm: This is raised if - the provided ``backend`` does not implement - :class:`~cryptography.hazmat.backends.interfaces.RSABackend` or if - the backend does not support the chosen hash or padding algorithm. - If the padding is - :class:`~cryptography.hazmat.primitives.asymmetric.padding.PSS` - with the - :class:`~cryptography.hazmat.primitives.asymmetric.padding.MGF1` - mask generation function it may also refer to the ``MGF1`` hash - algorithm. - - :raises TypeError: This is raised when the padding is not an - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` - provider. - - :raises ValueError: This is raised when the chosen hash algorithm is - too large for the key size. - - .. method:: encrypt(plaintext, padding, backend) - - .. versionadded:: 0.4 - - Encrypt data using the public key. The resulting ciphertext can only - be decrypted with the private key. - - :param bytes plaintext: The plaintext to encrypt. - - :param padding: An instance of a - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` - provider. - - :param backend: A - :class:`~cryptography.hazmat.backends.interfaces.RSABackend` - provider. - - :return bytes: Encrypted data. - - :raises cryptography.exceptions.UnsupportedAlgorithm: This is raised if - the provided ``backend`` does not implement - :class:`~cryptography.hazmat.backends.interfaces.RSABackend` or if - the backend does not support the chosen hash or padding algorithm. - If the padding is - :class:`~cryptography.hazmat.primitives.asymmetric.padding.OAEP` - with the - :class:`~cryptography.hazmat.primitives.asymmetric.padding.MGF1` - mask generation function it may also refer to the ``MGF1`` hash - algorithm. - - :raises TypeError: This is raised when the padding is not an - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` - provider. - - :raises ValueError: This is raised if the data is too large for the - key size. If the padding is - :class:`~cryptography.hazmat.primitives.asymmetric.padding.OAEP` - it may also be raised for invalid label values. - .. _`RSA`: https://en.wikipedia.org/wiki/RSA_(cryptosystem) .. _`public-key`: https://en.wikipedia.org/wiki/Public-key_cryptography -- cgit v1.2.3