I have a hashed value $X$ and need to ensure that any of the data sets $D_1...D_n$ can be concatenated with a correctional value $C_1...C_n$ and passed into a hashing algorithm to result in the value of $X$. What I need is a way to figure out what $C_i$ should be in order to ensure that $Hash(D_i, C_i ) = X$. If I use a simple hash like addition or XOR then it'll be pretty easy, but is there any way to figure out $C_i$ for better hashing algorithms?
1 Answer
$\begingroup$
$\endgroup$
0
No (assuming by “better” you mean “cryptographically strong”). What you are trying to do is finding a pre-image of $X$ under the extra condition that $D_i$ must be a prefix of the pre-image. Cryptographic hash functions are designed to make finding pre-images computationally infeasible.