summaryrefslogtreecommitdiff
path: root/docs/lib/passlib.hash.bcrypt.rst
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2013-12-26 10:50:07 -0500
committerEli Collins <elic@assurancetechnologies.com>2013-12-26 10:50:07 -0500
commit0db4ea7949997265fcaae406a26070af86d4bb65 (patch)
treed2ddbef22b700f7e97075c15e9e94b700732955e /docs/lib/passlib.hash.bcrypt.rst
parent1fe99e524b5d6120b2994b94c2ed9ef2cb3437ad (diff)
downloadpasslib-0db4ea7949997265fcaae406a26070af86d4bb65.tar.gz
added passlib.hash.bcrypt_sha256
* not too much trouble, and definitely needed. after considering options, decided to use sha256 + base64. * added note re: bcrypt password truncation * HasBackend mixin -- changed to use _calc_checksum_backend() as the attribute it patches, instead of _calc_checksum(). makes it easier to consolidate code common to all backends (e.g. bcrypt) * test_60_secret_size: changed hardcoded exception list to a class flag * added registry test to make sure all hashes are being tested (with a few known exceptions) * clarified names inside builtin bcrypt backend * updated changelog
Diffstat (limited to 'docs/lib/passlib.hash.bcrypt.rst')
-rw-r--r--docs/lib/passlib.hash.bcrypt.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/lib/passlib.hash.bcrypt.rst b/docs/lib/passlib.hash.bcrypt.rst
index b94dfa8..eafe7ac 100644
--- a/docs/lib/passlib.hash.bcrypt.rst
+++ b/docs/lib/passlib.hash.bcrypt.rst
@@ -93,6 +93,21 @@ While BCrypt's basic algorithm is described in it's design document [#f1]_,
the OpenBSD implementation [#f2]_ is considered the canonical reference, even
though it differs from the design document in a few small ways.
+Security Issues
+===============
+
+.. _bcrypt-password-truncation:
+
+* Password Truncation.
+
+ While not a security issue per-se, bcrypt does have one major limitation:
+ password are truncated on the first NULL byte (if any),
+ and only the first 72 bytes of a password are hashed... all the rest are ignored.
+ Furthermore, bytes 55-72 are not fully mixed into the resulting hash (citation needed!).
+ To work around both these issues, many applications first run the password through a message
+ digest such as SHA2-256. Passlib offers the premade :doc:`passlib.hash.bcrypt_sha256`
+ to take care of this issue.
+
Deviations
==========
This implementation of bcrypt differs from others in a few ways: