aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/interfaces.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/hazmat/primitives/interfaces.rst')
-rw-r--r--docs/hazmat/primitives/interfaces.rst124
1 files changed, 119 insertions, 5 deletions
diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst
index 15ad1d1b..9a1f3307 100644
--- a/docs/hazmat/primitives/interfaces.rst
+++ b/docs/hazmat/primitives/interfaces.rst
@@ -12,7 +12,7 @@ to document argument and return types.
.. _`Abstract Base Classes`: http://docs.python.org/3.2/library/abc.html
-Symmetric Ciphers
+Symmetric ciphers
~~~~~~~~~~~~~~~~~
.. currentmodule:: cryptography.hazmat.primitives.interfaces
@@ -47,7 +47,7 @@ Symmetric Ciphers
The number of bits in a block.
-Cipher Modes
+Cipher modes
------------
Interfaces used by the symmetric cipher modes described in
@@ -103,7 +103,7 @@ Interfaces used by the symmetric cipher modes described in
Exact requirements of the nonce are described by the documentation of
individual modes.
-Asymmetric Interfaces
+Asymmetric interfaces
~~~~~~~~~~~~~~~~~~~~~
.. class:: RSAPrivateKey
@@ -231,6 +231,119 @@ Asymmetric Interfaces
The public exponent. Alias for :attr:`public_exponent`.
+.. class:: DSAParameters
+
+ .. versionadded:: 0.3
+
+ `DSA`_ parameters.
+
+ .. attribute:: modulus
+
+ :type: int
+
+ The prime modulus that is used in generating the DSA key pair and used
+ in the DSA signing and verification processes.
+
+ .. attribute:: subgroup_order
+
+ :type: int
+
+ The subgroup order that is used in generating the DSA key pair
+ by the generator and used in the DSA signing and verification
+ processes.
+
+ .. attribute:: generator
+
+ :type: int
+
+ The generator that is used in generating the DSA key pair and used
+ in the DSA signing and verification processes.
+
+ .. attribute:: p
+
+ :type: int
+
+ The prime modulus that is used in generating the DSA key pair and used
+ in the DSA signing and verification processes. Alias for :attr:`modulus`.
+
+ .. attribute:: q
+
+ :type: int
+
+ The subgroup order that is used in generating the DSA key pair
+ by the generator and used in the DSA signing and verification
+ processes. Alias for :attr:`subgroup_order`.
+
+ .. attribute:: g
+
+ :type: int
+
+ The generator that is used in generating the DSA key pair and used
+ in the DSA signing and verification processes. Alias for :attr:`generator`.
+
+
+.. 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.
+
+ .. attribute:: key_size
+
+ :type: int
+
+ The bit length of the modulus.
+
+ .. attribute:: x
+
+ :type: int
+
+ The private key.
+
+ .. attribute:: y
+
+ :type: int
+
+ The public key.
+
+
+.. 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.
+
+ .. attribute:: y
+
+ :type: int
+
+ The public key.
+
+
.. class:: AsymmetricSignatureContext
.. versionadded:: 0.2
@@ -264,7 +377,7 @@ Asymmetric Interfaces
.. attribute:: name
-Hash Algorithms
+Hash algorithms
~~~~~~~~~~~~~~~
.. class:: HashAlgorithm
@@ -289,7 +402,7 @@ Hash Algorithms
The internal block size of the hash algorithm in bytes.
-Key Derivation Functions
+Key derivation functions
~~~~~~~~~~~~~~~~~~~~~~~~
.. class:: KeyDerivationFunction
@@ -335,3 +448,4 @@ Key Derivation Functions
.. _`RSA`: https://en.wikipedia.org/wiki/RSA_(cryptosystem)
.. _`Chinese remainder theorem`: https://en.wikipedia.org/wiki/Chinese_remainder_theorem
+.. _`DSA`: https://en.wikipedia.org/wiki/Digital_Signature_Algorithm