Hot answers tagged

180 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 ...
Gudradain's user avatar
  • 6,991
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 ...
amccormack's user avatar
  • 3,961
123 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 ...
Anders's user avatar
  • 65.5k
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 ...
Xiong Chiamiov's user avatar
79 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. ...
Anders's user avatar
  • 65.5k
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 ...
Benoit Esnard's user avatar
60 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).
Joseph Sible-Reinstate Monica's 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 ...
Anders's user avatar
  • 65.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 (...
Machavity's user avatar
  • 3,818
44 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 ...
Anders's user avatar
  • 65.5k
40 votes
Accepted

Is it a good practice to add hard-coded salt to BCrypt passwords?

What you're talking about with a single shared string being added to all the hashes is usually called a pepper, as opposed to a salt which is unique per hash. The two techniques complement each other, ...
Gh0stFish's user avatar
  • 10.1k
33 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 (...
Steffen Ullrich's 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: ...
Marc's user avatar
  • 4,271
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) ...
LSerni's user avatar
  • 22.8k
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 ...
MiaoHatola's user avatar
  • 2,314
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 ...
Brian's user avatar
  • 962
23 votes

How can I re-use my password and still protect the password if it is exposed from one source?

The established solution for this problem is to use different passwords for different websites along with a password manager. That way you won't have to reinvent the wheel. I know the rule don't ...
yeah_well's user avatar
  • 3,794
23 votes
Accepted

Client side password hashing with static salt - did I find a breach?

It depends. There is not enough information in your question to give specific answers, and probably without knowing the server side, it will be hard to evaluate. Isn't this a breach? I would not call ...
phisch's user avatar
  • 1,305
22 votes

Can somebody explain simply why crypt of a password with a salt (the hash result) is equal to crypt of the password with the hash result itself?

The output of crypt looks like this: $1$L2l4$oqf.HIrymNg/YIIF.r.rP0 This is not just the cryptographic hash. The dollar signs in here split the structure into three strings: 1, the type of hash ...
Sjoerd's user avatar
  • 30.4k
21 votes

Does anybody not store salts?

Background: You should be using a Slow Password Hash. (i.e. bcrypt) By 'slow' I mean computationally expensive, taking more than 100ms (on your hardware) with DoS protection * to test a single ...
700 Software's user avatar
19 votes

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

There is no way to retrieve the password faster than brute force, but there is a lot you can change about your brute-force speed. four (time: ~7m19.531s) This is a long time to brute-force a ...
Sjoerd's user avatar
  • 30.4k
17 votes

Does anybody not store salts?

Your professor isn't correct. The point of a salt is to increase the entropy of the hashed passwords to prevent any sort of pre-computation attack on them as well as preventing the same password from ...
Steve Sether's user avatar
  • 21.6k
17 votes

Can somebody explain simply why crypt of a password with a salt (the hash result) is equal to crypt of the password with the hash result itself?

In this case man 3 crypt is probably more useful than asking AI. AI has a tendency to be... not entirely correct. The man page has the following about return value: Upon successful completion, crypt, ...
vidarlo's user avatar
  • 16k
15 votes

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

As asked, No. As of the posting of this answer, the question asks if it is safe to send a password "before salting and hashing it", which means in plaintext. You should never send a password in ...
NH.'s user avatar
  • 1,034
14 votes

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

Just to add something more to Xiong's answer: In case of a database compromise an attacker will try to recover all the passwords (Or at least the most interesting ones), meaning he needs to try each ...
Mr. E's user avatar
  • 1,964
14 votes
Accepted

Why do salts for hashing passwords need to be globally unique, not just system/site-unique?

The goal of salting is resistance to precomputation. While you can't guarantee that a salt is globally unique, you can (just as you said) generate salts of sufficient size as to make it infeasible to ...
Royce Williams's user avatar
14 votes

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

If the operator of the Pwned Passwords API is malicious (or the service is hacked by a malicious person, or someone intercepts your communication) it can lie about certain passwords (only return a ...
Tgr's user avatar
  • 668
14 votes
Accepted

Alternatives for sending plaintext password while login

I don't see to how your proposal is better than existing client side hashing approaches, but I find it as more complex to implement than others. Unfortunately you don't describe a specific risk you ...
Steffen Ullrich's user avatar

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