4 ms·
You might be right, but I don't understand how either party could cheat. Let's assume that the hash is computationally secure, so that it's effectively impossi
by RiderOfGiraffes 17y ago
You might be right, but I don't understand how either party could cheat.
Let's assume that the hash is computationally secure, so that it's effectively impossible to compute a file to match a given hash. SHA-256 seems to me to meet that assumption.
I decide whether I want heads or tails, and create a file that starts with my choice, then has random padding. I compute the hash and send it to you.
You now tell me openly your call. I believe you have no way to compute from my hash what I've chosen, so to you, my choice is hidden. Whether you guess right is effectively random.
Now I reveal the file from which the hash was computed. Again, I can't compute a different file with the same hash, so I'm forced to reveal the choice I made. If you were right we both know it. If you were wrong we both know it.
Can you explain how it's possible for either of us to cheat?
I appreciate your time - thanks.