diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2011-04-29 16:18:38 -0400 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2011-04-29 16:18:38 -0400 |
| commit | 0a911f70599de598d65147dc9b19ead51ff9ab38 (patch) | |
| tree | 5b846674cece38dea221271607c31f718fb8a7a6 /docs | |
| parent | c8d8eb0d9b1c753d342307b070fb1ad09cc351a6 (diff) | |
| download | passlib-0a911f70599de598d65147dc9b19ead51ff9ab38.tar.gz | |
added ldap_pbkdf2_{digest} variants; UTs & docs; removed prefix from pdkdf2_sha1 for compat w/ existing hashes
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/lib/passlib.hash.ldap_pbkdf2_digest.rst | 38 | ||||
| -rw-r--r-- | docs/lib/passlib.hash.pbkdf2_digest.rst | 17 | ||||
| -rw-r--r-- | docs/lib/passlib.hash.rst | 1 |
3 files changed, 50 insertions, 6 deletions
diff --git a/docs/lib/passlib.hash.ldap_pbkdf2_digest.rst b/docs/lib/passlib.hash.ldap_pbkdf2_digest.rst new file mode 100644 index 0000000..d734960 --- /dev/null +++ b/docs/lib/passlib.hash.ldap_pbkdf2_digest.rst @@ -0,0 +1,38 @@ +================================================================= +:samp:`passlib.hash.ldap_pbkdf2_{digest}` - Generic PBKDF2 Hashes +================================================================= + +.. index:: pbkdf2 hash; generic ldap + +.. currentmodule:: passlib.hash + +PassLib provides three custom hash schemes based on the PBKDF2 [#pbkdf2]_ algorithm +which are compatible with the :ref:`ldap hash format <ldap-hashes>`: +:class:`!ldap_pbkdf2_sha1`, :class:`!ldap_pbkdf2_sha256`, :class:`!ldap_pbkdf2_sha512`. +They feature variable length salts, variable rounds. + +.. seealso:: + + These classes are simply wrappers around the :doc:`MCF-Compatible Simple PBKDF2 Hashes <passlib.hash.pbkdf2_digest>`. + +Interface +========= +.. class:: ldap_pbkdf2_sha1() + + this is the same as :class:`pbkdf2_sha1`, except that it + uses ``{PBKDF2}`` as it's identifying prefix instead of ``$pdkdf2$``. + +.. class:: ldap_pbkdf2_sha256() + + this is the same as :class:`pbkdf2_sha256`, except that it + uses ``{PBKDF2-SHA256}`` as it's identifying prefix instead of ``$pdkdf2-sha256$``. + +.. class:: ldap_pbkdf2_sha512() + + this is the same as :class:`pbkdf2_sha512`, except that it + uses ``{PBKDF2-SHA512}`` as it's identifying prefix instead of ``$pdkdf2-sha512$``. + +References +========== +.. [#pbkdf2] The specification for the PBKDF2 algorithm - `<http://tools.ietf.org/html/rfc2898#section-5.2>`_, + part of :rfc:`2898`. diff --git a/docs/lib/passlib.hash.pbkdf2_digest.rst b/docs/lib/passlib.hash.pbkdf2_digest.rst index 1014907..fac5ca9 100644 --- a/docs/lib/passlib.hash.pbkdf2_digest.rst +++ b/docs/lib/passlib.hash.pbkdf2_digest.rst @@ -1,14 +1,14 @@ =============================================================== -:samp:`passlib.hash.pbkdf2_{digest}` - Simple PBKDF2 Hashes +:samp:`passlib.hash.pbkdf2_{digest}` - Generic PBKDF2 Hashes =============================================================== -.. index:: pbkdf2; password hash +.. index:: pbkdf2 hash; generic mcf .. currentmodule:: passlib.hash PassLib provides three custom hash schemes based on the PBKDF2 [#pbkdf2]_ algorithm which are compatible with the :ref:`modular crypt format <modular-crypt-format>`: -:class:`pbkdf2_sha1`, :class:`pbkdf2_sha256`, :class:`pbkdf2_sha512`. +:class:`!pbkdf2_sha1`, :class:`!pbkdf2_sha256`, :class:`!pbkdf2_sha512`. They feature variable length salts, variable rounds. Security-wise, PBKDF2 is currently one of the leading key derivation functions, @@ -18,6 +18,10 @@ it is not vulnerable to any of the known weaknesses of SHA-1 [#hmac-sha1]_, and can be safely used. However, for those still concerned, SHA-256 and SHA-512 versions are offered as well. +.. seealso:: + + Alternate version of these hashes - :doc:`LDAP-Compatible Simple PBKDF2 Hashes <passlib.hash.ldap_pbkdf2_digest>` + Usage ===== These classes support both rounds and salts, @@ -42,9 +46,9 @@ Interface Format & Algorithm ================== -An example :class:`!pbkdf2_sha256` hash (of ``password``): +An example :class:`!pbkdf2_sha256` hash (of ``password``):: -``$pbkdf2-sha256$6400$.6UI/S.nXIk8jcbdHx3Fhg$98jZicV16ODfEsEZeYPGHU3kbrUrvUEXOPimVSQDD44``. + $pbkdf2-sha256$6400$.6UI/S.nXIk8jcbdHx3Fhg$98jZicV16ODfEsEZeYPGHU3kbrUrvUEXOPimVSQDD44 All of the pbkdf2 hashes defined by passlib follow the same format, :samp:`$pbkdf2-{digest}${rounds}${salt}${checksum}`. @@ -82,4 +86,5 @@ References .. [#pbkdf2] The specification for the PBKDF2 algorithm - `<http://tools.ietf.org/html/rfc2898#section-5.2>`_, part of :rfc:`2898`. -.. [#hmac-sha1] While SHA1 has fallen to collision attacks, HMAC-SHA1 is still considered secure - `<http://www.schneier.com/blog/archives/2005/02/sha1_broken.html>`_. +.. [#hmac-sha1] While SHA1 has fallen to collision attacks, HMAC-SHA1 as used by PBKDF2 + is still considered secure - `<http://www.schneier.com/blog/archives/2005/02/sha1_broken.html>`_. diff --git a/docs/lib/passlib.hash.rst b/docs/lib/passlib.hash.rst index 8a2e99c..47297cc 100644 --- a/docs/lib/passlib.hash.rst +++ b/docs/lib/passlib.hash.rst @@ -144,6 +144,7 @@ but follow the LDAP format: .. toctree:: :maxdepth: 1 + passlib.hash.ldap_pbkdf2_digest passlib.hash.atlassian_pbkdf2_sha1 .. |
