title: How large should my password salt be?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/184112/what-is-the-optimal-length-for-user-password-salt">What is the optimal length for user password salt?</a>  </p>
  </blockquote>
  
  
  
  <p>I have a database like below:</p>
  
  <pre><code>create table user (id int primary key auto increment,
       username varchar(64),
       password varchar(128), # sha512 hash of password
       password_salt varchar(128) # sha512 hash of a random number used as salt
  )
  </code></pre>
  
  <p>Is this a good idea for ensuring password security with a salt? How long should a salt be? I assume that it can't hurt to have a 128bit (SHA-512) salt, but I've been wrong before. </p>