summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/lib/passlib.hash.argon2.rst3
-rw-r--r--docs/lib/passlib.hash.scrypt.rst5
-rw-r--r--docs/modular_crypt_format.rst20
3 files changed, 19 insertions, 9 deletions
diff --git a/docs/lib/passlib.hash.argon2.rst b/docs/lib/passlib.hash.argon2.rst
index 89c0432..0eb1ad6 100644
--- a/docs/lib/passlib.hash.argon2.rst
+++ b/docs/lib/passlib.hash.argon2.rst
@@ -55,7 +55,8 @@ You can check which backend is in use by calling :meth:`!argon2.get_backend()`.
Format & Algorithm
==================
The Argon2 hash format is defined by the argon2 reference implementation.
-It's compatible with the :ref:`modular-crypt-format`, and uses ``$argon2i$`` and ``$argon2d$``
+It's compatible with the :ref:`PHC Format <phc-format>` and :ref:`modular-crypt-format`,
+and uses ``$argon2i$`` and ``$argon2d$``
as it's identifying prefixes for all its strings. An example hash (of ``password``) is:
``$argon2i$v=19$m=512,t=3,p=2$c29tZXNhbHQ$SqlVijFGiPG+935vDSGEsA``
diff --git a/docs/lib/passlib.hash.scrypt.rst b/docs/lib/passlib.hash.scrypt.rst
index 7a5230a..29f491a 100644
--- a/docs/lib/passlib.hash.scrypt.rst
+++ b/docs/lib/passlib.hash.scrypt.rst
@@ -65,7 +65,8 @@ This class will use the first available of two possible backends:
Format & Algorithm
==================
-This Scrypt hash format is compatible with the :ref:`modular-crypt-format`, and uses ``$scrypt$`` as the identifying prefix
+This Scrypt hash format is compatible with the :ref:`PHC Format <phc-format>` and :ref:`modular-crypt-format`,
+and uses ``$scrypt$`` as the identifying prefix
for all its strings. An example hash (of ``password``) is:
``$scrypt$ln=16,r=8,p=1$aM15713r3Xsvxbi31lqr1Q$nFNh2CVHVjNldFVKDHDlm4CbdRSCdEBsjjJxD+iCs5E``
@@ -73,7 +74,7 @@ for all its strings. An example hash (of ``password``) is:
This string has the format :samp:`$scrypt$ln={logN},r={R},p={P}${salt}${checksum}`, where:
* :samp:`{logN}` is the exponent for calculating SCRYPT's cost parameter (N), encoded as a decimal digit,
- (logN is 16 in the example, corresponding to n=65536).
+ (logN is 16 in the example, corresponding to n = 2**16 = 65536).
* :samp:`{R}` is the value of SCRYPT's block size parameter (r), encoded as a decimal digit,
(r is 8 in the example).
diff --git a/docs/modular_crypt_format.rst b/docs/modular_crypt_format.rst
index 3c5480d..c70933b 100644
--- a/docs/modular_crypt_format.rst
+++ b/docs/modular_crypt_format.rst
@@ -1,5 +1,6 @@
.. index:: modular crypt format
+.. _phc-format:
.. _modular-crypt-format:
.. rst-class:: html-toggle
@@ -12,6 +13,19 @@ Modular Crypt Format
A explanation about a standard that isn't
+.. rst-class:: without-title
+
+.. seealso::
+ **Deprecated (as of 2016) in favor of the PHC String Format**
+
+ In the opinion of the main Passlib author, the modular crypt format (described below)
+ should be considered deprecated when creating new hashes.
+ The `PHC String Format <https://github.com/P-H-C/phc-string-format/blob/master/phc-sf-spec.md>`_
+ is an attempt to specify a common hash string format
+ that's a restricted & well defined subset of the Modular Crypt Format.
+ New hashes are strongly encouraged to adhere to the PHC specification,
+ rather than the much looser Modular Crypt Format.
+
Overview
========
A number of the hashes in Passlib are described as adhering to the "Modular Crypt Format".
@@ -32,12 +46,6 @@ The modular crypt format is more of an ad-hoc idea rather than a true standard.
The rest of this page is an attempt to describe what is known,
at least as far as the hashes supported by Passlib.
-.. seealso::
-
- The `PHC string format <https://github.com/P-H-C/phc-string-format/blob/master/phc-sf-spec.md>`
- is a recent attempt to specify a common hash string format,
- that's a restricted (& more well defined) subset of the modular crypt format.
-
History
=======
Historically, most unix systems supported only :class:`~passlib.hash.des_crypt`.