I have the following idea for a hash algorithm:
- Take a string called
- Hash it and get
- Insert (uniformly? randomly? in a pattern based on some value of the hash itself? something more complicated that I can't think of?) the characters of
hashas the key
In other words:
encrypt(hash(string), hash(string) + string)
I have no idea if this works, or if it actually accomplishes anything in terms of additional security. In fact, it might compromise security, I don't know.
Is this any less reversible/less likely to create collisions/better in some way than just hashing and leaving it alone?
It should still be easy to do forward because all the user inputs is plaintext if I'm understanding this correctly. But by inserting the actual data and then encrypting, doesn't that make it harder to extrapolate anything useful from the decrypted hash+string mess?
Or does using the hash as the key compromise the data? Or (as is probably much more likely if this is validly useful) does this already exist?