Jump to content

Opinions On Best Password Security


glenelkins

Recommended Posts

Hi

 

I am looking for opinions on the best way to secure user passwords. I am currently using crypt() with a 32 bit salt string... now my main question here would be: Should I store a randomly generated md5 hashed salt in the database for each user, or maybe a single salt string in a config file?

 

I am looking for the most secure option here.

Link to comment
Share on other sites

The md5'd salt can't be random because there would be no way for the system to replicate that salt purposely. You could use some sort of entry in your user's information that is unchangeable to create an md5'd salt. For instance a creation date or user id + some word. Whatever you do though do not hash the password twice because it makes it more vulnerable.

Link to comment
Share on other sites

Hi

 

Thanks for the reply. I was thinking of storing the salt in the database and just pulling it out when i need to check passwords. The problem is I have been told this isn't the best way to store the salt string, what is your opinion on this?

 

My idea of the salt would be to generate a string of say 32 characters long with completely random characters, then hash this to make the salt for the password

Link to comment
Share on other sites

Hi

 

Thanks for the reply. I was thinking of storing the salt in the database and just pulling it out when i need to check passwords. The problem is I have been told this isn't the best way to store the salt string, what is your opinion on this?

 

My idea of the salt would be to generate a string of say 32 characters long with completely random characters, then hash this to make the salt for the password

 

To be honest I believe that storing a randomized salt in the database would provide the same security as storing a non-randomized salt in the database. That's why I would salt a non-changing variable that is stored in the database that otherwise would not be used as a salt.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.