1
$\begingroup$

This question already has an answer here:

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.

$\endgroup$

marked as duplicate by yyyyyyy, otus, tylo, Maarten Bodewes, e-sushi Mar 18 '17 at 15:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ 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. ​ ​ ​ ​ $\endgroup$ – user991 Mar 13 '17 at 20:29
  • $\begingroup$ 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. $\endgroup$ – lufthansa747 Mar 13 '17 at 20:53
  • $\begingroup$ 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. $\endgroup$ – Maarten Bodewes Mar 13 '17 at 22:50

Browse other questions tagged or ask your own question.