title: Improve password hashing with a random salt
body: <p>I'm starting a website and I'm trying to decide how to encrypt user passwords to store them in a SQL database.</p>
  
  <p>I realize that using a simple md5(password) is very unsecured. I'm considering using a sha512(password.salt), and I have been researching the best way to generate a useful salt.
  I read numerous articles stating that a salt should be as random as possible to add entropy to the hash and it looks like a great idea. But:</p>
  
  <ul>
  <li>you need to store the random salt along with your hash</li>
  <li>given that an attacker somehow got access to your hashed passwords (and is trying to reverse the hash to plain text), it means he probably dumped your database, then got access to your random salts also</li>
  </ul>
  
  <p>Isn't it obvious that the weird looking value next to the hash in the database is a salt? If the attacker can access the salt along with the hash value, how is that more secure?</p>
  
  <p>Anyone has any expertise in that area? Thanks!</p>