No subject


Sat Jan 26 15:46:28 EST 2008


there are situations where the md5 calculation will actually reduce the
number of bytes of "randomness" (entropy). And since we're talking about a
WebApp here... not a high speed wireless encryption scheme, why not just use
sha256 all the way through? Same for the salt, if it contains a sufficient
amount of entropy.

And to clairify what I said about the salt before... simply adding a salt
will defeat rainbow attacks as Reto has already said, the added complexity
of using a "hash function", of any kind, on the salt, does not significantly
impact a dedicated attacker. Because in the situation of a database
compromise the salt (which is assumably stored in the database, per user,
and of sufficient entropy) has already been revealed, and the hash of it
simply needs to be calculated once for the brute force attack on the
password.

Either way, the salt is a good addition. I'm pleased you guys are so
proactive about security.

However, if you are wishing to increase the security (time to brute
force) of the password/salt entry it may be worthwhile to follow the
following algorithm instead.

sha2($salt + sha2($password + $salt))

you can repeat that ad-naseum increasing the complexity of the brute force
by forcing the attacker to follow the chained hash algorithm in their brute
forcing attempts. You can even add multiple salts... Just don't store the
final hash in the HTTP cookie like some of these other blogging platforms...
On Tue, Mar 11, 2008 at 12:04 AM, Mark Wu <markplace at gmail.com> wrote:

>  That's why I use (MD5($password)+MD5($salt)) to keep it easy to upgrade.
>
> And use sha256() to enhence the security level.
>
> Mark
>
>  ------------------------------
> *From:* plog-svn-bounces at devel.lifetype.net [mailto:
> plog-svn-bounces at devel.lifetype.net] *On Behalf Of *Matt Wood
> *Sent:* Tuesday, March 11, 2008 3:23 AM
>
> *To:* LifeType Developer List
> *Subject:* Re: [pLog-svn] Salted MD5
>
>   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 "crack" the password
> hash.
>
> -Matt
>
> PS. md5/sha1 are not cryptographically secure hash algorithms anymore
> (however probably are ok for this situation). any sha2 algorithm (sha256,
> sha512) is suposedly.
>
> On Mon, Mar 10, 2008 at 11:32 AM, Mark Wu <markplace at gmail.com> wrote:
>
> > >
> > >       How much more secure is than simply:
> > >
> > > md5($password . $private_key)
> >
> > Actually, it's no difference for normal people, but much secure for
> > those
> > hackers...
> >
> > BTW, VBB and IPB use:
> >
> > md5(md5($password).md5($private_key))
> >
> > >
> > > And are there any downsides of the new method - ie. will it
> > > fail on upgrades, or fail for certain servers, etc?
> > >
> >
> > mmm .... for lifetype 2.0 . The minimal requirement is php 5.1.x ...
> >
> > so, It won't be a problem.
> >
> > mhash become "hash" in pecl in php5, if there is no hash installed, it
> > will
> > use the pure php  implementation...
> >
> > >
> > > On Mon, 10 Mar 2008, Mark Wu wrote:
> > >
> > > > Here comes more secure algorithm:
> > > >
> > > > sha256(md5($password)+md5($your_provide_private_key));
> > > >
> > > > I use sha256 here.
> > > >
> > > > Here also comes the pure php sha256 implementation:
> > > >
> > > > http://nanolink.ca/pub/sha256/
> > > >
> > > > If the server has "hash" pecl, it will use it instead of
> > > the pure one.
> > > >
> > > > Mark
> > > >
> > > >> -----Original Message-----
> > > >> From: plog-svn-bounces at devel.lifetype.net
> > > >> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Reto Hugi
> > > >> Sent: Monday, March 10, 2008 7:25 PM
> > > >> To: LifeType Developer List
> > > >> Subject: Re: [pLog-svn] Salted MD5
> > > >>
> > > >> Hi Mark
> > > >>
> > > >> I welcome your suggestion and think that this is valuable
> > > >> protection against rainbow table attacks.
> > > >>
> > > >> We already had an issue with the revealed admin password
> > > >> hash. This would have been less severe with the saltet md5.
> > > >>
> > > >> Thanks for suggesting!
> > > >>
> > > >> reto
> > > >>
> > > >> Mark Wu wrote:
> > > >>> Hi All:
> > > >>>
> > > >>> I plan to upgrade our password algorithm to salted MD5, take the
> > > >>> following for eaxample:
> > > >>>
> > > >>> sha1(md5($password) + user_defined_private_key);
> > > >>>
> > > >>> I will also remain an option in lifetype admin panel for
> > > >> user to use
> > > >>> the old MD5 way to keep compatability.
> > > >>>
> > > >>> If we use the algorithm above, It is also possible to
> > > >> convert the old
> > > >>> hashed password to new hased password.
> > > >>>
> > > >>> How do you think?
> > > >>>
> > > >>>
> > > >>
> > > http://kuza55.blogspot.com/2006/10/online-reverse-lookup-tables-for.ht
> > > >>> ml
> > > >>>
> > > >>> These kind of online reverse lookup table sites making
> > > the MD5 only
> > > >>> algorithm more dangerous.
> > > >>>
> > > >>> Mark
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>
> > > ----------------------------------------------------------------------
> > > >>> --
> > > >>>
> > > >>> _______________________________________________
> > > >>> pLog-svn mailing list
> > > >>> pLog-svn at devel.lifetype.net
> > > >>> http://limedaley.com/mailman/listinfo/plog-svn
> > > >>
> > > >> _______________________________________________
> > > >> pLog-svn mailing list
> > > >> pLog-svn at devel.lifetype.net
> > > >> http://limedaley.com/mailman/listinfo/plog-svn
> > > >
> > > > _______________________________________________
> > > > pLog-svn mailing list
> > > > pLog-svn at devel.lifetype.net
> > > > http://limedaley.com/mailman/listinfo/plog-svn
> > > >
> > >
> > > --
> > > Jon Daley
> > > http://jon.limedaley.com/
> > >
> > > We are all made different, but we are all sinners.
> > > -- Jim Herron
> > > _______________________________________________
> > > pLog-svn mailing list
> > > pLog-svn at devel.lifetype.net
> > > http://limedaley.com/mailman/listinfo/plog-svn
> >
> > _______________________________________________
> > pLog-svn mailing list
> > pLog-svn at devel.lifetype.net
> > http://limedaley.com/mailman/listinfo/plog-svn
> >
>
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>

