Linked Questions

628 votes
7 answers

How to store salt?

If you expect to store user password securely, you need to do at least the following: $pwd=hash(hash($password) + salt) Then, you store $pwd in your system instead of the real password. I have seen ...
George's user avatar
  • 6,467
671 votes
4 answers

Do any security experts recommend bcrypt for password storage?

On the surface bcrypt, an 11 year old security algorithm designed for hashing passwords by Niels Provos and David Mazieres, which is based on the initialization function used in the NIST approved ...
Sam Saffron's user avatar
  • 6,795
272 votes
7 answers

Password Hashing: add salt + pepper or is salt enough?

Please Note: I'm aware that the proper method for secure password storage hashing is either scrypt or bcrypt. This question isn't for implementation in actual software, it's for my own understanding. ...
Jacco's user avatar
  • 7,712
217 votes
4 answers

Is a rand from /dev/urandom secure for a login key?

Lets say I want to create a cookie for a user. Would simply generating a 1024 bit string by using /dev/urandom, and checking if it already exists (looping until I get a unique one) suffice? Should I ...
Incognito's user avatar
  • 5,264
79 votes
4 answers

Why add username to salt before hashing a password?

I have seen examples of password hashing that were: H(username + salt + password). What is the purpose of adding username? Is there any purpose?
JustinLovinger's user avatar
54 votes
4 answers

Why is using salt more secure?

Storing the hash of users' passwords, e.g. in a database, is insecure since human passwords are vulnerable to dictionary attacks. Everyone suggests that this is mitigated via the use of salts, but the ...
Jim's user avatar
  • 1,415
32 votes
2 answers

How big should salt be?

I will be using scrypt to store passwords in my application. As such, I'll be using SHA-256 and Salsa20 crypto primitives (with PBKDF2). Having that in mind, how big salt should I use? Should it be ...
Hubert Kario's user avatar
  • 3,808
15 votes
3 answers

What is a good enough salt for a SaltedHash?

Since I'm hashing all passwords with each their own salt, is there a benefit to the salt being really random, or would an incremental counter or a guid be good enough? Also, is there a benefit of ...
Arjan Einbu's user avatar
7 votes
5 answers

Is it a good idea to use an input by the user as SALT?

I have read many Q&As here on IT Security about password hashing and salting. I am building a simple registration form for our community website which will be used by our members to create their ...
vinaya's user avatar
  • 355
11 votes
3 answers

Is it a good idea to use the user's username as a salt when hashing a password like hash(username_str + password_str)?

I'm helping my friend with hashing his passwords, and I've a question - Should he use one secret string as salt for hashing or is it better to have each user its own salt for hashing? Consider these ...
bodacydo's user avatar
  • 859
15 votes
2 answers

What are the most common password salting methods?

I learned that the Sun guys used the login name as salt for password hashing. Is this a common approach? What are the most common salt values?
Federico Elles's user avatar
3 votes
1 answer

Are Windows password hashes salted with the user name?

I'll readily admit I'm pretty clueless when it comes to cryptography, so there may already be some false assumptions in the question title itself :-) Still, I "heard" that it is more secure to store ...
Martin's user avatar
  • 1,237
4 votes
2 answers

user authentication by decrypting a random blob

Normal user authentication is done by comparing "hash"-values. A simple example of this: The user password is hashed with PBKDF2 on the client using a salt (the salt is the hash of the user password ...
Anonymous's user avatar
  • 333
3 votes
6 answers

Is it okay to wrap a cryptographic hash with MD5 for storage?

Is there any security issues if you wrap your cryptographic hash with MD5 for storage purposes? For example: $hash = md5(hash($password,$salt,$rounds)); Note: hash() uses scrypt or bcrypt or pbkdf2 ...
IMB's user avatar
  • 2,978