aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat
diff options
context:
space:
mode:
authorAlex Stapleton <alexs@prol.etari.at>2014-04-18 11:38:28 +0100
committerAlex Stapleton <alexs@prol.etari.at>2014-05-23 21:05:47 +0100
commita1853f9bdbabd1f7c48229272915e1fcf4b998e7 (patch)
tree2ca2a3c252d3f29f856f2fbbccd278fb72f60e27 /docs/hazmat
parentb72e53ced354e34354a321fc3d5f1ca7b6fddf4e (diff)
downloadcryptography-a1853f9bdbabd1f7c48229272915e1fcf4b998e7.tar.gz
cryptography-a1853f9bdbabd1f7c48229272915e1fcf4b998e7.tar.bz2
cryptography-a1853f9bdbabd1f7c48229272915e1fcf4b998e7.zip
Flesh out EllipticCurveSignatureAlgorithm
Diffstat (limited to 'docs/hazmat')
-rw-r--r--docs/hazmat/primitives/interfaces.rst87
1 files changed, 87 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst
index 6ec6de62..e53c6099 100644
--- a/docs/hazmat/primitives/interfaces.rst
+++ b/docs/hazmat/primitives/interfaces.rst
@@ -483,6 +483,54 @@ Asymmetric interfaces
The bit length of the curves base point.
+.. class:: EllipticCurveSignatureAlgorithm
+
+ .. versionadded:: 0.4
+
+ A signature algorithm for use with elliptic curve keys.
+
+ .. method:: signer(private_key, algorithm, backend)
+
+ Sign data which can be verified later by others using the public key.
+
+ :param private_key: An instance of a
+ :class:`~cryptography.hazmat.primitives.interfaces.EllipticCurvePrivateKey`
+ provider.
+
+ :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`
+
+ .. method:: verifier(public_key, algorithm, backend)
+
+ Verify data was signed by the private key associated with this public
+ key.
+
+ :param bytes signature: The signature to verify.
+
+ :param public_key: An instance of a
+ :class:`~cryptography.hazmat.primitives.interfaces.EllipticCurvePublicKey`
+ provider.
+
+ :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`
+
+
.. class:: EllipticCurvePrivateKey
.. versionadded:: 0.4
@@ -490,6 +538,25 @@ Asymmetric interfaces
An elliptic curve private key for use with an algorithm such as `ECDSA`_ or
`EdDSA`_.
+ .. classmethod:: signer(signature_algorithm, digest_algorithm, backend)
+
+ Sign data which can be verified later by others using the public key.
+
+ :param signature_algorithm: An instance of a
+ :class:`~cryptography.hazmat.primitives.interfaces.EllipticCurveSignatureAlgorithm`
+ provider.
+
+ :param digest_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`
+
.. attribute:: curve
:type: :class:`~cryptography.hazmat.primitives.interfaces.EllipticCurve`
@@ -533,6 +600,26 @@ Asymmetric interfaces
An elliptic curve public key.
+ .. classmethod:: verifier(signature_algorithm, digest_algorithm, backend)
+
+ Verify data was signed by the private key associated with this public
+ key.
+
+ :param signature_algorithm: An instance of a
+ :class:`~cryptography.hazmat.primitives.interfaces.EllipticCurveSignatureAlgorithm`
+ provider.
+
+ :param digest_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`
+
.. attribute:: curve
:type: :class:`~cryptography.hazmat.primitives.interfaces.EllipticCurve`