# Understanding Cryptography by Christof Paar and Jan Pelzl - Chapter 4 Solutions - Ex4.9

- 3 mins- Return to index
- Exercise 4.1
- Exercise 4.2
- Exercise 4.3
- Exercise 4.4
- Exercise 4.5
- Exercise 4.6
- Exercise 4.7
- Exercise 4.8
- Exercise 4.9
- Exercise 4.10
- Exercise 4.11
- Exercise 4.12
- Exercise 4.13
- Exercise 4.14
- Exercise 4.15
- Exercise 4.16

## Exercise 4.9

We consider AES with 128-bit block length and 128-bit key length. What is the output of the first round of AES if the plaintext consists of 128 ones, and the first subkey also consists of 128 ones? You can write your final results in a rectangular array format if you wish.

*Note: It seems that the official solution for this question discounts the initial Key Addition that would have XORed the all-1s plaintext with the all-1s zeroth subkey. This would have given all-0s input to the S-boxes and completely changed the outcome. To stay in line with the solutions manual I’ll also be ignoring the inital Key Addition of .*

### Solution

*This solution is verified as correct by the official Solutions for Odd-Numbered Questions manual.*

We know that all the S-boxes are the same function, and that the input will the same in each case (). As such, using Table 4.3 from the book, the state array () produced by Byte Substitution is as follows:

ShiftRows can be discounted since all cells in the array are the same and therefore permutating them does not change anything.

Given that all the cells are the same, the MixColumn matrix multiplication can be expressed as follows for each column, since :

It’s worth noting that in , . As such, in this special case, the MixColumn operation will also not affect the state (since ).

All that remains now is to bitwise XOR the round key onto the state:

This is the state after the first round of encryption.