Hot answers tagged

261 votes
Accepted

How can I create a password that says "SALT ME!" when hashed?

The output of MD5 is binary: a sequence of 128 bits, commonly encoded as 16 bytes (technically, 16 octets, but let's use the common convention of bytes being octets). Humans don't read bits or bytes. ...
user avatar
  • 168k
178 votes
Accepted

Does anybody not store salts?

Not storing the salt is bad advice. The main purpose of a salt is that each user password has to be attacked individually. If you do not store the salt then, as you said, you need to try every ...
user avatar
  • 6,881
127 votes

Does anybody not store salts?

A 'secret' salt is known as a pepper. From Wikipedia: A pepper can be added to a password in addition to a salt value. A pepper performs a similar role to a salt, however whereas a salt is ...
user avatar
  • 3,971
122 votes
Accepted

Is it safe/wise to store a salt in the same field as the hashed password?

You should store it in a single field. Do not try to divide it into parts. I know this might seem a bit unintuitive for people coming from a database background, where the modus operandi is to ...
user avatar
  • 64.2k
106 votes

Is there any real value in hashing/salting passwords?

Users often use the same passwords on multiple sites. Your site might not have any financial data, but what if the same password is used for their bank, or for an online store? You could argue that ...
user avatar
  • 27.2k
100 votes
Accepted

Secret salts; why do they slow down attacker more than they do me?

This would probably be explained in the auditory lecture that these slides accompany. My guess is that he's calculating this assuming that users generally enter their correct passwords. You only need ...
user avatar
81 votes

Convincing my manager to use salts

I'm not sure where you are from. First of all his opinion is against the the considered industry best practice as defined by NIST. Furthermore your manager is dangerously wrong. The more users the ...
user avatar
74 votes
Accepted

How does the attacker know what algorithm and salt to use in a dictionary attack?

How are plaintext and hashes compared? During the brute force attack, words from the dictionary are hashed with the correct hash algorithm and salt, and then compared to the hash in the database dump. ...
user avatar
  • 64.2k
70 votes

How often do two users use the same password

The assumption is already wrong. Even if every password was unique, you'd still need salts. Without salts, the attacker can go through his list of possible passwords just once, compare the hash of ...
user avatar
  • 4,014
61 votes
Accepted

Is it safe to check password against the HIBP Pwned Passwords API during account registration?

Have I Been Pwned? allows anyone to download the full database to perform the checks locally. If that's not an option, using the API is safe, since it uses k-anonimity which allows you to perform the ...
user avatar
61 votes
Accepted

How can Freeradius detect if the password provided is right when only the salted hash is stored in the database without the salt

The hash and salt are both in the value column. After Base64 decoding, the first 32 bytes are the hash, and the rest is the salt (in your case, it's the ASCII string seldemer).
user avatar
50 votes
Accepted

Is there a way to add salted hashing to my user authentication without breaking my former login server

You have conflicting requirements here. The compatibility requirements forces you to keep the old hashes. The security requirements forces you to drop them. You will have to make a choice here about ...
user avatar
  • 64.2k
49 votes
Accepted

Does too long a salt reduce the security of a stored password hash?

As Mike and Gumbo have mentioned in comments, a salt isn't intended to add protection to bad passwords. It's meant to keep the attackers from breaking the whole database at once. The length of the ...
user avatar
  • 27k
49 votes

Is there any real value in hashing/salting passwords?

Good question, and I'm glad you asked it. I want people to find this thread when they Google it so they -- hopefully -- won't make the same mistakes that many other companies make. You shouldn't just ...
user avatar
  • 22.5k
49 votes

Is it safe/wise to store a salt in the same field as the hashed password?

What you're missing is that hashes work on the original data, minus the original string. When you want to validate a string against a hash, you take the supplied string, plus the original hash data (...
user avatar
  • 3,766
47 votes
Accepted

How Does A Random Salt Work?

Is the random salt saved somewhere to be used for each encryption? Yes Seems less secure to me if the salt is saved right alongside the hashed password, rather than using some kind of computed ...
user avatar
  • 868
46 votes
Accepted

What are the differences between an encryption seed and salt?

Seed: Encryption is powered by random numbers, but how do you generate a truly random number? The current millisecond? The number of processor threads in use? You need a starting point. This is ...
user avatar
  • 123k
45 votes
Accepted

Does complexity of salt in password hashing matter?

The important part The fact that you are generating salts on your own is a red flag. The best way to do this, especially if you have little experience with security, is to use an established library ...
user avatar
  • 64.2k
33 votes
Accepted

Password hashing : Using 2 salts

Your second "salt" is a concept which has been described as "peppering". Basically, it works, but has the drawback of implying key management (the "pepper" being really what cryptographers would call ...
user avatar
  • 168k
30 votes

Convincing my manager to use salts

The main purpose of salts is to prevent an attacker from saving work by comparing a single calculated hash with all stored hashes. This problem is independent from whether or not the passwords are ...
user avatar
  • 4,014
29 votes
Accepted

bcrypt no need to store salt?

From a description of bcrypt at Wikipedia: ... The rest of the hash string includes the cost parameter, a 128-bit salt (Radix-64 encoded as 22 characters), and 184 bits of the resulting hash value (...
user avatar
29 votes
Accepted

How does a 'rainbow table' hacker obtain password hashes in the first place?

The news is full of examples of leaked databases (this is just the most recent results). The How: The vast majority of cases involve unsecured databases/backups (across pretty much all technologies: ...
user avatar
  • 4,061
28 votes
Accepted

Should I remotely store my salt?

It is not a problem if the attacker learns the salts. Salts are not meant to be secret. What is important for a salt is that it is unique for each hashed password instance (i.e. not only a unique salt ...
user avatar
  • 168k
27 votes
Accepted

Find matching phone numbers without actually knowing them

bcrypt would be a somewhat better approach because it is designed to be (programmably) slow. Using a large enough salt and a reasonable complexityFactor, bcrypt(salt + number, complexityFactor) ...
user avatar
  • 22.5k
26 votes

Convincing my manager to use salts

The "best" counter-argument depends on what you are trying to achieve. If you just want to be scientifically right, then it suffices to say that salts are not, and never have been, a method to cope ...
user avatar
  • 168k
25 votes

How Does A Random Salt Work?

To verify the hashed password without salt, you compute MD5(privided_password) and compares with the data stored on the database. It makes a trivial search on a hash table to decode lots of your ...
user avatar
  • 50.5k
25 votes
Accepted

Perfectly Robust Hashing Scheme, or Completely Over-Engineered?

This basically looks like something along the lines of PBKDF2 or sha512crypt, only with a bunch of "cryptographic voodoo" applied. Salts have a very specific cryptographic purpose: to tie an password-...
user avatar
24 votes

How to crack a password given its hash and its salt using a more efficient method than brute force?

Without any more information, you can not reduce the search space. Since you don't have any prior information about the password, you can't rule out any possible password from the search space. If ...
user avatar
  • 2,284
24 votes

Is there a way to add salted hashing to my user authentication without breaking my former login server

Is there a secure way to add salt (and pepper) to our authentication database while maintaining the old application's ability to authenticate users? Yes, this can be done. Below are high-level ...
user avatar
  • 922

Only top scored, non community-wiki answers of a minimum length are eligible