25.06.2013, 21:04
Hey,
I'm interested in the security aspects of programming, and this time my question is about securely storing passwords. While reading about the topic, I've seen a lot of controversial ideas about the best way of doing it. It's clear that the password should be hashed and salted, but how this should be done isn't so straight forward anymore.
Some suggest to hash the password multiple times with different hashes, but this has been proven a bad idea by many sources, so let's just leave it there.
Then there is the concept of hashing the password many times using the same hashing algorithm (introduced here: https://sampforum.blast.hk/showthread.php?tid=417637). Most people seemed to approve this on the SA-MP forums, but further research made me feel less comfortable with this method. The possibility of hash collisions increases, thus making it easier for the hacker to find the original password (source: http://yorickpeterse.com/articles/use-bcrypt-fool/)
Bcrypt seems the best way to go, but it hasn't been ported to SA-MP. In fact, all the hashes available on SA-MP are relatively fast, and thus not very good for storing passwords.
So what are your opinions? What's the best way to do it on a SA-MP server?
I'm interested in the security aspects of programming, and this time my question is about securely storing passwords. While reading about the topic, I've seen a lot of controversial ideas about the best way of doing it. It's clear that the password should be hashed and salted, but how this should be done isn't so straight forward anymore.
Some suggest to hash the password multiple times with different hashes, but this has been proven a bad idea by many sources, so let's just leave it there.
Then there is the concept of hashing the password many times using the same hashing algorithm (introduced here: https://sampforum.blast.hk/showthread.php?tid=417637). Most people seemed to approve this on the SA-MP forums, but further research made me feel less comfortable with this method. The possibility of hash collisions increases, thus making it easier for the hacker to find the original password (source: http://yorickpeterse.com/articles/use-bcrypt-fool/)
Bcrypt seems the best way to go, but it hasn't been ported to SA-MP. In fact, all the hashes available on SA-MP are relatively fast, and thus not very good for storing passwords.
So what are your opinions? What's the best way to do it on a SA-MP server?