Ah, this made me laugh out loud.

I have visions of some consultant doing a 'security audit' and suggesting it
because, well, it's _obviously_ 64 times better than SHA1.

(It wouldn't be the daftest thing I've heard a consultant say, either...
And imagine his reaction when you tell him about SHA-256!)

Anyway, I know it has already been pointed out by a bunch of other folks,
but base64 is nothing to do with security, and it should not be used for the
safe-storing of passwords.

I have a base64 encoder and decoder on my site, to give you a better idea of
what base 64 does:
    http://www.opinionatedgeek.com/DotNet/Tools/Base64Encode/default.aspx
    http://www.opinionatedgeek.com/DotNet/Tools/Base64Decode/default.aspx

The summary is that base64 encodes binary data into text, so that it can be
transmitted as a stream of characters (like MIME attachments in email).
Nothing to do with encryption, just a way of getting a bunch of ASCII
characters to represent binary data.

Anyway, enough of that.  The other thing I'd point out is that SHA1 may not
be 'the safest', but it's still very safe.  I'm not trying to dismiss what
others have said here (the responses have all been pretty great), but the
attacks that I've seen on SHA1 have been quite lengthy, contorted attacks to
generate hash collisions on known plaintexts.  I suspect the 'security
audit' folks have glanced at the summaries and decided to dismiss SHA1
because it makes them look uber-cautious security-aware smart people.

Of course, it's _possible_ they have an inside way of generating collisions
on demand and - hey, why not - decrypting SHA1 hashes.  But I doubt it.

I think (getting even more cynical) most applications have so many security
problems of their own - that are easier to target - that the choice of SHA1
versus SHA-256 is moot.

I'm not saying that to dismiss your fears or make fun of you, Paul - I know
that it's entirely possible that your application is one of the ones that
would benefit from a tighter hash algorithm, and it could easily be dealing
with a big enough volume of money to benefit from the improved peace of
mind.  I just think that in the general case it won't make much difference.

Plus, a chain is only as strong as its weakest link, and SSL uses SHA1, not
SHA-256...

Good luck,

                        Geoff

> -----Original Message-----
> From: Discussion of advanced .NET topics. [mailto:ADVANCED-
> [EMAIL PROTECTED] On Behalf Of Paul Cowan
> Sent: 22 April 2008 15:12
> To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
> Subject: [ADVANCED-DOTNET] Security questions
>
> Hi,We have a web application that where the username and password are
> stored in the database.The password is stored as SHA1.  We have just
> been through a security audit which deemed SHA1 to be not the saftest
> encryption algorithm.Is there any way we can update the passwords from
> SHA1 to base64?We also need to have the transport running over https,
> how can we develop against Https without purchasing a certificate?
> Is there a [EMAIL PROTECTED]
> _________________________________________________________________
> 100's of prizes to be won at BigSnapSearch.com
> http://www.bigsnapsearch.com
> ===================================
> This list is hosted by DevelopMentorR  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to