aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat
diff options
context:
space:
mode:
authorAlex Stapleton <alexs@prol.etari.at>2014-04-01 16:18:17 +0100
committerAlex Stapleton <alexs@prol.etari.at>2014-05-23 21:05:47 +0100
commit085f37861e4a505a12a1ddb940788a3025fdcf4f (patch)
tree2ab276e9b5778f137b3418729b8beb667498461e /docs/hazmat
parentebf1235e7ebbd84d2f1e05a060c6df25adb58353 (diff)
downloadcryptography-085f37861e4a505a12a1ddb940788a3025fdcf4f.tar.gz
cryptography-085f37861e4a505a12a1ddb940788a3025fdcf4f.tar.bz2
cryptography-085f37861e4a505a12a1ddb940788a3025fdcf4f.zip
Elliptic curve interfaces
Diffstat (limited to 'docs/hazmat')
-rw-r--r--docs/hazmat/primitives/interfaces.rst97
1 files changed, 97 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst
index dc09a26f..6ec6de62 100644
--- a/docs/hazmat/primitives/interfaces.rst
+++ b/docs/hazmat/primitives/interfaces.rst
@@ -463,6 +463,101 @@ Asymmetric interfaces
:class:`~cryptography.hazmat.primitives.interfaces.AsymmetricVerificationContext`
+.. class:: EllipticCurve
+
+ .. versionadded:: 0.4
+
+ A named elliptic curve.
+
+ .. attribute:: name
+
+ :type: string
+
+ The name of the curve. Usually the name used for the ASN.1 OID such as
+ "secp256k1".
+
+ .. attribute:: key_size
+
+ :type: int
+
+ The bit length of the curves base point.
+
+
+.. class:: EllipticCurvePrivateKey
+
+ .. versionadded:: 0.4
+
+ An elliptic curve private key for use with an algorithm such as `ECDSA`_ or
+ `EdDSA`_.
+
+ .. attribute:: curve
+
+ :type: :class:`~cryptography.hazmat.primitives.interfaces.EllipticCurve`
+
+ The elliptic curve for this key.
+
+ .. attribute:: private_key
+
+ :type: int
+
+ The private key.
+
+ .. attribute:: key_size
+
+ :type: int
+
+ The bit length of the curves base point.
+
+ .. attribute:: x
+
+ :type: int
+
+ The affine x component of the public point used for verifying.
+
+ .. attribute:: y
+
+ :type: int
+
+ The affine y component of the public point used for verifying.
+
+ .. method:: public_key()
+
+ :return: :class:`~cryptography.hazmat.primitives.interfaces.EllipticCurvePublicKey`
+
+ The EllipticCurvePublicKey object for this private key.
+
+
+.. class:: EllipticCurvePublicKey
+
+ .. versionadded:: 0.4
+
+ An elliptic curve public key.
+
+ .. attribute:: curve
+
+ :type: :class:`~cryptography.hazmat.primitives.interfaces.EllipticCurve`
+
+ The elliptic curve for this key.
+
+ .. attribute:: x
+
+ :type: int
+
+ The affine x component of the public point used for verifying.
+
+ .. attribute:: y
+
+ :type: int
+
+ The affine y component of the public point used for verifying.
+
+ .. attribute:: key_size
+
+ :type: int
+
+ The bit length of the curves base point.
+
+
.. class:: AsymmetricSignatureContext
.. versionadded:: 0.2
@@ -612,3 +707,5 @@ Key derivation functions
.. _`Chinese remainder theorem`: https://en.wikipedia.org/wiki/Chinese_remainder_theorem
.. _`DSA`: https://en.wikipedia.org/wiki/Digital_Signature_Algorithm
.. _`CMAC`: https://en.wikipedia.org/wiki/CMAC
+.. _`ECDSA`: http://en.wikipedia.org/wiki/ECDSA
+.. _`EdDSA`: http://en.wikipedia.org/wiki/EdDSA