# Share two secrets between two parties [duplicate]

Alice has a secret A, Bob has a secret B. They have a secure channel and a MAC. They each want to know the other's secret, but don't particularly want to give up their own. However, neither will not lie about the secret, but if possible, will stop communications once [s]he learns the other's secret.

How can such a protocol work, that if Alice or Bob doesn't correctly follow all steps in the protocol, neither person can gain any information about the other's secret.

You may not use a third party.

• I think your question got already answered here: crypto.stackexchange.com/questions/1639/… – wonce Jun 4 '15 at 0:16
• Specifically, with this answer. $\;$ – user991 Jun 4 '15 at 1:05
• "Neither will not lie about the secret?" Did you mean "neither will lie?" – cpast Jun 4 '15 at 19:23