diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-11-17 10:23:12 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-11-17 10:23:12 -0800 |
commit | 4b4a1c27b8d4dcf4239493227d1465cd93ec4334 (patch) | |
tree | 434aa661fd895405ab6471cf6ace25ed63d21f32 /docs/hazmat/primitives/asymmetric | |
parent | b581cc6a7abe8a8e6d487535dbf78453833fc34d (diff) | |
download | cryptography-4b4a1c27b8d4dcf4239493227d1465cd93ec4334.tar.gz cryptography-4b4a1c27b8d4dcf4239493227d1465cd93ec4334.tar.bz2 cryptography-4b4a1c27b8d4dcf4239493227d1465cd93ec4334.zip |
Describe teh format of the result of signer.finalize(). Fixes #1479
Diffstat (limited to 'docs/hazmat/primitives/asymmetric')
-rw-r--r-- | docs/hazmat/primitives/asymmetric/dsa.rst | 9 | ||||
-rw-r--r-- | docs/hazmat/primitives/asymmetric/ec.rst | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/asymmetric/dsa.rst b/docs/hazmat/primitives/asymmetric/dsa.rst index 302eea81..43741ede 100644 --- a/docs/hazmat/primitives/asymmetric/dsa.rst +++ b/docs/hazmat/primitives/asymmetric/dsa.rst @@ -79,6 +79,9 @@ provider. >>> signer.update(data) >>> signature = signer.finalize() +The ``signature`` is a ``bytes`` object, whose contents is DER encoded as +described in :rfc:`6979`. + Verification ~~~~~~~~~~~~ @@ -92,6 +95,12 @@ provider. >>> verifier.update(data) >>> verifier.verify() +``verifier()`` takes the signature in the same format as is returned by +``signer.finalize()``. + +``verify()`` will raise an :class:`~cryptography.exceptions.InvalidSignature` +exception if the signature isn't valid. + Numbers ~~~~~~~ diff --git a/docs/hazmat/primitives/asymmetric/ec.rst b/docs/hazmat/primitives/asymmetric/ec.rst index 0e19bb2e..a229fe41 100644 --- a/docs/hazmat/primitives/asymmetric/ec.rst +++ b/docs/hazmat/primitives/asymmetric/ec.rst @@ -52,6 +52,9 @@ Elliptic Curve Signature Algorithms >>> signer.update(b" to sign") >>> signature = signer.finalize() + The ``signature`` is a ``bytes`` object, whose contents is DER encoded as + described in :rfc:`6979`. + .. class:: EllipticCurvePrivateNumbers(private_value, public_numbers) |