Modified Advanced Encryption Standard Algorithm for Information Security

: The wide acceptability of Advanced Encryption Standard (AES) as the most efficient of all of the symmetric cryptographic techniques has further opened it up to more attacks. Efforts that were aimed at securing information while using AES is still being undermined by the activities of attackers This has further necessitated the need for researchers to come up with ways of enhancing the strength of AES. This article presents an enhanced AES algorithm that was achieved by modifying its SubBytes and ShiftRows transformations. The SubBytes transformation is modified to be round key dependent, while the ShiftRows transformation is randomized. The rationale behind the modification is to make the two transformations round key dependent, so that a single bit change in the key will produce a significant change in the cipher text. The conventional and modified AES algorithms are both implemented and evaluated in terms avalanche effect and execution time. The modified AES algorithm achieved an avalanche effect of 57.81% as compared to 50.78 recorded with the conventional AES. However, with 16, 32, 64, and 128 plain text bytes, the modified AES recorded an execution time of 0.18, 0.31, 0.46, and 0.59 ms, respectively. This is slightly higher than the results obtained with the conventional AES. Though a slightly higher execution time in milliseconds was recorded with the modified AES, the improved encryption and decryption strength via the avalanche effects measured is a desirable feat.


Introduction
The advancement in Information and Communication Technology (ICT) has made internet one of the major mediums through which information is being shared in this 21st century. However, the confidentiality, integrity, and availability of information shared over public network still remains an open issue [1]. Information hiding techniques using watermarking and steganography as well as cryptography have been widely explored to ensure the security of information transmitted over an unsecured network. With emphasis on cryptography, information security is guaranteed by making a secret message unreadable to a third party, but accessible by the sender and recipient alone while using one or more secret keys. Cryptographic techniques could be symmetric-if the same key is used for encryption and decryption or asymmetric-if different keys are used for encryption and decryption [2]. Symmetric cryptographic techniques are the most appropriate when a large amount of data is to be secured [3]. Of the available symmetric cryptographic techniques, such as Data Encryption Standard (DES), Triple DES, and Advanced Encryption Standard (AES), AES is the most common and widely used [4]. However, several attacks that aimed at undermining the strength of AES algorithm have been reported in the literature. Differential fault analysis attacks that inject faults into AES structure with the aim of retrieving the secret information were reported in [5], while cache timing attack, which uses side channel information, such as power consumption statistics, timing information, and cache contents to infer the unknown key used in data encryption, was reported in [6]. Most recently, related-key differential attacks was reported in [7]. In this attack, the cryptanalyst queries the block ciphers with plaintext pairs to deduce the secret key that was used. Similarly, cipher strength analysis carried out by cipher analysts have revealed that with the current trend of increasing computational power, eight out of ten rounds of AES has been brute forced successfully and soonest the remaining two rounds may be broken [8]. This has called for the need to urgently explore techniques that could further strengthen the AES algorithm. Therefore, this article introduces an enhanced AES algorithm that was achieved by modifying its SubBytes and ShiftRows transformations. The rationale behind the modification is to make the two transformations round key dependent, so that a change to any bit of the key will result to a significant change in the cipher text. The rest of the paper is organized, as follows: Section 2 explained the existing AES algorithm, its structure, and various transformation stages. A review of recent works as regards AES modification was carried out in Section 3, while the proposed methodology was explained in details in Section 4. The result of the modified AES algorithm, its performance evaluation using avalanche effect, execution time is presented in Section 5. A comparative analysis of the modified AES with those that were obtained from existing works is also presented in Section 5. The study's conclusion is provided in Section 6.

