Ijreiss 3064 83559

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

International Journal of Research in Engineering, IT and Social Science, ISSN 2250-0588, Impact Factor:

6.565, Volume 09, Special Issue 1, May 2019, Page 104-109

IMPLEMENTATION OF AES ALGORITHM FOR


IOT APPLICATIONS
Dr.P.Rajasekar1, B.V.Padmavathi2 , I.Sai Harshitha3,G.Pavan kumar4
234
Student, Electronics and Communication Engineering, Narayana Engineering College Gudur
1
Professor, Electronics and Communication Engineering, Narayana Engineering College
Gudur

ABSTRACT:

Advanced Encryption Standard (AES) is used for securing data. There are several types of
algorithms available in cryptography, but AES is one among the standardized high security
algorithm. It is implemented in various hardware devices and various software languages. This
paper explores the implementation of AES in MATLAB. A MATLAB code is developed for
plaintext encryption and cipher text decryption. AES algorithm was known for providing the best
security without any limitations. But in recent days there are some methods are found by
cryptanalyst that can crack the AES algorithm. So we need some improvement in the AES
algorithm. In this paper we enhance the key (256-bit) by the advance method and algos by which
the key size of AES is look like the size of 512-bit. By enhancing the key size see that the more
improvement in security in the encrypted data which is provided by us for the communication
between the devices.

Keywords: Advanced Encryption Standard, symmetric key Encryption, cipher text and MATLAB,
internet, multimedia files.

I. INTRODUCTION: AES is already implemented in various


processors including microcontrollers [11]. Also,
With the advent of internet and multimedia files AES is implemented in many platforms like
many old encryption algorithms are finding new ASIC [9], FPGA [5], Embedded systems like
platform for their application. Rijndael algorithm Arduino, Raspberry Pi. This paper explores the
is adopted as Advanced Encryption Standard by implementation of AES in MATLAB. It uses a
NIST [1]. The AES algorithm uses a round high level language and useful to develop many
function that is composed of four different byte- applications such as video processing, control
oriented Layers. They are byte substitution, systems, signal processing and communications.
shifting rows, mix columns, add around key. In Therefore, development of AES in MATLAB
AES algorithm, the number of rounds to be will be useful for many applications which
performed during the execution of the algorithm required data protection. For example, encryption
is dependent on the key size. The number of of image will be very useful to ensure the
rounds is represented by Nr, where Nr=10 for 128 security.
bits, Nr= 12 for 192 bits and Nr= 14 for 256 bits.

http://indusedu.org Page 104


This work is licensed under a Creative Commons Attribution 4.0 International License
International Journal of Research in Engineering, IT and Social Science, ISSN 2250-0588, Impact Factor:
6.565, Volume 09, Special Issue 1, May 2019, Page 104-109

same size. AES requires a second input, which is


the secret key. AES uses three different key sizes:
128, 192 and 256 bits. For both its Cipher and
Inverse Cipher, the AES algorithm uses a round
function that is composed of four different byte-
oriented Layers: 1) Byte substitution using a
substitution table (Sbox) 2) Shifting rows of the
Fig1: Block diagram of AES State array by different offsets 3) Mixing the data
within each column of the State array 4) Adding
Plaintext: Plain text is add input Data by using
a Round Key to the State. AES algorithm uses
algorithm.
this round function for ten rounds, but the first
Encryption algorithm: The encryption algorithm and last round of AES algorithm is differing from
performs substitution and permutation values or other rounds. That is depicted in the figure
document or data on input text (Plain text). below.

Secret Key: The secret key is also input to the


encryption algorithm. The exact substitutions and
permutations performed depend on the key used,
and the algorithm will produce a different output
depending on the specific key being used at the
time.

Cipher text: This is the scrambled message


produced as output. It depends on the plaintext
and the key. The cipher text is an apparently
random stream of data, as it stands, is
unintelligible.

Decryption Algorithm: This is essentially the


encryption algorithm run in reverse. It takes the
cipher text and the secret key and produces the
original plaintext.

These cryptographic Algorithms are use for


protection of the user data so that only the
permitted user is allowed to access it and it is a
science of information security. Unlike DES, the
decryption algorithm differs from the encryption
algorithm.

II.AES algorithm

