diff options
author | Ofek Lev <ofekmeister@gmail.com> | 2016-11-11 10:54:00 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2016-11-11 07:54:00 -0800 |
commit | c816735f0e9250328e4a697c8dfb23f0aa1e584b (patch) | |
tree | 2e95196a00131e26f078abee5516926dc72797a3 /src/cryptography/hazmat/backends/interfaces.py | |
parent | 01ee6f5e391eee76e6cd3062de8fc84851bd06e3 (diff) | |
download | cryptography-c816735f0e9250328e4a697c8dfb23f0aa1e584b.tar.gz cryptography-c816735f0e9250328e4a697c8dfb23f0aa1e584b.tar.bz2 cryptography-c816735f0e9250328e4a697c8dfb23f0aa1e584b.zip |
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
Diffstat (limited to 'src/cryptography/hazmat/backends/interfaces.py')
-rw-r--r-- | src/cryptography/hazmat/backends/interfaces.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cryptography/hazmat/backends/interfaces.py b/src/cryptography/hazmat/backends/interfaces.py index 9a1d704a..ad4a4364 100644 --- a/src/cryptography/hazmat/backends/interfaces.py +++ b/src/cryptography/hazmat/backends/interfaces.py @@ -221,6 +221,12 @@ class EllipticCurveBackend(object): Returns whether the exchange algorithm is supported by this backend. """ + @abc.abstractmethod + def derive_elliptic_curve_public_point(self, private_value, curve): + """ + Compute the public key point (x, y) given the private value and curve. + """ + @six.add_metaclass(abc.ABCMeta) class PEMSerializationBackend(object): |