how to obtain the plaintext in counter mode using the AES block cipher I want to obtain the plaintexts.

Sentence1

9d567b9ae76c8a1c72c9075e28d3537a8325bed6043620216c5d796fa65ef24d46a059
9b0c337e9f32465dae103cdb852cddc2e49ab525e923bf364e5c7602f31ee40805ef36
5340e83ef1ee2220fadb2d58ac6e8cf3d0348c34b7a48887a85d8a864bcd5f4ff5b3dc
0b33ada6b92c069f

Sentence2

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'.



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!
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 ;-)