I am currently attending a IT-Security course at the Tel Aviv University and I stuck with the an assignment task.

Please DO NOT post the solution if you know it. But I would be very grateful for any hint that leads me to the correct result.


"Eve has managed to intercept the following messages, encrypted by Alice using a XOR cipher:

c1 = 0 0 1 0 0 1 1 1 0 1 0

c2 = 0 1 0 0 1 1 1 0 1 1 0

c3 = 1 1 0 1 0 1 1 0 1 0 1

Eve suspects Alice has been using the same key to encrypt all three messages; moreover, she suspects that the third message (m3) also happens to be m1 XOR m2.

Can you find the key k and the deciphered messages m1, m2, m3?"

Thank you very much in advance for any helpful hint!

  • $\begingroup$ Write down the formula to obtain $c_n$ from $m_n$ and $k_n$, then apply the two special rules you have been given. See if you can figure out $k$ from that. $\endgroup$ – Marc Jun 9 at 8:13
  • $\begingroup$ Thank you, Marc! At least for some seconds I felt like "I got it".. :-/ But I am still despairing.. I hardly dare to ask, but which TWO formulas did you mean? I am aware of the m3 = m1 XOR m2 as given one, but which should be the second? The formulas for c should look like these, right!? c1 = m1 XOR k c2 = m2 XOR k c3 = (m1 XOR m2) XOR k $\endgroup$ – ALL Jun 9 at 8:30
  • 1
    $\begingroup$ Correct. Now make use of the properties of $\oplus$ to work out the rest. The two formulas you are given are $k_1 = k_2 = k_3$ and $m_3 = m_1 \oplus m_2$. These alongside the three $c_n = m_n \oplus k_n$ are enough. $\endgroup$ – Marc Jun 9 at 8:33
  • $\begingroup$ Got it! Thank you, Marc! :-) (@Maarten: Question can be closed) $\endgroup$ – ALL Jun 9 at 9:40
  • 1
    $\begingroup$ @kelalaka That's not so strange. We don't really answer the questions, and they are probably part of some course. Will be tricky to find dupes that way. $\endgroup$ – Maarten Bodewes Jun 9 at 22:34

Browse other questions tagged or ask your own question.