diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2019-01-20 15:02:59 -0600 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2019-01-20 15:02:59 -0600 |
commit | a07b1f5463361570c3248c1096ffd8b3bff0bfa5 (patch) | |
tree | 66bc3e076557579ad062dea6a08a716519857b11 /docs/hazmat/primitives/asymmetric/ec.rst | |
parent | 5fe88ea0500c6e418492f4b166c0d4a24e9632cc (diff) | |
download | cryptography-a07b1f5463361570c3248c1096ffd8b3bff0bfa5.tar.gz cryptography-a07b1f5463361570c3248c1096ffd8b3bff0bfa5.tar.bz2 cryptography-a07b1f5463361570c3248c1096ffd8b3bff0bfa5.zip |
add support for encoding compressed points (#4638)
* add support for encoding compressed points
* review feedback
Diffstat (limited to 'docs/hazmat/primitives/asymmetric/ec.rst')
-rw-r--r-- | docs/hazmat/primitives/asymmetric/ec.rst | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/docs/hazmat/primitives/asymmetric/ec.rst b/docs/hazmat/primitives/asymmetric/ec.rst index bd618551..a356dcaa 100644 --- a/docs/hazmat/primitives/asymmetric/ec.rst +++ b/docs/hazmat/primitives/asymmetric/ec.rst @@ -668,12 +668,20 @@ Key Interfaces .. method:: public_bytes(encoding, format) - Allows serialization of the key to bytes. Encoding ( - :attr:`~cryptography.hazmat.primitives.serialization.Encoding.PEM` or + Allows serialization of the key data to bytes. When encoding the public + key the encodings ( + :attr:`~cryptography.hazmat.primitives.serialization.Encoding.PEM`, :attr:`~cryptography.hazmat.primitives.serialization.Encoding.DER`) and format ( :attr:`~cryptography.hazmat.primitives.serialization.PublicFormat.SubjectPublicKeyInfo`) - are chosen to define the exact serialization. + are chosen to define the exact serialization. When encoding the point + the encoding + :attr:`~cryptography.hazmat.primitives.serialization.Encoding.X962` + should be used with the formats ( + :attr:`~cryptography.hazmat.primitives.serialization.PublicFormat.UncompressedPoint` + or + :attr:`~cryptography.hazmat.primitives.serialization.PublicFormat.CompressedPoint` + ). :param encoding: A value from the :class:`~cryptography.hazmat.primitives.serialization.Encoding` enum. @@ -681,7 +689,7 @@ Key Interfaces :param format: A value from the :class:`~cryptography.hazmat.primitives.serialization.PublicFormat` enum. - :return bytes: Serialized key. + :return bytes: Serialized data. .. method:: verify(signature, data, signature_algorithm) |