aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/backends
diff options
context:
space:
mode:
authorTerry Chia <terrycwk1994@gmail.com>2016-09-01 23:39:57 +0800
committerPaul Kehrer <paul.l.kehrer@gmail.com>2016-09-01 10:39:57 -0500
commitd8a27df32b1ae35f165b00a644bd2432f6e44280 (patch)
treef0aaab250003ac9cbfb5f458df9ab32ec74a8bce /docs/hazmat/backends
parentc7b29b86cd20fe62fa199eb8fb2c87f88133a5ab (diff)
downloadcryptography-d8a27df32b1ae35f165b00a644bd2432f6e44280.tar.gz
cryptography-d8a27df32b1ae35f165b00a644bd2432f6e44280.tar.bz2
cryptography-d8a27df32b1ae35f165b00a644bd2432f6e44280.zip
Scrypt Implementation (#3117)
* Scrypt implementation. * Docs stuff. * Make example just an example and not a doctest. * Add changelog entry. * Docs cleanup. * Add more tests. * Add multibackend tests. * PEP8. * Add docs about Scrypt parameters. * Docs cleanup. * Add AlreadyFinalized.
Diffstat (limited to 'docs/hazmat/backends')
-rw-r--r--docs/hazmat/backends/interfaces.rst30
-rw-r--r--docs/hazmat/backends/openssl.rst5
2 files changed, 35 insertions, 0 deletions
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst
index 14f72cf6..b79bb239 100644
--- a/docs/hazmat/backends/interfaces.rst
+++ b/docs/hazmat/backends/interfaces.rst
@@ -652,3 +652,33 @@ A specific ``backend`` may provide one or more of these interfaces.
:returns: ``True`` if the given values of ``p`` and ``g`` are supported
by this backend, otherwise ``False``.
+
+
+.. class:: ScryptBackend
+
+ .. versionadded:: 1.6
+
+ A backend with methods for using Scrypt.
+
+ The following backends implement this interface:
+
+ * :doc:`/hazmat/backends/openssl`
+
+ .. method:: derive_scrypt(self, key_material, salt, length, n, r, p)
+
+ :param bytes key_material: The key material to use as a basis for
+ the derived key. This is typically a password.
+
+ :param bytes salt: A salt.
+
+ :param int length: The desired length of the derived key.
+
+ :param int n: CPU/Memory cost parameter. It must be larger than 1 and be a
+ power of 2.
+
+ :param int r: Block size parameter.
+
+ :param int p: Parallelization parameter.
+
+ :return bytes: Derived key.
+
diff --git a/docs/hazmat/backends/openssl.rst b/docs/hazmat/backends/openssl.rst
index 8bc7dac5..791aab3d 100644
--- a/docs/hazmat/backends/openssl.rst
+++ b/docs/hazmat/backends/openssl.rst
@@ -24,6 +24,11 @@ greater.
* :class:`~cryptography.hazmat.backends.interfaces.PEMSerializationBackend`
* :class:`~cryptography.hazmat.backends.interfaces.X509Backend`
+ It also implements the following interface for OpenSSL versions ``1.1.0``
+ and above.
+
+ * :class:`~cryptography.hazmat.backends.interfaces.ScryptBackend`
+
It also exposes the following:
.. attribute:: name