June 8, 201214 yr After reading various blogs and threads talking about the recent LinkedIn hack I was left wondering about my own hashes. I have used various methods to hash my passwords including hashing the password with salts multiple times such as password.salt.password.salt.salt and then hashing it multiple times after that using all the SHA's etc to try and make it harder to crack. Some people are saying that hashing a password multiple times makes it less secure but I can't imagine that. Instead of then saving the hash and salt hash in the database separately, I made a script to slice them up and merge them together in the database so that even if they are leaked, a the correct script would still be needed to split the salt from the hash, I was wondering if this was a good idea or not?
June 9, 201214 yr Have you seen phppass? - http://www.openwall.com/phpass/ Its probably more secure and more 'industry standard' than hashing passwords.
June 9, 201214 yr http://www.php.net/manual/en/function.hash.php This is the way I would hash passwords. For example: var $code = hash('SOME_RANDOM_*CONSTANT*_KEY', ' SOME_RANDOM_STRING '); What Jock wrote should work too.
June 9, 201214 yr Er, it will work and is much more secure than your example. Its based on pretty much the same, talking about security, almost everything can be decrypted.
June 9, 201214 yr Its based on pretty much the same, talking about security, almost everything can be decrypted. Firstly, the first argument of hash() should be the algorithm. Secondly, phpass uses bcrypt. Bcrypt uses built-in salts to guard against rainbow table attacks, and incorporates a work factor which can be made sufficiently strenuous to defeat brute-forcing by anything. Yes, it CAN be decrypted, but if decrypting a single hash would take years with a massively parallel CUDA cracker, that's secure enough.
June 9, 201214 yr I must agree with the other replies made, although i personally have not used phpass myself ive heard some good things about it, and from what ive read its supierior to normal sha1 or md5 password hashing with or without a salt.
June 10, 201214 yr Author Is it better though because it's 'easier' to set up and use, or because simply it is more secure? Surely if it can be decrypted (in any way shape or form), it can't be more secure than using salts, keys and SHA-512?
Create an account or sign in to comment