Professional Documents
Culture Documents
Design of A Modified Rijndael Algorithm
Design of A Modified Rijndael Algorithm
†Associate Professor, Department of Computer Sc. & Applications, Kurukshetra University, Kurukshetra, India
†† Assistant Professor, Dept. of Computer Sc. & Applications, NC Institute of Computer Sciences, Israna, Panipat India
Summary
Rijmen and Daemen had proposed Rijndael algorithm for In the original Rijndael algorithm, the plaintext blocks and
Advanced Encryption Standard (AES) in June 1998. It was keys can be arranged in variable sizes (16, 24 or 32 bytes).
accepted for commercial use due to its symmetric and parallel The logical view of the block structure is shown in Fig 1.
structure, well adapted to modern processors and its suitability to Unlike the DES, the AES algorithm has a highly
smart cards. Rijndael algorithm uses an iterated block cipher
with a variable block length and a variable key length. The block
mathematical structure. There are four steps (see fig. 2)
length and the key length can be independently specified to 128, involved in the algorithm, which perform specific
192 or 256 bits. We are proposing a modification which we transformations in the input plaintext. The algorithm can
rotate the bytes using 2 Dimensional rotation of the block after be used with three key lengths (independent of selected
Step 4, thereby increasing confusion-diffusion. The proposed block length): 128, 192, or 256 bits. It can consist of 10,
scheme will have improved complexity that increases the 12 or 14 rounds where each round consists of
security for a 128 and 256 bits block case without increase in the transformations as discussed below.
length of the key used.
Key words: Column
Exclusive OR (XOR), permutation, bytes, substitution, shift and Row 1 2 3 4
2D rotation operation, S-box
1 A B C D
2 E F G H
1. Introduction 3 I J K L
AES named as Advance Encryption Standard (AES), is 4 M N O P
based on the Rijmen and Daemen submitted Rijndael
algorithm in June 1998. Rijndael was announced to be Fig. 1 Initial plaintext/key block
the final selection for AES in October 2000. AES is an
iterative block cipher with a variable length and a variable Step 1: Byte Substitution
key length. It is based on some very simple operations
like Exclusive OR (XOR), bits shifts and permutations of
the columns [1 & 2]. The algorithm in its original form
Step 2: Shift Rows
contained four transformations in each rounds, namely, Repeat these four steps
Byte Substitution, Shift Row, Mix Columns, Add (XOR) 10, 12 or 14 times
Round Key. The last round does not use the Mix
Step 3: Mix Columns
Columns transformation. Chun Yen et. al. improved
Rijndael algorithm and constructed a new S-box. After the
improvement, iterative output cycle is 256, and algebraic
expression reached 254 items [3]. In this paper we Step 4: Round Key Addition
present a modification in Rijndael algorithm, by adding Fig. 2: Steps in Rijndael’s algorithm
one more round that increases the overall
confusion-diffusion of the bytes thereby increasing the 2.1 Byte Substitution
complexity which cryptanalysis of the algorithm. The
proposed transformations involve mathematical In this transformation, operation based on the secret S-box
opeartaions that are easy to implement in software level is applied to each byte separately. The inverse of the byte
especially by using MATLAB programming due to substitution are in the inverse table that has a mapping of
matrix-based structure of the algorithm. the inverses at the corresponding locations in the S-box.
2. Theoretical Consideration
Row 1 2 3 4
Column
1 A B C D
Row 4 3 2 1
2 E F G H
M = 1 P O N L
3 I J K L
2 L K J I
4 M N O P rROOM (rCOOM (M))=
3 H G F E
4 D C B A
Column
Row 1 2 3 4
Similarly, reversing the order of the columns of the 1 A B C D
Matrix M (as shown in Fig.5) is equivalent to a 180°
rotation. Hence a function rCOOM (M) operation can be 2 E F G H
M =
used in this case, 3 I J K L
4 M N O P
i.e. Rotation of 180° = rROOM (rCOOM (M)) (2)
Column
Row 1 2 3 4
1 A B C D
144 IJCSNS International Journal of Computer Science and Network Security, VOL.11 No.9, September 2011
Column
Table 4 Rotation Policy while Decryption (clockwise rotation)
Row 1 2 3 4
Key bit 2’s Complement+1 Rotation
1 A E I M
value (ignore carry) (Clockwise
M’= 2 B F J N direction)
3 C G K O 00 11+1=00 0°
01 10+1=11 270°
4 D H L P 10 01+1=10 180°
Column
11 00+1=01 90°
Row 1 2 3 4
4 D H L P 5. Key Usage
rROOM (M’)= 3 C G K O Naim Ajlouni et.al. had suggested a new approach in Key
2 B F J N Generation and Expansion in Rijndael Algorithm. Use of
random pool of keys has been suggested that simplifies the
1 A E I M process of generating and expanding cipher key for the
algorithm [5].
Fig. 6 270° Rotation of the 2D Array However, for this modified form, there is no need of
increasing the length of the key. The same old round key
4.3 Decryption Phase (Step 4 of the original AES algorithm) can be used to
generate two parity values. The column values of the
It is noteworthy that the operations during the decrypting round key can be added to produce the two bit parity code
phase can be carried out in two different manners. In the of the two bytes separately. These two bits can be used to
first approach, one may use the same bits but rotate the rotate the block as discussed in Section 4. Thus we have
elements in anti-clockwise direction at an angle that was introduced another step / transformation without
used while encryption (refer Table 3). But for this increasing the key length which is advantageous.
approach one has to define the decryption operations In case of a 4X4 block, the 2D Block rotation can be used
separately. as explained in the 2D Block Rotation Explained (Section
4). However, in case of a 4X8 block, one can consider it
Table 3 Rotation Policy while Decryption as a special case of two 4X4 blocks. The round key can
(anti-clockwise rotation case) be used in the same way for the two 4X4 sub-blocks.
Key bit value Rotation
(anti-Clockwise direction) 5.1 Backward Compatibility
00 0°
01 90° In order to provide backward compatibility in the modified
10 180° AES implementation, one can take two parity bits after
11 270° each round as ‘00’. Since ‘00’ represents a 0° rotation
during encryption and decryption phases, the modified
In the second approach, one may use in the algorithm will work as the original AES.
anti-clockwise direction. OR another alternative way is to
rotate the matrix in clock-wise direction but for some 5.2 Key Transfer
different angle as specified below:
As the parity bit sum is used to rotate the block cipher by
In this approach one needs to find the 2’s complement certain angle, the transfer of the key becomes very
of the key bit values of rotation and add 1 to it. During important. We confirm the use of our 3D Parity Bit
addition operation, carry in the 4’s place may be ignored. Structure for increasing error free rate of transfer of key
The rotations in clockwise direction using computed bits, bits [6].
is given in the Table 4 for the encryption process. It can
be easily verified that the rotations are obtained by adding
1 to the 2’s complement of rotation bits, ignoring last carry,
6. Implementation
for clockwise rotation functions only. Moreover, the The proposed design is complex to be implemented using
operations to be carried out in these cases are same as hardware only. We suggest the use of software based
discussed in above discussions. implementation, preferably in MATLAB due to intrinsic
IJCSNS International Journal of Computer Science and Network Security, VOL.11 No.9, September 2011 145