0
$\begingroup$

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?

$\endgroup$

1 Answer 1

0
$\begingroup$

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.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.