1

Goal

I want Alice and Bob to communicate a message without their answers influencing each other. More formally:

  • Alice wants to send Bob a message, a.
  • Bob wants to send Alice a message, b.
  • But Alice must not know b before sending a
  • And Bob must not know a before sending b.

Attempt

I was thinking I could have:

  • Alice sends an encrypted message, f(a, p1) = a', and a hash with the original message and the private key, h(a, p1).
  • Bob also sends an encrypted message, f(b, p2) = b' and hash, h(b, p2).
  • Alice and Bob exchange private keys once they have received their messages
  • They decrypt the received messages and verify the hash matches

Is there any problems with this method? Would it be feasible for Alice to construct a p' that causes the message to be decrypted as something other than a yet still satisfy the hashing function? (assuming cryptographically secure f and h)

Are there more commonly accepted ways to do this?

Browse other questions tagged or ask your own question.