I've been reading up on Password hashing, and it seems like there is a lot of opinions on "What's right."
I'm curious about the possibility of storing a split of a Hashed password in multiple user fields. Meaning hash the password first, then split, as it seems splitting a plain-text password, making it's length smaller, then hashing, will weaken security.
Lets say I have a password field, an then another field somewhere else in the table that's also hashed. When trying to see if the entered password is the same, could I take the 2 hashed values that were split, combine them, and see if that equals the entered one? Granted, I would like to hash a lot of values in my DB, so having a random "hashed value" wouldn't seem suspicious in this case.
Example
Field Password: SA234j23kljfs
Other field : 23lkj4as89dfADk
User password: SA234j23kljfs23lkj4as89dfADk
I also am curious if I could append data to the fields in order to confuse an attacker even more. I believe this would be a form of SALT?
Example
Field Password: SA234j23kljfs|dSl92slC3lD29
Other field : 23lkj4as89dfADk|298fskASDlk2sl
then split the extra data behind |
(Note that | is there just as a placeholder for this example and it would be split would some sort of logic to split correctly).
User password: SA234j23kljfs23lkj4as89dfADk
Is there anything wrong with either of these approaches? I surely feel that this would be a problem for any attacker.
EDIT: I decided to edit some details and explain better/give better examples of what I'm trying to do.
It seems that a lot of the answers had to do with splitting the plain-text, and then hashing each piece, instead of hashing everything, then splitting...
I understand why splitting then hashing is a risk, but why would splitting an already hashed password, be the same?
From what I've read, hashes aren't supposed to have any relevance to each other so "hello" and "world" hashes put together, should not be "helloworld" hashed, or is this wrong?
Thanks.