42342[FEATURE] Add PBKDF2 based password storage to EXT:saltedpasswords
Commit message
Review
-
Code review CR +2
- Markus Klein +2
- Georg Ringer +1
-
Verified V +2
- Markus Klein +2
- Georg Ringer +1
Issues 1
Files 7
- typo3/sysext/core/Documentation/Changelog/master/Feature-28230-AddSupportForPBKDF2ToSaltedpasswords.rst2new+16 −0
- typo3/sysext/saltedpasswords/Classes/Salt/Pbkdf2Salt.php11new+409 −0
- typo3/sysext/saltedpasswords/Classes/Salt/SaltFactory.php+2 −1
- typo3/sysext/saltedpasswords/Documentation/Overview/Index.rst3+5 −1
- typo3/sysext/saltedpasswords/Resources/Private/Language/locallang.xlf+3 −0
- typo3/sysext/saltedpasswords/Tests/Unit/Salt/Pbkdf2SaltTest.php1new+345 −0
- typo3/sysext/saltedpasswords/Tests/Unit/Salt/SaltFactoryTest.php+10 −0
Review log 27
Show 2 earlier messages
-
Morton Jonuschat uploaded patch set 1 08/07/15, 07:33
-
Mathias Brodala commented on patch set 1 08/07/15, 07:45
Feature-28230-AddSupportForPBKDF2ToSaltedpasswords.rst:15enabledPbkdf2SaltTest.php:51Can't this be replaced with "@requires function hash_pbkdf2"? See https://phpunit.de/manual/current/en/incomplete-and-skipped-tests.html#incomplete-and-skipped-tests.skipping-tests-using-requires
-
Morton Jonuschat uploaded patch set 2 08/07/15, 11:17
-
Oliver Hader uploaded patch set 3 10/09/15, 06:33
-
Morton Jonuschat rebased onto patch set 4 01/08/16, 17:22
-
Markus Klein commented on patch set 4 01/08/16, 17:48
Pbkdf2Salt.php:93===Pbkdf2Salt.php:111===Pbkdf2Salt.php:113can be reduced to: return $this->isValidSalt($saltedHashPW) && $this->getHashedPassword($plainPW, $saltedHashPW) === $saltedHashPW;Pbkdf2Salt.php:128how can that ever be false? shoud be $firstSplitPos, right?Pbkdf2Salt.php:147shorten namespace plsPbkdf2Salt.php:1880 would be treated as empty password, must be !== '' -
Morton Jonuschat uploaded patch set 5 01/08/16, 18:45
-
Markus Klein voted on patch set 5 CR +1 01/09/16, 18:51
-
Markus Klein commented on patch set 5 V +1 01/09/16, 19:06
Index.rst:72actually that doesn't help an integrator at all to make the decision whether to use this option. I think we can skip that part. Maybe some autodetection is possible somehow/somewhere? -
Frank Nägler commented on patch set 5 01/11/16, 09:00
ext_tables.sql:61why we need here 255? the hash length for PBKDF2 is 32 or not? -
Christian Kuhn commented on patch set 5 01/11/16, 14:14
ext_tables.sql:61Replyimho not needed. at least fe_users and be_users should be kept in sync. -
Christian Kuhn commented on patch set 5 01/11/16, 14:45
basically +1 on reading, but i'd like to have a proof with a 3rd party application or the reference implementation that the created hash can be successfully used.ext_tables.sql:61Replyah, needed: the example salt from the test has 174 characters. so - please extend both fe_users and be_users field length.Pbkdf2Salt.php:74blowfish?Pbkdf2Salt.php:250blowfishPbkdf2Salt.php:263blowfish?Pbkdf2Salt.php:266blowfish?Index.rst:72Replyi'd skip the last sentence, hash_pbkdf2 is always available since 5.5. -
Frank Nägler commented on patch set 5 V -1 01/11/16, 14:49
can't change my password in user settings with patch applied. I have changed config to the new PBKDF2 hash but, click on save results in an endless request. can't find the problem at the moment. -
Morton Jonuschat uploaded patch set 6 01/11/16, 17:10
-
Markus Klein commented on patch set 6 01/11/16, 20:41
Index.rst:72my comment from set 5 is still valid -
Morton Jonuschat wrote 01/12/16, 09:31
Patch set 7: Published edit on patch set 6. -
Christian Kuhn commented on patch set 7 01/12/16, 16:14
Had a quick chat with Marcus on this topic: * It would be great to implement the test vectors from rfc6070 to verify results * How was the prefix "$pbkdf2-sha512$" chosen? At best, this would be in line with other major products, or is there some standards definition for this? -
Christian Kuhn commented on patch set 7 01/12/16, 16:43
i'd like to have this as "standard" compatible as possible, also on the storage end. there seems to be no strict definition on that however, so it would be great to have further information from others in this regard. according to one of the unit tests, current chosen storage format is: $pbkdf2_sha512$iterationcount$salthash google says others seem to use an additional $ between salt and hash. a reference from other big projects would be great.Pbkdf2Salt.php:33lastpass used 100.000 with sha256 in 2011, see https://blog.lastpass.com/2011/05/lastpass-security-notification.html/ -
Christian Kuhn commented on patch set 7 01/12/16, 16:52
django: https://pythonhosted.org/passlib/lib/passlib.hash.django_std.html pbkdf2_sha256$10000$s1w0UXDd00XB$+4ORmyvVWAQvoAEWlDgN34vlaJx1ZTZpa1pCSRey2Yk= -
Morton Jonuschat commented on patch set 5 01/12/16, 18:04
The test vectors from RFC6070 are for HMAC-SHA1 and not applicable to HMAC-SHA512. Afaik there are no RFC test vectors for other hashing algorithms. As we are using the PHP provided implementation of PBKDF2 we would only be (re-)testing the actual implementation of the algorithm by PHP, not our usage. The identifier $pbkdf2-sha512$ was chosen based upon LDAP / Passlib which both use the same format (LDAP uses curly braces instead of $). The choice not to separate salt and hash is based upon the blowfish format from EXT:saltedpasswords which doesn't separate it either. The iteration count was set to a value that takes about the same time as the current blowfish implementation. An iteration count of 100.000 made the password verification take upwards of 500ms which results in a noticeable delay on login compared to the other options. -
Georg Ringer voted on patch set 7 CR +1 V +1 01/15/16, 09:33
-
Christian Kuhn commented on patch set 7 01/15/16, 11:10
ok, last question - why sha512 and not sha256 that most other implementations use that i found in the wild? -
Morton Jonuschat commented on patch set 7 01/15/16, 11:50
No specific reason except for "strongest" default. As discussed in Slack will change to SHA256 and add the $ between salt and hash. -
Morton Jonuschat uploaded patch set 8 01/15/16, 14:43
-
Georg Ringer voted on patch set 8 CR +1 V +1 01/15/16, 14:51
-
Markus Klein voted on patch set 8 CR +2 V +2 01/15/16, 15:13
-
Gerrit merged patch set 8 01/15/16, 15:13
Feature-28230-AddSupportForPBKDF2ToSaltedpasswords.rst:15