aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/asymmetric
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2018-07-09 20:13:01 +0530
committerAlex Gaynor <alex.gaynor@gmail.com>2018-07-09 10:43:01 -0400
commit01c9dac7c0ac33fb3dd73ab32322f7fc1699c059 (patch)
tree689130cf852a38b30cafa1614a18c4e0b55f6d53 /docs/hazmat/primitives/asymmetric
parent9e1873af35a2b530e71e1579b2d62c233b75ba26 (diff)
downloadcryptography-01c9dac7c0ac33fb3dd73ab32322f7fc1699c059.tar.gz
cryptography-01c9dac7c0ac33fb3dd73ab32322f7fc1699c059.tar.bz2
cryptography-01c9dac7c0ac33fb3dd73ab32322f7fc1699c059.zip
document that an ECPublicNumbers object has some unexpected properties (#4319)
* document that an ECPublicNumbers object has some unexpected properties It is not guaranteed to be a valid point on the curve as that is not checked until you convert it to a PublicKey object. * different language * move the text, make it a warning, alter the language * new language
Diffstat (limited to 'docs/hazmat/primitives/asymmetric')
-rw-r--r--docs/hazmat/primitives/asymmetric/ec.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/asymmetric/ec.rst b/docs/hazmat/primitives/asymmetric/ec.rst
index bbab2246..ab781e92 100644
--- a/docs/hazmat/primitives/asymmetric/ec.rst
+++ b/docs/hazmat/primitives/asymmetric/ec.rst
@@ -152,6 +152,13 @@ Elliptic Curve Signature Algorithms
.. class:: EllipticCurvePublicNumbers(x, y, curve)
+ .. warning::
+ The point represented by this object is not validated in any way until
+ :meth:`EllipticCurvePublicNumbers.public_key` is called and may not
+ represent a valid point on the curve. You should not attempt to perform
+ any computations using the values from this class until you have either
+ validated it yourself or called ``public_key()`` successfully.
+
.. versionadded:: 0.5
The collection of integers that make up an EC public key.
@@ -182,6 +189,7 @@ Elliptic Curve Signature Algorithms
:param backend: An instance of
:class:`~cryptography.hazmat.backends.interfaces.EllipticCurveBackend`.
+ :raises ValueError: Raised if the point is invalid for the curve.
:returns: A new instance of :class:`EllipticCurvePublicKey`.
.. method:: encode_point()