I want to obtain the plaintexts.


9d567b9ae76c8a1c72c9075e28d3537a8325bed6043620216c5d796fa65ef24d46a059 9b0c337e9f32465dae103cdb852cddc2e49ab525e923bf364e5c7602f31ee40805ef36 5340e83ef1ee2220fadb2d58ac6e8cf3d0348c34b7a48887a85d8a864bcd5f4ff5b3dc 0b33ada6b92c069f


8c507dc8ce4fb7556bc1554124c54029c420b8d71c36202177547f6ba00bf34356a00a d2067c65d026444ee20f2a979930c0d1e488b422ff2ffa3b45427018f35bb34739bb72 4b01f571e0af2538bd9e7f50eb608aa9

They were encrypted with the same nonce and key in the counter mode using the AES block cipher. The plaintexts are English sentences.

I guess the first word is 'the' in sentence2. When I found the 'Enc' in the sentence2. I thought the first word of sentence2 is 'Encrypted'.

enter image description here

I know that the keystream is combined the nonce and the counter value in the Counter Mode. But, I don't know what should I do after this.

I can't guess the word anymore. How can I know the nonce and obtain full plaintexts??

Any help will be really helpful to me!! Thank you!

  • $\begingroup$ The best you can learn about the $i^\mathit{th}$ bit position in one plaintext is only as good as you know about the $i^\mathit{th}$ bit position in the other plaintext. If you have a probabilistic model for English sentences, that may help you, of course, to guess the two sentences given their xor. But nothing about the cryptography will inform you about bit positions you don't already know something about. $\endgroup$ Dec 9, 2017 at 13:40
  • $\begingroup$ hint: "working group", "you for solving this" and "It was easy, right?" might be part of the solution. $\endgroup$ Dec 9, 2017 at 22:36
  • $\begingroup$ the PSI working group congratulates you for solving this exercise. It was easy, right? and encrypting texts with counter mode is normally just fine, unless you do not take a fre $\endgroup$ Dec 15, 2017 at 12:16

1 Answer 1


You can't obtain the nonce without having the key which was used for the block cipher.

For CTR mode the ciphertext is $c = m \oplus s$ where $m$ is the message and $s$ is the keystream (which is derived from the key $k$, a nonce and a counter, but this is a minor detail, important is, that re-using the nonce results in the same keystream).

Take two messages $m_1$ and $m_2$ and their corresponding ciphertexts $c_1$ and $c_2$. If we XOR those ciphertexts we get: $c_1 \oplus c_2 = m_1 \oplus s \oplus m_2 \oplus s = m_1 \oplus m_2 \oplus s \oplus s = \mathrm{???}$. Just apply the rules of XOR and you will see, what you get.

Our exercise sheet you are trying to solve, provided another hint: XORing a " " (space) with a letter (in ASCII) flips between lower- and uppercase, e.g. $\mathrm{‘a\verb!’!} \oplus \mathrm{‘\;\verb!’!} = \mathrm{‘A\verb!’!}$. If you XOR two plaintext messages in a character position, where one plaintext message has a space, what can you tell about the other message if you see a letter in uppercase or lowercase?

Now, you might ask yourself: How do I figure out, which of the two plaintexts contains the space? Use the other ciphertexts (there are 11 of them on the task sheet with the same nonce!). What will most of them tell you, if you XOR them with a ciphertext, you presume to have a space at position $i$?

Looking forward to see your solution tomorrow!

Your friendly teaching assistant

PS: You can ask on our Mattermost chat too ;-)

  • $\begingroup$ I was a bit surprised that the solution calls breaking a two-time-pad easy (It's doable, but a bit complex for a student exercise, unless you hand them a pre-trained language model), but having 11 ciphertexts does indeed make it easy. $\endgroup$ Dec 15, 2017 at 12:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.