Possible Duplicate:
What is the optimal length for user password salt?
I have a database like below:
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
)
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.