------=_Part_29225_19853300.1205214546987
Content-Type: text/html; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div>From a cryptographic standpoint, since sha256 has a larger byte output, there are situations where the md5 calculation will actually reduce the number of bytes of &quot;randomness&quot; (entropy).&nbsp;And since we&#39;re talking about a WebApp here... not a high speed&nbsp;wireless encryption scheme, why not just use sha256 all the way through? Same for the salt, if it contains a sufficient amount of entropy.</div>

<div>&nbsp;</div>
<div>And to clairify what I said about the salt before... simply adding a salt will defeat rainbow attacks as Reto has already said, the added complexity of using a &quot;hash function&quot;, of any kind, on the salt, does not significantly impact a dedicated attacker. Because in the situation of a database compromise the salt (which is assumably stored in the database, per user, and of sufficient entropy) has already been revealed, and the hash of it simply needs to be calculated once for the brute force attack on the password.</div>

<div>&nbsp;</div>
<div>Either way, the salt is a good addition. I&#39;m pleased you guys are so proactive about security.</div>
<div>&nbsp;</div>
<div>However, if you are wishing to increase the security (time to&nbsp;brute force)&nbsp;of the password/salt entry it may be worthwhile to follow the following algorithm instead.</div>
<div>&nbsp;</div>
<div>sha2($salt + sha2($password + $salt))</div>
<div>&nbsp;</div>
<div>you can repeat that ad-naseum increasing the complexity of the brute force by&nbsp;forcing the attacker to follow the chained hash algorithm in their brute forcing attempts. You can even add multiple salts... Just don&#39;t store the final hash in the HTTP cookie like some of these other blogging platforms...<br>
</div>
<div class="gmail_quote">On Tue, Mar 11, 2008 at 12:04 AM, Mark Wu &lt;<a href="mailto:markplace at gmail.com">markplace at gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div dir="ltr" align="left"><span><font face="$B?7:YL at qs(B" color="#0000ff" size="2">That&#39;s why I use (MD5($password)+MD5($salt)) to keep it easy to upgrade.</font></span></div>
<div dir="ltr" align="left"><span><font face="$B?7:YL at qs(B" color="#0000ff" size="2"></font></span>&nbsp;</div>
<div dir="ltr" align="left"><span><font face="$B?7:YL at qs(B" color="#0000ff" size="2">And use sha256() to enhence the security level.</font></span></div>
<div dir="ltr" align="left"><span><font face="$B?7:YL at qs(B" color="#0000ff" size="2"></font></span>&nbsp;</div>
<div dir="ltr" align="left"><span><font face="$B?7:YL at qs(B" color="#0000ff" size="2">Mark</font></span></div><br>
<blockquote style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<div lang="zh-tw" dir="ltr" align="left">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a href="mailto:plog-svn-bounces at devel.lifetype.net" target="_blank">plog-svn-bounces at devel.lifetype.net</a> [mailto:<a href="mailto:plog-svn-bounces at devel.lifetype.net" target="_blank">plog-svn-bounces at devel.lifetype.net</a>] <b>On Behalf Of </b>Matt Wood<br>
<b>Sent:</b> Tuesday, March 11, 2008 3:23 AM 
<div>
<div></div>
<div class="Wj3C7c"><br><b>To:</b> LifeType Developer List<br><b>Subject:</b> Re: [pLog-svn] Salted MD5<br></div></div></font><br></div>
<div>
<div></div>
<div class="Wj3C7c">
<div></div>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 at gmail.com" target="_blank">markplace at gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div>&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><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><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 at devel.lifetype.net" target="_blank">plog-svn-bounces at devel.lifetype.net</a><br>
&gt; &gt;&gt; [mailto:<a href="mailto:plog-svn-bounces at devel.lifetype.net" target="_blank">plog-svn-bounces at 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 at devel.lifetype.net" target="_blank">pLog-svn at 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 at devel.lifetype.net" target="_blank">pLog-svn at 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 at devel.lifetype.net" target="_blank">pLog-svn at 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 at devel.lifetype.net" target="_blank">pLog-svn at 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 at devel.lifetype.net" target="_blank">pLog-svn at 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></div></div></blockquote></div><br>_______________________________________________<br>pLog-svn mailing list<br><a href="mailto:pLog-svn at devel.lifetype.net">pLog-svn at 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></blockquote></div><br>

------=_Part_29225_19853300.1205214546987--


More information about the pLog-svn mailing list