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.


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?

closed as off-topic by crovers, Steve, Robert Mennell, Steffen Ullrich, Serge Ballesta Oct 3 '17 at 11:19

  • This question does not appear to be about Information security within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.