aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-11-27 10:29:59 -1000
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-11-27 10:29:59 -1000
commit65d054d1a9b8b122096d7994fc2fe675c06f423f (patch)
tree4d42a91fc6a2a9105f04aa11501adec3999af039 /docs/hazmat
parenta98f95a14ef6394795b9a34402d41552e43a8101 (diff)
downloadcryptography-65d054d1a9b8b122096d7994fc2fe675c06f423f.tar.gz
cryptography-65d054d1a9b8b122096d7994fc2fe675c06f423f.tar.bz2
cryptography-65d054d1a9b8b122096d7994fc2fe675c06f423f.zip
add decode_rfc6979_signature helper for DSA/ECDSA
Diffstat (limited to 'docs/hazmat')
-rw-r--r--docs/hazmat/primitives/asymmetric/dsa.rst3
-rw-r--r--docs/hazmat/primitives/asymmetric/ec.rst4
-rw-r--r--docs/hazmat/primitives/asymmetric/index.rst1
-rw-r--r--docs/hazmat/primitives/asymmetric/utils.rst16
4 files changed, 22 insertions, 2 deletions
diff --git a/docs/hazmat/primitives/asymmetric/dsa.rst b/docs/hazmat/primitives/asymmetric/dsa.rst
index 43741ede..df3c99fc 100644
--- a/docs/hazmat/primitives/asymmetric/dsa.rst
+++ b/docs/hazmat/primitives/asymmetric/dsa.rst
@@ -80,7 +80,8 @@ provider.
>>> signature = signer.finalize()
The ``signature`` is a ``bytes`` object, whose contents is DER encoded as
-described in :rfc:`6979`.
+described in :rfc:`6979`. This can be decoded using
+:func:`~cryptography.hazmat.primitives.asymmetric.utils.decode_rfc6979_signature`.
Verification
~~~~~~~~~~~~
diff --git a/docs/hazmat/primitives/asymmetric/ec.rst b/docs/hazmat/primitives/asymmetric/ec.rst
index fd20cbb2..13ab7c11 100644
--- a/docs/hazmat/primitives/asymmetric/ec.rst
+++ b/docs/hazmat/primitives/asymmetric/ec.rst
@@ -53,7 +53,9 @@ Elliptic Curve Signature Algorithms
>>> signature = signer.finalize()
The ``signature`` is a ``bytes`` object, whose contents is DER encoded as
- described in :rfc:`6979`.
+ described in :rfc:`6979`. This can be decoded using
+ :func:`~cryptography.hazmat.primitives.asymmetric.utils.decode_rfc6979_signature`.
+
.. class:: EllipticCurvePrivateNumbers(private_value, public_numbers)
diff --git a/docs/hazmat/primitives/asymmetric/index.rst b/docs/hazmat/primitives/asymmetric/index.rst
index 6a5228ba..24f0f5b1 100644
--- a/docs/hazmat/primitives/asymmetric/index.rst
+++ b/docs/hazmat/primitives/asymmetric/index.rst
@@ -11,3 +11,4 @@ Asymmetric algorithms
rsa
padding
serialization
+ utils
diff --git a/docs/hazmat/primitives/asymmetric/utils.rst b/docs/hazmat/primitives/asymmetric/utils.rst
new file mode 100644
index 00000000..9749b6d1
--- /dev/null
+++ b/docs/hazmat/primitives/asymmetric/utils.rst
@@ -0,0 +1,16 @@
+.. hazmat::
+
+Asymmetric Utilities
+====================
+
+.. currentmodule:: cryptography.hazmat.primitives.asymmetric.utils
+
+
+.. function:: decode_rfc6979_signature(signature)
+
+ Takes in :rfc:`6979` signatures generated by the DSA/ECDSA signers and
+ returns a tuple ``(r, s)``.
+
+ :param bytes signature: The signature to decode.
+
+ :returns: The decoded tuple ``(r, s)``.