Computer Security Ch3cont
Computer Security Ch3cont
BURIE CAMPUS
DEPARTMENT OF COMPUTER SCIENCE
Computer Security
By:
Amare W.
1
2
Chapter 3: continued
It is extremely complex
4 01/27/2025
♥ AES encrypts and decrypts a data block size of 128 bits. Key
lengths can be 128 bits, 192 bits, or 256 bits;
♥ The algorithm is referred to as AES-128, AES-192, or AES-
256, depending on the key length.
♥ AES-128 uses 10 rounds, AES-192 uses 12 rounds, and AES-
256 uses 14 rounds.
♥ However, the round key, which are generated by the key
expansion algorithm are always 128 bits, the same size as
3/2/2018
♥ Note that the ordering of bytes within a matrix is by column. So, for
example, the first four bytes of a 128-bit plaintext input to the
encryption cipher occupy the first column of the in matrix, the second
four bytes occupy the second column, and so on.
♥ Similarly, the first four bytes of the expanded key, which form a
word, occupy the first column of the w matrix.
♥ The cipher consists of rounds, where the number of rounds depends
on the key length:
10 rounds for a 16-byte key,
12 rounds for a 24-byte key, and 3/2/2018
E
n
F c
i r
g y
u p
r t
e i
o
n
P
r
o
c
3/2/2018
e
s
s
10 01/27/2025
3/2/2018
...a15. The bytes and the bit ordering within bytes are derived from the 128-bit input
sequence:
input0 input1 input2 … input126 input127
as follows: a0 = {input0, input1, …, input7};
a1 = {input8, input9, …, input15};
3/2/2018
…
a15 = {input120, input121, …, input127}.
15 01/27/2025
iii. Words:
♥ A word is a group of 32 bits that can be treated as a single entity, a row matrix of 4
bytes, or a column matrix of 4 bytes.
iv. Blocks:
♥ AES encrypts and decrypts data blocks. A block in AES is a group of 128 bits.
However, a block can be represented as a row matrix of 16 bytes.
v. States:
♥ AES uses the term data block at the beginning and end of the cipher; before and after
each stage, the data block is referred to as state.
♥ AES algorithm’s operations are performed on a two-dimensional array of bytes called
the State.
3/2/2018
♥ The State consists of four rows of bytes, each containing Nb bytes, where Nb is the
block length divided by 32.
16 01/27/2025
♥ In the State array denoted by the symbol s, each individual byte has two indices, with
its row number r in the range 0 ≤ r < 4 and its column number c in the range 0 ≤ c <
Nb.
♥ This allows an individual byte of the State to be referred to as either sr,c or s[r,c]. For
♥ At the start of the Cipher and Inverse Cipher, the input, the array of bytes in0, in1, …
and at the end of the Cipher and Inverse Cipher, the State is
copied to the output array out as follows:
♥ The four bytes in each column of the State array form 32-bit
words, where the row number r provides an index for the four
bytes within each word.
♥ The state can hence be interpreted as a one-dimensional array of
32 bit words (columns), w0,...,w3, where the column number c
provides an index into this array.
♥ Hence, for the following example, the State can be considered as
an array of four words, as follows:
w0 = s0,0 s1,0 s2,0 s3,0 w2 = s0,2 s1,2 s2,2 s3,2 3/2/2018
….cont’d
Algorithm Specification
♥ For the AES algorithm, the length of the input block, the output
block and the State is 128 bits.
Key Length (Nk words) Block Size (Nb words) Number of Rounds (Nr)
AES-128 4 4 10 3/2/2018
AES-192 6 4 12
21 01/27/2025
swapped.
22 01/27/2025
3/2/2018
23 01/27/2025
3/2/2018
24 01/27/2025
A
A
E
E
S
S
E
D
N
E
C
C
R
R
Y
Y
P
P
T
T
I
I
O
O
N
N
3/2/2018
25 01/27/2025
5) Only the Add Round Key stage makes use of the key. For this
reason, the cipher begins and ends with an Add Round Key stage.
6) The Add Round Key stage by itself would not be formidable. The
other three stages together provide confusion, diffusion, and
nonlinearity, but by themselves would provide no security because
3/2/2018
For the Add Round Key stage, the inverse is achieved by XORing
the same round key to the block, using the result that A ⊕ B3/2/2018
⊕B = A.
27 01/27/2025
3/2/2018
♥ For both its Cipher and Inverse Cipher, the AES algorithm uses a
round function that is composed of four different byte-oriented
transformations:
1) byte substitution using a substitution table (S-box),
2) shifting rows of the State array by different offsets,
3) mixing the data within each column of the State array, and
4) adding a Round Key to the State.
3/2/2018
30 01/27/2025
Thank you