Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: crypt function has string length limit?

by Eily (Monsignor)
on Jul 24, 2017 at 16:28 UTC ( [id://1195893]=note: print w/replies, xml ) Need Help??


in reply to Re: crypt function has string length limit?
in thread crypt function has string length limit?

From Wikipedia

SHA-1 is no longer considered secure against well-funded opponents. In 2005, cryptanalysts found attacks on SHA-1 suggesting that the algorithm might not be secure enough for ongoing use,, and since 2010 many organizations have recommended its replacement by SHA-2 or SHA-3

Sure, it's still more secure than crypt (edit: at least the version of crypt discussed in the OP), but your very long paragraph makes it sound like it's some sort of perfect magical solution. Salting isn't specific to SHA, actually you can just add your salt at the end of your input data and call it salting as long the algorithm accepts arbitrary length. And SHA-1 is "thought" to be more-secure than MD5: well MD5 outputs 128 bits of data, against 160 for SHA-1. I'd say it's around 32 bits more secure .

Edit: oh and you may get an unlimited number of password/salt combinations. But no matter how often you change the salt, you won't get more than 2^160 different output values.

Edit: The wikipedia page for SHA-1 actually has a comparison of hash functions which gives one less bit of information for SHA-1 than MD5. So I remove my claim about the 32 bits additional security. And this directly contradicts your claim that "SHA1 is thought to be a more-secure algorithm than MD5".

  • Comment on Re^2: crypt function has string length limit?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1195893]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-19 21:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found