Re: [PHP-DEV] password_hash() best practices

2015-05-07 Thread Anthony Ferrara
Leszek, On Thu, May 7, 2015 at 2:11 AM, Leszek Krupinski wrote: > On Wed, May 6, 2015 at 4:00 PM, Nikita Popov wrote: > >> It should be further noted that there is no standardized crypt() format for >> PBKDF2 and password_hash() is a crypt-compatible API. As such supporting >> PBKDF2 there would

Re: [PHP-DEV] password_hash() best practices

2015-05-07 Thread Rowan Collins
Leszek Krupinski wrote on 07/05/2015 07:11: On Wed, May 6, 2015 at 4:00 PM, Nikita Popov wrote: It should be further noted that there is no standardized crypt() format for PBKDF2 and password_hash() is a crypt-compatible API. As such supporting PBKDF2 there would be very problematic. That's t

Re: [PHP-DEV] password_hash() best practices

2015-05-06 Thread Leszek Krupinski
On Wed, May 6, 2015 at 4:00 PM, Nikita Popov wrote: > It should be further noted that there is no standardized crypt() format for > PBKDF2 and password_hash() is a crypt-compatible API. As such supporting > PBKDF2 there would be very problematic. We do already support it in the > form of hash_pbk

Re: [PHP-DEV] password_hash() best practices

2015-05-06 Thread Leszek Krupinski
On Wed, May 6, 2015 at 9:17 PM, Christoph Becker wrote: > Leszek Krupinski: > > > While I agree that the statement "bcrypt is better than PBKDF2, thus only > > bcrypt should be used" is difficult to defend, > > Well at least the StackExchange thread[1] pointed out by Nikita supports > the stateme

Re: [PHP-DEV] password_hash() best practices

2015-05-06 Thread Christoph Becker
Albert Casademont wrote: > The iteration count is very different because in bcrypt it's not an > iteration count number at all, it's a "cost". And it's kinda exponential: a > hash with a cost of 11 is twice as hard to compute than that of a 10. At > our company we are using a cost of 11 right now,

Re: [PHP-DEV] password_hash() best practices

2015-05-06 Thread Albert Casademont
The iteration count is very different because in bcrypt it's not an iteration count number at all, it's a "cost". And it's kinda exponential: a hash with a cost of 11 is twice as hard to compute than that of a 10. At our company we are using a cost of 11 right now, which means a hash is computed in

Re: [PHP-DEV] password_hash() best practices

2015-05-06 Thread Christoph Becker
Leszek Krupinski: > While I agree that the statement "bcrypt is better than PBKDF2, thus only > bcrypt should be used" is difficult to defend, Well at least the StackExchange thread[1] pointed out by Nikita supports the statement. > I think saying "bcrypt is a > homegrown solution, only PBKDF2

Re: [PHP-DEV] password_hash() best practices

2015-05-06 Thread Christoph Becker
Nikita Popov wrote: > On Tue, May 5, 2015 at 10:37 PM, Christoph Becker wrote: > >> In issue #64816[1] the OP suggests in the comment from [2015-05-05 04:34 >> UTC] that hash_pbkdf2() should be recommended for advanced users, and >> that password_hash() should use PBKDF2 with at least 128,000 rou

Re: [PHP-DEV] password_hash() best practices

2015-05-06 Thread Nikita Popov
On Tue, May 5, 2015 at 10:37 PM, Christoph Becker wrote: > Hi everybody! > > In issue #64816[1] the OP suggests in the comment from [2015-05-05 04:34 > UTC] that hash_pbkdf2() should be recommended for advanced users, and > that password_hash() should use PBKDF2 with at least 128,000 rounds. > P

Re: [PHP-DEV] password_hash() best practices

2015-05-06 Thread Leszek Krupinski
While I agree that the statement "bcrypt is better than PBKDF2, thus only bcrypt should be used" is difficult to defend, I think saying "bcrypt is a homegrown solution, only PBKDF2 is a good way to do it" is also wrong and OP is opinionated. IMO - docs should describe alternatives, without stateme

[PHP-DEV] password_hash() best practices

2015-05-05 Thread Christoph Becker
Hi everybody! In issue #64816[1] the OP suggests in the comment from [2015-05-05 04:34 UTC] that hash_pbkdf2() should be recommended for advanced users, and that password_hash() should use PBKDF2 with at least 128,000 rounds. The "Adding simple password hashing API" RFC[2] mentions in the "Future