<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>[PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
        <description>Hello All,

I've taken the conversation of the previous simplified password
hashing API, and generated a patch and draft RFC for it. The patch
isn't ready yet (needs review, cleanup and testing), but it's a start.

https://wiki.php.net/rfc/password_hash

Please have a look and comment away!

Thanks,

Anthony

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php</description>
        <link>http://www.serverphorums.com/read.php?7,519597,519597#msg-519597</link>
        <lastBuildDate>Mon, 20 May 2013 06:50:24 +0200</lastBuildDate>
        <generator>Phorum 5.2.18</generator>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,538047#msg-538047</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,538047#msg-538047</link>
            <description><![CDATA[ hi,<br />
<br />
On Tue, Jul 31, 2012 at 2:02 PM, Jonathan Bond-Caron &lt;jbondc@openmv.com&gt; wrote:<br />
&gt; On Wed Jun 27 12:32 PM, Arvids Godjuks wrote:<br />
<br />
&gt; a) In terms of 'effort' to break many passwords, there's a benefit to the salt stored in the hash itself.<br />
&gt; It's not 'more secure' but 'better/recommended' since the attacker would need to create a 'rainbow table' for each password it's trying to crack<br />
&gt; Overall, the technique offers better protection.<br />
&gt;<br />
&gt; b) In terms of 'effort' to break a single password, there's **no** benefit to the salt stored in the hash itself.<br />
&gt;<br />
&gt; If you want a single password to be really secure, don't let the attacker know the salt and keep it long:<br />
&gt;<br />
&gt; // no benefit of short salt, ~ same effort required by the attacker<br />
&gt; $password = '234';<br />
&gt; md5($password);<br />
&gt;<br />
&gt; $salt = '1';<br />
&gt; $password = '234';<br />
&gt; md5($salt . $password);<br />
&gt;<br />
&gt; c) The best of both worlds: long private salt (b) + different for every user (a)<br />
&gt; $saltInpassword = $password[0]; // could be random bytes, stored in password like crypt() does<br />
&gt; $salt = 'my-long-private-value-use-all-bytes'. $saltInPassword;<br />
&gt; $password = '234';<br />
&gt; $hash = md5($salt . $password);<br />
&gt;<br />
&gt; This one requires more effort by the attacker since the long salt forces more 'bits/guesses' to pass into md5()<br />
&gt;<br />
&gt; // require even more effort, iterate<br />
&gt; for($i = 0; $i &lt; 1000; $i++)<br />
&gt;   $hash = md5($i . $hash);<br />
<br />
This is somehow the 1st implementation (part of) of crypt. See<br />
ext/standard for the full code. And md5 is now known to do not be<br />
secure enough. IIRC.<br />
<br />
I would not, but really totally not, begin to try to implement our own<br />
little algorithm but rely on standard well tested implementations.<br />
Crypt support blowfish, for example. Anthony also works on supporting<br />
more algos afair.<br />
<br />
<br />
Cheers,<br />
-- <br />
Pierre<br />
<br />
@pierrejoye | <a href="http://blog.thepimp.net" target="_blank"  rel="nofollow">http://blog.thepimp.net</a> | <a href="http://www.libgd.org" target="_blank"  rel="nofollow">http://www.libgd.org</a><br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Pierre Joye</dc:creator>
            <category>php-internals</category>
            <pubDate>Tue, 31 Jul 2012 14:30:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,538040#msg-538040</guid>
            <title>RE: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,538040#msg-538040</link>
            <description><![CDATA[ On Wed Jun 27 12:32 PM, Arvids Godjuks wrote:<br />
&gt; because at the moment i do not understand how salt stored in the hash itself makes hash more <br />
&gt; secure than an unsalted one.<br />
<br />
a) In terms of 'effort' to break many passwords, there's a benefit to the salt stored in the hash itself.<br />
It's not 'more secure' but 'better/recommended' since the attacker would need to create a 'rainbow table' for each password it's trying to crack <br />
Overall, the technique offers better protection.<br />
<br />
b) In terms of 'effort' to break a single password, there's **no** benefit to the salt stored in the hash itself.<br />
<br />
If you want a single password to be really secure, don't let the attacker know the salt and keep it long:<br />
<br />
// no benefit of short salt, ~ same effort required by the attacker<br />
$password = '234';<br />
md5($password);<br />
<br />
$salt = '1';<br />
$password = '234';<br />
md5($salt . $password);<br />
<br />
c) The best of both worlds: long private salt (b) + different for every user (a) <br />
$saltInpassword = $password[0]; // could be random bytes, stored in password like crypt() does<br />
$salt = 'my-long-private-value-use-all-bytes'. $saltInPassword;<br />
$password = '234';<br />
$hash = md5($salt . $password);<br />
<br />
This one requires more effort by the attacker since the long salt forces more 'bits/guesses' to pass into md5()<br />
<br />
// require even more effort, iterate<br />
for($i = 0; $i &lt; 1000; $i++)<br />
  $hash = md5($i . $hash);<br />
