summaryrefslogtreecommitdiff
path: root/docs/lib/passlib.hash.crypt16.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/lib/passlib.hash.crypt16.rst')
-rw-r--r--docs/lib/passlib.hash.crypt16.rst21
1 files changed, 11 insertions, 10 deletions
diff --git a/docs/lib/passlib.hash.crypt16.rst b/docs/lib/passlib.hash.crypt16.rst
index 9fd2a21..2cdd5eb 100644
--- a/docs/lib/passlib.hash.crypt16.rst
+++ b/docs/lib/passlib.hash.crypt16.rst
@@ -32,12 +32,13 @@ Format
An example hash (of the string ``passphrase``) is ``aaX/UmCcBrceQ0kQGGWKTbuE``.
A crypt16 hash string has the format :samp:`{salt}{checksum_1}{checksum_2}`, where:
-* :samp:`{salt}` is the salt, stored as a 2 character :func:`hash64 <passlib.utils.h64.encode_int12>`-encoded
- 12-bit integer (``aa`` in the example).
+* :samp:`{salt}` is the salt, stored as a 2 character
+ :data:`hash64 <passlib.utils.h64>`-encoded 12-bit integer (``aa`` in the
+ example).
* each :samp:`{checksum_i}` is a separate checksum, stored as an 11 character
- :func:`hash64 <passlib.utils.h64.encode_dc_int64>`-encoded 64-bit integer (``X/UmCcBrceQ`` and ``0kQGGWKTbuE``
- in the example).
+ :data:`hash64-big <passlib.utils.h64big>`-encoded 64-bit integer
+ (``X/UmCcBrceQ`` and ``0kQGGWKTbuE`` in the example).
.. rst-class:: html-toggle
@@ -48,8 +49,8 @@ The crypt16 algorithm uses a weakened version of the des-crypt algorithm:
1. Given a password string and a salt string.
2. The 2 character salt string is decoded to a 12-bit integer salt value;
- The salt string uses little-endian
- :func:`hash64 <passlib.utils.h64.decode_int12>` encoding.
+ The salt string uses little-endian :data:`hash64 <passlib.utils.h64>`
+ encoding.
3. If the password is larger than 16 bytes, the end is truncated to 16 bytes.
If the password is smaller than 16 bytes, the end is NULL padded to 16 bytes.
@@ -63,16 +64,16 @@ The crypt16 algorithm uses a weakened version of the des-crypt algorithm:
starting with a null input block,
and using the 56-bit integer from step 4 as the DES key.
- The salt value from step 2 is used to to mutate the normal
- DES encrypt operation by swapping bits :samp:`{i}` and :samp:`{i}+24`
- in the DES E-Box output if and only if bit :samp:`{i}` is set in
+ The salt value from step 2 is used to to mutate the normal
+ DES encrypt operation by swapping bits :samp:`{i}` and :samp:`{i}+24`
+ in the DES E-Box output if and only if bit :samp:`{i}` is set in
the salt value.
6. The 64-bit result of the last round of step 5 is then
lsb-padded with 2 zero bits.
7. The resulting 66-bit integer is encoded in big-endian order
- using the :func:`hash 64 <passlib.utils.h64.encode_int>` format.
+ using the :data:`hash64-big <passlib.utils.h64big>` format.
This is the first checksum segment.
8. The second checksum segment is created by repeating