116k views
3 votes
Consider a simple system with 8-bit block size. Assume the encryption (and decryption) to be as follows: If plaintext is LT∥RT and the key is LK∥RK, where LC,RC, LT, and RT are each 4 bits, then ciphertext= LC||RC where LC=LK XOR RT; and RC =RKXORLT; Plaintext and ciphertext are each 8 bits. Similarly, to decrypt ciphertext, we perform exactly the reverse operation where LT=RC XOR RK and RT = LC XOR LK. You are given the following 16-bit input FFFF (in Hexa). You are provided IV as: A9 (Hexa). The 8-bit key to be used (where appropriate) is C5 (Hexa). Compute the encrypted output as 4 hexadecimal characters for each of the following: A.

User Quentamia
by
8.6k points

1 Answer

1 vote

Final answer:

To encrypt a 16-bit plaintext using the given 8-bit block size cipher, the procedure is carried out in two stages. The plaintext blocks are each combined with the previous encrypted block (or IV for the first block), split into halves, individually XORed with the key halves, and then concatenated to form the ciphertext block. The complete encryption output is A030.

Step-by-step explanation:

To encrypt the 16-bit plaintext FFFF with the given 8-bit block size system using an Initial Vector (IV) and key, we need to perform the encryption in two stages (since we have 16 bits and the block size is 8 bits). The given IV is A9, and the key is C5. We'll use Cipher Block Chaining (CBC) mode, where each plaintext block is XORed with the previous ciphertext block before being encrypted. For the first block, the IV is used as the previous ciphertext block.

First 8-bit block encryption:

  1. Split the first 8 bits of plaintext (FFFF) and the key (C5): Plaintext (PT) = FF, Key = C5.
  2. The initial vector (A9) is XORed with PT: A9 XOR FF = 56.
  3. Now split 56 into two 4-bit blocks: LT = 5 and RT = 6.
  4. The key C5 is split into LK = C and RK = 5.
  5. Calculate LC = LK XOR RT = C XOR 6 = A.
  6. Calculate RC = RK XOR LT = 5 XOR 5 = 0.
  7. The first encrypted block is LC||RC = A0.


Second 8-bit block encryption:

  1. Now take the second 8 bits of plaintext (FFFF): PT = FF.
  2. The first encrypted block (A0) is XORed with PT: A0 XOR FF = 5F.
  3. Split 5F into two 4-bit blocks: LT = 5 and RT = F.
  4. Use the same key C5: LK = C and RK = 5.
  5. Calculate LC = LK XOR RT = C XOR F = 3.
  6. Calculate RC = RK XOR LT = 5 XOR 5 = 0.
  7. The second encrypted block is LC||RC = 30.

The complete encrypted output as 4 hexadecimal characters is A030.