The only reason you would salt passwords in a database means your concerned that the password db table has been compromised... if you fear that has happened then the salt that your storing in the database is available to the attacker. Thus adding md5 or sha1 or sha256 of that salt to the password is no more secure than just appending the salt in plaintext. The same number of computations will be required to &quot;crack&quot; the password hash.<br>
<br>-Matt<br><br>PS. md5/sha1 are not cryptographically secure hash algorithms anymore (however probably are ok for this situation). any sha2 algorithm (sha256, sha512) is suposedly.<br><br><div class="gmail_quote">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>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; How much more secure is than simply:<br>
&gt;<br>
&gt; md5($password . $private_key)<br>
<br>
</div>Actually, it&#39;s no difference for normal people, but much secure for those<br>
hackers...<br>
<br>
BTW, VBB and IPB use:<br>
<br>
md5(md5($password).md5($private_key))<br>
<div class="Ih2E3d"><br>
&gt;<br>
&gt; And are there any downsides of the new method - ie. will it<br>
&gt; fail on upgrades, or fail for certain servers, etc?<br>
&gt;<br>
<br>
</div>mmm .... for lifetype 2.0 . The minimal requirement is php 5.1.x ...<br>
<br>
so, It won&#39;t be a problem.<br>
<br>
mhash become &quot;hash&quot; in pecl in php5, if there is no hash installed, it will<br>
use the pure php &nbsp;implementation...<br>
<div><div></div><div class="Wj3C7c"><br>
&gt;<br>
&gt; On Mon, 10 Mar 2008, Mark Wu wrote:<br>
&gt;<br>
&gt; &gt; Here comes more secure algorithm:<br>
&gt; &gt;<br>
&gt; &gt; sha256(md5($password)+md5($your_provide_private_key));<br>
&gt; &gt;<br>
&gt; &gt; I use sha256 here.<br>
&gt; &gt;<br>
&gt; &gt; Here also comes the pure php sha256 implementation:<br>
&gt; &gt;<br>
&gt; &gt; <a href="http://nanolink.ca/pub/sha256/" target="_blank">http://nanolink.ca/pub/sha256/</a><br>
&gt; &gt;<br>
&gt; &gt; If the server has &quot;hash&quot; pecl, it will use it instead of<br>
&gt; the pure one.<br>
&gt; &gt;<br>
&gt; &gt; Mark<br>
&gt; &gt;<br>
&gt; &gt;&gt; -----Original Message-----<br>
&gt; &gt;&gt; From: <a href="mailto:plog-svn-bounces@devel.lifetype.net">plog-svn-bounces@devel.lifetype.net</a><br>
&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; Sent: Monday, March 10, 2008 7:25 PM<br>
&gt; &gt;&gt; To: LifeType Developer List<br>
&gt; &gt;&gt; Subject: Re: [pLog-svn] Salted MD5<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Hi Mark<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; I welcome your suggestion and think that this is valuable<br>
&gt; &gt;&gt; protection against rainbow table attacks.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; We already had an issue with the revealed admin password<br>
&gt; &gt;&gt; hash. This would have been less severe with the saltet md5.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Thanks for suggesting!<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; reto<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Mark Wu wrote:<br>
&gt; &gt;&gt;&gt; Hi All:<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; I plan to upgrade our password algorithm to salted MD5, take the<br>
&gt; &gt;&gt;&gt; following for eaxample:<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; sha1(md5($password) + user_defined_private_key);<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; I will also remain an option in lifetype admin panel for<br>
&gt; &gt;&gt; user to use<br>
&gt; &gt;&gt;&gt; the old MD5 way to keep compatability.<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; If we use the algorithm above, It is also possible to<br>
&gt; &gt;&gt; convert the old<br>
&gt; &gt;&gt;&gt; hashed password to new hased password.<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; How do you think?<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;<br>
&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; ml<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; These kind of online reverse lookup table sites making<br>
&gt; the MD5 only<br>
&gt; &gt;&gt;&gt; algorithm more dangerous.<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; Mark<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; ----------------------------------------------------------------------<br>
&gt; &gt;&gt;&gt; --<br>
&gt; &gt;&gt;&gt;<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;<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>
&gt; --<br>
&gt; Jon Daley<br>
&gt; <a href="http://jon.limedaley.com/" target="_blank">http://jon.limedaley.com/</a><br>
&gt;<br>
&gt; We are all made different, but we are all sinners.<br>
&gt; -- Jim Herron<br>
&gt; _______________________________________________<br>
&gt; pLog-svn mailing list<br>
&gt; <a href="mailto:pLog-svn@devel.lifetype.net">pLog-svn@devel.lifetype.net</a><br>
&gt; <a href="http://limedaley.com/mailman/listinfo/plog-svn" target="_blank">http://limedaley.com/mailman/listinfo/plog-svn</a><br>
<br>
_______________________________________________<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>