# 8 bit block cipher in CTR mode for practice - counter is 32 bits

I'm given a very simple 8 bit block cipher in which to encrypt plaintext x with k k one performs $$x \oplus k$$. I am given IV = 0101 and a CTR of value CCCCCCCC (36bits).

My understanding is that counter mode relies on the output block size of my cipher to yield a stream key of b (in this case 8) bits which will then be XORed with my plaintext, and that the bit length of IV and counter should also be b-bits long.

Am I misunderstanding, or did my professor make a mistake with the counter and IV being 40 bits long?

To aide, here is the exact text from the assignment:

Consider a simple system with 8-bit block size. Assume the encryption (and decryption) to be a simple XOR of the key with the input. In other words, to encrypt x with k we simply perform $$x \oplus k$$ giving y. Similarly to decrypt y, we perform $$y \oplus k$$ giving x.

You are given the following 16-bit input. 1111000011110000 (F0F0 in hex).

You are provided IV as: 00001111 (or 0F in hex).

For CTR assume the stream of bits ot be used for counter to be "110011001100110011001100110011001100" (or CCCCCCCCC)

The key to be used (where appropriate) is 10100011 (A3 in hex).

Compute the encrypted output with (i) ECB, (ii) CBC, (iii) OFB, (iv) CFB, (v) CTR (use IV = 0101 for CTR)

• I am confused by your description. A block cipher is a keyed map from a space into the same space, e.g. a map from 128-bit strings to 128-bit strings. An 8-bit block cipher can't possibly handle a 36-bit block counter in CTR mode; even if it is used only for a single message, so that the message number is empty, it can only handle an 8-bit block counter at most. Sep 24 '19 at 1:05
• I'll delete my answer. That's an assignment that has been written down horribly and your professor should feel ashamed for stating it this way. I don't have a clue what is meant with the "stream of bits" and having an IV of 0101 seems to be in direct conflict with it as well, without actually even showing how the counter should be produced. Yuck. Sep 24 '19 at 1:36
• My solution to this professor's assignment: wat Sep 24 '19 at 1:50
• I suppose I'm relieved that the question is jacked up, and not my understanding, but I would have liked to finish the assignment. Oh well. Thanks for your help clarifying, all. Sep 24 '19 at 2:15
• Just do it at the best of your ability showing what you know. Just make assumptions on how it should be and clarify that. And, if possible, ask your prof. for clarification. This looks like practice, I can only hope that a graded test gets more attention than this. Sep 24 '19 at 2:16