Today I have read this discussion about SHA-256 and SHA-512 and that we should not use any of them to store a password securely. And I have read here that instead we can use the PBKDF2 hashing function, because we can use salt and specify the number of iterations. That is great, but what about if I use a salt and iterating with SHA-512?
For example, consider this simple implementation:
string Password= "admin";
for(int I= 0; I<numberOfIterations, I++)
{
Password = sha512(Password+salt);
}
store(Password);
So is it possible to apply something like this?
using salt and iterating with sha512
– Mo Haidar Aug 10 '15 at 15:09One thing it mentions is : `Key stretching is implemented using a special type of CPU-intensive hash function. Don't try to invent your own–simply iteratively hashing the hash of the password isn't enough as it can be parallelized in hardware and executed as fast as a normal hash. Use a standard algorithm like PBKDF2 or bcrypt. You can find a PHP implementation of PBKDF2 here.'
– Jerry Saravia Aug 10 '15 at 15:28