From c816735f0e9250328e4a697c8dfb23f0aa1e584b Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Fri, 11 Nov 2016 10:54:00 -0500 Subject: add ec.private_key_from_secret_and_curve (#3225) * finish https://github.com/pyca/cryptography/pull/1973 * change API & add test Function will now return an instance of EllipticCurvePrivateKey, as that is the users' ultimate goal anyway. * fix test * improve coverage * complete coverage * final fix * centos fix * retry * cleanup asserts * use openssl_assert * skip unsupported platforms * change API name to derive_private_key * change version added * improve description of `secret` param * separate successful and failure test cases * simplify successful case * add docs for derive_elliptic_curve_public_point * add period --- docs/hazmat/primitives/asymmetric/ec.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'docs/hazmat/primitives/asymmetric') diff --git a/docs/hazmat/primitives/asymmetric/ec.rst b/docs/hazmat/primitives/asymmetric/ec.rst index 2421d921..33ebee0f 100644 --- a/docs/hazmat/primitives/asymmetric/ec.rst +++ b/docs/hazmat/primitives/asymmetric/ec.rst @@ -20,6 +20,22 @@ Elliptic curve cryptography :returns: A new instance of :class:`EllipticCurvePrivateKey`. +.. function:: derive_private_key(secret, curve, backend) + + .. versionadded:: 1.6 + + Derive a private key from ``secret`` on ``curve`` for use with ``backend``. + + :param int secret: The secret scalar value. + + :param curve: An instance of :class:`EllipticCurve`. + + :param backend: An instance of + :class:`~cryptography.hazmat.backends.interfaces.EllipticCurveBackend`. + + :returns: A new instance of :class:`EllipticCurvePrivateKey`. + + Elliptic Curve Signature Algorithms ----------------------------------- -- cgit v1.2.3