Module Code & Module Title CC5004NI Security in Computing
Module Code & Module Title CC5004NI Security in Computing
I confirm that I understand my coursework needs to be submitted online via Google Classroom under the
relevant module page before the deadline in order for my assignment to be accepted and marked. I am
fully aware that late submissions will be treated as non-submission and a marks of zero will be awarded.
Security in Computing CC5004NI
Question no 1
Elaborate the general properties of the Advanced Encryption Standard (AES) crypto
scheme.
Answer:
The Advanced Encryption Standard (AES) is a widely used symmetric encryption
algorithm that was first adopted by the U.S. government in 2002. It is based on the
Rijndael cipher, which was developed by Belgian cryptographers Vincent Rijmen and
Joan Daemen. Some general properties of the AES crypto scheme include:
1. Key size:
AES uses keys of 128, 192, or 256 bits, with a 128-bit key being the most
commonly used.
2. Block size:
AES operates on fixed-size blocks of data, with a block size of 128 bits.
3. Speed:
AES is designed to be very fast, both in terms of its encryption and decryption
times. It can be implemented efficiently in hardware and software.
4. Security:
AES has been analyzed extensively by cryptanalysts and is widely considered to
be very secure. No practical attacks against it have been found, and it is believed
to be secure against all known attacks.
ROJIN BIMB 1
Security in Computing CC5004NI
Question no 2
Explain the sub-key generation algorithm for the AES-128 crypto scheme.
Answer:
In the AES-128 encryption algorithm, sub-keys are derived from the main key using a
process called key expansion. The key expansion algorithm works as follows:
1. The main key is divided into four words (w0, w1, w2, and w3) of 32 bits each.
These four words form the initial state of the key schedule.
2. The key schedule consists of a series of rounds, with each round generating four
new words. In total, there are 44 rounds for AES-128.
3. At each round, the new words are generated by performing the following
operations:
• Rotating the third word (w3) to the left by one bit.
• Applying the S-box function to the fourth word (w4) to obtain a new value.
• XORing the result of the S-box function with the round constant (which is derived
from the round number) and the first word (w0).
• XORing the result with the second word (w1).
• XORing the result with the third word (w2).
• XORing the result with the fourth word (w3).
4. The four new words generated in each round are added to the key schedule. The
key schedule now consists of the initial state (w0, w1, w2, w3) plus the new
words generated in each round.
After all rounds have been completed, the key schedule consists of a total of 44 words.
These words are used as sub-keys in the encryption and decryption process.
ROJIN BIMB 2
Security in Computing CC5004NI
Question no 3
What is the use of RCON table during the sub-key formation?
Answer:
In the key expansion process for the AES encryption algorithm, the RCON (Round
Constant) table is used to generate a round constant for each round of sub-key
generation. The round constant is a value that is XORed with one of the words in the
key schedule to create a new word.
The RCON table consists of a series of values that are derived from the polynomial x^(i-
1) modulo m(x), where i is the round number and m(x) is a predetermined polynomial.
For example, in the case of AES-128, m(x) is equal to x^8 + x^4 + x^3 + x + 1.
The round constant is used to help ensure that the sub-keys generated in each round
are different from each other and from the main key. This helps to increase the security
of the AES encryption algorithm, as it makes it more difficult for an attacker to determine
the sub-keys and thus decrypt the ciphertext.
ROJIN BIMB 3
Security in Computing CC5004NI
Question no 4
Explain the use of input-arrays.
Answer:
In the Advanced Encryption Standard (AES) encryption algorithm, input-arrays are used
to hold the plaintext or ciphertext that is being processed by the algorithm.
There are two input-arrays in AES: the state array and the key array.
Overall, the input-arrays are an important part of the AES algorithm, as they hold the
data being processed and allow the algorithm to operate on it.
ROJIN BIMB 4
Security in Computing CC5004NI
Question no 5
Explain the use of state-arrays.
Answer:
In the Advanced Encryption Standard (AES) encryption algorithm, the state array is a
two-dimensional array that holds the plaintext or ciphertext being processed in the
current round of encryption or decryption. It consists of 4 rows and 4 columns, with each
element in the array being a byte (8 bits).
The state array is used in conjunction with the key array (which holds the key being
used for encryption or decryption) and a series of operations (such as XOR, shift, and
substitution) to transform the plaintext or ciphertext. The output of each round of
encryption or decryption is stored in the state array, which is then used as the input for
the next round.
Overall, the state array is an important part of the AES algorithm, as it holds the data
being processed and allows the algorithm to operate on it. It plays a central role in the
encryption and decryption process, and its contents are constantly being updated as the
algorithm progresses.
ROJIN BIMB 5
Security in Computing CC5004NI
Question no 6
Explain the use of output-arrays.
Answer:
In the Advanced Encryption Standard (AES) encryption algorithm, output-arrays are
used to hold the resulting ciphertext after the encryption process has been completed.
The state array is a two-dimensional array that holds the plaintext or ciphertext being
processed in the current round of encryption or decryption. It consists of 4 rows and 4
columns, with each element in the array being a byte (8 bits).
ROJIN BIMB 6
Security in Computing CC5004NI
Question no 7
What happens throughout the ByteSub step in AES-128?
Answer:
The ByteSub step in the AES-128 encryption algorithm is a substitution step that
operates on the bytes in the state array. It works by replacing each byte in the state
array with another byte according to a predetermined lookup table called the S-box.
The purpose of the ByteSub step is to add an extra layer of confusion to the encryption
process by replacing the original bytes with new, unrelated bytes. This helps to make it
more difficult for an attacker to determine the contents of the original plaintext based on
the ciphertext.
The S-box used in the ByteSub step is a fixed, precomputed table that consists of 256
entries. Each entry in the table corresponds to a byte value, and the table lists the
replacement byte that should be used for that value. The mapping from one byte to
another is designed to be difficult to reverse, making it harder for an attacker to
determine the original plaintext from the ciphertext.
During the ByteSub step, the encryption algorithm looks up each byte in the state array
in the S-box and replaces it with the corresponding value from the table. This process is
performed on all bytes in the state array, resulting in a new, transformed state array.
The transformed state array is then used as input for the next step in the encryption
process.
ROJIN BIMB 7
Security in Computing CC5004NI
Question no 8
Explain the processes involved in the Shift Rows step in AES-128.
Answer:
The Shift Rows step in the AES-128 encryption algorithm is a transformation step that
operates on the rows of the state array. Its purpose is to add an extra layer of confusion
to the encryption process by rearranging the bytes in the state array in a non-linear way.
1 5 9 13
2 6 10 14
3 7 11 15
4 8 12 16
Then the state array after the Shift Rows step would be:
1 5 9 13
6 10 14 2
11 15 3 7
16 4 8 12
As you can see, the rows of the state array have been rearranged in a non-linear way.
This helps to add an extra layer of confusion to the encryption process and makes it
more difficult for an attacker to determine the contents of the original plaintext based on
the ciphertext.
ROJIN BIMB 8
Security in Computing CC5004NI
Question no 9
Elaborate the involved ideas in the Mix Columns step in AES-128.
Answer:
The Mix Columns step in the AES-128 encryption algorithm is a transformation step that
operates on the columns of the state array. Its purpose is to mix the bytes in the state
array in a way that helps to add confusion to the encryption process and make it more
difficult for an attacker to determine the contents of the original plaintext based on the
ciphertext.
The Mix Columns step operates by performing a mathematical operation called matrix
multiplication on the columns of the state array. Specifically, it multiplies each column by
a fixed matrix called the MixColumns matrix. The result of the matrix multiplication is a
new, transformed state array.
The MixColumns matrix is a fixed, predefined matrix with the following values:
2311
1231
1123
3112
To perform the Mix Columns step, the encryption algorithm performs matrix
multiplication on each column of the state array as follows:
where s0, s1, s2, and s3 are the bytes in the column being transformed, and c0, c1, c2,
and c3 are the resulting bytes in the transformed column.
ROJIN BIMB 9
Security in Computing CC5004NI
The Mix Columns step helps to add an extra layer of confusion to the encryption
process by mixing the bytes in the state array in a non-linear way. It is performed after
the Shift Rows step in the encryption process, and the transformed state array is then
used as input for the Add Round Key step.
ROJIN BIMB 10