aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/hazmat/primitives/cryptographic-hashes.rst31
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/cryptographic-hashes.rst b/docs/hazmat/primitives/cryptographic-hashes.rst
index d0414efa..b0e9c16a 100644
--- a/docs/hazmat/primitives/cryptographic-hashes.rst
+++ b/docs/hazmat/primitives/cryptographic-hashes.rst
@@ -117,6 +117,36 @@ SHA-2 family
SHA-512 is a cryptographic hash function from the SHA-2 family and is
standardized by NIST. It produces a 512-bit message digest.
+BLAKE2
+~~~~~~
+
+`BLAKE2`_ is a cryptographic hash function specified in :rfc:`7693`.
+
+.. note::
+
+ While the RFC specifies keying, personalization, and salting features,
+ these are not supported at this time due to limitations in OpenSSL 1.1.0.
+
+.. class:: BLAKE2b(digest_size)
+
+ BLAKE2b is optimized for 64-bit platforms and produces an 1 to 64-byte
+ message digest.
+
+ :param int digest_size: The desired size of the hash output in bytes. Only
+ ``64`` is supported at this time.
+
+ :raises ValueError: If the ``digest_size`` is invalid.
+
+.. class:: BLAKE2s(digest_size)
+
+ BLAKE2s is optimized for 8 to 32-bit platforms and produces a
+ 1 to 32-byte message digest.
+
+ :param int digest_size: The desired size of the hash output in bytes. Only
+ ``32`` is supported at this time.
+
+ :raises ValueError: If the ``digest_size`` is invalid.
+
RIPEMD160
~~~~~~~~~
@@ -193,3 +223,4 @@ Interfaces
.. _`Lifetimes of cryptographic hash functions`: http://valerieaurora.org/hash.html
+.. _`BLAKE2`: https://blake2.net