aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-04-09 14:28:54 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-04-09 14:28:54 -0400
commit890081828d99159145e12c8654501c2d867c4327 (patch)
tree746907327bb3bc9bb72dae604cdbaf5a7b0c49ba /docs
parent5043edf2ff391167f5d9ad02c5a9f07d82371715 (diff)
parent232de6c8e134d81cd1dd738fb9860948e10e928e (diff)
downloadcryptography-890081828d99159145e12c8654501c2d867c4327.tar.gz
cryptography-890081828d99159145e12c8654501c2d867c4327.tar.bz2
cryptography-890081828d99159145e12c8654501c2d867c4327.zip
Merge pull request #1727 from public/dh-key-iface-2015
DH key interfaces
Diffstat (limited to 'docs')
-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
3 files changed, 99 insertions, 1 deletions
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