title: Salting passwords with client-side hash
body: <p>Given that you really have to perform your password hashing on the client side, how can you implement server-side salting?</p>
  
  <p>The first solution that I can think of is to ask for the user's salt from the server's users table before you perform the hash. But that means you're confirming that the user "exists" since you give him the valid salt of the user.</p>
  
  <p>I've also thought that instead of storing the salt in the user's table, you can make the salt something that is available to the user, for example, a variation of his username. But consistency problems might arise because the server and the client needs to remember how exactly the salt is gotten from the provided user data.</p>
  
  <p>What is the best way to do this?</p>