aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/development/test-vectors.rst2
-rw-r--r--docs/fernet.rst6
-rw-r--r--docs/hazmat/primitives/asymmetric/dh.rst98
-rw-r--r--docs/hazmat/primitives/asymmetric/interfaces.rst1
-rw-r--r--docs/spelling_wordlist.txt1
-rw-r--r--docs/x509.rst14
6 files changed, 119 insertions, 3 deletions
diff --git a/docs/development/test-vectors.rst b/docs/development/test-vectors.rst
index e2b621c3..5353b1d2 100644
--- a/docs/development/test-vectors.rst
+++ b/docs/development/test-vectors.rst
@@ -132,6 +132,8 @@ Custom X.509 Vectors
a subject alternative name extension with the ``otherName`` general name.
* ``san_registered_id.pem`` - An RSA 1024 bit certificate containing a
subject alternative name extension with the ``registeredID`` general name.
+* ``all_key_usages.pem`` - An RSA 2048 bit self-signed certificate containing
+ a key usage extension with all nine purposes set to true.
Custom X.509 Request Vectors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/fernet.rst b/docs/fernet.rst
index f1a4c748..eacbc2ae 100644
--- a/docs/fernet.rst
+++ b/docs/fernet.rst
@@ -92,8 +92,10 @@ has support for implementing key rotation via :class:`MultiFernet`.
>>> f.decrypt(token)
'Secret message!'
- Fernet performs all encryption options using the *first* key in the
- ``list`` provided. Decryption supports using *any* of constituent keys.
+ MultiFernet performs all encryption options using the *first* key in the
+ ``list`` provided. MultiFernet attempts to decrypt tokens with each key in
+ turn. A :class:`cryptography.fernet.InvalidToken` exception is raised if
+ the correct key is not found in the ``list`` provided.
Key rotation makes it easy to replace old keys. You can add your new key at
the front of the list to start encrypting new messages, and remove old keys
diff --git a/docs/hazmat/primitives/asymmetric/dh.rst b/docs/hazmat/primitives/asymmetric/dh.rst
index fdf113f7..dde18cf7 100644
--- a/docs/hazmat/primitives/asymmetric/dh.rst
+++ b/docs/hazmat/primitives/asymmetric/dh.rst
@@ -6,6 +6,9 @@ Diffie-Hellman key exchange
.. currentmodule:: cryptography.hazmat.primitives.asymmetric.dh
+Numbers
+~~~~~~~
+
.. class:: DHPrivateNumbers(x, public_numbers)
.. versionadded:: 0.8
@@ -62,3 +65,98 @@ Diffie-Hellman key exchange
:type: int
The generator value.
+
+
+Key interfaces
+~~~~~~~~~~~~~~
+
+.. class:: DHParameters
+
+ .. versionadded:: 0.9
+
+
+ .. method:: generate_private_key()
+
+ .. versionadded:: 0.9
+
+ 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.
+
+
+.. class:: DHParametersWithSerialization
+
+ .. versionadded:: 0.9
+
+ Inherits from :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHParameters`.
+
+ .. method:: parameter_numbers()
+
+ Return the numbers that make up this set of parameters.
+
+ :return: A :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHParameterNumbers`.
+
+
+.. class:: DHPrivateKey
+
+ .. versionadded:: 0.9
+
+ .. attribute:: key_size
+
+ The bit length of the prime modulus.
+
+ .. method:: public_key()
+
+ Return the public key associated with this private key.
+
+ :return: A :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPublicKey`.
+
+ .. method:: parameters()
+
+ Return the parameters associated with this private key.
+
+ :return: A :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHParameters`.
+
+
+.. class:: DHPrivateKeyWithSerialization
+
+ .. versionadded:: 0.9
+
+ Inherits from :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateKey`.
+
+ .. method:: private_numbers()
+
+ Return the numbers that make up this private key.
+
+ :return: A :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateNumbers`.
+
+
+.. class:: DHPublicKey
+
+ .. versionadded:: 0.9
+
+ .. attribute:: key_size
+
+ The bit length of the prime modulus.
+
+ .. method:: parameters()
+
+ Return the parameters associated with this private key.
+
+ :return: A :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHParameters`.
+
+
+.. class:: DHPublicKeyWithSerialization
+
+ .. versionadded:: 0.9
+
+ Inherits from :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPublicKey`.
+
+ .. method:: public_numbers()
+
+ Return the numbers that make up this public key.
+
+ :return: A :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPublicNumbers`.
diff --git a/docs/hazmat/primitives/asymmetric/interfaces.rst b/docs/hazmat/primitives/asymmetric/interfaces.rst
index 4932faa5..c4f176c6 100644
--- a/docs/hazmat/primitives/asymmetric/interfaces.rst
+++ b/docs/hazmat/primitives/asymmetric/interfaces.rst
@@ -30,4 +30,3 @@ Signature Interfaces
:raises cryptography.exceptions.InvalidSignature: If the signature does
not validate.
-
diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt
index c029b5df..f7b73b38 100644
--- a/docs/spelling_wordlist.txt
+++ b/docs/spelling_wordlist.txt
@@ -20,6 +20,7 @@ decrypted
decrypting
deserialize
deserialized
+Diffie
Docstrings
Encodings
fernet
diff --git a/docs/x509.rst b/docs/x509.rst
index afc9620a..d09651fb 100644
--- a/docs/x509.rst
+++ b/docs/x509.rst
@@ -275,6 +275,7 @@ X.509 Certificate Object
>>> for ext in cert.extensions:
... print(ext)
+ <Extension(oid=<ObjectIdentifier(oid=2.5.29.14, name=subjectKeyIdentifier)>, critical=False, value=<SubjectKeyIdentifier(digest='X\x01\x84$\x1b\xbc+R\x94J=\xa5\x10r\x14Q\xf5\xaf:\xc9')>)>
<Extension(oid=<ObjectIdentifier(oid=2.5.29.19, name=basicConstraints)>, critical=True, value=<BasicConstraints(ca=True, path_length=None)>)>
X.509 CSR (Certificate Signing Request) Object
@@ -576,6 +577,19 @@ X.509 Extensions
purposes indicated in the key usage extension. The object is
iterable to obtain the list of :ref:`extended key usage OIDs <eku_oids>`.
+.. class:: SubjectKeyIdentifier
+
+ .. versionadded:: 0.9
+
+ The subject key identifier extension provides a means of identifying
+ certificates that contain a particular public key.
+
+ .. attribute:: digest
+
+ :type: bytes
+
+ The binary value of the identifier.
+
Object Identifiers
~~~~~~~~~~~~~~~~~~