AES algorithm is a Block cipher and works on Fig2: encryption and decryption of AES
fixed-length group of bits, which are called
Blocks. It takes an input block of 128 bits, and In this AES algorithm, the number of rounds to
produces a corresponding output block of the be performed during the execution of the
http://indusedu.org Page 105
This work is licensed under a Creative Commons Attribution 4.0 International License
International Journal of Research in Engineering, IT and Social Science, ISSN 2250-0588, Impact Factor:
6.565, Volume 09, Special Issue 1, May 2019, Page 104-109

algorithm is dependent on the key size. The


number of rounds is represented by Nr, where
Nr=10 for 128bits, Nr= 12 for 192bits and Nr= 14
for 256bits. This structure is very simple for the
process of encryption and decryption, the cipher
starts by ADD round key, the nine rounds that
which has the four stages follows the Add round
key.

Fig4: AES Encryption Round

III.Working of the Proposed AES

There are many steps for Encryption. The steps


for the Encryption are given below.

 Byte substitution
The Sub Bytes transformation is a non-
Fig3: input state array and output, key and linear byte substitution, operating on
expanded key bytes independently. A non-linear
substitution step where each byte is
The AES encryption standard contains the AES
replaced with another according to a
encryption round in which the process of
table. The Sub Bytes is constructed by
encryption takes place, in this process of
the composition of the following
encryption and in the process of decryption there
transformations.
are different number of transformations, these
transformations are consecutively applied at the
data blocks This encryption process contains a
number of iterations that which are fixed these
are called as rounds, these number of iterations or
rounds are depended upon the key length for the
process of encryption .10 iterations are required
for key length of 128 bits. The key will be used
by only the ADD round key, the starting and the
ending of the key will be taken place at the ADD
round key only. The expanded key will be used
by the decryption algorithm the expanded key
will be used in reverse order, at the final stage for Fig5: Byte substitution
the process of encryption and for the process of
decryption there are only three stage.

http://indusedu.org Page 106


This work is licensed under a Creative Commons Attribution 4.0 International License
International Journal of Research in Engineering, IT and Social Science, ISSN 2250-0588, Impact Factor:
6.565, Volume 09, Special Issue 1, May 2019, Page 104-109

the help of invertible linear transformation. The


The Byte substitution table is shown function of mix columns will take input as four
below bytes and output as four bytes, each and every
input byte will affect the all four output bytes that
present, at this time of operation each column
will be transformed with the help of fixed matrix.
The mixed column layer is an operational matrix
layer in which a column of 4 byte is considered
as a vector and then it is multiplied by a matrix of
4X4 [4]

 Shift row

The shift rows are used to operate on state of


rows, the bytes that which are present in each row
are shifted by certain
Fig7: Mix columns
Offset. In case of AES there is no change in first
row, the bytes that which are present in the During this operation, each column is multiplied
second row are shifted to the left side, in the same by a fixed matrix which is shown below:
manner the third and fourth rows are shifted by
using two, three offsets. In case of block sizes
such as for 128 bits and for 192 bits the pattern of
the shifting is same, row r is circularly left shifted
by r-1 bytes, In this manner by using the shift
rows technique the output of one column is
converted into the input state of another column.

The matrix operation is perform in following


manner, Matrix multiplication is composed of
multiplication and addition of the entries, and
here the multiplication operation can be defined
as this: multiplication by 1 means no change,
Fig6: Shift rows multiplication by 2 means shifting to the left, and
multiplication by 3 means shifting to the left and
 Mix columns then performing XOR with the initial unshifted
value.
In case of Mix columns four bytes that which are
present in each column in a state are mixed with

http://indusedu.org Page 107


This work is licensed under a Creative Commons Attribution 4.0 International License
International Journal of Research in Engineering, IT and Social Science, ISSN 2250-0588, Impact Factor:
6.565, Volume 09, Special Issue 1, May 2019, Page 104-109

Plain text is as follows:


 Add Round Key
55 4F 56 3F 4E 3F 3D 3C 3A 4A 46 41
In case of Add round key the combination of 2A 49 4C 3B
substitution key and state takes place, for every
Key is as follows:
round from the main key substitution byte will be
1A 0C 24 F2 87 54 93 BC B7 0B 0E 43
derived with the help of Rijndael’s key schedule, 93 0C 53 0D
substitution key and the state will have same size,
the substitution key will be added by the The following are the outputs of each round by
combination of each byte from the state with giving desired plaintext and key as an input
corresponding byte that which is present in the
substitution key with the help of bitwise XOR. ROUND-0

4F 43 72 CD C9 6B AE 80 8D 42 48 02 B9
45 1F 36

ROUND-1

