Hi Mária,

Actually BCrypt isn't preferred/recommended:  Apache Shiro's default
Hash implementations are as secure as BCrypt as long as you're using a
reasonably secure hashing algorithm (e.g. SHA-256) and a sufficiently
high number of iterations.  I covered this briefly in a blog article
that may be of help:
http://www.katasoft.com/blog/2011/04/04/strong-password-hashing-apache-shiro

I really created SHIRO-290 as a placeholder, but I'm fairly certain
it's not worth our time to implement it, given that Shiro Hashes are
already as secure as BCrypt because we've always supported an
iterations component.

Also note that the jBCrypt [1] implementation that could have been
used as a code seed does not appear to implement the Blowfish
algorithm correctly.  I've read the Niels/Provos paper and viewed the
jBCrypt source and noticed that the code does not match the math.  (I
can't remember off of the top of my head but I believe the feistel
transformation function was incorrect).

Summary: There is no published evidence that BCrypt is more
cryptographically secure than Shiro's recommended mechanism (e.g.
SHA-256 or SHA-512 and a high # of iterations), so we probably don't
need to go through the effort of implementing BCrypt as a new Hash
implementation.

[1] http://www.mindrot.org/projects/jBCrypt/

HTH,

-- 
Les Hazlewood
Founder, Katasoft, Inc.
Application Security Products & Professional Apache Shiro Support and Training:
http://www.katasoft.com

2011/6/6 Mária Jurčovičová <[email protected]>:
> Hi,
>
> there is one thing: DefaultHasher takes algorithm name as a parameter and
> then uses an instance of simple hash to hash passwords. It is not possible
> to supply it with an arbitrary instance of Hash interface implementation.
>
> For example, if BCrypt hashing would be implemented (
> https://issues.apache.org/jira/browse/SHIRO-290), it would be impossible to
> use it with DefaultHasher. As I understand it, BCrypt is now recommended for
> password hashing.
>
> With Regards,
> Maria Jurcovicova
>
>
>
> On Fri, Jun 3, 2011 at 7:21 PM, Les Hazlewood <[email protected]> wrote:
>
>> Thanks for this Maria and Kalle.
>>
>> Just a quick note though - the Hasher stuff I wrote is still in flux -
>> it's not necessarily scoped out to how it should/could be before being
>> 'releasable'.  Any thoughts or feedback is appreciated!
>>
>> Cheers,
>>
>> Les
>>
>> On Fri, Jun 3, 2011 at 7:52 AM,  <[email protected]> wrote:
>> > Author: kaosko
>> > Date: Fri Jun  3 14:52:04 2011
>> > New Revision: 1131059
>> > ...

Reply via email to