Existing AES Algorithm
The AES algorithm is a symmetric key algorithm that was established as the standard for encrypting digital data by the US National Institute for Standard and Technology (NIST). It is an iterative round block cipher that works on 128bit plaintext using three different key lengths 128, 192, and 256 bits [9]. The key length determines the number of encryption and decryption rounds to be performed which could be 10, 12, and 14 rounds for 128, 192, and 256-bit key length, respectively. It is believed that the larger the key length, the higher the cryptographic strength [9]. The AES algorithm consists of four invertible transformations: SubBytes, ShiftRows MixColumns, and AddRoundKey, as shown in Figure 1. All of these transformations are performed in all the encryption rounds, except the final round, where the MixColumns transformation is omitted to make the encryption and decryption scheme symmetric, these transformations are described below: i) SubBytes Transformation: as shown in Figure 2, SubBytes transformation is the only non-linear and invertible byte transformation that replaces each byte of the input data block (D0, …, D15) by the row (first 4-bits) and column (second 4-bits) of a 16 × 16 Substitution Box (S-Box). The S-Box, as shown in Figure 3, has special mathematical properties that ensure that changes in individual state bits propagate quickly across the cipher text, which introduces confusion. Inverse substitution table (InvS-Box) is used during decryption to undo the effect of the SubBytes transformation.  ii) ShiftRows Transformation: This manipulates the rows of the state by using a certain offset to shift the bytes in each row, as shown in Figure 4. This is carried out to ensure that the columns of the state are not independently encrypted. During this operation, the first row remains unchanged, while one-byte, two-byte, and three-byte circular shift operation is performed on the second, third, and fourth rows, respectively. For the decryption process, the first row remains unchanged, while the other rows are shifted to the right based on the same offset used to shift them to the left during encryption process iii) MixColumns Transformation: This is a linear diffusion process that sees the columns of the state as coefficients of polynomial of order x 7 . It manipulates all the columns of the state by carrying out multiplication and addition operation on their bytes. Exclusive OR (XOR) is used for the addition operation while modulo ( ) = 8 + 4 3 + + 1 is used for the multiplication operation. As shown in Figure 5, each column of the state obtained from shiftrow transformation is multiplied by a mixing matrix to obtain the transformed matrix. With this manipulation, the initial setting of the cipher text is changed, such that no bytes look similar. Inverse MixColumns is used to undo this transformation during the decryption process. iv) AddRoundKey Transformation: This is the last transformation that will be done for each round. As shown in Figure 6, an addition operation between the bytes of the transformed state and the round key is carried out while using XOR.

