473,326 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

md5 / sha1 - Any real difference?


Folks,

I use md5 hash with some of my cookies and occassionally a hidden form
field - I know the physical data on my network is insecure (unless being
served via https) but I was wondering if there are any advantages to using
md5 over sha1 or versa vicea... I know md5 gives me a unique 32bit hash
while sha1 I've read is 'secure' (?) and gives a 40bit hash... Since The
technical webpage on sha1 is lengthy and for the most part over my head...
and other than today, I've never heard of it before... I was wondering if
anyone could offer any comments on it...

Cheers
randelld
Jul 16 '05 #1
3 45020
Randell D. wrote:
md5 over sha1 or versa vicea... I know md5 gives me a unique 32bit hash
while sha1 I've read is 'secure' (?) and gives a 40bit hash... Since The


Basically there is just less chance of two strings ending up with the same
hash value (a "collision"). The more "collisions" a hash algorithm has the
less useful it becomes.

This
http://groups.google.com/groups?q=md...psi.net&rnum=5
might be of interest.

--
James Sleeman
Gogo:Code http://www.gogo.co.nz/
Email domain : gogo.co.nz see user in from header!
Jul 16 '05 #2

"James Sleeman" <ja***@seeMessageForDomain.moc> wrote in message
news:M7******************@news02.tsnz.net...
Randell D. wrote:
md5 over sha1 or versa vicea... I know md5 gives me a unique 32bit hash
while sha1 I've read is 'secure' (?) and gives a 40bit hash... Since The
Basically there is just less chance of two strings ending up with the same
hash value (a "collision"). The more "collisions" a hash algorithm has

the less useful it becomes.

This
http://groups.google.com/groups?q=md...psi.net&rnum=5 might be of interest.

--
James Sleeman
Gogo:Code http://www.gogo.co.nz/
Email domain : gogo.co.nz see user in from header!


Cheers for that...
Jul 16 '05 #3
"Randell D." <yo**************************@yahoo.com> wrote in message
news:lH**********************@news1.calgary.shaw.c a...

Folks,

I use md5 hash with some of my cookies and occassionally a hidden form
field - I know the physical data on my network is insecure (unless being
served via https) but I was wondering if there are any advantages to using
md5 over sha1 or versa vicea... I know md5 gives me a unique 32bit hash
while sha1 I've read is 'secure' (?) and gives a 40bit hash... Since The
technical webpage on sha1 is lengthy and for the most part over my head...
and other than today, I've never heard of it before... I was wondering if
anyone could offer any comments on it...

Cheers
randelld


First of all the hash length you mention are much to short to offer any
security.
md5 = 128 bit
sha-1 = 160 bit

If you are not working on high-security stuff it makes no real difference
for you but if it's your decision and there is an available sha-1 imple-
mentation for you platform then i see no reason why to use the old
md5 stuff.
Jul 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Paul Rubin | last post by:
FYI. From <http://www.schneier.com/blog/archives/2005/02/sha1_broken.html>: The research team of Xiaoyun Wang, Yiqun Lisa Yin, and Hongbo Yu (mostly from Shandong University in China) have been...
6
by: Chang | last post by:
How to get SHA1 or MD5 of a big file (+5MB - 20GB) as I can't read 20GB into memory. -- Chang.
5
by: Michael H | last post by:
Hi all, I guess I don't fully understand how a SHA1 hash value is calculated in C# / .NET for a large file... I'm trying to calculate SHA1 values for large files that are much larger than my...
0
by: Dil via .NET 247 | last post by:
Fresher to .NET Aiming to produce a resulting hash of length 24 CHARACTERS, using MD5 or SHA1 Algorithms. According to the Class Libraries, the hash size for the SHA1 algorithm is 160 bits, and...
8
by: Adam Carpenter | last post by:
Hello, I have my users passwords stored to my DB hashs created using SHA1CryptoServiceProvider, here is the function: Public Shared Function EncryptPassword(ByVal password As String) As Byte()...
0
by: VAISH | last post by:
Hi I am using C# (.NET) to do the following I am trying to canonicalize the xml and signing the xml using sha1. Please read the scenario below I have form with few fields, when I click save...
8
by: sathyashrayan | last post by:
Dear group, For a log-in page I have created a mysql db and user registers with a user name and password. The password field is encrypted with $passwd = sha1($_REQUEST); I insert the...
2
by: amygdala | last post by:
Hi, Does anybody now of a custom crypt function that implements sha1? The thing I like about crypt is that I don't have to worry about (re)generating salt when querying the database. Or are...
5
by: LMZ | last post by:
How can convert string from sha1.hexdigest() to string that is the same, like from sha1.digest() thanks for your help! Alexandr.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.