aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/asymmetric
diff options
context:
space:
mode:
authorGabriel Orisaka <orisaka@gmail.com>2016-07-26 21:26:29 -0300
committerAlex Gaynor <alex.gaynor@gmail.com>2016-07-26 20:26:29 -0400
commite035c50510cc02e0aeaf49c60508d5d8b83120a8 (patch)
tree183964bdf6bc9bc913144b15d875ecc5eb1f0a76 /docs/hazmat/primitives/asymmetric
parentbe7c5e55e4b4a0a8ce6f1f553535e82d1eeafce5 (diff)
downloadcryptography-e035c50510cc02e0aeaf49c60508d5d8b83120a8.tar.gz
cryptography-e035c50510cc02e0aeaf49c60508d5d8b83120a8.tar.bz2
cryptography-e035c50510cc02e0aeaf49c60508d5d8b83120a8.zip
Removed provider language from asymmetric primitives docs (#3052)
* Removed provider language from asymmetric primitives docs * Reverted changes to some examples
Diffstat (limited to 'docs/hazmat/primitives/asymmetric')
-rw-r--r--docs/hazmat/primitives/asymmetric/dh.rst5
-rw-r--r--docs/hazmat/primitives/asymmetric/dsa.rst87
-rw-r--r--docs/hazmat/primitives/asymmetric/ec.rst32
-rw-r--r--docs/hazmat/primitives/asymmetric/rsa.rst77
-rw-r--r--docs/hazmat/primitives/asymmetric/serialization.rst22
5 files changed, 91 insertions, 132 deletions
diff --git a/docs/hazmat/primitives/asymmetric/dh.rst b/docs/hazmat/primitives/asymmetric/dh.rst
index f4e0de69..8cb68280 100644
--- a/docs/hazmat/primitives/asymmetric/dh.rst
+++ b/docs/hazmat/primitives/asymmetric/dh.rst
@@ -82,9 +82,8 @@ Key interfaces
Generate a DH 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.dh.DHPrivateKey`
- provider.
+ :return: An instance of
+ :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateKey`.
.. class:: DHParametersWithSerialization
diff --git a/docs/hazmat/primitives/asymmetric/dsa.rst b/docs/hazmat/primitives/asymmetric/dsa.rst
index f77af2a2..126cdc28 100644
--- a/docs/hazmat/primitives/asymmetric/dsa.rst
+++ b/docs/hazmat/primitives/asymmetric/dsa.rst
@@ -24,12 +24,11 @@ Generation
specified in FIPS 186-3 and are still restricted to only the
1024-bit keys specified in FIPS 186-2.
- :param backend: A
- :class:`~cryptography.hazmat.backends.interfaces.DSABackend`
- provider.
+ :param backend: An instance of
+ :class:`~cryptography.hazmat.backends.interfaces.DSABackend`.
- :return: A :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey`
- provider.
+ :return: An instance of
+ :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey`.
:raises cryptography.exceptions.UnsupportedAlgorithm: This is raised if
the provided ``backend`` does not implement
@@ -48,12 +47,11 @@ Generation
specified in FIPS 186-3 and are still restricted to only the
1024-bit keys specified in FIPS 186-2.
- :param backend: A
- :class:`~cryptography.hazmat.backends.interfaces.DSABackend`
- provider.
+ :param backend: An instance of
+ :class:`~cryptography.hazmat.backends.interfaces.DSABackend`.
- :return: A :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameters`
- provider.
+ :return: An instance of
+ :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameters`.
:raises cryptography.exceptions.UnsupportedAlgorithm: This is raised if
the provided ``backend`` does not implement
@@ -63,7 +61,7 @@ Signing
~~~~~~~
Using a :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey`
-provider.
+instance.
.. doctest::
@@ -97,7 +95,7 @@ Verification
~~~~~~~~~~~~
Verification is performed using a
-:class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicKey` provider.
+:class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicKey` instance.
You can get a public key object with
:func:`~cryptography.hazmat.primitives.serialization.load_pem_public_key`,
:func:`~cryptography.hazmat.primitives.serialization.load_der_public_key`,
@@ -157,13 +155,11 @@ Numbers
.. method:: parameters(backend)
- :param backend: A
- :class:`~cryptography.hazmat.backends.interfaces.DSABackend`
- provider.
+ :param backend: An instance of
+ :class:`~cryptography.hazmat.backends.interfaces.DSABackend`.
- :returns: A new instance of a
- :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameters`
- provider.
+ :returns: A new instance of
+ :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameters`.
.. class:: DSAPublicNumbers(y, parameter_numbers)
@@ -186,13 +182,11 @@ Numbers
.. method:: public_key(backend)
- :param backend: A
- :class:`~cryptography.hazmat.backends.interfaces.DSABackend`
- provider.
+ :param backend: An instance of
+ :class:`~cryptography.hazmat.backends.interfaces.DSABackend`.
- :returns: A new instance of a
- :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicKey`
- provider.
+ :returns: A new instance of
+ :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicKey`.
.. class:: DSAPrivateNumbers(x, public_numbers)
@@ -220,13 +214,11 @@ Numbers
.. method:: private_key(backend)
- :param backend: A
- :class:`~cryptography.hazmat.backends.interfaces.DSABackend`
- provider.
+ :param backend: An instance of
+ :class:`~cryptography.hazmat.backends.interfaces.DSABackend`.
- :returns: A new instance of a
- :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey`
- provider.
+ :returns: A new instance of
+ :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey`.
Key interfaces
~~~~~~~~~~~~~~
@@ -244,9 +236,8 @@ Key interfaces
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.
+ :return: An instance of
+ :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey`.
.. class:: DSAParametersWithNumbers
@@ -292,13 +283,11 @@ Key interfaces
The signature is formatted as DER-encoded bytes, as specified in
:rfc:`3279`.
- :param algorithm: An instance of a
- :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
- provider.
+ :param algorithm: An instance of
+ :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`.
- :param backend: A
- :class:`~cryptography.hazmat.backends.interfaces.DSABackend`
- provider.
+ :param backend: An instance of
+ :class:`~cryptography.hazmat.backends.interfaces.DSABackend`.
:returns:
:class:`~cryptography.hazmat.primitives.asymmetric.AsymmetricSignatureContext`
@@ -318,9 +307,8 @@ Key interfaces
:param bytes data: The message string to sign.
- :param algorithm: An instance of a
- :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
- provider.
+ :param algorithm: An instance of
+ :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`.
:return bytes: Signature.
@@ -397,13 +385,11 @@ Key interfaces
:param bytes signature: The signature to verify. DER encoded as
specified in :rfc:`3279`.
- :param algorithm: An instance of a
- :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
- provider.
+ :param algorithm: An instance of
+ :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`.
- :param backend: A
- :class:`~cryptography.hazmat.backends.interfaces.DSABackend`
- provider.
+ :param backend: An instance of
+ :class:`~cryptography.hazmat.backends.interfaces.DSABackend`.
:returns:
:class:`~cryptography.hazmat.primitives.asymmetric.AsymmetricVerificationContext`
@@ -446,9 +432,8 @@ Key interfaces
:param bytes data: The message string that was signed.
- :param algorithm: An instance of a
- :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
- provider.
+ :param algorithm: An instance of
+ :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`.
:raises cryptography.exceptions.InvalidSignature: If the signature does
not validate.
diff --git a/docs/hazmat/primitives/asymmetric/ec.rst b/docs/hazmat/primitives/asymmetric/ec.rst
index 979d3e4b..88e6e517 100644
--- a/docs/hazmat/primitives/asymmetric/ec.rst
+++ b/docs/hazmat/primitives/asymmetric/ec.rst
@@ -12,13 +12,12 @@ Elliptic curve cryptography
Generate a new private key on ``curve`` for use with ``backend``.
- :param curve: A :class:`EllipticCurve` provider.
+ :param curve: An instance of :class:`EllipticCurve`.
- :param backend: A
- :class:`~cryptography.hazmat.backends.interfaces.EllipticCurveBackend`
- provider.
+ :param backend: An instance of
+ :class:`~cryptography.hazmat.backends.interfaces.EllipticCurveBackend`.
- :returns: A new instance of a :class:`EllipticCurvePrivateKey` provider.
+ :returns: A new instance of :class:`EllipticCurvePrivateKey`.
Elliptic Curve Signature Algorithms
@@ -31,9 +30,8 @@ Elliptic Curve Signature Algorithms
The ECDSA signature algorithm first standardized in NIST publication
`FIPS 186-3`_, and later in `FIPS 186-4`_.
- :param algorithm: An instance of a
- :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
- provider.
+ :param algorithm: An instance of
+ :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`.
.. doctest::
@@ -88,12 +86,10 @@ Elliptic Curve Signature Algorithms
Convert a collection of numbers into a private key suitable for doing
actual cryptographic operations.
- :param backend: A
- :class:`~cryptography.hazmat.backends.interfaces.EllipticCurveBackend`
- provider.
+ :param backend: An instance of
+ :class:`~cryptography.hazmat.backends.interfaces.EllipticCurveBackend`.
- :returns: A new instance of a :class:`EllipticCurvePrivateKey`
- provider.
+ :returns: A new instance of :class:`EllipticCurvePrivateKey`.
.. class:: EllipticCurvePublicNumbers(x, y, curve)
@@ -125,12 +121,10 @@ Elliptic Curve Signature Algorithms
Convert a collection of numbers into a public key suitable for doing
actual cryptographic operations.
- :param backend: A
- :class:`~cryptography.hazmat.backends.interfaces.EllipticCurveBackend`
- provider.
+ :param backend: An instance of
+ :class:`~cryptography.hazmat.backends.interfaces.EllipticCurveBackend`.
- :returns: A new instance of a :class:`EllipticCurvePublicKey`
- provider.
+ :returns: A new instance of :class:`EllipticCurvePublicKey`.
.. method:: encode_point()
@@ -217,7 +211,7 @@ Currently `cryptography` only supports NIST curves, none of which are
considered "safe" by the `SafeCurves`_ project run by Daniel J. Bernstein and
Tanja Lange.
-All named curves are providers of :class:`EllipticCurve`.
+All named curves are instances of :class:`EllipticCurve`.
.. class:: SECT571K1
diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst
index 10e48b4a..d37b40f8 100644
--- a/docs/hazmat/primitives/asymmetric/rsa.rst
+++ b/docs/hazmat/primitives/asymmetric/rsa.rst
@@ -44,7 +44,7 @@ mathematical properties`_.
`at least 2048`_ (See page 41). It must not be less than 512.
Some backends may have additional limitations.
- :param backend: A backend which provides
+ :param backend: A backend which implements
:class:`~cryptography.hazmat.backends.interfaces.RSABackend`.
:return: An instance of
@@ -311,9 +311,8 @@ Padding
:param mgf: A mask generation function object. At this time the only
supported MGF is :class:`MGF1`.
- :param algorithm: An instance of a
- :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
- provider.
+ :param algorithm: An instance of
+ :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`.
:param bytes label: A label to apply. This is a rarely used field and
should typically be set to ``None`` or ``b""``, which are equivalent.
@@ -389,13 +388,11 @@ is unavailable.
.. method:: public_key(backend)
- :param backend: A
- :class:`~cryptography.hazmat.backends.interfaces.RSABackend`
- provider.
+ :param backend: An instance of
+ :class:`~cryptography.hazmat.backends.interfaces.RSABackend`.
- :returns: A new instance of a
- :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey`
- provider.
+ :returns: A new instance of
+ :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey`.
.. class:: RSAPrivateNumbers(p, q, d, dmp1, dmq1, iqmp, public_numbers)
@@ -458,13 +455,11 @@ is unavailable.
.. method:: private_key(backend)
- :param backend: A new instance of a
- :class:`~cryptography.hazmat.backends.interfaces.RSABackend`
- provider.
+ :param backend: A new instance of
+ :class:`~cryptography.hazmat.backends.interfaces.RSABackend`.
- :returns: A
- :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey`
- provider.
+ :returns: An instance of
+ :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey`.
Handling partial RSA private keys
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -532,13 +527,11 @@ Key interfaces
Get signer to sign data which can be verified later by others using
the public key.
- :param padding: An instance of a
- :class:`~cryptography.hazmat.primitives.asymmetric.padding.AsymmetricPadding`
- provider.
+ :param padding: An instance of
+ :class:`~cryptography.hazmat.primitives.asymmetric.padding.AsymmetricPadding`.
- :param algorithm: An instance of a
- :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
- provider.
+ :param algorithm: An instance of
+ :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`.
:returns:
:class:`~cryptography.hazmat.primitives.asymmetric.AsymmetricSignatureContext`
@@ -551,9 +544,8 @@ Key interfaces
:param bytes ciphertext: The ciphertext to decrypt.
- :param padding: An instance of an
- :class:`~cryptography.hazmat.primitives.asymmetric.padding.AsymmetricPadding`
- provider.
+ :param padding: An instance of
+ :class:`~cryptography.hazmat.primitives.asymmetric.padding.AsymmetricPadding`.
:return bytes: Decrypted data.
@@ -578,13 +570,11 @@ Key interfaces
:param bytes data: The message string to sign.
- :param padding: An instance of an
- :class:`~cryptography.hazmat.primitives.asymmetric.padding.AsymmetricPadding`
- provider.
+ :param padding: An instance of
+ :class:`~cryptography.hazmat.primitives.asymmetric.padding.AsymmetricPadding`.
- :param algorithm: An instance of a
- :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
- provider.
+ :param algorithm: An instance of
+ :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`.
:return bytes: Signature.
@@ -648,13 +638,11 @@ Key interfaces
:param bytes signature: The signature to verify.
- :param padding: An instance of a
- :class:`~cryptography.hazmat.primitives.asymmetric.padding.AsymmetricPadding`
- provider.
+ :param padding: An instance of
+ :class:`~cryptography.hazmat.primitives.asymmetric.padding.AsymmetricPadding`.
- :param algorithm: An instance of a
- :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
- provider.
+ :param algorithm: An instance of
+ :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`.
:returns:
:class:`~cryptography.hazmat.primitives.asymmetric.AsymmetricVerificationContext`
@@ -667,9 +655,8 @@ Key interfaces
:param bytes plaintext: The plaintext to encrypt.
- :param padding: An instance of a
- :class:`~cryptography.hazmat.primitives.asymmetric.padding.AsymmetricPadding`
- provider.
+ :param padding: An instance of
+ :class:`~cryptography.hazmat.primitives.asymmetric.padding.AsymmetricPadding`.
:return bytes: Encrypted data.
@@ -719,13 +706,11 @@ Key interfaces
:param bytes data: The message string that was signed.
- :param padding: An instance of an
- :class:`~cryptography.hazmat.primitives.asymmetric.padding.AsymmetricPadding`
- provider.
+ :param padding: An instance of
+ :class:`~cryptography.hazmat.primitives.asymmetric.padding.AsymmetricPadding`.
- :param algorithm: An instance of a
- :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`
- provider.
+ :param algorithm: An instance of
+ :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`.
:raises cryptography.exceptions.InvalidSignature: If the signature does
not validate.
diff --git a/docs/hazmat/primitives/asymmetric/serialization.rst b/docs/hazmat/primitives/asymmetric/serialization.rst
index 815a9cb5..f7baf754 100644
--- a/docs/hazmat/primitives/asymmetric/serialization.rst
+++ b/docs/hazmat/primitives/asymmetric/serialization.rst
@@ -124,9 +124,8 @@ all begin with ``-----BEGIN {format}-----`` and end with ``-----END
:param bytes password: The password to use to decrypt the data. Should
be ``None`` if the private key is not encrypted.
- :param backend: A
- :class:`~cryptography.hazmat.backends.interfaces.PEMSerializationBackend`
- provider.
+ :param backend: An instance of
+ :class:`~cryptography.hazmat.backends.interfaces.PEMSerializationBackend`.
:returns: One of
:class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey`,
@@ -163,9 +162,8 @@ all begin with ``-----BEGIN {format}-----`` and end with ``-----END
:param bytes data: The PEM encoded key data.
- :param backend: A
- :class:`~cryptography.hazmat.backends.interfaces.PEMSerializationBackend`
- provider.
+ :param backend: An instance of
+ :class:`~cryptography.hazmat.backends.interfaces.PEMSerializationBackend`.
:returns: One of
@@ -201,9 +199,8 @@ the rest.
:param bytes password: The password to use to decrypt the data. Should
be ``None`` if the private key is not encrypted.
- :param backend: A
- :class:`~cryptography.hazmat.backends.interfaces.DERSerializationBackend`
- provider.
+ :param backend: An instance of
+ :class:`~cryptography.hazmat.backends.interfaces.DERSerializationBackend`.
:returns: One of
:class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey`,
@@ -242,9 +239,8 @@ the rest.
:param bytes data: The DER encoded key data.
- :param backend: A
- :class:`~cryptography.hazmat.backends.interfaces.DERSerializationBackend`
- provider.
+ :param backend: An instance of
+ :class:`~cryptography.hazmat.backends.interfaces.DERSerializationBackend`.
:returns: One of
:class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey`,
@@ -302,7 +298,7 @@ DSA keys look almost identical but begin with ``ssh-dss`` rather than
:param bytes data: The OpenSSH encoded key data.
- :param backend: A backend providing
+ :param backend: A backend which implements
:class:`~cryptography.hazmat.backends.interfaces.RSABackend`,
:class:`~cryptography.hazmat.backends.interfaces.DSABackend`, or
:class:`~cryptography.hazmat.backends.interfaces.EllipticCurveBackend`