diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2018-12-12 08:08:27 +0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2018-12-11 19:08:27 -0500 |
commit | 4c5740a6747b78502f432b662024e5bf6a4ae8c4 (patch) | |
tree | c245a60d06c205cb9c744ea03aeb1b9172abe45e /docs | |
parent | 0143367da8896d4c188df390ba3fad868b770d02 (diff) | |
download | cryptography-4c5740a6747b78502f432b662024e5bf6a4ae8c4.tar.gz cryptography-4c5740a6747b78502f432b662024e5bf6a4ae8c4.tar.bz2 cryptography-4c5740a6747b78502f432b662024e5bf6a4ae8c4.zip |
Compressed point support (#4629)
* compressed point support
* refactor to use oct2point directly
* small docs change
* remove deprecation for the moment and a bit of review feedback
* no backend arg, implicitly import it
* missed a spot
* double oops
* remove superfluous call
* use refactored method
* use vector file
* one last item
Diffstat (limited to 'docs')
-rw-r--r-- | docs/hazmat/primitives/asymmetric/ec.rst | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/asymmetric/ec.rst b/docs/hazmat/primitives/asymmetric/ec.rst index 5936cf44..728c5159 100644 --- a/docs/hazmat/primitives/asymmetric/ec.rst +++ b/docs/hazmat/primitives/asymmetric/ec.rst @@ -704,6 +704,27 @@ Key Interfaces Size (in :term:`bits`) of a secret scalar for the curve (as generated by :func:`generate_private_key`). + .. classmethod:: from_encoded_point(curve, data) + + .. versionadded:: 2.5 + + Decodes a byte string as described in `SEC 1 v2.0`_ section 2.3.3 and + returns an :class:`EllipticCurvePublicKey`. This class method supports + compressed points. + + :param curve: An + :class:`~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurve` + instance. + + :param bytes data: The serialized point byte string. + + :returns: An :class:`EllipticCurvePublicKey` instance. + + :raises ValueError: Raised when an invalid point is supplied. + + :raises TypeError: Raised when curve is not an + :class:`~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurve`. + .. class:: EllipticCurvePublicKeyWithSerialization |