# Decrypt Messages With Reused Pad [duplicate]

I have 2 messages which have been encrypted using the same pad. I know that if i xor these 2 messages together the key falls out. I am confused in how to figure out what the 2 messages are from the combined xor of the two. How do I go about decoding the 2 messages?

I am aware of crib dragging, but I don't know how to figure out which message the crib belongs to.

Note: the key(pad) used is a random sequence

Links to or Concrete examples of how to implement a solution would be really helpful.

• xor is commutative and everything is its own inverse under xor, so with just two messages there's literally no way "to figure out which message the crib belongs to". ​ Instead, you just try to get two plaintexts which each are one of what was encrypted, despite not knowing which is which. ​ ​ ​ ​ – user991 Mar 13 '17 at 20:29
• I dont need to know which message is which as long as I have the two plane text messages. My confusion with cribs is, lets say crib C1 gives you decrypted part P1 and C2 gives you P2. Theres no way of knowing if C1 C2 or C1 P2 are supposed to belong together. The more cribs used the larger this search space becomes. – lufthansa747 Mar 13 '17 at 20:53
• I guess the position of the cribs - once found - will largely help you there. But with just a singly reused pad, you've got a tough road ahead when it comes to determining the two messages. – Maarten Bodewes Mar 13 '17 at 22:50