<br />
<br />
<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Jonathan Bond-Caron</dc:creator>
            <category>php-internals</category>
            <pubDate>Tue, 31 Jul 2012 14:10:03 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,528312#msg-528312</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,528312#msg-528312</link>
            <description><![CDATA[ Pierre,<br />
<br />
&gt; I've added a pair of new functions to the RFC and implementation:<br />
&gt; &gt;<br />
&gt; &gt; password_needs_rehash($hash, $algo, array $options = array())<br />
&gt;<br />
&gt; Not totally convinced about that one.<br />
<br />
<br />
I'm not either. That's why I added the discussion point around it. I can<br />
see it going either way.<br />
<br />
<br />
&gt; I would prefer a password_rehash<br />
&gt; instead, then a simple comparison is needed to know if an update is<br />
&gt; necessary or not.<br />
&gt;<br />
&gt; &gt; password_get_info($hash)<br />
&gt;<br />
&gt; Soungs good, to get all the details about the given hash.<br />
<br />
<br />
The *only* problem with this is what happens if the options array contains<br />
unused variables for an algorithm. Say we implement scrypt, and there's an<br />
R variable in the array. If we check a bcrypt algorithm hash (with<br />
PASSWORD_BCRYPT specifically), if the array contains &quot;R&quot;, it could throw a<br />
red herring indicating an un-necessary re-hash. So there's some algorithmic<br />
specific information that needs to be compared. Thereby making a<br />
&quot;needs_rehash&quot; function in userland non-trivial. It's still not complex,<br />
but it's not trivial either. Part of me wants to see it as it would be<br />
maintained over the years as new algorithms are introduced, and hence can<br />
compensate for other things that implementing it in userland can't....<br />
<br />
In other words, I'm not sure either way...<br />
<br />
Anthony]]></description>
            <dc:creator>Anthony Ferrara</dc:creator>
            <category>php-internals</category>
            <pubDate>Thu, 12 Jul 2012 20:40:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,528297#msg-528297</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,528297#msg-528297</link>
            <description><![CDATA[ hi Anthony!<br />
<br />
On Mon, Jul 9, 2012 at 5:19 PM, Anthony Ferrara &lt;ircmaxell@gmail.com&gt; wrote:<br />
&gt; I've added a pair of new functions to the RFC and implementation:<br />
&gt;<br />
&gt; password_needs_rehash($hash, $algo, array $options = array())<br />
<br />
Not totally convinced about that one. I would prefer a password_rehash<br />
instead, then a simple comparison is needed to know if an update is<br />
necessary or not.<br />
<br />
&gt; password_get_info($hash)<br />
<br />
Soungs good, to get all the details about the given hash.<br />
<br />
Cheers,<br />
-- <br />
Pierre<br />
<br />
@pierrejoye | <a href="http://blog.thepimp.net" target="_blank"  rel="nofollow">http://blog.thepimp.net</a> | <a href="http://www.libgd.org" target="_blank"  rel="nofollow">http://www.libgd.org</a><br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Pierre Joye</dc:creator>
            <category>php-internals</category>
            <pubDate>Thu, 12 Jul 2012 20:00:04 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,526087#msg-526087</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,526087#msg-526087</link>
            <description><![CDATA[ I've added a pair of new functions to the RFC and implementation:<br />
<br />
password_needs_rehash($hash, $algo, array $options = array())<br />
and<br />
password_get_info($hash)<br />
<br />
both are reasonably similar and there's a fair bit of overlap. Considering<br />
that password_needs_rehash can be implemented easily in user-land, I'm not<br />
convinced it's needed. Then again, it's easy to implement and shouldn't<br />
pose a maintenance headache, so I'm not sure if it shouldn't be there<br />
either...<br />
<br />
What do you think?<br />
<br />
Anthony<br />
<br />
On Tue, Jul 3, 2012 at 5:24 PM, Anthony Ferrara &lt;ircmaxell@gmail.com&gt; wrote:<br />
<br />
&gt; Richard,<br />
&gt;<br />
&gt; &gt; There is also the case of an app that simple shouldn't run with the<br />
&gt; &gt; single default, but could pick and choose suitable algorithm from a<br />
&gt; &gt; list of defaults, while still honoring whatever is in the .ini file<br />
&gt; &gt; instead of going rogue with some other algorithm.<br />
&gt;<br />
&gt; I disagree there. I think that's up to the application to decide. A<br />
&gt; list of defaults does nothing but needlessly complicate the<br />
&gt; implementation. How is the hash function supposed to determine which<br />
&gt; of the list of defaults to use? Let the application layer choose, and<br />
&gt; pass it in. The current PASSWORD_DEFAULT lives for the sole reason<br />
&gt; that it auto-updates to indicate the most secure algorithm available.<br />
&gt;<br />
&gt; Anthony<br />
&gt;]]></description>
            <dc:creator>Anthony Ferrara</dc:creator>
            <category>php-internals</category>
            <pubDate>Mon, 09 Jul 2012 17:30:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,523377#msg-523377</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,523377#msg-523377</link>
            <description><![CDATA[ Richard,<br />
<br />
&gt; There is also the case of an app that simple shouldn't run with the<br />
&gt; single default, but could pick and choose suitable algorithm from a<br />
&gt; list of defaults, while still honoring whatever is in the .ini file<br />
&gt; instead of going rogue with some other algorithm.<br />
<br />
I disagree there. I think that's up to the application to decide. A<br />
list of defaults does nothing but needlessly complicate the<br />
implementation. How is the hash function supposed to determine which<br />
of the list of defaults to use? Let the application layer choose, and<br />
pass it in. The current PASSWORD_DEFAULT lives for the sole reason<br />
that it auto-updates to indicate the most secure algorithm available.<br />
<br />
Anthony<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Anthony Ferrara</dc:creator>
            <category>php-internals</category>
            <pubDate>Tue, 03 Jul 2012 23:30:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,523130#msg-523130</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,523130#msg-523130</link>
            <description><![CDATA[ Pierre,<br />
&gt;&gt; I know you didn't like PASSWORD_MOST_SECURE. So what about keeping<br />
&gt;&gt; PASSWORD_DEFAULT as a moving target, documented, and just making the<br />
&gt;&gt; second parameter (algo) to password_hash required? That way users<br />
&gt;&gt; could choose between PASSWORD_BCRYPT and PASSWORD_DEFAULT.<br />
&gt;&gt;<br />
&gt;&gt; That way, over time, PASSWORD_DEFAULT could be updated, and it would<br />
&gt;&gt; be documented that it would change. But it would require them to<br />
&gt;&gt; understand that it could change...<br />
&gt;&gt;<br />
&gt;&gt; Would that satisfy your issues?<br />
&gt;<br />
&gt; Yes.<br />
&gt;<br />
&gt; Using this constant name and clearly document its changing nature is<br />
&gt; fine. The argument being required fully solves my worry about optional<br />
&gt; argument with changing default value.<br />
<br />
I've implemented this in my branch. I've also updated the RFC to<br />
indicate such (we may want to expand it a little bit, but it should<br />
suffice for now).<br />
<br />
I've also added a bit to the RFC about a policy for updating the<br />
default constant over time. (Indicating for a non-security release,<br />
changing the default must be done via an RFC, how long the algorithm<br />
must be available before being eligible for default, etc).<br />
<br />
&gt; Thanks for your efforts and work!<br />
<br />
Absolutely!<br />
<br />
Thanks,<br />
<br />
Anthony<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Anthony Ferrara</dc:creator>
            <category>php-internals</category>
            <pubDate>Tue, 03 Jul 2012 14:40:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,523123#msg-523123</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,523123#msg-523123</link>
            <description><![CDATA[ hi Anthony,<br />
<br />
On Tue, Jul 3, 2012 at 1:53 PM, Anthony Ferrara &lt;ircmaxell@gmail.com&gt; wrote:<br />
&gt; Pierre,<br />
&gt;<br />
&gt; Getting back to the PASSWORD_DEFAULT discussion...<br />
&gt;<br />
&gt; I know you didn't like PASSWORD_MOST_SECURE. So what about keeping<br />
&gt; PASSWORD_DEFAULT as a moving target, documented, and just making the<br />
&gt; second parameter (algo) to password_hash required? That way users<br />
&gt; could choose between PASSWORD_BCRYPT and PASSWORD_DEFAULT.<br />
&gt;<br />
&gt; That way, over time, PASSWORD_DEFAULT could be updated, and it would<br />
&gt; be documented that it would change. But it would require them to<br />
&gt; understand that it could change...<br />
&gt;<br />
&gt; Would that satisfy your issues?<br />
<br />
Yes.<br />
<br />
Using this constant name and clearly document its changing nature is<br />
fine. The argument being required fully solves my worry about optional<br />
argument with changing default value.<br />
<br />
Thanks for your efforts and work!<br />
<br />
Cheers,<br />
-- <br />
Pierre<br />
<br />
@pierrejoye | <a href="http://blog.thepimp.net" target="_blank"  rel="nofollow">http://blog.thepimp.net</a> | <a href="http://www.libgd.org" target="_blank"  rel="nofollow">http://www.libgd.org</a><br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Pierre Joye</dc:creator>
            <category>php-internals</category>
            <pubDate>Tue, 03 Jul 2012 14:10:03 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,523115#msg-523115</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,523115#msg-523115</link>
            <description><![CDATA[ Pierre,<br />
<br />
Getting back to the PASSWORD_DEFAULT discussion...<br />
<br />
I know you didn't like PASSWORD_MOST_SECURE. So what about keeping<br />
PASSWORD_DEFAULT as a moving target, documented, and just making the<br />
second parameter (algo) to password_hash required? That way users<br />
could choose between PASSWORD_BCRYPT and PASSWORD_DEFAULT.<br />
<br />
That way, over time, PASSWORD_DEFAULT could be updated, and it would<br />
be documented that it would change. But it would require them to<br />
understand that it could change...<br />
<br />
Would that satisfy your issues?<br />
<br />
Thanks,<br />
<br />
Anthony<br />
<br />
On Wed, Jun 27, 2012 at 8:12 AM, Pierre Joye &lt;pierre.php@gmail.com&gt; wrote:<br />
&gt; hi,<br />
&gt;<br />
&gt; On Wed, Jun 27, 2012 at 1:49 PM, Gustavo Lopes &lt;glopes@nebm.ist.utl.pt&gt; wrote:<br />
&gt;&gt; Em Wed, 27 Jun 2012 13:37:50 +0200, Pierre Joye &lt;pierre.php@gmail.com&gt;<br />
&gt;&gt; escreveu:<br />
&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt;&gt; That's exactly what I meant, having a changing default in this may<br />
&gt;&gt;&gt; force code change during php updates. I'm not in favour of having such<br />
&gt;&gt;&gt; default.<br />
&gt;&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt; This would not require any code changes after updates.<br />
&gt;&gt;<br />
&gt;&gt; As I understand, hashes computed with the old default method could still be<br />
&gt;&gt; checked without any modification as the hash itself stores information about<br />
&gt;&gt; the method.<br />
&gt;<br />
&gt; That's only about one relatively simple use case where only PHP would<br />
&gt; be involved or crypt-like implemenation. For any other and rather<br />
&gt; common cases, it won't. I do not think a default should be implemented<br />
&gt; and actually let the user knows what he uses and what he is doing.<br />
&gt; That's one argument after all and clears all possible caveats.<br />
&gt;<br />
&gt; Cheers,<br />
&gt; --<br />
&gt; Pierre<br />
&gt;<br />
&gt; @pierrejoye | <a href="http://blog.thepimp.net" target="_blank"  rel="nofollow">http://blog.thepimp.net</a> | <a href="http://www.libgd.org" target="_blank"  rel="nofollow">http://www.libgd.org</a><br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Anthony Ferrara</dc:creator>
            <category>php-internals</category>
            <pubDate>Tue, 03 Jul 2012 14:00:03 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,523106#msg-523106</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,523106#msg-523106</link>
            <description><![CDATA[ Pierre,<br />
<br />
&gt; Simply by not allowing to change it. If one does not like it, it can<br />
&gt; pass the option value as he wishes.<br />
&gt;<br />
&gt; An ini setting for that sounds wrong to me.<br />
<br />
Alright. I've pulled the ini option from the fork, and have updated<br />
the RFC to the same...<br />
<br />
Anthony<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Anthony Ferrara</dc:creator>
            <category>php-internals</category>
            <pubDate>Tue, 03 Jul 2012 13:50:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,523021#msg-523021</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,523021#msg-523021</link>
            <description><![CDATA[ On Tue, Jul 3, 2012 at 10:42 AM, Pierre Joye &lt;pierre.php@gmail.com&gt; wrote:<br />
&gt; hi!<br />
&gt;<br />
&gt; On Tue, Jul 3, 2012 at 1:23 AM, Anthony Ferrara &lt;ircmaxell@gmail.com&gt; wrote:<br />
&gt;<br />
&gt;&gt; Well, if not for an ini parameter, what way would you suggest to alter<br />
&gt;&gt; the default bcrypt cost? (seriously, I'm open to suggestions)...<br />
&gt;<br />
&gt; Simply by not allowing to change it. If one does not like it, it can<br />
&gt; pass the option value as he wishes.<br />
&gt;<br />
&gt; An ini setting for that sounds wrong to me.<br />
Agree on this. We don't need any more ini settings. Having an<br />
ini-setting would just force everyone to explicitly specify the load<br />
parameter.<br />
<br />
Nikita<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Nikita Popov</dc:creator>
            <category>php-internals</category>
            <pubDate>Tue, 03 Jul 2012 11:10:03 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,523005#msg-523005</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,523005#msg-523005</link>
            <description><![CDATA[ hi!<br />
<br />
On Tue, Jul 3, 2012 at 1:23 AM, Anthony Ferrara &lt;ircmaxell@gmail.com&gt; wrote:<br />
<br />
&gt; Well, if not for an ini parameter, what way would you suggest to alter<br />
&gt; the default bcrypt cost? (seriously, I'm open to suggestions)...<br />
<br />
Simply by not allowing to change it. If one does not like it, it can<br />
pass the option value as he wishes.<br />
<br />
An ini setting for that sounds wrong to me.<br />
<br />
Cheers,<br />
-- <br />
Pierre<br />
<br />
@pierrejoye | <a href="http://blog.thepimp.net" target="_blank"  rel="nofollow">http://blog.thepimp.net</a> | <a href="http://www.libgd.org" target="_blank"  rel="nofollow">http://www.libgd.org</a><br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Pierre Joye</dc:creator>
            <category>php-internals</category>
            <pubDate>Tue, 03 Jul 2012 10:50:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,522814#msg-522814</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,522814#msg-522814</link>
            <description><![CDATA[ Chris,<br />
<br />
&gt; To be honest, a note next to PASSWORD_DEFAULT would be good too.<br />
<br />
Ok, I'll add that in shortly.<br />
<br />
&gt;&gt;&gt; The API of password_make_salt() seems restrictive.  What if other<br />
&gt;&gt;&gt; options are needed in future?<br />
&gt;&gt;<br />
&gt;&gt;<br />
&gt;&gt; Can you give any examples of what options would be needed in the<br />
&gt;&gt; future, or how you would like to see the API?<br />
&gt;<br />
&gt;<br />
&gt; I only have brainstorm thoughts on this, since I don't have a crystal<br />
&gt; ball.  What if characters other than a-zA-Z0-9./ should/can be used<br />
&gt; for some PASSWORD_xxx algorithms?  What if some seed is needed?  What<br />
&gt; if the salt creation algorithm should be swappable due to resource<br />
&gt; usage reasons, etc?<br />
<br />
Actually...  What about making the `raw_output` parameter a bitmask.<br />
Then provide:<br />
<br />
PASSWORD_SALT_CRYPT = 1<br />
PASSWORD_SALT_RAW = 2<br />
<br />
Then, in the future you could add a bunch of others PASSWORD_SALT_SOMETHINGELSE.<br />
<br />
And you could combine some: PASSWORD_SALT_DEV_RANDOM, PASSWORD_SALT_WAHTEVER...<br />
<br />
&gt; Also, do you really need a php.ini parameter?  It's yet another<br />
&gt; potential way to attack a system.<br />
<br />
Well, if not for an ini parameter, what way would you suggest to alter<br />
the default bcrypt cost? (seriously, I'm open to suggestions)...<br />
<br />
<br />
Thanks,<br />
<br />
Anthony<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Anthony Ferrara</dc:creator>
            <category>php-internals</category>
            <pubDate>Tue, 03 Jul 2012 01:30:01 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,522776#msg-522776</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,522776#msg-522776</link>
            <description><![CDATA[ On 07/02/2012 01:55 PM, Anthony Ferrara wrote:<br />
&gt; Chris,<br />
&gt;<br />
&gt;&gt; Can you update the RFC (aka future documentation) and make this obvious<br />
&gt;&gt; to an end user?<br />
&gt;<br />
&gt; I just made an update (in the behavior sections). Let me know if<br />
&gt; additional clarification is needed.<br />
<br />
To be honest, a note next to PASSWORD_DEFAULT would be good too.<br />
<br />
&gt;&gt; The API of password_make_salt() seems restrictive.  What if other<br />
&gt;&gt; options are needed in future?<br />
&gt;<br />
&gt; Can you give any examples of what options would be needed in the<br />
&gt; future, or how you would like to see the API?<br />
<br />
I only have brainstorm thoughts on this, since I don't have a crystal<br />
ball.  What if characters other than a-zA-Z0-9./ should/can be used<br />
for some PASSWORD_xxx algorithms?  What if some seed is needed?  What<br />
if the salt creation algorithm should be swappable due to resource<br />
usage reasons, etc?<br />
<br />
Also, do you really need a php.ini parameter?  It's yet another<br />
potential way to attack a system.<br />
<br />
Chris<br />
<br />
-- <br />
<a href="mailto:&#99;&#104;&#114;&#105;&#115;&#116;&#111;&#112;&#104;&#101;&#114;&#46;&#106;&#111;&#110;&#101;&#115;&#64;&#111;&#114;&#97;&#99;&#108;&#101;&#46;&#99;&#111;&#109;">&#99;&#104;&#114;&#105;&#115;&#116;&#111;&#112;&#104;&#101;&#114;&#46;&#106;&#111;&#110;&#101;&#115;&#64;&#111;&#114;&#97;&#99;&#108;&#101;&#46;&#99;&#111;&#109;</a><br />
<a href="http://twitter.com/#!/ghrd" target="_blank"  rel="nofollow">http://twitter.com/#!/ghrd</a><br />
<br />
<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Christopher Jones</dc:creator>
            <category>php-internals</category>
            <pubDate>Mon, 02 Jul 2012 23:30:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,522764#msg-522764</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,522764#msg-522764</link>
            <description><![CDATA[ Chris,<br />
<br />
&gt; Can you update the RFC (aka future documentation) and make this obvious<br />
&gt; to an end user?<br />
<br />
I just made an update (in the behavior sections). Let me know if<br />
additional clarification is needed.<br />
<br />
&gt; I think PASSWORD_BCRYPT should be an ordinal value, which the new<br />
&gt; library maps to &quot;2y&quot; when bcrypt is called.<br />
<br />
That would be fine. The initial goal for mapping the prefix to the<br />
constant was to provide the ability to map hash prefixes to the<br />
argument. That way, we could add user-supplied algorithms and base<br />
everything off the prefix with no additional mapping needed. But now<br />
that's off the table, I think switching back to an ordinal would be<br />
fine (and would pretty up the code a bit)...<br />
<br />
&gt; The API of password_make_salt() seems restrictive.  What if other<br />
&gt; options are needed in future?<br />
<br />
Can you give any examples of what options would be needed in the<br />
future, or how you would like to see the API?<br />
<br />
Thanks for the feedback!<br />
<br />
Anthony<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Anthony Ferrara</dc:creator>
            <category>php-internals</category>
            <pubDate>Mon, 02 Jul 2012 23:00:05 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,522703#msg-522703</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,522703#msg-522703</link>
            <description><![CDATA[ On 06/26/2012 08:25 AM, Anthony Ferrara wrote:<br />
&gt; Hello All,<br />
&gt;<br />
&gt; I've taken the conversation of the previous simplified password<br />
&gt; hashing API, and generated a patch and draft RFC for it. The patch<br />
&gt; isn't ready yet (needs review, cleanup and testing), but it's a start.<br />
&gt;<br />
&gt; <a href="https://wiki.php.net/rfc/password_hash" target="_blank"  rel="nofollow">https://wiki.php.net/rfc/password_hash</a><br />
&gt;<br />
&gt; Please have a look and comment away!<br />
&gt;<br />
&gt; Thanks,<br />
&gt;<br />
&gt; Anthony<br />
&gt;<br />
<br />
Hi Anthony,<br />
<br />
I think PASSWORD_BCRYPT should be an ordinal value, which the new<br />
library maps to &quot;2y&quot; when bcrypt is called.<br />
<br />
The API of password_make_salt() seems restrictive.  What if other<br />
options are needed in future?<br />
<br />
Chris<br />
<br />
-- <br />
<a href="mailto:&#99;&#104;&#114;&#105;&#115;&#116;&#111;&#112;&#104;&#101;&#114;&#46;&#106;&#111;&#110;&#101;&#115;&#64;&#111;&#114;&#97;&#99;&#108;&#101;&#46;&#99;&#111;&#109;">&#99;&#104;&#114;&#105;&#115;&#116;&#111;&#112;&#104;&#101;&#114;&#46;&#106;&#111;&#110;&#101;&#115;&#64;&#111;&#114;&#97;&#99;&#108;&#101;&#46;&#99;&#111;&#109;</a><br />
<a href="http://twitter.com/#!/ghrd" target="_blank"  rel="nofollow">http://twitter.com/#!/ghrd</a><br />
<br />
<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Christopher Jones</dc:creator>
            <category>php-internals</category>
            <pubDate>Mon, 02 Jul 2012 22:00:03 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,522702#msg-522702</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,522702#msg-522702</link>
            <description><![CDATA[ On 06/27/2012 07:16 AM, Anthony Ferrara wrote:<br />
&gt; Arvids,<br />
&gt;<br />
&gt; On Wed, Jun 27, 2012 at 9:23 AM, Arvids Godjuks<br />
&gt; &lt;arvids.godjuks@gmail.com&gt; wrote:<br />
&gt;&gt; Hello.<br />
&gt;&gt;<br />
&gt;&gt; I personally think that using PASSWORD_DEFAULT for algorythm by default is a<br />
&gt;&gt; bad idea. This should be defined by user in the code. Even worse if it is<br />
&gt;&gt; defined by .ini setting - deploy to a remote server and realize that there<br />
&gt;&gt; is a different .ini default that messes up everything. Lessons learned in<br />
&gt;&gt; the past are forgetten fast?<br />
&gt;<br />
&gt; It wouldn't mess up anything. All it would do is change the algorithm<br />
&gt; used by the library when creating new passwords. Existing ones will<br />
&gt; still validate. The new ones will validate on the old server as long<br />
&gt; as that algorithm is supported (could be an issue in a mixed<br />
&gt; environment where there are servers using an older version without<br />
&gt; support for the new method in crypt())...<br />
<br />
Hi Anthony,<br />
<br />
Can you update the RFC (aka future documentation) and make this obvious<br />
to an end user?<br />
<br />
Chris<br />
<br />
-- <br />
<a href="mailto:&#99;&#104;&#114;&#105;&#115;&#116;&#111;&#112;&#104;&#101;&#114;&#46;&#106;&#111;&#110;&#101;&#115;&#64;&#111;&#114;&#97;&#99;&#108;&#101;&#46;&#99;&#111;&#109;">&#99;&#104;&#114;&#105;&#115;&#116;&#111;&#112;&#104;&#101;&#114;&#46;&#106;&#111;&#110;&#101;&#115;&#64;&#111;&#114;&#97;&#99;&#108;&#101;&#46;&#99;&#111;&#109;</a><br />
<a href="http://twitter.com/#!/ghrd" target="_blank"  rel="nofollow">http://twitter.com/#!/ghrd</a><br />
<br />
<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Christopher Jones</dc:creator>
            <category>php-internals</category>
            <pubDate>Mon, 02 Jul 2012 22:00:03 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,521354#msg-521354</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,521354#msg-521354</link>
            <description><![CDATA[ hi Anthony,<br />
<br />
On Thu, Jun 28, 2012 at 9:36 PM, Anthony Ferrara &lt;ircmaxell@gmail.com&gt; wrote:<br />
<br />
&gt;&gt; I haven't looked at your patch. But if it has to call another<br />
&gt;&gt; PHP_FuNCTION then it's not good. crypt implementation should be<br />
&gt;&gt; accessible via C.<br />
&gt;<br />
&gt; I've refactored crypt() slightly to expose a PHP_API crypt_execute()<br />
&gt; function that does just about everything except the argument parsing /<br />
&gt; default randomizing.<br />
&gt; <a href="https://github.com/ircmaxell/php-src/blob/hash_password/ext/standard/crypt.c" target="_blank"  rel="nofollow">https://github.com/ircmaxell/php-src/blob/hash_password/ext/standard/crypt.c</a><br />
<br />
<br />
It looks good. I would name it php_crypt  instead. _execute means<br />
there is a prepare (well, there is but it is called on init :).<br />
<br />
Cheers,<br />
-- <br />
Pierre<br />
<br />
@pierrejoye | <a href="http://blog.thepimp.net" target="_blank"  rel="nofollow">http://blog.thepimp.net</a> | <a href="http://www.libgd.org" target="_blank"  rel="nofollow">http://www.libgd.org</a><br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Pierre Joye</dc:creator>
            <category>php-internals</category>
            <pubDate>Fri, 29 Jun 2012 09:20:03 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,521195#msg-521195</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,521195#msg-521195</link>
            <description><![CDATA[ Johannes,<br />
<br />
&gt; I haven't looked at your patch. But if it has to call another<br />
&gt; PHP_FuNCTION then it's not good. crypt implementation should be<br />
&gt; accessible via C.<br />
<br />
I've refactored crypt() slightly to expose a PHP_API crypt_execute()<br />
function that does just about everything except the argument parsing /<br />
default randomizing.<br />
<a href="https://github.com/ircmaxell/php-src/blob/hash_password/ext/standard/crypt.c" target="_blank"  rel="nofollow">https://github.com/ircmaxell/php-src/blob/hash_password/ext/standard/crypt.c</a><br />
<br />
Now that I did that, I adjusted the implementation to call that instead...<br />
<br />
&gt;&gt; I don't like the concept of core functions disappearing if they are<br />
&gt;&gt; not implemented. I think that does nothing but make it harder on the<br />
&gt;&gt; developers (now having to inject a function_exists(), etc).<br />
&gt;<br />
&gt; I think it's rather the opposite. In that case the user has no way to<br />
&gt; check whether the function is there without calling it and reacting to<br />
&gt; errors. If the function &quot;disappears&quot; there is a possibility to check.<br />
<br />
I've now based this implementation on HAVE_CRYPT. If that's not<br />
defined, neither are these functions...<br />
<br />
&gt;&gt; Additionally, since this is a security issue, I think that always<br />
&gt;&gt; defining the function is the better approach. Otherwise, you can wind<br />
&gt;&gt; up in a situation where someone else comes in and implements function<br />
&gt;&gt; password_verify($password, $hash) { return true; }, which would be all<br />
&gt;&gt; sorts of bad...  I can see the static linking to the function (instead<br />
&gt;&gt; of the dynamic call that's there), So in this case, I personally think<br />
&gt;&gt; the warning is appropriate.<br />
&gt;<br />
&gt; No, but a simple zend_parse_parameters with &quot;s&quot; modifier should be<br />
&gt; enough?<br />
<br />
Well, that was enough for the main parsing. But I had to do a little<br />
bit of copy/paste for the argument array parsing (not comfortable with<br />
it): <a href="https://github.com/ircmaxell/php-src/blob/hash_password/ext/standard/password.c#L262" target="_blank"  rel="nofollow">https://github.com/ircmaxell/php-src/blob/hash_password/ext/standard/password.c#L262</a><br />
<br />
&gt; I don't see what makes password_verify special. If one wants a typesafe<br />
&gt; check one can go for true === password_verify.<br />
<br />
I've changed all other parameter based error returns to NULL (even the<br />
out of range checks). But I left password_verify for now as returning<br />
false on any error. I still think this one case is significant enough<br />
to always return false/true instead of a third parameter. But we can<br />
talk about that more...<br />
<br />
Thanks,<br />
<br />
Anthony<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Anthony Ferrara</dc:creator>
            <category>php-internals</category>
            <pubDate>Thu, 28 Jun 2012 21:40:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,520792#msg-520792</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,520792#msg-520792</link>
            <description><![CDATA[ On Wed, 2012-06-27 at 22:00 -0400, Anthony Ferrara wrote:<br />
&gt; Johannes,<br />
&gt; <br />
&gt; &gt; Some comments on the &quot;error behavior&quot; part:<br />
&gt; &gt;<br />
&gt; &gt;    E_WARNING - When CRYPT is not included in core (was disabled<br />
&gt; &gt;    compile-time, or is listed in disabled_functions declaration)<br />
&gt; &gt;<br />
&gt; &gt; Disabling a different function should have no effect. This is not<br />
&gt; &gt; intuitive. If crypt is a dependency and is not available this function<br />
&gt; &gt; shouldn't be available either.<br />
&gt; <br />
&gt; Hrm. Well, then I guess I could re-implement against crypt internally.<br />
&gt; That would take either a slight re-implementation of the crypt()<br />
&gt; internals, or slight refactoring of the PHP_FUNCTION(crypt) function<br />
&gt; to enable c calls to it (even if it's disabled).<br />
<br />
I haven't looked at your patch. But if it has to call another<br />
PHP_FuNCTION then it's not good. crypt implementation should be<br />
accessible via C.<br />
<br />
&gt; I don't like the concept of core functions disappearing if they are<br />
&gt; not implemented. I think that does nothing but make it harder on the<br />
&gt; developers (now having to inject a function_exists(), etc).<br />
<br />
I think it's rather the opposite. In that case the user has no way to<br />
check whether the function is there without calling it and reacting to<br />
errors. If the function &quot;disappears&quot; there is a possibility to check.<br />
<br />
&gt; Additionally, since this is a security issue, I think that always<br />
&gt; defining the function is the better approach. Otherwise, you can wind<br />
&gt; up in a situation where someone else comes in and implements function<br />
&gt; password_verify($password, $hash) { return true; }, which would be all<br />
&gt; sorts of bad...  I can see the static linking to the function (instead<br />
&gt; of the dynamic call that's there), So in this case, I personally think<br />
&gt; the warning is appropriate.<br />
<br />
Who should be the bad person in that scenario? The developer himself? I<br />
think even the security goes the other way round - deelopers don't do<br />
error checking, so they store an empty password in case of error. If the<br />
function does not exist and is being called the script temrinates and<br />
nothing further ad happens.<br />
<br />
&gt; &gt;    E_WARNING - When supplied an incorrect number of arguments.<br />
&gt; &gt;    E_WARNING - When supplied a non-string first parameter (password)<br />
&gt; &gt;<br />
&gt; &gt; This should follow common semantics of zend_parse_parameters(... &quot;s&quot;).<br />
&gt; &gt; i.e. it has to support objects with __toString(). Also other scalars are<br />
&gt; &gt; fine. (if they can be casted to string)<br />
&gt; &gt;<br />
&gt; &gt;    E_WARNING - If a non-string salt option is provided<br />
&gt; &gt;<br />
&gt; &gt; As above.<br />
&gt; <br />
&gt; Yeah, I guess that's fair. Is there a macro or function like<br />
&gt; Z_REPRESENTABLE_AS_STRING_P() or something? To make it easier to<br />
&gt; check?<br />
<br />
No, but a simple zend_parse_parameters with &quot;s&quot; modifier should be<br />
enough?<br />
<br />
&gt; &gt;    If any error is raise, false is returned by the function.<br />
&gt; &gt;<br />
&gt; &gt; In <a href="http://de.php.net/functions.internal" target="_blank"  rel="nofollow">http://de.php.net/functions.internal</a> it is documented that internal<br />
&gt; &gt; functions return NULL on error during parameter parsing. New exceptions<br />
&gt; &gt; for that should have a good reason.<br />
&gt; <br />
&gt; The good reason is consistency. Otherwise there would be three return<br />
&gt; values, `null`, `false` and `true` for password_verify(). Therefore, a<br />
&gt; check of `false === password_verify($foo)` would actually fail<br />
&gt; inadvertantly.<br />
&gt; <br />
&gt; My opinion is that it should do what's appropriate.  The other 2 I can<br />
&gt; live with returning null (although I disagree with it significantly),<br />
&gt; but password_verify I think really should only ever return a<br />
&gt; boolean...<br />
<br />
I don't see what makes password_verify special. If one wants a typesafe<br />
check one can go for true === password_verify.<br />
<br />
johannes<br />
<br />
<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Johannes Schlüter</dc:creator>
            <category>php-internals</category>
            <pubDate>Thu, 28 Jun 2012 11:20:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,520777#msg-520777</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,520777#msg-520777</link>
            <description><![CDATA[ Hi Anthony!<br />
<br />
On Thu, Jun 28, 2012 at 4:00 AM, Anthony Ferrara &lt;ircmaxell@gmail.com&gt; wrote:<br />
<br />
&gt; Hrm. Well, then I guess I could re-implement against crypt internally.<br />
&gt; That would take either a slight re-implementation of the crypt()<br />
&gt; internals, or slight refactoring of the PHP_FUNCTION(crypt) function<br />
&gt; to enable c calls to it (even if it's disabled).<br />
<br />
We would have to expose the crypt implementation, it is not the case<br />
right now. But you could still use it using func call.<br />
<br />
Let me know if you need to expose it and which parts, we will need to<br />
refactor it a bit (which should be a good thing to do anyway).<br />
<br />
&gt; I don't like the concept of core functions disappearing if they are<br />
&gt; not implemented.<br />
<br />
Well, that's the case for extensions altogether so... :)<br />
<br />
However if I remember correctly, I made crypt always available from<br />
php 5.3 and later, for all algorithms.<br />
<br />
&gt;&gt;    E_WARNING - When supplied an incorrect number of arguments.<br />
&gt;&gt;    E_WARNING - When supplied a non-string first parameter (password)<br />
<br />
I would not use warnings at all but return false on error. Maybe add<br />
an argument or a function to fetch the error messages.<br />
<br />
In case you call other PHP functions, you can push/pop the errors<br />
easily as well.<br />
<br />
<br />
Cheers,<br />
-- <br />
Pierre<br />
<br />
@pierrejoye | <a href="http://blog.thepimp.net" target="_blank"  rel="nofollow">http://blog.thepimp.net</a> | <a href="http://www.libgd.org" target="_blank"  rel="nofollow">http://www.libgd.org</a><br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Pierre Joye</dc:creator>
            <category>php-internals</category>
            <pubDate>Thu, 28 Jun 2012 10:50:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,520717#msg-520717</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,520717#msg-520717</link>
            <description><![CDATA[ hi,<br />
<br />
On Thu, Jun 28, 2012 at 12:03 AM, Ángel González &lt;keisial@gmail.com&gt; wrote:<br />
<br />
&gt; Precisely the point of such constant is to allow the applications to<br />
&gt; magically<br />
<br />
Right, but not a default argument, which is bad in this case, for the<br />
reasons explained earlier.<br />
<br />
&gt; Obviously, any such bump -which I would expect to happen on major releases-<br />
&gt; would hold an entry in the NEWS file explaining that PASSWORD_DEFAULT_HASH<br />
<br />
I have no problem with such constant and let the user uses it instead<br />
of a given algo. But then he will do it on purpose and being well<br />
informed about the implications.<br />
<br />
Cheers,<br />
-- <br />
Pierre<br />
<br />
@pierrejoye | <a href="http://blog.thepimp.net" target="_blank"  rel="nofollow">http://blog.thepimp.net</a> | <a href="http://www.libgd.org" target="_blank"  rel="nofollow">http://www.libgd.org</a><br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Pierre Joye</dc:creator>
            <category>php-internals</category>
            <pubDate>Thu, 28 Jun 2012 08:20:10 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,520613#msg-520613</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,520613#msg-520613</link>
            <description><![CDATA[ Pierre,<br />
<br />
&gt; No, it is exactly one example out of many where changing values are a<br />
&gt; real pain to deal with over the years. We should not have one.<br />
<br />
While I completely see your point (and don't disagree with it in<br />
isolation), I also see the counter point of making it easy for people<br />
to use. Knowing anything about algorithms to force the common<br />
developer to make a choice between bcrypt and scrypt is unreasonable<br />
IMHO. It's an implementation detail that they should know, but most<br />
won't. Knowing the intricacies of the different algorithms is<br />
something even most senior devs (who are not active in security at<br />
least) don't understand. I'd rather present them best-case defaults,<br />
and let them make the decision to diverge from them.<br />
<br />
With that said, what about a compromise. What if we made the API:<br />
<br />
password_hash($password, $algo, array $options = array())<br />
<br />
And instead of just making the users choose which algorithm to use, we<br />
provide a &quot;moving&quot; constant called<br />
<br />
PASSWORD_MOST_SECURE<br />
<br />
Which will be updated every major release (assuming there's an update<br />
to apply) or in extreme circumstances (a serious flaw is found in the<br />
current most secure algorithm, justifying a concern).<br />
<br />
That way, people don't have to worry about moving targets, because the<br />
core moves it for them as needed. But the choice has to be made. They<br />
aren't just relying upon the default. And the documentation<br />
surrounding it must indicate that if cross-platform interoperability<br />
is a concern, pick a standard algorithm such as bcrypt and use just<br />
that.<br />
<br />
So then, a basic call would be $hash = password_hash($password,<br />
PASSWORD_MOST_SECURE);<br />
<br />
It solves both problems, while still being reasonably easy...<br />
<br />
Thoughts?<br />
<br />
Anthony<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Anthony Ferrara</dc:creator>
            <category>php-internals</category>
            <pubDate>Thu, 28 Jun 2012 04:10:03 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,520611#msg-520611</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,520611#msg-520611</link>
            <description><![CDATA[ Johannes,<br />
<br />
&gt; Some comments on the &quot;error behavior&quot; part:<br />
&gt;<br />
&gt;    E_WARNING - When CRYPT is not included in core (was disabled<br />
&gt;    compile-time, or is listed in disabled_functions declaration)<br />
&gt;<br />
&gt; Disabling a different function should have no effect. This is not<br />
&gt; intuitive. If crypt is a dependency and is not available this function<br />
&gt; shouldn't be available either.<br />
<br />
Hrm. Well, then I guess I could re-implement against crypt internally.<br />
That would take either a slight re-implementation of the crypt()<br />
internals, or slight refactoring of the PHP_FUNCTION(crypt) function<br />
to enable c calls to it (even if it's disabled).<br />
<br />
I don't like the concept of core functions disappearing if they are<br />
not implemented. I think that does nothing but make it harder on the<br />
developers (now having to inject a function_exists(), etc).<br />
Additionally, since this is a security issue, I think that always<br />
defining the function is the better approach. Otherwise, you can wind<br />
up in a situation where someone else comes in and implements function<br />
password_verify($password, $hash) { return true; }, which would be all<br />
sorts of bad...  I can see the static linking to the function (instead<br />
of the dynamic call that's there), So in this case, I personally think<br />
the warning is appropriate.<br />
<br />
&gt;    E_WARNING - When supplied an incorrect number of arguments.<br />
&gt;    E_WARNING - When supplied a non-string first parameter (password)<br />
&gt;<br />
&gt; This should follow common semantics of zend_parse_parameters(... &quot;s&quot;).<br />
&gt; i.e. it has to support objects with __toString(). Also other scalars are<br />
&gt; fine. (if they can be casted to string)<br />
&gt;<br />
&gt;    E_WARNING - If a non-string salt option is provided<br />
&gt;<br />
&gt; As above.<br />
<br />
Yeah, I guess that's fair. Is there a macro or function like<br />
Z_REPRESENTABLE_AS_STRING_P() or something? To make it easier to<br />
check?<br />
<br />
&gt;    If any error is raise, false is returned by the function.<br />
&gt;<br />
&gt; In <a href="http://de.php.net/functions.internal" target="_blank"  rel="nofollow">http://de.php.net/functions.internal</a> it is documented that internal<br />
&gt; functions return NULL on error during parameter parsing. New exceptions<br />
&gt; for that should have a good reason.<br />
<br />
The good reason is consistency. Otherwise there would be three return<br />
values, `null`, `false` and `true` for password_verify(). Therefore, a<br />
check of `false === password_verify($foo)` would actually fail<br />
inadvertantly.<br />
<br />
My opinion is that it should do what's appropriate.  The other 2 I can<br />
live with returning null (although I disagree with it significantly),<br />
but password_verify I think really should only ever return a<br />
boolean...<br />
<br />
&gt; These things are all minor and you might consider them bad, but then<br />
&gt; change it globally, not by adding new inconsistencies.<br />
<br />
Fair enough...<br />
<br />
Thanks,<br />
<br />
Anthony<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Anthony Ferrara</dc:creator>
            <category>php-internals</category>
            <pubDate>Thu, 28 Jun 2012 04:10:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,520602#msg-520602</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,520602#msg-520602</link>
            <description><![CDATA[ Arvids,<br />
<br />
On Wed, Jun 27, 2012 at 12:32 PM, Arvids Godjuks<br />
&lt;arvids.godjuks@gmail.com&gt; wrote:<br />
&gt; On that note I have only one request - please point me to the good article<br />
&gt; that describes how this thing works (I would prefer one that at least tries<br />
&gt; to explain in simple words) because at the moment i do not understand how<br />
&gt; salt stored in the hash itself makes hash more secure than an unsalted one.<br />
<br />
Here are some articles that are worth while:<br />
<br />
<a href="http://php.net/manual/en/function.crypt.php" target="_blank"  rel="nofollow">http://php.net/manual/en/function.crypt.php</a><br />
<a href="http://www.devshed.com/c/a/PHP/Using-the-PHP-Crypt-Function/" target="_blank"  rel="nofollow">http://www.devshed.com/c/a/PHP/Using-the-PHP-Crypt-Function/</a><br />
<a href="http://stackoverflow.com/a/4808616/338665" target="_blank"  rel="nofollow">http://stackoverflow.com/a/4808616/338665</a><br />
<br />
If more explanation is needed, I can try to expand the RFC a bit more.<br />
But give the new sections a read and let me know what you think.<br />
<br />
Thanks,<br />
<br />
Anthony<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Anthony Ferrara</dc:creator>
            <category>php-internals</category>
            <pubDate>Thu, 28 Jun 2012 04:00:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,520512#msg-520512</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,520512#msg-520512</link>
            <description><![CDATA[ On 27/06/12 18:13, Pierre Joye wrote:<br />
&gt; Changing default value forces code change if you have to keep a given<br />
&gt; hash, for one obvious side effect.<br />
&gt;<br />
&gt; If you disagree or does not like the idea, that's all fine, but you<br />
&gt; can't really say that it is not an argument (nothing to justify, this<br />
&gt; is a draft and it is being discussed).<br />
&gt;<br />
&gt; Cheers,<br />
Precisely the point of such constant is to allow the applications to<br />
magically<br />
change to use more secure hashes, without needing to parform a recursive<br />
sed in the codebase to change HASH_SHA2015 with HASH_SHA2048.<br />
If you want to be in precise control of the actual hash used in a newer<br />
version<br />
(such as an hereogeneous deployment), you could set it to the lower<br />
denominator<br />
in php.ini.<br />
<br />
Obviously, any such bump -which I would expect to happen on major releases-<br />
would hold an entry in the NEWS file explaining that PASSWORD_DEFAULT_HASH<br />
is now md5 by default instead of crc32 (still, I would expect a new hash<br />
to have<br />
been available on several releases -they could easily be added on minor<br />
ones-<br />
before becoming the PASSWORD_DEFAULT_HASH).<br />
<br />
Remember that the goal was to make the next-generation password hasing api.<br />
An (almost) foolproof way to make the applications secure. If you expect<br />
them to<br />
timely realise the problems of md5() and go back to change all their<br />
functions,<br />
you will replace the current function with password_hash('password',<br />
SILLY_HASH, ...).<br />
<br />
Developers with higher security knowledge (few of them, you'd almost<br />
need to be a<br />
cryptographer yourself) can use the advanced parameters to tweak it to<br />
their needs.<br />
<br />
Regards<br />
<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Ángel González</dc:creator>
            <category>php-internals</category>
            <pubDate>Thu, 28 Jun 2012 00:10:04 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,520337#msg-520337</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,520337#msg-520337</link>
            <description><![CDATA[ Hi,<br />
<br />
On Tue, 2012-06-26 at 11:25 -0400, Anthony Ferrara wrote:<br />
&gt; <a href="https://wiki.php.net/rfc/password_hash" target="_blank"  rel="nofollow">https://wiki.php.net/rfc/password_hash</a><br />
<br />
Some comments on the &quot;error behavior&quot; part:<br />
<br />
    E_WARNING - When CRYPT is not included in core (was disabled<br />
    compile-time, or is listed in disabled_functions declaration)<br />
<br />
Disabling a different function should have no effect. This is not<br />
intuitive. If crypt is a dependency and is not available this function<br />
shouldn't be available either.<br />
<br />
    E_WARNING - When supplied an incorrect number of arguments.<br />
    E_WARNING - When supplied a non-string first parameter (password)<br />
<br />
This should follow common semantics of zend_parse_parameters(... &quot;s&quot;).<br />
i.e. it has to support objects with __toString(). Also other scalars are<br />
fine. (if they can be casted to string)<br />
<br />
    E_WARNING - If a non-string salt option is provided<br />
<br />
As above.<br />
<br />
    If any error is raise, false is returned by the function. <br />
<br />
In <a href="http://de.php.net/functions.internal" target="_blank"  rel="nofollow">http://de.php.net/functions.internal</a> it is documented that internal<br />
functions return NULL on error during parameter parsing. New exceptions<br />
for that should have a good reason.<br />
<br />
These things are all minor and you might consider them bad, but then<br />
change it globally, not by adding new inconsistencies.<br />
<br />
johannes<br />
<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Johannes Schlüter</dc:creator>
            <category>php-internals</category>
            <pubDate>Wed, 27 Jun 2012 18:50:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,520334#msg-520334</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,520334#msg-520334</link>
            <description><![CDATA[ On that note I have only one request - please point me to the good article<br />
that describes how this thing works (I would prefer one that at least tries<br />
to explain in simple words) because at the moment i do not understand how<br />
salt stored in the hash itself makes hash more secure than an unsalted one.<br />
<br />
Thank you :-)<br />
27.06.2012 14:16 пользователь &quot;Anthony Ferrara&quot; &lt;ircmaxell@gmail.com&gt;<br />
написал:<br />
<br />
&gt; Arvids,<br />
&gt;<br />
&gt; On Wed, Jun 27, 2012 at 9:23 AM, Arvids Godjuks<br />
&gt; &lt;arvids.godjuks@gmail.com&gt; wrote:<br />
&gt; &gt; Hello.<br />
&gt; &gt;<br />
&gt; &gt; I personally think that using PASSWORD_DEFAULT for algorythm by default<br />
&gt; is a<br />
&gt; &gt; bad idea. This should be defined by user in the code. Even worse if it is<br />
&gt; &gt; defined by .ini setting - deploy to a remote server and realize that<br />
&gt; there<br />
&gt; &gt; is a different .ini default that messes up everything. Lessons learned in<br />
&gt; &gt; the past are forgetten fast?<br />
&gt;<br />
&gt; It wouldn't mess up anything. All it would do is change the algorithm<br />
&gt; used by the library when creating new passwords. Existing ones will<br />
&gt; still validate. The new ones will validate on the old server as long<br />
&gt; as that algorithm is supported (could be an issue in a mixed<br />
&gt; environment where there are servers using an older version without<br />
&gt; support for the new method in crypt())...<br />
&gt;<br />
&gt; &gt; And the thing I don't get is how do I verify a salted password? I have<br />
&gt; read<br />
&gt; &gt; throught the RFC and what I know about the salts makes me wonder - how da<br />
&gt; &gt; hell I will verify my salted hash if I can't pass the salt to<br />
&gt; &gt; password_verify?<br />
&gt;<br />
&gt; Ah, I think I see the disconnect. crypt() returns the full salt<br />
&gt; information along with everything necessary to hash it (all settings).<br />
&gt; So the generated hash includes the salt, the method, and the cost<br />
&gt; parameter. For example:<br />
&gt;<br />
&gt; var_dump(crypt(&quot;rasmuslerdorf&quot;, &quot;$2a$07$usesomesillystringfor&quot;));<br />
&gt;<br />
&gt; string(60) &quot;$2a$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi&quot;<br />
&gt;<br />
&gt; So just storing the hash is enough...<br />
&gt;<br />
&gt; &gt; If there is some trick behind, it should be explained in the RFC (and in<br />
&gt; the<br />
&gt; &gt; docs later, because otherwise it makes people WTF?! who are not into<br />
&gt; &gt; cryptography).<br />
&gt;<br />
&gt; That's completely fair. I'll add a section to the RFC about that...<br />
&gt;<br />
&gt; Thanks,<br />
&gt;<br />
&gt; Anthony<br />
&gt;]]></description>
            <dc:creator>Arvids Godjuks</dc:creator>
            <category>php-internals</category>
            <pubDate>Wed, 27 Jun 2012 18:40:01 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,520329#msg-520329</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,520329#msg-520329</link>
            <description><![CDATA[ hi,<br />
<br />
On Wed, Jun 27, 2012 at 2:59 PM, Gustavo Lopes &lt;glopes@nebm.ist.utl.pt&gt; wrote:<br />
<br />
&gt; You described why people *may* have to, depending on the circumstances --<br />
&gt; for instance, when interoperability in mixed environments is required. No<br />
&gt; one is saying that relying on a default value is appropriate in those<br />
&gt; circumstances, so this argument misses the mark.<br />
<br />
No, it is exactly one example out of many where changing values are a<br />
real pain to deal with over the years. We should not have one.<br />
<br />
&gt; If this API existed 10 or more years ago and used MD5 as a default, I don't<br />
&gt; see how it could not be used in a forward compatible manner back then --<br />
&gt; seen from the outside there's nothing different about MD5 or other digest<br />
&gt; method except for different parameters (which can be stored together with<br />
&gt; the salt and the method in the result of password_hash()) and digest size.<br />
&gt; And, unsurprisingly, you have no justification on why it could not be made<br />
&gt; forward compatible.<br />
<br />
Changing default value forces code change if you have to keep a given<br />
hash, for one obvious side effect.<br />
<br />
If you disagree or does not like the idea, that's all fine, but you<br />
can't really say that it is not an argument (nothing to justify, this<br />
is a draft and it is being discussed).<br />
<br />
Cheers,<br />
-- <br />
Pierre<br />
<br />
@pierrejoye | <a href="http://blog.thepimp.net" target="_blank"  rel="nofollow">http://blog.thepimp.net</a> | <a href="http://www.libgd.org" target="_blank"  rel="nofollow">http://www.libgd.org</a><br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Pierre Joye</dc:creator>
            <category>php-internals</category>
            <pubDate>Wed, 27 Jun 2012 18:20:05 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?7,519597,520237#msg-520237</guid>
            <title>Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API</title>
            <link>http://www.serverphorums.com/read.php?7,519597,520237#msg-520237</link>
            <description><![CDATA[ Arvids,<br />
<br />
On Wed, Jun 27, 2012 at 9:23 AM, Arvids Godjuks<br />
&lt;arvids.godjuks@gmail.com&gt; wrote:<br />
&gt; Hello.<br />
&gt;<br />
&gt; I personally think that using PASSWORD_DEFAULT for algorythm by default is a<br />
&gt; bad idea. This should be defined by user in the code. Even worse if it is<br />
&gt; defined by .ini setting - deploy to a remote server and realize that there<br />
&gt; is a different .ini default that messes up everything. Lessons learned in<br />
&gt; the past are forgetten fast?<br />
<br />
It wouldn't mess up anything. All it would do is change the algorithm<br />
used by the library when creating new passwords. Existing ones will<br />
still validate. The new ones will validate on the old server as long<br />
as that algorithm is supported (could be an issue in a mixed<br />
environment where there are servers using an older version without<br />
support for the new method in crypt())...<br />
<br />
&gt; And the thing I don't get is how do I verify a salted password? I have read<br />
&gt; throught the RFC and what I know about the salts makes me wonder - how da<br />
&gt; hell I will verify my salted hash if I can't pass the salt to<br />
&gt; password_verify?<br />
<br />
Ah, I think I see the disconnect. crypt() returns the full salt<br />
information along with everything necessary to hash it (all settings).<br />
So the generated hash includes the salt, the method, and the cost<br />
parameter. For example:<br />
<br />
var_dump(crypt(&quot;rasmuslerdorf&quot;, &quot;$2a$07$usesomesillystringfor&quot;));<br />
<br />
string(60) &quot;$2a$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi&quot;<br />
<br />
So just storing the hash is enough...<br />
<br />
&gt; If there is some trick behind, it should be explained in the RFC (and in the<br />
&gt; docs later, because otherwise it makes people WTF?! who are not into<br />
&gt; cryptography).<br />
<br />
That's completely fair. I'll add a section to the RFC about that...<br />
<br />
Thanks,<br />
<br />
Anthony<br />
<br />
-- <br />
PHP Internals - PHP Runtime Development Mailing List<br />
To unsubscribe, visit: <a href="http://www.php.net/unsub.php" target="_blank"  rel="nofollow">http://www.php.net/unsub.php</a>]]></description>
            <dc:creator>Anthony Ferrara</dc:creator>
            <category>php-internals</category>
            <pubDate>Wed, 27 Jun 2012 16:20:03 +0200</pubDate>
        </item>
    </channel>
</rss>