20 68 A3 9E CA D6 D6 63 50 31 91 99 57
93 3B 36

ROUND-2

Fig8: Add Round Key DF 1B 22 CB 1E A4 64 49 B0 DB F6 F9 BF


41 86 72

ROUND-3
IV Result Analysis:
07 16 0F 5B DB 27 EB DA CF 4E E6 EC D2
AES algorithm is implemented using the 4F 25 83
MATLAB
platform. Here image is taken as input, applying ROUND-4
the AES encryption algorithm creates a cipher
image and this cipher image is input to the E0 C7 54 C4 03 61 5B DD 88 8B 11 0E 5C
decryption algorithm which reconstructs the 54 CC 69
original image back. Result for cameraman image
is as shown below. ROUND-5

3D FF 2F 72 4E 81 22 62 8B BB 20 B8 0D
22 7A 9E

ROUND-6

B3 E3 E4 B4 1C 81 DB 10 0F 5F CC 29 4E
EC 87 6A

ROUND-7

91 35 AA 36 18 66 DB 75 29 21 53 5D C0
AC EB 69
http://indusedu.org Page 108
This work is licensed under a Creative Commons Attribution 4.0 International License
International Journal of Research in Engineering, IT and Social Science, ISSN 2250-0588, Impact Factor:
6.565, Volume 09, Special Issue 1, May 2019, Page 104-109

ROUND-8 REFERENCES:

86 FF C0 A5 84 6F 1F EB 72 E9 C5 45 30 [1] Manoj. B, Manjula N Harihar, International


C2 D7 2E Journal of Engineering and Advanced
Technology (IJEAT) ISSN: 2249 8958, Volume-
ROUND-9 1, Issue-5, June 2012.
[2] Kundankumar Rameswar Saraf, Vishal
5F 58 62 81 02 E6 54 C5 90 20 27 03 BB 58 Prakash Jagtap, Amit Kumar Mishra International
70 DF Journal of Emerging Trends and Technology in
Computer Science(IJETICS) ISSN: 2278 6856,
ROUND-10 Volume 3, Issue 3, May June 2014.
[3] Seyed Hossein Kamali, Reza Shakerian,
34 AA 73 73 1A 55 ED D9 21 E9 1B E6 8C maysam Hedayati, Mohsen Rahamani, ANew
AC DA E2 Modi_ed Version of Advanced Encryption
Standard (AES) based algorithm for image
ENCRYPTED IMAGE: encryption.
[4] B Subramanyan, Vivek M Chhabria, T G
Shankar babu, Image Encryption Based On AES
Key Expansion, 2011 Second International
Conference on Emerging Applications of
Information Technology.
[5] Komal D Patel, Sonal Belani, International
Journal of Emerging Technology and Advanced
Engineering ISSN: 2250 2459, Volume 1, Issue
1, November 2011.
[6] P.Karthigaikumar, Soumiya Rasheed, IJCA
Special Issue on Computational Science New
Dimensions and Perspectives, NCCSE, 2011.
[7] Think Python, Allen B. Downey, ISBN
CONCLUSION: 13:978-93-5023-863-9.
[8] Ahmed Bashir Abugharsa, Abd Samad Bin
In this paper, Image Encryption using AES Hasan Basari and Hamida Almangush a Novel
algorithm is implemented to secure the image Image Encryption using an Integration Technique
data from an unauthorized access. A Successful of Blocks Rotation based on the Magic
implementation of symmetric key AES algorithm Cube and the AES Algorithm International
is one of the best encryption standards available Journal of Computer Science Issues (IJCSI); Vol.
in market. With the help of MATLAB coding 9 Issue 4, p41 Jul2012.
implementation of an AES algorithm is [9] Ahmad Abusukhon Mohammad Talia A
synthesized and simulated for Image Encryption. Novel Network Security Algorithm Based on
The original images can also be completely Private Key Encryption IEEE International
reconstructed without any distortion. It has shown Conference on Cyber Security, Cyber Warfare
that the algorithms have extremely large security and Digital Forensic (CyberSec), 2012 .
key space and can withstand most common [10] Praveen.H.L, H.S Jayaramu, M.Z.Kurian
attacks such as the brute force attack, cipher Satellite Image Encryption Using AES
attacks and plaintext attacks. International Journal of Computer Science and
Electrical Engineering (IJCSEE), Vol-1, Iss-2,
2012.

http://indusedu.org Page 109


This work is licensed under a Creative Commons Attribution 4.0 International License

You might also like