# OTP XOR two messages

I am working on a project in which we will XOR two messages basically adding them together, $$C_1= (M+K)$$ and $$C_2= (M'+K')$$ the result should look like $$K\mathbin\|K'$$ and $$M \oplus M'$$. My question is about the security of the resulting cipher after XORing two messages.

Note: Both the keys and messages have been chosen uniformly from the message space and keyspace in which we want to prove that, $$\Pr [C=C \,|\, m=M] = \Pr[m=M]$$

• Not clear exactly what you mean by $K\mathbin\| K'$ and $M\oplus M′$, but it seems that you are asking the proof of the perfect secrecy of OTP. – kelalaka Nov 12 '19 at 20:08
• K||K' means concatenating the keys and M XOR M' meaning XORing the messages, I want to know if I have tow cipher resulting from an OTP encryption, how to proof of the new cipher's perfect secrecy or computationally secure respecting the static of the messages themselves. please let me know if it is not clear yet. Thanks – himan namdari Nov 13 '19 at 21:53
• Your encryption scheme is not clear. What do you do with $k\mathbin\|K'$ You have calculated $C$ and $C'$ than what? – kelalaka Nov 14 '19 at 7:41
• for each cipher, we do have a key that has been driven from a public key encryption scheme as k = (pk,k) so we encrypt the key with the public key and then we use this key to encipher the message. then we have (c,c') in which c = (pk,k) and c' = (Enc (m,k) . we can consider the Enc scheme as OTP as m XOR k. – himan namdari Nov 14 '19 at 21:39
• now if we want to add the result of two ciphers created by the mentioned scheme. we will add (m+k) XOR (m'+k') , then we have (K||K', m XOR m') , my question was how to know the security proof of the resulting m XOR m' based on the static of the message and the fact that we have used the OTP algorithm to generate the cipher in first place. – himan namdari Nov 14 '19 at 21:44