<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/passlib.git/docs/lib/passlib.hash.bcrypt_sha256.rst, branch master</title>
<subtitle>foss.heptapod.net: python-libs/passlib
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/passlib.git/'/>
<entry>
<title>passlib.hash.bcrypt_sha256: now uses hmac-sha256 instead of plain sha256</title>
<updated>2020-02-16T15:56:06+00:00</updated>
<author>
<name>Eli Collins</name>
<email>elic@assurancetechnologies.com</email>
</author>
<published>2020-02-16T15:56:06+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/passlib.git/commit/?id=2766485f5760489fedb2e73f8a162c83633bbbcb'/>
<id>2766485f5760489fedb2e73f8a162c83633bbbcb</id>
<content type='text'>
(fixes issue 114)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(fixes issue 114)
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: updated rounds in bcrypt examples (fixes issue #91)</title>
<updated>2017-06-06T16:02:52+00:00</updated>
<author>
<name>Eli Collins</name>
<email>elic@assurancetechnologies.com</email>
</author>
<published>2017-06-06T16:02:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/passlib.git/commit/?id=c8fb988565ecd80873c124c3f38d38b015fe5a48'/>
<id>c8fb988565ecd80873c124c3f38d38b015fe5a48</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: minor wording corrections, replaced 'encrypt' with 'hash' in a bunch of places.</title>
<updated>2016-11-25T16:53:32+00:00</updated>
<author>
<name>Eli Collins</name>
<email>elic@assurancetechnologies.com</email>
</author>
<published>2016-11-25T16:53:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/passlib.git/commit/?id=5e230694bdc3c16a6962d3a57ec821584dccdc23'/>
<id>5e230694bdc3c16a6962d3a57ec821584dccdc23</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>renamed PasswordHandler.replace() back to PasswordHandler.using()</title>
<updated>2016-06-15T22:07:59+00:00</updated>
<author>
<name>Eli Collins</name>
<email>elic@assurancetechnologies.com</email>
</author>
<published>2016-06-15T22:07:59+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/passlib.git/commit/?id=ce23c2ab15e70b612cbd902bf0513c0cf6d734e9'/>
<id>ce23c2ab15e70b612cbd902bf0513c0cf6d734e9</id>
<content type='text'>
this basically reversed rev 5c41b0153d4f; after using it a bit more,
decided the name didn't indicate as well what the method was doing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this basically reversed rev 5c41b0153d4f; after using it a bit more,
decided the name didn't indicate as well what the method was doing.
</pre>
</div>
</content>
</entry>
<entry>
<title>PasswordHash.hash() api shift: deprecating passing settings kwds into hash() --</title>
<updated>2016-06-15T21:43:31+00:00</updated>
<author>
<name>Eli Collins</name>
<email>elic@assurancetechnologies.com</email>
</author>
<published>2016-06-15T21:43:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/passlib.git/commit/?id=713c0bb81f3cec4ee15715657c627a9757a2edf2'/>
<id>713c0bb81f3cec4ee15715657c627a9757a2edf2</id>
<content type='text'>
callers should use handler.replace(**settings).hash() instead.

this is being done because it greatly streamlines the internals of the .hash()
implementation, and allows some redundant configuration parsing to be extracted
from the .hash() methods and merged in with existing code in .replace().

this also opens things up for alternate code architectures for implementing new hashers,
making it easier to wrap existing libraries (e.g. argon2).

internals
---------
* replaced a bunch of internal .hash(**settings) calls

* GenericHandler
    - stripped out 'relaxed' keyword from constructor, since it's no longer
      passed by hash() etc.
    - _norm_checksum() now only invoked if checksum is specified (simplifies logic).
      keeping support for 'relaxed' mode, but only as explicit keyword.
    - removed some unused comments about .from_string() &amp; .to_string()

* HasSalt mixin:
    - .replace() now supports 'salt' keyword, creates variant
      which has a fixed salt string.

    - 'salt size' keyword removed from ctor, now handled by .replace() call

    - _norm_salt() converted to class method so it can be
       used by .replace() 'salt' keyword code.

    - per-instance bits of _norm_salt() relocated to HasSalt.__init__ proper

    - _generate_salt() converted to class method, since no longer depends on instance config.

* HasRounds mixin:

    - similar to HasSalt, relocates per-instance bits of _norm_rounds()
      into HasRounds.__init__() proper.

    - remainder of _norm_rounds() turned into class method, merged
      with ._clip_to_valid_rounds() helper to reduce duplication.

    - _generate_rounds() converted to class method, since no longer depends on instance config.

hashers
-------
* fshp: added support for 'variant' keyword to replace()
* unix_disabled: added support for 'marker' keyword to replace(), added UTs.
* cisco_type7: to match HasSalt, added support for 'salt' keyword to replace(), added UTs.
* sha256/512_crypt: now uses custom salt &amp; rounds parsing, rather than relaxed kwd,
  to handle correctable-but-invalid config strings.

unittests
---------
* removed checks for PasslibConfigWarning when setting hash(rounds=) out of policy bounds,
  since that now *is* setting the policy.
* adapted some handler ctor to deal w/ lack of 'relaxed' kwd

docs
----
* updated docstrings listing hash() keywords for each scheme to list them
  as .replace() keywords.
* updated example code to use .replace()
* fleshed out api docs about the change
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
callers should use handler.replace(**settings).hash() instead.

this is being done because it greatly streamlines the internals of the .hash()
implementation, and allows some redundant configuration parsing to be extracted
from the .hash() methods and merged in with existing code in .replace().

this also opens things up for alternate code architectures for implementing new hashers,
making it easier to wrap existing libraries (e.g. argon2).

internals
---------
* replaced a bunch of internal .hash(**settings) calls

* GenericHandler
    - stripped out 'relaxed' keyword from constructor, since it's no longer
      passed by hash() etc.
    - _norm_checksum() now only invoked if checksum is specified (simplifies logic).
      keeping support for 'relaxed' mode, but only as explicit keyword.
    - removed some unused comments about .from_string() &amp; .to_string()

* HasSalt mixin:
    - .replace() now supports 'salt' keyword, creates variant
      which has a fixed salt string.

    - 'salt size' keyword removed from ctor, now handled by .replace() call

    - _norm_salt() converted to class method so it can be
       used by .replace() 'salt' keyword code.

    - per-instance bits of _norm_salt() relocated to HasSalt.__init__ proper

    - _generate_salt() converted to class method, since no longer depends on instance config.

* HasRounds mixin:

    - similar to HasSalt, relocates per-instance bits of _norm_rounds()
      into HasRounds.__init__() proper.

    - remainder of _norm_rounds() turned into class method, merged
      with ._clip_to_valid_rounds() helper to reduce duplication.

    - _generate_rounds() converted to class method, since no longer depends on instance config.

hashers
-------
* fshp: added support for 'variant' keyword to replace()
* unix_disabled: added support for 'marker' keyword to replace(), added UTs.
* cisco_type7: to match HasSalt, added support for 'salt' keyword to replace(), added UTs.
* sha256/512_crypt: now uses custom salt &amp; rounds parsing, rather than relaxed kwd,
  to handle correctable-but-invalid config strings.

unittests
---------
* removed checks for PasslibConfigWarning when setting hash(rounds=) out of policy bounds,
  since that now *is* setting the policy.
* adapted some handler ctor to deal w/ lack of 'relaxed' kwd

docs
----
* updated docstrings listing hash() keywords for each scheme to list them
  as .replace() keywords.
* updated example code to use .replace()
* fleshed out api docs about the change
</pre>
</div>
</content>
</entry>
<entry>
<title>.encrypt() method renamed to .hash(), other api cleanups</title>
<updated>2016-06-10T16:32:52+00:00</updated>
<author>
<name>Eli Collins</name>
<email>elic@assurancetechnologies.com</email>
</author>
<published>2016-06-10T16:32:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/passlib.git/commit/?id=281dacd121d72c7570442a13f2113f63c6c439ba'/>
<id>281dacd121d72c7570442a13f2113f63c6c439ba</id>
<content type='text'>
.encrypt()
----------
hash.encrypt() &amp; context.encrypt() have been renamed to .hash().
this should take care of the long-standing issue 21 (the poor naming of .encrypt).
per docs, legacy aliases will remain in place until passlib 2.0.

.genhash() / .genconfig()
-------------------------
taking advantage of this reorganization to also deprecate .genconfig()
and .genhash() -- they're not really useful in a modern system,
nor as needed for historical support as initially thought:
.genconfig() will be retired completely in passlib 2.0;
.genhash() is rolled into the new .hash() method along with .encrypt().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
.encrypt()
----------
hash.encrypt() &amp; context.encrypt() have been renamed to .hash().
this should take care of the long-standing issue 21 (the poor naming of .encrypt).
per docs, legacy aliases will remain in place until passlib 2.0.

.genhash() / .genconfig()
-------------------------
taking advantage of this reorganization to also deprecate .genconfig()
and .genhash() -- they're not really useful in a modern system,
nor as needed for historical support as initially thought:
.genconfig() will be retired completely in passlib 2.0;
.genhash() is rolled into the new .hash() method along with .encrypt().
</pre>
</div>
</content>
</entry>
<entry>
<title>bunch of bcrypt updates, centered around the bsd wraparound bug.</title>
<updated>2015-07-21T22:58:52+00:00</updated>
<author>
<name>Eli Collins</name>
<email>elic@assurancetechnologies.com</email>
</author>
<published>2015-07-21T22:58:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/passlib.git/commit/?id=b649b236b4df38910d4b225844eaeb8ff6731b40'/>
<id>b649b236b4df38910d4b225844eaeb8ff6731b40</id>
<content type='text'>
bcrypt
------
* added support &amp; UT for $2b$ hash format.
  not making it the default yet, for backward compat.

* large refactor of how bcrypt backends are loaded:
  instead of per-backend workarounds within each _calc_checksum_&lt;backend&gt;()
  function: now using runtime detection of specific capabilities &amp; workarounds,
  that runs whenever set_backend() is called, combined with consolidated
  workaround code within _calc_checksum(), controlled by the flags
  set by set_backend().

  this detection now looks for:
    - the 8bit bug: throws a PasslibSecurityError
    - the wraparound bug: issues warning, sets flag enabling a workaround.
    - support for 2/2y/2b: if backend lacks support for particular variants,
      sets flag enabling workaround to add support.

* os_crypt backend now just issues error if it can't handle a password encoding;
  rather than trying fallbacks first -- edge case anyways, and likely
  to not have any fallbacks when it does happen. simplifies backend code.

* added UTs to make sure wraparound-vulnerable passwords are hashed correctly
  (as a 72char string, not a 1-3 char string that's repeated).

* internal blowfish code's ident parsing clarified.

other
-----
* added exc.PasslibSecurityError for fatal runtime errors.

* test framework: os_crypt backends no longer expected to use
  *any* backend as fallback, just ones with lower priority than os_crypt.

* test framework: crypt_stub() wrapper now subclasses the handler,
  so it can use an independant backend, instead of changing global
  backend for duration of call (made parallel testing hard)

docs
----
* added entry to bcrypt page, writing down wraparound bug details,
  and how passlib is handling it.

* all versions of pybcrypt &amp; bcryptor seem to be vulnerable to wraparound bug.
  starting process of deprecating these backends: marked bcrypt backend
  as 'preferred' throughout the documentation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
bcrypt
------
* added support &amp; UT for $2b$ hash format.
  not making it the default yet, for backward compat.

* large refactor of how bcrypt backends are loaded:
  instead of per-backend workarounds within each _calc_checksum_&lt;backend&gt;()
  function: now using runtime detection of specific capabilities &amp; workarounds,
  that runs whenever set_backend() is called, combined with consolidated
  workaround code within _calc_checksum(), controlled by the flags
  set by set_backend().

  this detection now looks for:
    - the 8bit bug: throws a PasslibSecurityError
    - the wraparound bug: issues warning, sets flag enabling a workaround.
    - support for 2/2y/2b: if backend lacks support for particular variants,
      sets flag enabling workaround to add support.

* os_crypt backend now just issues error if it can't handle a password encoding;
  rather than trying fallbacks first -- edge case anyways, and likely
  to not have any fallbacks when it does happen. simplifies backend code.

* added UTs to make sure wraparound-vulnerable passwords are hashed correctly
  (as a 72char string, not a 1-3 char string that's repeated).

* internal blowfish code's ident parsing clarified.

other
-----
* added exc.PasslibSecurityError for fatal runtime errors.

* test framework: os_crypt backends no longer expected to use
  *any* backend as fallback, just ones with lower priority than os_crypt.

* test framework: crypt_stub() wrapper now subclasses the handler,
  so it can use an independant backend, instead of changing global
  backend for duration of call (made parallel testing hard)

docs
----
* added entry to bcrypt page, writing down wraparound bug details,
  and how passlib is handling it.

* all versions of pybcrypt &amp; bcryptor seem to be vulnerable to wraparound bug.
  starting process of deprecating these backends: marked bcrypt backend
  as 'preferred' throughout the documentation.
</pre>
</div>
</content>
</entry>
<entry>
<title>added passlib.hash.bcrypt_sha256</title>
<updated>2013-12-26T15:50:07+00:00</updated>
<author>
<name>Eli Collins</name>
<email>elic@assurancetechnologies.com</email>
</author>
<published>2013-12-26T15:50:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/passlib.git/commit/?id=0db4ea7949997265fcaae406a26070af86d4bb65'/>
<id>0db4ea7949997265fcaae406a26070af86d4bb65</id>
<content type='text'>
* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
</feed>
