Whats is salted MD5? Is salted MD5 or salted SHA safe enough?

622    Asked by ajithJayaraman in SQL Server , Asked on Dec 1, 2021

Is using something like bcrypt or scrypt necessary? The hashes are so much longer to store in a database. Can one get away with using salted MD5 or SHA and still be secure?



Answered by Anisha Dalal

Salted MD5 and SHA-1 are emphatically poor choices for storing passwords. The problem is not their collision-resistance; it's that they're designed to be extremely fast. A modern GPU can attempt upwards of billions of passwords per second when brute-forcing through a list of hashes. This can shred through every possible eight-character alphanumeric password in at most a few days; that's with just one GPU.

The advantage of bcrypt and scrypt is that they can consume arbitrarily many resources; bcrypt has configurable CPU requirements, scrypt has configurable CPU and memory requirements. By increasing these work factors, you can dramatically increase the amount of effort it takes an attacker to attempt even a single password in your database.

As to the length: it's 2014. Storage is essentially infinitely cheap. Saving 40 bytes per record is simply not an acceptable excuse for selecting known-poor password hashing algorithms. In whatever project you're working on, surely there are more worthwhile tasks to spend your limited development resources on than this.

What is MD5 Salt and How to Use It? In cryptography, salt is a random string that you add to an input word, to generate a different hash that with the word alone. MD5 doesn’t really offer this feature in the cryptographic algorithm, but you can concatenate two strings to get the same result.






Your Answer

Interviews

Parent Categories