Tag Info

New answers tagged

0

I am aware of the benefits of adding a salt to values that are hashed using a one-way function. Is adding a salt to a value that is being encrypted (using symmetric encryption) considered to be good practice as well? I think your approach is flawed and will weaken the integrity of the cipher it self. By appending the salt with the plaintext that is going ...


2

A salt has absolutely no benefit for encryption. If anything, it could (though it shouldn't) make the encryption less secure. If it turns out that a known plaintext attack is found (an attack that allows information to be gained from a cypher text about the key by knowing part of the plain text) then having a public value encrypted would make every message ...


5

A salt is a cryptographically-secure random non-repeating value, added to the password before hashing it, rendering rainbow tables useless and making it impossible to attack more than one password by attacking one hash. An initialization vector (IV) is a cryptographically-secure random non-repeating value added as the initial state to a block cipher ...


3

The point of a salt is that it is unique, so that an attacker who wants to crack multiple hashes has to do all the work afresh for each hash. If you include a characteristic that is derived from the password, it doesn't help the salt. It doesn't hurt, either, but it doesn't strengthen the salt in any way. In effect, by taking hash(password+length+salt) ...


1

There are a couple of factors involved in salting, and you're missing (at least) one of those. They make rainbow tables useless. If someone looks in your password database and sees that a password is "5f4dcc3b5aa765d61d8327deb882cf99," they don't even need to build a "rainbow table," they can just google for that value and google will tell them that it's ...


1

The output of a good hash should be unrelated to the input, thus no additional randomness should be achieved by factoring in the length. The point of the salt isn't to make the hash more unique so much as it is to prevent the possibility of precalculating tables. Since the length of a password being guessed is known, it doesn't add any protection against ...


1

Firstly, why are you implementing low-level crypto code for a web page? You'd think this is a solved problem: you use a framework which uses libraries. Secondly, the hash protect the passwords in case that the hashes leak out. Your site does not provide access to the password database, so this situation should ideally not even arise. The salts help to ...


3

It depends. If you're using a proper KDF such as PBKDF2 or bcrypt, then there's no benefit whatsoever. If you're using a simple cryptographic hash function that suffers from length extension attacks (e.g. MD5 or SHA-1) then it may help reduce your susceptibility to such issues. However, at that point, you've got bigger problems.


1

I don't see any advantage at all (though no disadvantages either). The purpose of salting is to thwart precomputed hash tables/rainbow tables, forcing the attacker to brute force your hashes instead. If you add an easily computable property of the password in the hashing process, the attacker will just have to do the same as well (for each guessing attempt), ...


8

A unique salt solves one problem -- every account can't be attacked simultaneously in one giant brute-force attempt. Let's say you tried building a rainbow table of all printable ASCII passwords that were 8 characters long1. That's 968 ~ 7.2 million billion (7.2 x 1015) possibilities. If you had a GPU that generates passwords at a billion per second, that ...


14

You are fundamentally correct that it is just making the password longer but there are some additional things that it does add. Also the average password is not that long or secure and adding length "for free" is rarely bad. The salt makes it so that an attacker can't hash "password" once and then look for every user that has a password of "password". ...


3

Rainbow tables are precomputed hash tables which are used to crack the passwords in a relatively quicker time because looking up a table is much faster than calculating a hash. if one can find the hashed passwords one should be able to find the corresponding salts The salt known to the attacker will not create a big problem if the attacker is trying to ...


28

A rainbow table is an optimization for reversing hashes by brute force. It works by a trade-off: you do a lot of precomputation to build a huge data structure, and you can then crack many hashes quickly. A rainbow table only helps the crack hashes in the search space that it covers. Concretely, rainbow tables are built for plaintexts made of printable ...


45

You have a fundamental misconception of how rainbow tables work. A rainbow table or a hash table is built by an attacker prior to an attack. Say I build a hash table containing all the hashes of strings below 7 characters for MD5. If I compromise your database and obtain list of hashes, all I have to do is lookup the hash on the table to obtain your ...


5

The method you describe is indeed a classic algorithm for one-time passwords, but it has some drawbacks: It is good only for N passwords, where N must be chosen at initialization time. The client must invoke the hash function R times, where R is the number of remaining passwords in the chain, i.e. initially R = N. This limits the size of N, otherwise the ...


2

What you're describing sounds vaguely similar in it's aims to the one-time password scheme, HOTP. However, after many thousands of logins, my login attempt under your scheme consumes more CPU time than the first login I attempted. With HOTP, the time to attempt login is constant. It is also the case with this scheme that I cannot protect the secret on the ...


1

Firstly, the system is complicated and brings up other issues: Does the user have to remember how many times he logged in? If not, who does? Not his browser, he should be able to log in from anywhere. Secondly, any form of client side encryption in HTTP connections is useless. A man in the middle can easily modify the javascript, remove the hashing ...



Top 50 recent answers are included