6Vol53No2 PDF
6Vol53No2 PDF
6Vol53No2 PDF
th
20 July 2013. Vol. 53 No.2
2005 - 2013 JATIT & LLS. All rights reserved.
4
khamlich.salah@gmail.com
ABSTRACT
In this paper we propose and we show a new approach of nonlinear transformation algorithm for AES
SBox to enhance the complexity of the SBox structure,we making AES stronger by using Dynamic
Sbox,with look up table Sbox and Key expansion as modified when we change the initial key, that
effectively providing a high resistance against differential cryptanalysis and especially the linear
cryptanalysis. The structure of the AES S-box has been expanded and modified to be accordance with the
proposed algorithm and to obtain good nonlinearity of the Sbox. This has been done without changing the
basic operations of AES.The proposed modifications of the Advanced Encryption and a modified Sbox are
implemented in Cyclone II Dvice by using VHDL language.
Keywords: AES, Dynamic S-box, Master key, FPGA, Vhdl.
196
Journal of Theoretical and Applied Information Technology
th
20 July 2013. Vol. 53 No.2
2005 - 2013 JATIT & LLS. All rights reserved.
special rules according GF (28) (or Galois field Table 1: Look Up Table Of S-BOX.
finite field). Linear transformation ensures better
diffusion (spread of bits in the structure) over 63 7c 77 7b f2 6b 6f c5 30 01 67 2b fe d7 ab 76
several turns.Finally, an XOR between the matrix ca 82 c9 7d fa 59 47 f0 ad d4 a2 af 9c a4 72 c0
and other matrix allows to obtain an intermediate
b7 fd 93 26 36 3f f7 cc 34 a5 e5 f1 71 d8 31 15
matrix. These operations are repeated several
times and define a "turn." For a 128, 192 or 256, 04 c7 23 c3 18 96 05 9a 07 12 80 e2 eb 27 b2 75
AES requires respectively 10, 12 or 14 rounds. 09 83 2c 1a 1b 6e 5a a0 52 3b d6 b3 29 e3 2f 84
53 d1 00 ed 20 fc b1 5b 6a cb be 39 4a 4c 58 cf
The following diagram describes briefly the d0 ef aa fb 43 4d 33 85 45 f9 02 7f 50 3c 9f a8
progress of encryption Fig 1: 51 a3 40 8f 92 9d 38 f5 bc b6 da 21 10 ff f3 d2
cd 0c 13 ec 5f 97 44 17 c4 a7 7e 3d 64 5d 19 73
60 81 4f dc 22 2a 90 88 46 ee b8 14 de 5e 0b db
e0 32 3a 0a 49 06 24 5c c2 d3 ac 62 91 95 e4 79
e7 c8 37 6d 8d d5 4e a9 6c 56 f4 ea 65 7a ae 08
ba 78 25 2e 1c a6 b4 c6 e8 dd 74 1f 4b bd 8b 8a
70 3e b5 66 48 03 f6 0e 61 35 57 b9 86 c1 1d 9e
e1 f8 98 11 69 d9 8e 94 9b 1e 87 e9 ce 55 28 df
8c a1 89 0d bf e6 42 68 41 99 2d 0f b0 54 bb 16
Three main criteria have been met in its design: Figure 3: Structure Of The Shiftrows
-Resistance against all known attacks.
-Speed code on the widest variety of platforms MIX_COL is a function which converts each
possible. input byte into a linear combination of input bytes
-Simplicity in design. and can be mathematically expressed by a product
Rijndael (1998) was strongly influenced by his marticiel on the Galois field (28) [15].
predecessor, Square algorithm (1997).Crypton and
Twofish algorithms also use transactions Square.
Rijndael is pronounced "Raindal".
197
Journal of Theoretical and Applied Information Technology
th
20 July 2013. Vol. 53 No.2
2005 - 2013 JATIT & LLS. All rights reserved.
The Add RoundKey operation is a simple bit by first column of the i-th key in the second column of
bit XOR operation between the data and the the first key-i.
roundkey (by using initial key or Key
expansion).
The circled means exclusive OR operation
(XOR).
K i is the ith subkey calculated by an algorithm from
the master key K.
Figure 9:XOR-Ing Between Modified Row And Second
Key Expansion operation: The algorithm for Row Of Master Key
generating the 10 turns of the round key is as
follows: The fourth column of the i-1 key is rotated This iteration continues for the other two columns
such that each element is moved one row. to generate the key to ith.
198
Journal of Theoretical and Applied Information Technology
th
20 July 2013. Vol. 53 No.2
2005 - 2013 JATIT & LLS. All rights reserved.
output data), the dynamic criteria (Dynamic A recalculation inverse S-BOX is used to decrypt
independence between the data input and output, the plaintext.
the independence between dynamic the input and
output of data, dynamic independence between the By using the above described method 256
output and output data), specific criteria (Entire S- substitution matrices have been obtained. One of
BOX and non-contradiction). These criteria are them SBOXAES 0hex is equal to original SBOX
defined and described in detail in [9], [14], [23]. suggered in AES core. Some of them are depicted
Requirements defined so that each S-BOX must in Table 1 and Table 2 , respectively, SBOX
meet are determined by the need to be stable computed by XOR with byte equal to 24hex and 6F
algorithm for linear cryptanalysis and differential at hex.
a time.
Table 2: SBOX 24 (S-BOX 24 hex ).
Therefore, to meet the requirements set forth above,
new substitution matrices must be found, which
should be applied in the algorithm parameters or
47 58 53 5F D6 4F 4B E1 14 25 43 0F DA F3 8F 52
function key values and at the same time, these S-
boxes must have characteristics same or higher EE A6 ED 59 DE 7D 63 D4 89 F0 86 8B B8 80 56 E4
20 E3 07 E7 3C B2 21 BE 23 36 A4 C6 CF 03 96 51
4. PROPOSITION FOR GENERATING 2D A7 08 3E 3F 4A 7E 84 76 1F F2 97 0D C7 0B A0
NEW S-BOX DEPENDING OF MASTER
77 F5 24 C9 04 D8 95 7F 4E EF 9A 1D 6E 68 7C EB
KEY
F4 CB 8E DF 67 69 17 A1 61 DD 26 5B 74 18 BB 8C
9E 5C 01 0A 38 82 90 E2 CC F9 50 3B 6F 99 AF AE
SBOXxor[x,y]=SBOXAES[x,y] Key[i]; 6B A8 4C AC 77 F9 6A F5 68 7D EF 8D 84 48 DD 1A
A substitution matrix newly calculated is used 66 EC 43 75 74 01 35 CF 3D 54 B9 DC 46 8C 40 EB
for plaintext encryption. 3C BE 6F 82 4F 93 DE 34 05 A4 D1 56 25 23 37 A0
BF 80 C5 94 2C 22 5C EA 2A 96 6D 10 3F 53 F0 C7
Decryption process will the following approach
3E CC 2F E0 FD F2 57 9A D3 D9 B5 4E 7F 90 9C BD
is used:
A2 63 7C 83 30 F8 2B 78 AB C8 11 52 0B 32 76 1C
199
Journal of Theoretical and Applied Information Technology
th
20 July 2013. Vol. 53 No.2
2005 - 2013 JATIT & LLS. All rights reserved.
Note: in the table 1 we considered 24 hex first one generated will used for finding a value that is used
byte on master key, and same idea for 6F hex . to rotate the S-box.
The same round keys are used for AddRoundKey
4.1 New algorithm using the SBOX depending stage as well. Suppose for a particular round j, if
on the AES key the round key value is :
Now, with Sbox dependent initial key, AES will be X"6172726167736C696D616E5F6D697469".
much stronger. [24] We now present how the
property above of Sbox can be used to master the Here XOR operation of all the bytes is taken.
function key by using one of the two cases (we can
also use other cases) depending on the level of the 35(Hex)=6172726167736C696D6
security requirement. In case the demand moderate 16E5F6D697469.
level of security Case 1 can be used. For more high
security requirements case 2 may be adopted. The resulting byte value 35(Hex) is used to XOR-
ing the Sbox (change the sbox by using XOR
operation between each byte of fixe Sbox(showing
in Table 1) and the 35 (hex) ). The resulting Sbox is
used during the Sub Bytes operation.
Encryption:
200
Journal of Theoretical and Applied Information Technology
th
20 July 2013. Vol. 53 No.2
2005 - 2013 JATIT & LLS. All rights reserved.
Number of For key length same Table 5 : I/O functional descriptions of proposed and
Rounds 128-bit. modified AES-128.
10 Rounds
Composed of 4 Composed of 4
transformations, transformations,
namely: namely:
Function
Rounf Function Pin name I/O
-ByteSub using -ByteSub using description
SBOX SBOXxor key I System
CLK
-Shift Row -Shift Row frequency
-Mix Column -Mix Column Rst I System reset
-AddRoundKey. -AddRoundKey. Plaintext bits
(for
For last round For last round Encryption)
Mix Column is Mix Column is Donner
I Encryption
eliminated eliminated bits (for
SBOX Fixed initial Key Decryption)
Dependent Key for
Key Expansion Use the master Use the master I Encryption
key and static key and Clef
or
SBOX Dynamic decryption
SBOXxor key Encryption
bits (for
Encryption)
Sortie
5. IMPLEMENTATION OF MODIFIED O Plaintext bits
(for
PIPELINED AES IN FPGA
Decryption)
Implementation uses the VHDL
programming language that nowadays is commonly Table 6: Comparative Table Between Different
a language used very established for FPGA [16]. implementation constitute AES algorithm
The drawing & the software of the simulation is
Quartus II v9.1.
201
Journal of Theoretical and Applied Information Technology
th
20 July 2013. Vol. 53 No.2
2005 - 2013 JATIT & LLS. All rights reserved.
7. CONCLUSION
The first conclusion, in this paper new
substitution matrices have been developed by XOR
with byte key and chosen from existing AES S-
BOX. These matrices were tested with simulation
Figure 14 : Compile The Circuit software developed by Quartus II V.9.1. Analysis of
the results shows that the characteristics of the new
256 S-BOX are identical, based on which the
conclusion was reached that it is possible to use
202
Journal of Theoretical and Applied Information Technology
th
20 July 2013. Vol. 53 No.2
2005 - 2013 JATIT & LLS. All rights reserved.
each for encryption. It will not lead to a [5] Olivier Frider ETR6 Advanced Encryption
deterioration of the stability of the AES linear System , cole dingnieurs du Canton de
cryptanalysis and differential. An algorithm for the Vaud, Mai 2004.
use of these matrices is proposed, as it is based on a [6] Ashwini M. D, Mangesh S. D and Devendra N.
preselected byte of the key used, and depending on K ,FPGA Implementation of AES Encryption
the result in XOR operation, one of the S-BOX 256 and Decryption, Proceeding of International
is selected. Conference On Control, Automation,
Second conclusion, we find the changes Communication And Energy Conservation -
proposed (Sbox dependent of initial key) in our 2009.
paper although consumes little extra time and more [7] Daemen J. and Rijmen V., Rijndael: The
logic elements, but can be implemented without Advanced Encryption Standard. Dr. Dobbs
changing the block size keys ( 128, 192 or 256). Journal, March 2001.
Even if the original AES algorithm is very secure, [8] NIST, DRAFT NIST Special Publication 800-
These proposed changes in the treatment of the 131, Recommendation for the Transitioning of
algorithm will encrypt the information by Cryptographic Algorithms and Key Sizes,
performing high diffusion and confusion. It also Federal Information Processing Standards
increases the complexity of the AES algorithm Publication (FIPS PUB) 197, National Institute
several times,so AES will be much stronger. of Standards and Technology (NIST), January,
2010.
8. POSSIBLE FUTURE WORK [9] Nikolai Stoianov, AES S-BOX generator:
analysis of requirements, International Science
From our perspective is to do: Conference 2009 Communication and
information systems, Shoumen, Bulgaria,2010.
Implementation and simulation the other optimize
structure and description based on that same [10] Qin H., Nonmember, SASAO T. and IGUCHI
principle of AES algorithm to encrypt and decrypt Y.,Members ,A Design of AES Encryption
data such as images and sounds. Circuit with 128 bit keys using Look-UP Table
Study of FPGA components and choosing the Ring on FPGA,IEICE TRANS. INF. &
most suitable architectures for the implementation SYST.,VOL.E89-D,NO.3 MARCH 2006.
of encryption algorithms. [11] Rahman T., Pan S. and Zhang Q., Design of a
A combination between the AES algorithm and High Throughput 128-bit (Rijndael Block
genetic algorithm to increase the security. Cipher), Proceeding of International
Implementation of the AES pipeline architecture Multiconferrence of Engineers and computer
to optimize the encryption and decryption time and scientists 2010 Vol II IMECS 2010, March 17-
number of clock cycles. 19,2010, Hongkong.
New instructions ensure a faster and more [12] Hodjat A. and Varbauwhede I.,A 21.54 Gbits
affordable encryption of data, as well as better Fully Pipelined AES Processor on FPGA,
security. IEEE Symposim on Field-Programmable
Custom Computing Machines,April 2004.
REFRENCES: [13] Jarvinen et al, A fully pipelined memoryless
17.8 Gbps AES-128 encrypter,International
Symposium on Field Programmable Gate
[1] NIST, Advanced Encryption Standard (AES),
arrays,pp.207-215.2003.
Springfield,VA, Nov. 2001
[14] INDECT Consortium, D8.2: Evaluation of
[2] Simon Singh : Histoire des codes secrets. De
Components, June, 2010, http://www.indect-
lEgypte des pharaons lordinateur quantique.
project.eu/files/deliverables/public/deliverable
Paru chez J.-C. Latts, Paris, 1999.
8.2.
[3] Stallings W. Cryptography and Network
[15] Rijndael mix column, available at:
Security: Principles and Practices.4th ed.
Pearson Education, Inc. pp. 63-173. 2006. http://en.wikipedia.org/wiki/Rijndael_mix_col
umns
[4] Bhupathi Kakarlapudi and Nitin Alabur, FPGA
Implementations of S-box vs. T-box iterative [16] Mroczkowski P., Implementation of the block
architectures of AES. cipher Rijndael using Altera FPGA, May 2000.
[17] Eli Biham and Nathan Keller, Cryptanalysis of
Reduced Variants of Rijndael, In Proceedings
203
Journal of Theoretical and Applied Information Technology
th
20 July 2013. Vol. 53 No.2
2005 - 2013 JATIT & LLS. All rights reserved.
204