aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-02-05 07:43:38 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2014-02-05 07:43:38 -0800
commit22a9d0e8a594848b61adddf4335ee4a87cc97b2c (patch)
tree98f9a0e834c840f36c604c3dec58d45bd7c47d71
parent99951455325713e8c487ccedcfefdf4ba4c984b0 (diff)
parent48ef0c1a319ea3787ac865d67c15dc303c588d70 (diff)
downloadcryptography-22a9d0e8a594848b61adddf4335ee4a87cc97b2c.tar.gz
cryptography-22a9d0e8a594848b61adddf4335ee4a87cc97b2c.tar.bz2
cryptography-22a9d0e8a594848b61adddf4335ee4a87cc97b2c.zip
Merge branch 'master' into osx-docs
-rw-r--r--docs/hazmat/backends/interfaces.rst21
-rw-r--r--docs/hazmat/primitives/constant-time.rst13
2 files changed, 28 insertions, 6 deletions
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst
index 49e4c88c..5131ca12 100644
--- a/docs/hazmat/backends/interfaces.rst
+++ b/docs/hazmat/backends/interfaces.rst
@@ -19,6 +19,11 @@ A specific ``backend`` may provide one or more of these interfaces.
A backend which provides methods for using ciphers for encryption
and decryption.
+ The following backends implement this interface:
+
+ * :doc:`/hazmat/backends/openssl`
+ * :doc:`/hazmat/backends/commoncrypto`
+
.. method:: cipher_supported(cipher, mode)
Check if a ``cipher`` and ``mode`` combination is supported by
@@ -76,6 +81,11 @@ A specific ``backend`` may provide one or more of these interfaces.
A backend with methods for using cryptographic hash functions.
+ The following backends implement this interface:
+
+ * :doc:`/hazmat/backends/openssl`
+ * :doc:`/hazmat/backends/commoncrypto`
+
.. method:: hash_supported(algorithm)
Check if the specified ``algorithm`` is supported by this backend.
@@ -107,6 +117,11 @@ A specific ``backend`` may provide one or more of these interfaces.
A backend with methods for using cryptographic hash functions as message
authentication codes.
+ The following backends implement this interface:
+
+ * :doc:`/hazmat/backends/openssl`
+ * :doc:`/hazmat/backends/commoncrypto`
+
.. method:: hmac_supported(algorithm)
Check if the specified ``algorithm`` is supported by this backend.
@@ -139,6 +154,11 @@ A specific ``backend`` may provide one or more of these interfaces.
A backend with methods for using PBKDF2 using HMAC as a PRF.
+ The following backends implement this interface:
+
+ * :doc:`/hazmat/backends/openssl`
+ * :doc:`/hazmat/backends/commoncrypto`
+
.. method:: pbkdf2_hmac_supported(algorithm)
Check if the specified ``algorithm`` is supported by this backend.
@@ -171,4 +191,3 @@ A specific ``backend`` may provide one or more of these interfaces.
the derived key. This is typically a password.
:return bytes: Derived key.
-
diff --git a/docs/hazmat/primitives/constant-time.rst b/docs/hazmat/primitives/constant-time.rst
index 632e7c68..c6fcb3a3 100644
--- a/docs/hazmat/primitives/constant-time.rst
+++ b/docs/hazmat/primitives/constant-time.rst
@@ -19,8 +19,10 @@ about the timing attacks on KeyCzar and Java's ``MessageDigest.isEqual()``.
.. function:: bytes_eq(a, b)
- Compare ``a`` and ``b`` to one another in constant time if they are of the
- same length.
+ Compares ``a`` and ``b`` with one another. If ``a`` and ``b`` have
+ different lengths, this returns ``False`` immediately. Otherwise it
+ compares them in a way that takes the same amount of time, regardless of
+ how many characters are the same between the two.
.. doctest::
@@ -30,9 +32,10 @@ about the timing attacks on KeyCzar and Java's ``MessageDigest.isEqual()``.
>>> constant_time.bytes_eq(b"foo", b"bar")
False
- :param a bytes: The left-hand side.
- :param b bytes: The right-hand side.
- :returns boolean: True if ``a`` has the same bytes as ``b``.
+ :param bytes a: The left-hand side.
+ :param bytes b: The right-hand side.
+ :returns bool: ``True`` if ``a`` has the same bytes as ``b``, otherwise
+ ``False``.
.. _`Coda Hale's blog post`: http://codahale.com/a-lesson-in-timing-attacks/