Related Works
Several research efforts have been directed at improving AES algorithm. A modified version of AES that is specifically designed to handle the unique features of image encryption and decryption was proposed in [11]. MixColumns transformation in the conventional AES was replaced with bit permutation. The computed number of pixel change rate and the unified average change intensity revealed that the modified AES is more sensitive to differential attack. Authors in [12] made the various attacks that have been targeted at undermining the strength of AES known. Among these is fault injection attacks that could be used to reveal AES key. Therefore, they proposed randomizing the key generation process of AES as a way out. This led to a higher avalanche effect in the modified AES. Additionally, it was envisaged that an increase in the number of rounds of AES could make the algorithm more secured in [13]. The assumption was validated by increasing the rounds of AES from 10 to 16. The results obtained revealed that the modified AES requires a higher computational time when compared to the conventional AES. An attempt to reduce the complexity path of AES was made in [14]. The complexity observed was as a result of redundant logical functions in the MixColumn transformation of AES. These logical functions were eradicated in the modified version of AES. After evaluating the modified AES, a 13.6% reduction in LUTs, 10.93% slice reduction, and a 1.19% reduction in delay consumption were achieved. Similarly, the low diffusion rate encountered by the conventional AES at the early cipher and key schedule rounds was addressed in [15]. XOR operation was added between the SubBytes and ShiftRow transformation processes, while modulo addition was added between the ShiftRow and MixColumn operations. The avalanche effect measured achieved a 61.98% increase in diffusion for the round 1 and 14.79% and 13.87% increase in diffusion for round 2 and 3, respectively. Furthermore, the increase in computational speed of computing systems is a sign that AES algorithm could be broken. Therefore, the use of the system's Media Access Control (MAC) Address as an additional key to shuffle the substitution box and shift row stage of the conventional AES algorithm was proposed in [16]. They permuted the six-bytes MAC Address to produce two 4 × 4 matrices (W1 and W2). Each of the matrices was then XORed with the original key K to obtain 1 = 1 ⨁ and 2 = 2 ⨁ . Sortkey1 and Sortkey2 were then used as row and column respectively in the S-Box to substitute the state. Though, breaking the modified AES will be more complex than the conventional AES, a higher execution time was recorded with the modified AES. Authors in [16] were of the opinion that S-Box and Mix Columns are the most energy consuming stages in encryption and decryption processes of the AES algorithm. They therefore proposed a onedimensional S-Box construction aimed at reducing AES energy consumption. The S-Box was constructed from a formulated affine transformation equation in Galois Field (2 4 ). The proposed method proved to be more efficient than conventional AES with 18.35% efficiency rate when compared to conventional AES.
Additionally, the need to reduce the energy consumption of AES so as to make them suitable for smart devices was explored in [17]. A Lorenz attractor which coupled three nonlinear differential equation was employed to formulate a one-dimensional substitution box used by the modified AES. This yielded a low energy consuming AES was achieved with a better latency and packet transmission rate. Authors in [18] also observed that cryptanalysts have been exploiting the static nature of the contents of S-Boxes. Therefore, a dynamic S-Box was created from the exsting S-Box and round keys, such that, for roundi, the first byte of the round key ( is XORed with all of the bytes of the original S-Box, as shown in Equation (1): The dynamic S-Box was then used to perform sub byte operation for that round. Comparative analysis carried out revealed that the new technique out performed the original AES in terms of the avalanche effect though the execution time is doubled. Similarly, a modified AES algorithm that was obtained by increasing the key length and the number of rounds was introduced in [19]. They are of the opinion that an increase in the key length and number of rounds could further strengthen the AES algorithm. The key length was increased to 320 bits, while the number of rounds was increased to sixteen. The modification led to a higher execution time when compared to the original AES algorithm, but lesser than 3DES. Additionally, the authors in [20] observed that most AES attacks target the secret key used for the encryption and decryption. To this effect, the Genetic Algorithm (GA) was employed to generate a secret key to be used for encryption and decryption purposes. Using text and audio data for encryption, less encryption and decryption time was observed when compared to the conventional 128 bit AES algorithm. Similarly, Elliptic Curve Cryptography (ECC) was employed in [21] to generate irreversible random numbers used as AES secret keys. X and Y coordinates used for random number generation improved the entropy of the random numbers generated. Security analysis carried out showed that the proposed technique is extremely sensitive to key changes and is also resistive to certain attacks. Furthermore, a dynamic key and S-box generation approach to the conventional AES algorithm was introduced in [22]. The dynamic key was generated by using the system time function that randomly generates the secret key using the time recorded when the user logs into the system. In the same way, the initial S-Box was transformed into a dynamic one with the aid of the dynamic random key generated. In a similar manner, Pseudo-Noise (PN) sequence generator was employed in [23] to produce dynamic S-box values and initial secret keys needed for encryption and decryption. Since the initial secret keys were internally generated, the seed value is difficult to deduce by an attacker, therefore, the modified AES algorithm was impenetrable by brute force attack. The modified AES algorithm also yielded a high encryption quality, an avalanche effect of 60%, a throughput of 3.039 Gbps, and a latency of 10 clock cycles.

Proposed Methodology
This section presents the methodology adopted in this study in detail.

Modified SubBytes Transformation
AES SubBytes transformation was modified to make it round key dependent; this is to ensure that a change in the key is easily discovered in the cipher text. To achieve that, the 16 bytes round key was used to obtain four eight-bit keys 0 , 1 , 2 , 3 by XORing all the bytes of the corresponding row ( ) in the round key matrix, as shown in Equation (2). After obtaining the , each as shown in Equations (3)-(6) was then added to all of the bytes in the corresponding row ( ) of the state matrix before substituting the values in the S-Box. Mathematically, given the state S and a round key K, represented as a 4 × 4 matrices: Alternatively, The new state matrix, S′ was obtained while using Equation (7).
The operation can be seen clearly from the matrix below: The resultant state matrix S′ is given as follows: After obtaining the new state matrix S′, the bytes are then substituted in the substitution table (S-Box) using normal SubBytes operation, as shown in Equation (8): where j = 0 to 3 for every i = 0 to 3 (8)
During the inverse SubBytes operation, the substitution is done before XORing the state matrix with the using ′ , = [ ′ , ], where j = 0 to 3, for every i = 0 to 3 The matrix S′ is then obtained after the substitution as: Hence, the original state S is obtained by XORing the S′ matrix with the using Equation (15): , where j = 0 to 3, for each i from 0 to 3 The inverse SubBytes operation is shown in the matrix below: The resultant matrix S, which is the original state is obtained, as follows: S0,0 S0,1 S0,2 S0,3 S1,0 S1,1 S1,2 S1,3 S2,0 S2,1 S2,2 S2,3 S3,0 S3,1 S3,2 S3,3 The proof above shows that the SubBytes operation is invertible, since where j = 0 to 3, for each i from 0 to 3.

Modified ShiftRows Transformation
Modification to the ShiftRows operation was achieved by randomizing the entire operation. In the conventional AES algorithm, the ShiftRows operation depends on a fixed number, called the offset, which determines the number of byte position(s) each row of the state will be shifted. With this modification, the operation does not have to depend on the fixed offset, it now depends on a number, called the Rank Number (RNo), which is obtained by manipulating each row of the state matrix with the corresponding row of the round key matrix. The rows of the state are shifted based on the rank number obtained. To obtain the rank number using a state matrix S and a round key matrix K, the following steps were adopted: Step 1: Each row (Rowi) of the state matrix was added to the corresponding row in the round key matrix using XOR to obtain a 4-byte vector called State-Key (SKey) vector.
Step 2: The four-byte of the State-Key vector are then XORed together to obtain an 8-bit value called the Rank Value (RVal).
Step 3: The eight-bit Rank Value (RVali) is then stored in corresponding Rowi of the state matrix.
Step 4: Steps 1-3 will be repeated for the remaining rows Row1 to Row3 Step 5: Attach Rank Number (RNo) to the Rank Values obtained in Step 3 above for each of the rows of the state (Row0 to Row3) in ascending order with the minimum rank value having 1 as the rank number while the maximum rank value has 4 as the Rank Number.
Lastly, each row of the state is then shifted − 1 positions to the left. This means that the row with RNo = 1 is not shifted, the one with RNo = 2 is shifted one-byte position to the left, followed by the row with RNo = 3, which is shifted two-byte position to the left, and lastly, the row with the highest rank number, RNo = 4 is shifted three-byte position to the left. Table 1 displays the above statements.   From Table 2, based on the rank numbers that were obtained for each row, the corresponding row will have to shift one less than the RNo value of that row. Row 0 will not shift, Row 1 will have to shift two-byte position to the left, row 2 will have to shift three-byte position to the left, and finally row 3 will have to shift one-byte position to the left. After performing these ShiftRows operations on the above state while using the state and the round key matrices S and K, the state matrix obtained is given as S and S′ for state matrix before and after the modified ShiftRows operation, respectively: D8 95 A6

Modified Inverse ShiftRows Transformation
The rank number computation for the modified InvShiftRows operation remains the same as that of modified ShiftRows operation since the round keys are read in reverse order during decryption process. The only difference is the direction to which the rows of the state matrix are shifted. For the inverse, the rows are shifted to the right based on the rank number.

Evaluating the Performance of the Modified AES
The strength of a cryptographic algorithm can be determined by measuring its diffusion and confusion property while using the avalanche effect. The term avalanche effect was first used by Horst Feistel in his article titled "Cryptography and Computer Privacy" published in 1973. Later, the concept was identified as Shannon's property of confusion. The avalanche effect is used to measure the amount of randomness (non-linearity) of hash functions and cryptographic algorithm, especially block ciphers, such as Data Encryption Standard (DES) and Advance Encryption Standard (AES). The avalanche effect to some extent, tries to reflect the intuitive idea of high non-linearity. Meaning that, a small change in either the plaintext or the key (by flipping a single bit), propagates and significantly produces changes in the output (at least half the output bits [24]. Strict Avalanche Criterion (SAC) test of a cryptographic algorithm is conducted by comparing two encrypted texts before and after complementing some bits of the original plain text or encryption key. This is achieved by obtaining the Hamming Distance between the two encrypted text represented as vectors = ( 1 , 2 , 3 , … , ) and = ( 1 , 2 , 3 , … , ). x is generated before flipping any bit of the plain text or encryption key, while y is generated after randomly flipping one bit of the plain text or encryption key. The Hamming Distance should be, on average, 2 . This implies that SAC is satisfied if, whenever a single bit in the input is complemented, each of the output bit changes with at least 50% probability.  [25]. Given two vectors = ( 1 , 2 , 3 , … ) and ′ = ( ′ 1 , ′ 2 , ′ 3 , … ′ ), where b is a binary representation of the cipher text obtained before flipping a bit in the encryption key, and b' is the binary representation of the cipher text that is obtained after flipping a single bit in the encryption key. The resultant vector , which is the binary representation of the result obtained after adding b and b′ using exclusive OR (XOR) operation, represent the hamming distance vector. Avalanche effect could also be computed using Equation (27) such that: If a cryptographic algorithm does not exhibit a significant degree of avalanche effect (at least 50%), then that algorithm has poor randomization. Thus, cryptanalysts can make predictions about the input, only being given the output. This may be enough to partially or worst, completely break the algorithm. In addition to the avalanche effect, the time taken for encryption and decryption were also measured.

Results and Discussion
The modified AES and the conventional AES were evaluated in terms of the avalanche effect and execution time (encryption/decryption time). The avalanche effect is a desirable property of block ciphers that ensures a single bit flip in input text produces at least 50% change in the output text. Execution time refers to the time taken by the algorithm to encrypt or decrypt a given input text.

Measuring the Avalanche Effect
The avalanche effect of the modified AES was carried out while using a short plain text and a 0.5 MB text file. The text file was encrypted with two different keys: key1 (original key) and key2 (obtained by flipping single bit (112th bit) of key1 from 0 to 1).

Avalanche Effect with a Short Plain Text File
A short plain text: I Love Unilorin! with hexadecimal values: 49 20 4C 6F 76 65 20 55 6E 69 6C 6F 72 69 6E 21 was first used to measure the avalanche effect of the modified and conventional AES. The plain text was encrypted with two different keys: key1 (original key) and key2 (obtained by flipping single bit (112th bit) of key1 from 0 to 1). Based on the computed results in Table 3, the modified AES achieved higher avalanche effect as compared to the conventional AES algorithm. The conventional AES achieved an avalanche effect of 50.7812%, while that of the Modified AES is 57.8125%. This means that, more than 57% of the bits that made up the cipher text changes after encryption by flipping just a single bit (112th bit) in the secret key while using the Modified AES as compared to less than 51% changes when the conventional AES was used.  Table 4 presents the avalanche effect that was obtained after flipping a single bit in the plain text. From the result, the modified AES achieved an avalanche effect of 56.25% when compared to 49.21875% achieved by the conventional AES algorithm. This signifies that, more than 56% of the bits that made up the cipher text changes after encryption by flipping just a single bit (88th bit) in the plain text while using the Modified AES as compared to less than 50% changes when the conventional AES was used. In addition to the short plain text file, a 0.5 mb text file was also used to measure the avalanche effect of the modified AES. As documented in Table 5, the conventional AES achieved an avalanche effect of 49.973%, while that of the Modified AES is 56.3625%. This means that more than 56% of the bits that made up the cipher text changed after encryption when the 112th bit in the secret key was flipped. This showed that the modified AES achieved a higher avalanche effect when compared to the conventional AES algorithm.  Table 6 presents the avalanche effect test result that was obtained after flipping a single it in the plain text. From the result, the modified AES achieved an avalanche effect of 55.735% as compared to 50.4715% achieved by the conventional AES algorithm. This signifies that more than 55% of the bits that made up the cipher text changes after encryption by randomly flipping just a single bit (3751st bit) in the plain text while using the Modified AES as compared to 50.4% changes when the conventional AES was used.

Measuring the Execution Time
The execution time is a function of the time that is taken to convert a plain text to a cipher text (encryption time) and the time that is needed to convert the cipher text back to the plain text (decryption time). The encryption time and decryption time is expected to be small in order to have a responsive and fast system. Furthermore, the execution time depends to some extent on the configuration of the system used. Therefore, the execution time reported was carried out on a laptop with the following configuration: i) 4.00 GB Random Access Memory (RAM). ii) 500 GB Hard Disk Drive (HDD). iii) Intel(R) Core i3 Processor clocking @ 2.27 GHz Dual Core. iv) A 64 bit Microsoft Windows 10 Pro Operating System. Table 7 presents the execution time test results in milliseconds (ms), which was obtained by computing the average encryption/decryption time after encrypting/decrypting the same input text while using the same key five times. The above result indicates that the modified AES has a slight increase in the encryption and decryption time when compared to the conventional AES algorithm.

