A hash algorithm is a function which takes a variable size input and produces a fixed size output. The algorithm tries to make it difficult to predict the output for a given input, find two inputs with the same output, or reconstruct the input from the output.
114
votes
11answers
14k views
How to securely hash passwords?
If I hash passwords before storing them in my database, is that sufficient to prevent them being recovered by anyone?
I should point out that this relates only to retrieval directly from the ...
168
votes
4answers
41k views
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 ...
122
votes
7answers
8k views
How to store salt?
Nowadays, if we expect to store user password securely, we need at least do the following thing
$pwd=hash(hash($password) + salt)
then store $pwd in your system instead of the real password. I have ...
34
votes
4answers
11k views
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.
...
43
votes
2answers
5k views
What are rainbow tables and how are they used?
Where can I find one? Is there a pot of gold at the end?
How do I protect against them?
From the Area51 proposal
This question was IT Security Question of the Week.
Read the Sep 09, 2011 blog ...
197
votes
9answers
20k views
Is my developer's home-brew password security right or wrong, and why?
Our developer, let's call him 'Dave', insists on using a home-brew script for hashing passwords. See Dave's proposal below.
We have already researched and adopted an industry standard protocol using ...
16
votes
9answers
581 views
Does hashing a file from an unsigned website give a false sense of security?
Consider this. Many websites with software downloads also make available MD5 or SHA1 hashes, for users to verify the integrity of the downloaded files. However, few of these sites actually use HTTPS ...
15
votes
4answers
1k views
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 ...
19
votes
5answers
8k views
Most secure password hash algorithm(s)?
What is/are currently the most cryptographically secure hashing algorithm(s)? (available in PHP)
Speed is irrelevant, because I'm iterating the hash over a fixed time (rather than a fixed number of ...
35
votes
4answers
4k views
Recommended # of iterations when using PKBDF2-SHA256?
I'm curious if anyone has any advice or points of reference when it comes to determining how many iterations is 'good enough' when using PBKDF2 (specifically with SHA-256). Certainly, 'good enough' is ...
25
votes
2answers
2k views
Pre-hash password before applying bcrypt to avoid restricting password length
Good practice is not to unnecessarily restrict password length, so that appropriately-long passphrases (perhaps 35-45 chars for 6/7 dicewords) can be used. (See e.g. Should I have a maximum password ...
10
votes
6answers
5k views
Is PBKDF2-based System.Cryptology.RFC2898DeriveBytes() “better” for Unicode Password hashing than traditional methods?
When is it appropriate to use RFC2898DeriveBytes versus a typical hash?
Update
I now understand that a KDF is typically used to create a symmetric key for possible use in encrypting a stream. I ...
17
votes
5answers
1k views
What's the practical limit for rainbow-table based bruteforce?
Say we have a hash of a password. The password can be considered to be made of of totally random characters and has a fixed length of N. The hash is SHA1(password+salt), where the salt is of length M. ...
16
votes
3answers
977 views
Is there any advantage to splitting a password?
I've been reading about the LANMAN (LM) hash and I'm curious about a particular part of the algorithm.
The LM hash is computed as follows:
The user’s ASCII password is converted to uppercase.
...
5
votes
4answers
801 views
Is MD5 considered insecure?
After all these articles circulating online about md5 exploits, I am considering switching to another hash algorithm. As far as I know it's always been the algorithm of choice among numerous DBAs. Is ...
7
votes
4answers
1k views
What is a good practical (and sane) way to manage all your passwords for online sites?
I am just a mere mortal that wants to have a somewhat secure way of managing all my passwords.
This is something that I have been putting off, but since LinkedIn decided to give away one of my ...
7
votes
1answer
617 views
Would it make sense to use Bcrypt and PBKDF2 together?
I've read various opinions about whether Bcrypt or PDBKF2 is a better key derivation hashing method. The answer seems to depend on a lot of complicated factors that are not easy to analyze. Would ...
61
votes
11answers
8k views
Why are hash functions one way? If I know the algorithm, why can't I calculate the input from it?
Why can't a password hash be reverse engineered?
I've looked into this ages ago and have read lots on it, but I can't find the explanation of why it can't be done. An example will make it easier to ...
25
votes
8answers
2k views
Why would salt not have prevented LinkedIn passwords from getting cracked?
In this interview posted on Krebs on Security, this question was asked and answered:
BK: I’ve heard people say, you know this probably would not have
happened if LinkedIn and others had salted ...
19
votes
2answers
4k views
HMAC - Why not HMAC for password storage?
Nota bene: I'm aware that the good answer to secure password storage is either scrypt or bcrypt. This question isn't for implementation in actual software, it's for my own understanding.
Let's say ...
18
votes
1answer
1k views
Collision rate for different hash algorithms
Is there any collision rate measure for popular hashing algorithms (md5, crc32, sha-*)?
If that depends only from output size, it's quite trivial to measure, but I suppose that depends also of ...
9
votes
1answer
772 views
How to apply a pepper correctly to bcrypt?
For hashing passwords in a database, i would like to add a pepper to the hash function. Of course this pepper will be additionally to the unique salt.
The reason why i want to add a pepper is, that ...
18
votes
4answers
1k views
What is SHA-3 and why did we change it?
On the 2nd of October NIST decided that SHA-3 is the new standard hashing algorithm, does this mean we need to stop using SHA-2 as it is not secure?
What is this SHA-3 anyway?
12
votes
2answers
2k views
Why is it always `HASH( salt + password )` that we recommend?
Browsing over this site, many forums, online articles, there's always one specific way we're suggesting to store a password hash:
function (salt, pass) {
return ( StrongHash(salt + pass) )
}
But ...
5
votes
3answers
243 views
How can Microsoft validate a shorter password on Microsoft accounts (MSDN)?
I recently ran across this when logging into MSDN. (I saw this screen after typing my initial credentials.)
I have a 20+ digit password, however there's apparently a new requirement for Microsoft ...
4
votes
2answers
1k views
Reference implementation of C# password hashing and verification
Does anyone have a reference implementation (ideally 3rd party certified, or government approved) way one-way hash a password for C# and or Java?
Ideally,I'd like to see something that includes a ...
18
votes
4answers
4k views
how long does it take to actually generate rainbow tables?
I've been reading up about rainbow tables as I think they're quite interesting cause they're actually a pretty simple concept.
Anyway, I was wondering, has anyone been involved in actually generating ...
12
votes
3answers
813 views
What's the mathematical model behind the security claims of symmetric ciphers and digest algorithms?
Why can SHA-1 be considered a secure hash function? That's something I still wonder about.
I understand the concepts of why modern asymmetric algorithms are deemed to be secure. They are founded on ...
8
votes
3answers
343 views
Are different hash algorithms ever used together?
I was wondering if different hashes (e.g. md5(sha1($data)) ) are ever used together for data security and if there was any reason for it (either positive or negative answer).
29
votes
3answers
1k views
Security Review - password_hash implementation for PHP
I'm currently working on a "helper function" for PHP's core to make password hashing more secure and easier for the majority of developers. Basically, the goal is to make it so easy, that it's harder ...
27
votes
16answers
4k views
Why do people think that this is bad way to hash passwords?
Well, please tell me, what's wrong with this code:
$password = "hello";
$password = md5($password);
for($i=1;$i<20;$i++){
$password = md5($password);
}
It's exactly the same as this one:
...
4
votes
11answers
3k views
Definitely safest password storage scheme?
I already asked this on StackOverflow but I was suggested this would be a better suited place and I found no way to "move" the question so I have to copy it.
Believe, I know, there are hundreds ...
15
votes
3answers
1k views
MySQL OLD_PASSWORD cryptanalysis?
The password hash used for MySQL passwords prior to version 4.1 (now called OLD_PASSWORD()) seems like a very simple ad-hoc hash, without salts or iteration counts. See e.g an implementation in ...
13
votes
5answers
1k views
The aescrypt implementation hashes a password 8192 times to generate the key. Is this necessary?
I'm considering encrypting some small files (hundreds of kb apiece) using the aescrypt reference implementation. Looking at the source, it seems that the encryption key is derived from the IV and the ...
11
votes
4answers
1k views
Looking for example of well-known app using unsalted hashes
Does anyone know of a well-known application that still uses unsalted hashes for password storage? I'm looking for an example for an upcoming lecture on Rainbow Tables, and I think it would add ...
18
votes
5answers
711 views
Is it possible to increase the cost of BCrypt or PBKDF2 when its already calculated and without the original password?
I just wanted to know if you can increase the cost (iterations) of those two algorithms off-line.
I want to increase the cost every year of my users passwords.
One solution is to recalculate them ...
9
votes
2answers
2k views
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?
11
votes
2answers
2k views
What is the difference between a Hash Function and a Cryptographic Hash Function?
I mean, is it just a matter of "how dificult is it to reverse the function with the current technology"?
Or is there a mathemathical concept or property that makes them diferent?
If it is a matter ...
6
votes
6answers
682 views
Client side password hashing
Edit: Updated to put more emphasis on the goal - peace of mind for the user, and not beefing up the security.
After reading through a few discussions here about client side hashing of passwords, I'm ...
14
votes
4answers
746 views
What to transfer? Password or its hash?
Let's say in my database I store passwords hashed with salt with a fairly expensive hash (scrypt, 1000 rounds of SHA2, whatever).
Upon login, what should I transfer over the network and why? Password ...
10
votes
4answers
2k views
https security - should password be hashed server-side or client-side?
I am building a web application which requires users to login. All communication goes through https. I am using bcrypt to hash passwords.
I am facing a dilemma - I used to think it is safer to make a ...
10
votes
2answers
6k views
What are the differences between MD5, SHA and RSA?
MD5 tools output hexadecimal values. In the same manner, do SHA and RSA together produce a hexadecimal (or any other) output?
What are the differences between the MD5, SHA and RSA algorithms?
2
votes
6answers
602 views
“Double hashing” with 2 different hash functions
Is doing something like this
sha256(sha512(password+salt))
Less secure then just doing
sha256(password+salt)
I've heard it will increase collision chances.
I can think of 3 reasons to do this
...
-5
votes
3answers
370 views
create a variants of MD5
I have also asked similar q here :
To create a variants of MD5, I made following changes :
MD5 uses a non-linear sin(i)* pow(2,32) ----> i plane to use cos(i)*pow(2,32)
Instead ...
19
votes
3answers
811 views
Am I wrong to believe that passwords should never be recoverable (one way hash)?
I recently forgot my password for our cable provider online account, only to discover that they sent it to us via plain text in an email. I quickly sent an email to customer support asking them if ...
8
votes
1answer
284 views
Any risk in using the same salt for several hashes on a user?
Right now I'm storing a salt and password_hash on the users table (pretty standard stuff).
The need arose to get a secure hash of another field for a user. Is there any risk in reusing the same salt ...
2
votes
7answers
395 views
Is it possible to detect password length from hash? Does doubling your password add more security?
Assuming a service doesn't store a plain text password, am I right in saying that the answer to this question depends on the service? On a bad service, the hash length is related to the password ...
1
vote
3answers
442 views
Recompute Rainbow table with salt?
So, as I understand it, you prepend a password with salt before you hash it so that the resulting hash can't be used with a rainbow table to find the original password, as you could if the password ...
41
votes
5answers
5k views
Is sending password to user email secure?
How secure is sending passwords through email to a user, since email isn't secured by HTTPS.
What is the best way to secure it? Should i use encryption?
33
votes
7answers
2k views
“Real” Salt and “Fake” Salt
During a Q&A period at DEFCON this year, one member of the audience mentioned that we're using "fake salt" when concatenating a random value and a password before hashing. He defined "real salt" ...
