0
$\begingroup$

Suppose that a block is ciphered with IDEA using CTR mode operation. To get the original message, why can't we use the cyphered rule?

$\endgroup$
  • 1
    $\begingroup$ It is not at all clear what your question is about. Can you please elaborate on the title and specify what it is that you want to know? $\endgroup$ – Ella Rose May 11 '18 at 1:53
  • $\begingroup$ Are you asking why $\operatorname{enc}_k(n) \neq \operatorname{dec}_k(n)$ for a key $k$ and counter $n$? $\endgroup$ – cypherfox May 11 '18 at 2:30
  • $\begingroup$ I read the question title to mean "Why does CTR mode not use [a block cipher's] decryption [algorithm] for message decryption?" (Even though it does use the block cipher's (block) encryption algorithm for message encryption.) $\endgroup$ – Future Security May 11 '18 at 2:46
1
$\begingroup$

CTR uses only a block cipher's forward algorithm, not its inverse. Both sender and recipient compute $N_? = E_K(nonce || counter)$ for each block. Then the plaintext is XORed with $N$ to get ciphertext. The recipient XORs ciphertext with $N$ to get plaintext.

$C_i = E_K(nonce || i) \oplus P_i$

$P_i = E_K(nonce || i) \oplus C_i$

Note: XOR is it's own inverse. $A \oplus B \oplus B = A$

$\endgroup$

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.