Comparative Analysis of Computed Results with Existing Works
A comparative analysis of the results that were obtained with those presented in existing works was carried out. This was a little bit of tasking, as there is no standard performance metrics that are widely and generally acceptable by all researchers in this regard. While some measured the performance of their modified AES version using text files of different sizes, some used images and video files. However, most authors employed execution time as their performance metrics while few used avalanche effect. As presented in Table 8, the proposed technique recorded a slightly higher execution time in seconds than the conventional AES. Though this may not be clearly noticeable in real life application, yet it is significant.  Table 9 presents a comparison of the avalanche effect of the modified AES with those that are available in existing literature. Few researchers have employed the avalanche effect to measure the performance of their algorithms. Therefore, it is recommended that more researchers should use it, as it is a desirable property of encryption algorithms. The proposed technique achieved a higher avalanche effect when compared to the Conventional AES. The difference obtained is higher than that obtained in [32,34].

Conclusions
The proposed method attempts to strengthen the conventional AES algorithm by making the SubBytes transformation round key dependent and randomizing the ShiftRows transformation. This is to ensure that a single bit change in either the key or the plain text produces significant changes in the cipher text, thereby increasing its avalanche effect. The modified algorithm is evaluated in terms of avalanche effect and execution time and the results that were obtained revealed that the modified AES achieved a higher avalanche effect with a slight increase in the execution time. The high avalanche effect recorded, as further shown that the conventional AES can still be strengthened and it is recommended that more researchers should use the avalanche effect as a performance evaluation metric.
Author Contributions: For research articles with several authors, a short paragraph specifying their individual contributions must be provided. The following statements should be used "conceptualization,