<div>Heh... this is OT... but&nbsp;more importantly, what other websites do you use your password on. There exists programs that will try username/password combinations on the top 500 financial institutions (banks/brokers/etc...).</div>

<div>&nbsp;</div>
<div>Assuming your password is of some strength, I doubt having the salt in the config file instead of the database is worth the hassle. The main idea of the salt is to fubar precomputed hash attacks.<br><br></div>
<div class="gmail_quote">On Tue, Mar 11, 2008 at 10:49 PM, Jon Daley &lt;<a href="mailto:plogworld@jon.limedaley.com">plogworld@jon.limedaley.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">&nbsp; &nbsp; &nbsp; &nbsp;Perhaps the salt should be stored in the config file instead of<br>the database to prevent it being grabbed trivially along with the stored<br>
passwords?<br>&nbsp; &nbsp; &nbsp; &nbsp;I wonder how much the time-to-crack really matters in this app -<br>how many of you have *ever* changed your login to your blog?<br>
<div>
<div></div>
<div class="Wj3C7c"><br>On Tue, 11 Mar 2008, Matt Wood wrote:<br>&gt;&gt; From a cryptographic standpoint, since sha256 has a larger byte output,<br>&gt; there are situations where the md5 calculation will actually reduce the<br>
&gt; number of bytes of &quot;randomness&quot; (entropy). And since we&#39;re talking about a<br>&gt; WebApp here... not a high speed wireless encryption scheme, why not just use<br>&gt; sha256 all the way through? Same for the salt, if it contains a sufficient<br>
&gt; amount of entropy.<br>&gt;<br>&gt; And to clairify what I said about the salt before... simply adding a salt<br>&gt; will defeat rainbow attacks as Reto has already said, the added complexity<br>&gt; of using a &quot;hash function&quot;, of any kind, on the salt, does not significantly<br>
&gt; impact a dedicated attacker. Because in the situation of a database<br>&gt; compromise the salt (which is assumably stored in the database, per user,<br>&gt; and of sufficient entropy) has already been revealed, and the hash of it<br>
&gt; simply needs to be calculated once for the brute force attack on the<br>&gt; password.<br>&gt;<br>&gt; Either way, the salt is a good addition. I&#39;m pleased you guys are so<br>&gt; proactive about security.<br>&gt;<br>
&gt; However, if you are wishing to increase the security (time to brute<br>&gt; force) of the password/salt entry it may be worthwhile to follow the<br>&gt; following algorithm instead.<br>&gt;<br>&gt; sha2($salt + sha2($password + $salt))<br>
&gt;<br>&gt; you can repeat that ad-naseum increasing the complexity of the brute force<br>&gt; by forcing the attacker to follow the chained hash algorithm in their brute<br>&gt; forcing attempts. You can even add multiple salts... Just don&#39;t store the<br>
&gt; final hash in the HTTP cookie like some of these other blogging platforms...<br>&gt; On Tue, Mar 11, 2008 at 12:04 AM, Mark Wu &lt;<a href="mailto:markplace@gmail.com">markplace@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt;&gt; &nbsp;That&#39;s why I use (MD5($password)+MD5($salt)) to keep it easy to upgrade.<br>
&gt;&gt;<br>&gt;&gt; And use sha256() to enhence the security level.<br>&gt;&gt;<br>&gt;&gt; Mark<br>&gt;&gt;<br>&gt;&gt; &nbsp;------------------------------<br>&gt;&gt; *From:* <a href="mailto:plog-svn-bounces@devel.lifetype.net">plog-svn-bounces@devel.lifetype.net</a> [mailto:<br>
&gt;&gt; <a href="mailto:plog-svn-bounces@devel.lifetype.net">plog-svn-bounces@devel.lifetype.net</a>] *On Behalf Of *Matt Wood<br>&gt;&gt; *Sent:* Tuesday, March 11, 2008 3:23 AM<br>&gt;&gt;<br>&gt;&gt; *To:* LifeType Developer List<br>
&gt;&gt; *Subject:* Re: [pLog-svn] Salted MD5<br>&gt;&gt;<br>&gt;&gt; &nbsp; The only reason you would salt passwords in a database means your<br>&gt;&gt; concerned that the password db table has been compromised... if you fear<br>
&gt;&gt; that has happened then the salt that your storing in the database is<br>&gt;&gt; available to the attacker. Thus adding md5 or sha1 or sha256 of that salt to<br>&gt;&gt; the password is no more secure than just appending the salt in plaintext.<br>
&gt;&gt; The same number of computations will be required to &quot;crack&quot; the password<br>&gt;&gt; hash.<br>&gt;&gt;<br>&gt;&gt; -Matt<br>&gt;&gt;<br>&gt;&gt; PS. md5/sha1 are not cryptographically secure hash algorithms anymore<br>
&gt;&gt; (however probably are ok for this situation). any sha2 algorithm (sha256,<br>&gt;&gt; sha512) is suposedly.<br>&gt;&gt;<br>&gt;&gt; On Mon, Mar 10, 2008 at 11:32 AM, Mark Wu &lt;<a href="mailto:markplace@gmail.com">markplace@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; How much more secure is than simply:<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; md5($password . $private_key)<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Actually, it&#39;s no difference for normal people, but much secure for<br>
&gt;&gt;&gt; those<br>&gt;&gt;&gt; hackers...<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; BTW, VBB and IPB use:<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; md5(md5($password).md5($private_key))<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; And are there any downsides of the new method - ie. will it<br>
&gt;&gt;&gt;&gt; fail on upgrades, or fail for certain servers, etc?<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; mmm .... for lifetype 2.0 . The minimal requirement is php 5.1.x ...<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; so, It won&#39;t be a problem.<br>
&gt;&gt;&gt;<br>&gt;&gt;&gt; mhash become &quot;hash&quot; in pecl in php5, if there is no hash installed, it<br>&gt;&gt;&gt; will<br>&gt;&gt;&gt; use the pure php &nbsp;implementation...<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On Mon, 10 Mar 2008, Mark Wu wrote:<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; Here comes more secure algorithm:<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; sha256(md5($password)+md5($your_provide_private_key));<br>
&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; I use sha256 here.<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; Here also comes the pure php sha256 implementation:<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; <a href="http://nanolink.ca/pub/sha256/" target="_blank">http://nanolink.ca/pub/sha256/</a><br>
&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; If the server has &quot;hash&quot; pecl, it will use it instead of<br>&gt;&gt;&gt;&gt; the pure one.<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; Mark<br>&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; -----Original Message-----<br>&gt;&gt;&gt;&gt;&gt;&gt; From: <a href="mailto:plog-svn-bounces@devel.lifetype.net">plog-svn-bounces@devel.lifetype.net</a><br>&gt;&gt;&gt;&gt;&gt;&gt; [mailto:<a href="mailto:plog-svn-bounces@devel.lifetype.net">plog-svn-bounces@devel.lifetype.net</a>] On Behalf Of Reto Hugi<br>
&gt;&gt;&gt;&gt;&gt;&gt; Sent: Monday, March 10, 2008 7:25 PM<br>&gt;&gt;&gt;&gt;&gt;&gt; To: LifeType Developer List<br>&gt;&gt;&gt;&gt;&gt;&gt; Subject: Re: [pLog-svn] Salted MD5<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; Hi Mark<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; I welcome your suggestion and think that this is valuable<br>&gt;&gt;&gt;&gt;&gt;&gt; protection against rainbow table attacks.<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; We already had an issue with the revealed admin password<br>
&gt;&gt;&gt;&gt;&gt;&gt; hash. This would have been less severe with the saltet md5.<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; Thanks for suggesting!<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; reto<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; Mark Wu wrote:<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; Hi All:<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; I plan to upgrade our password algorithm to salted MD5, take the<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; following for eaxample:<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; sha1(md5($password) + user_defined_private_key);<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; I will also remain an option in lifetype admin panel for<br>
&gt;&gt;&gt;&gt;&gt;&gt; user to use<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; the old MD5 way to keep compatability.<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; If we use the algorithm above, It is also possible to<br>
&gt;&gt;&gt;&gt;&gt;&gt; convert the old<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; hashed password to new hased password.<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; How do you think?<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; <a href="http://kuza55.blogspot.com/2006/10/online-reverse-lookup-tables-for.ht" target="_blank">http://kuza55.blogspot.com/2006/10/online-reverse-lookup-tables-for.ht</a><br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; ml<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; These kind of online reverse lookup table sites making<br>&gt;&gt;&gt;&gt; the MD5 only<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; algorithm more dangerous.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; Mark<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; ----------------------------------------------------------------------<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; --<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pLog-svn mailing list<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; <a href="mailto:pLog-svn@devel.lifetype.net">pLog-svn@devel.lifetype.net</a><br>&gt;&gt;&gt;&gt;&gt;&gt;&gt; <a href="http://limedaley.com/mailman/listinfo/plog-svn" target="_blank">http://limedaley.com/mailman/listinfo/plog-svn</a><br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>&gt;&gt;&gt;&gt;&gt;&gt; pLog-svn mailing list<br>&gt;&gt;&gt;&gt;&gt;&gt; <a href="mailto:pLog-svn@devel.lifetype.net">pLog-svn@devel.lifetype.net</a><br>
&gt;&gt;&gt;&gt;&gt;&gt; <a href="http://limedaley.com/mailman/listinfo/plog-svn" target="_blank">http://limedaley.com/mailman/listinfo/plog-svn</a><br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt; pLog-svn mailing list<br>&gt;&gt;&gt;&gt;&gt; <a href="mailto:pLog-svn@devel.lifetype.net">pLog-svn@devel.lifetype.net</a><br>&gt;&gt;&gt;&gt;&gt; <a href="http://limedaley.com/mailman/listinfo/plog-svn" target="_blank">http://limedaley.com/mailman/listinfo/plog-svn</a><br>
&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; --<br>&gt;&gt;&gt;&gt; Jon Daley<br>&gt;&gt;&gt;&gt; <a href="http://jon.limedaley.com/" target="_blank">http://jon.limedaley.com/</a><br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; We are all made different, but we are all sinners.<br>
&gt;&gt;&gt;&gt; -- Jim Herron<br>&gt;&gt;&gt;&gt; _______________________________________________<br>&gt;&gt;&gt;&gt; pLog-svn mailing list<br>&gt;&gt;&gt;&gt; <a href="mailto:pLog-svn@devel.lifetype.net">pLog-svn@devel.lifetype.net</a><br>
&gt;&gt;&gt;&gt; <a href="http://limedaley.com/mailman/listinfo/plog-svn" target="_blank">http://limedaley.com/mailman/listinfo/plog-svn</a><br>&gt;&gt;&gt;<br>&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; pLog-svn mailing list<br>&gt;&gt;&gt; <a href="mailto:pLog-svn@devel.lifetype.net">pLog-svn@devel.lifetype.net</a><br>&gt;&gt;&gt; <a href="http://limedaley.com/mailman/listinfo/plog-svn" target="_blank">http://limedaley.com/mailman/listinfo/plog-svn</a><br>
&gt;&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; pLog-svn mailing list<br>&gt;&gt; <a href="mailto:pLog-svn@devel.lifetype.net">pLog-svn@devel.lifetype.net</a><br>
&gt;&gt; <a href="http://limedaley.com/mailman/listinfo/plog-svn" target="_blank">http://limedaley.com/mailman/listinfo/plog-svn</a><br>&gt;&gt;<br>&gt;<br><br></div></div>--<br>
<div class="Ih2E3d">Jon Daley<br><a href="http://jon.limedaley.com/" target="_blank">http://jon.limedaley.com/</a><br><br></div>Our software is not &#39;released&#39;.<br>It *escapes*, leaving a trail of mangled QA engineers in its path.<br>

<div>
<div></div>
<div class="Wj3C7c">_______________________________________________<br>pLog-svn mailing list<br><a href="mailto:pLog-svn@devel.lifetype.net">pLog-svn@devel.lifetype.net</a><br><a href="http://limedaley.com/mailman/listinfo/plog-svn" target="_blank">http://limedaley.com/mailman/listinfo/plog-svn</a><br>
</div></div></blockquote></div><br>