phpbb/phpBB/includes
Marc Alexander fbdbf41dc8 [feature/passwords] Add helper functions, i.e. for combined hashes
Combined hashes can be used for i.e. converting already existing
password hashes to bcrypt. While this will not provide the same security
a pure bcrypt hash provides, it will still be significantly more secure
than a standard salted md5.
A combined hash will look as follows:
$H\2y${salted_for_H_prefix}${salt_+_settings_for_2y_prefix}${hash}
The prefixes are seperated by a backslash. Individual settings (which
can include either just the salt or a salt and possible additional settings)
are seperated by dollar signs. As backslashes and dollar signs are not
allowed in hashes or salts, they will be used for seperating the settings
from the salt.

Here is an example of a password hash:
$H\2a$9zv1uIaq1$10\1ff4640409fb96a449c1fO$/oN1O0cdUmFSMZT3UZKrgAyalhnt1LC

The 'H' prefix stands for the salted md5 implementation of phpBB 3.0.
Its settings will be parsed as 9zv1uIaq1 resulting in a hash for the check
as follows:
$H$9zv1uIaq1{hash}
Since the password is used for hashing, the {hash} can be left blank and
will basically be filled by the hashing algorithm. The {hash} will then be
used as password for the next hashing algorithm. In this case that would be
the bcrypt algorithm. The settings are set to 10\1ff4640409fb96a449c1fO which
will be transformed to 10$1ff4640409fb96a449c1fO resulting in a hash like
this for the bcrypt hashing function:
$2a$10$1ff4640409fb96a449c1fO{hash}
The {hash} will again be basically filled by the hashing algorithm.
Afterwards, the {hash} will be extracted from the returned hash and put at
the end of the already known hash settings:
$H\2a$9zv1uIaq1$10\1ff4640409fb96a449c1fO$

If the password is correct, the combined hash will of course be the same
as the stored one.

PHPBB3-11610
2013-09-14 13:50:56 +02:00
..
acp Merge pull request #1513 from nickvergessen/ticket/11582 2013-07-22 11:28:55 -07:00
captcha [ticket/11731] Remove static calls to captcha garbage collector 2013-07-22 15:04:30 -07:00
crypto [feature/passwords] Add helper functions, i.e. for combined hashes 2013-09-14 13:50:56 +02:00
db [ticket/11696] Move file to new directory 2013-07-14 10:16:15 -04:00
diff [ticket/9916] Updating header license and removing Version $Id$ 2011-12-31 13:32:52 +00:00
hooks [ticket/9916] Updating header license and removing Version $Id$ 2011-12-31 13:32:52 +00:00
mcp Merge branch 'develop-olympus' into develop 2013-08-15 01:40:08 +02:00
questionnaire Merge remote-tracking branch 'upstream/develop' into ticket/11015 2012-12-06 21:49:24 -05:00
ucp Merge remote-tracking branch 'brunoais/ticket/11655' into develop 2013-08-01 11:39:17 +02:00
utf [ticket/10847] fixing all misspelled "dependant" to "dependent" 2012-04-30 21:55:24 +02:00
.htaccess [ticket/9698] Add .htaccess to the includes subdirectory. 2010-10-15 16:47:21 +02:00
bbcode.php [feature/twig] Fix BBCode parser 2013-07-02 11:29:32 -05:00
constants.php [prep-release-3.0.12] Bumping version number for 3.0.12-RC2. 2013-08-01 17:26:34 +02:00
functions.php [ticket/11754] Remove styleswitcher leftovers 2013-07-30 12:21:34 +03:00
functions_acp.php [ticket/10999] Fix assets_version in ACP 2013-07-13 13:30:33 -04:00
functions_admin.php Merge remote-tracking branch 'phpbb/develop' into feature/softdelete-1-permission 2013-07-11 11:41:48 +02:00
functions_compatibility.php [feature/avatars] Use deprecated for compatibility function 2013-02-03 23:06:30 +01:00
functions_compress.php [ticket/11159] Static public is the currently approved order. 2012-11-06 16:43:48 -05:00
functions_container.php [ticket/11574] Fix more issues in the updater 2013-07-14 15:40:19 -04:00
functions_content.php Merge branch 'develop-olympus' into develop 2013-08-03 15:37:01 +02:00
functions_convert.php [feature/soft-delete] Lay the groundwork for a soft-delete feature 2012-08-29 17:49:37 +02:00
functions_database_helper.php [ticket/11162] Chase dbal autoloading changes in develop. 2012-12-13 21:27:30 -05:00
functions_display.php [ticket/9649] Display information on index for moderators on unapproved posts 2013-07-13 14:57:31 -04:00
functions_download.php Merge branch 'ticket/10820' into ticket/10820-develop 2013-06-14 00:32:23 +05:30
functions_install.php [ticket/11696] Rename db_tools.php so it can be autoloaded 2013-07-14 10:10:05 -04:00
functions_jabber.php Merge branch 'develop-olympus' into develop 2013-07-12 10:37:52 -05:00
functions_messenger.php [feature/twig] Should have been else 2013-07-01 21:32:10 -05:00
functions_module.php [feature/twig] Spacing 2013-07-04 15:24:42 -05:00
functions_posting.php Merge remote-tracking branch 'brunoais/ticket11639' into develop 2013-08-04 01:56:39 +02:00
functions_privmsgs.php [ticket/11640] removed the space that I wonder what it was doing there. 2013-07-29 16:55:58 +01:00
functions_profile_fields.php [ticket/11010] dealing with dimensions problem, removing extra code 2013-05-20 18:42:06 +02:00
functions_transfer.php [ticket/9916] Updating header license and removing Version $Id$ 2011-12-31 13:32:52 +00:00
functions_upload.php [ticket/10763] Use self when calling get_extension() in filespec class 2012-12-17 19:17:32 +01:00
functions_url_matcher.php [ticket/11335] (kernel request subscriber) Make php_ext 'php' not '.php' 2013-04-24 17:45:41 -05:00
functions_user.php Merge branch 'develop-olympus' into develop 2013-06-11 18:46:30 +02:00
index.htm Add blank indexes to stop nosey people being, erm, nosey 2001-11-21 13:06:56 +00:00
message_parser.php [ticket/11250] Move quote special cases from class to unit tests 2012-12-14 12:58:57 +01:00
sphinxapi.php [ticket/11248] Convert line endings to LF - develop edition. 2012-12-07 21:57:33 -05:00
startup.php [ticket/10893] Update the usage of Composer 2012-05-13 13:05:20 -04:00