jasmine shafi farha, m.yamini, n.sandhya,m.puneeth · international journal of engineering,...

5
International Journal of Engineering, Management & Sciences (IJEMS) ISSN-2348 –3733, Volume-2, Issue-6, June 2015 17 www.alliedjournals.com Abstract— Now a days cryptanalyst’s are increasing day by day so in order to maintain privacy or secrecy for information, a security encryption algorithm is required in order to send the data confidentially, AES (Advanced Encryption Standard) is an algorithm that which replaced DES and 3DES because of their smaller block size, AES is having the larger block size, good security and efficiency so in our paper we are going to generate a structure with s-boxes, expanded key, encryption and decryption arrays of AES using Mat lab software Index Terms—decryption, encryption, key, DES, AES I. INTRODUCTION Advanced Encryption standard replaced the DES and 3DES, because of two reasons these are having 64 bit block size and the another one is 3 DES is having three times more rounds than DES, which is slower correspondingly so that for security and efficiency there should be a larger block size so that in order to rectify these drawbacks AES came into existence. Rijndael was a block cipher and it was developed by Joan Daemen and Vincent Rijmen[5] AES is a symmetric block cipher which is having the block size of 128 bits and the key length of 128,192 and 256 bits. AES is having the high computational efficiency so that AES can be used in broad band links and high speed applications.AES is flexible and suitable for different types of software and hardware applications.AES is designed in such a way that it has resistance over all the known attacks, simplicity design and compactness of code on different types of platforms. Providing security for data is an important factor for embedded appliances [2] II. ENCRYPTION AND DECRYPTION OF AES AES implementation can be done in the following way there are four steps in implementing the AES they are initial round, Rounds, final round, modifications [1].The key expansion will be done with the help of key schedule .The Manuscript received June 20, 2014. Jasmine Shafi Farha, Department of ECE, KLuniversity,Vaddeswaram, India M.Yamini, Department of ECE, KLuniversity, vaddeswaram, India N.Sandhya, Department of ECE, KLuniversity, vaddeswaram, India M.Puneeth, Department of ECE, KLuniversity, vaddeswaram, India initial round will contain only an Add round key. In case of Rounds step it consists of substitution bytes, shift rows, Mix columns and Add round key. The final round will perform the operations of substitution bytes, shift rows and add round key [6]. A 128 bit block is given as the input for the process of encryption and the process of decryption algorithm This 128 bit blocks are portrayed into square matrix of bytes, in state array this block is copied, at each stage of the encryption process and the decryption process this block is modified,into an output matrix state is copied after the final stage ,in the same manner the 128 bit key is portrayed as a bytes of square matrix the expansion of key takes place into an array which has schedule words of key each key word is having 4 bytes, for the 128 bit key the total key schedule is having 44 words Fig1: encryption and decryption of AES Ordering of bytes are noted in the matrix are by its column AES is having a non Feistal structure,one half of the data block is used for modification of the other half of the data AES Algorithm Using MATLAB Jasmine Shafi Farha, M.Yamini, N.Sandhya,M.Puneeth

Upload: lekien

Post on 17-May-2018

218 views

Category:

Documents


1 download

TRANSCRIPT

International Journal of Engineering, Management & Sciences (IJEMS)ISSN-2348 –3733, Volume-2, Issue-6, June 2015

17 www.alliedjournals.com

Abstract— Now a days cryptanalyst’s are increasing day by

day so in order to maintain privacy or secrecy for information, asecurity encryption algorithm is required in order to send thedata confidentially, AES (Advanced Encryption Standard) is analgorithm that which replaced DES and 3DES because of theirsmaller block size, AES is having the larger block size, goodsecurity and efficiency so in our paper we are going to generate astructure with s-boxes, expanded key, encryption anddecryption arrays of AES using Mat lab software

Index Terms—decryption, encryption, key, DES, AES

I. INTRODUCTION

Advanced Encryption standard replaced the DES and 3DES,because of two reasons these are having 64 bit block size andthe another one is 3 DES is having three times more roundsthan DES, which is slower correspondingly so that forsecurity and efficiency there should be a larger block size sothat in order to rectify these drawbacks AES came intoexistence.Rijndael was a block cipher and it was developed by JoanDaemen and Vincent Rijmen[5]AES is a symmetric block cipher which is having the block

size of 128 bits and the key length of 128,192 and 256 bits.AES is having the high computational efficiency so that AEScan be used in broad band links and high speedapplications.AES is flexible and suitable for different types ofsoftware and hardware applications.AES is designed in such away that it has resistance over all the known attacks,simplicity design and compactness of code on different typesof platforms. Providing security for data is an important factorfor embedded appliances [2]

II. ENCRYPTION AND DECRYPTION OF AES

AES implementation can be done in the following waythere are four steps in implementing the AES they are initialround, Rounds, final round, modifications [1].The keyexpansion will be done with the help of key schedule .The

Manuscript received June 20, 2014.Jasmine Shafi Farha, Department of ECE, KLuniversity,Vaddeswaram,IndiaM.Yamini, Department of ECE, KLuniversity, vaddeswaram, IndiaN.Sandhya, Department of ECE, KLuniversity, vaddeswaram, IndiaM.Puneeth, Department of ECE, KLuniversity, vaddeswaram, India

initial round will contain only an Add round key. In case ofRounds step it consists of substitution bytes, shift rows, Mixcolumns and Add round key. The final round will perform theoperations of substitution bytes, shift rows and add round key[6]. A 128 bit block is given as the input for the process ofencryption and the process of decryption algorithm This 128bit blocks are portrayed into square matrix of bytes, in statearray this block is copied, at each stage of the encryptionprocess and the decryption process this block is modified,intoan output matrix state is copied after the final stage ,in thesame manner the 128 bit key is portrayed as a bytes of squarematrix the expansion of key takes place into an array whichhas schedule words of key each key word is having 4 bytes,for the 128 bit key the total key schedule is having 44 words

Fig1: encryption and decryption of AES

Ordering of bytes are noted in the matrix are by its columnAES is having a non Feistal structure,one half of the datablock is used for modification of the other half of the data

AES Algorithm Using MATLABJasmine Shafi Farha, M.Yamini, N.Sandhya,M.Puneeth

AES algorithm using matlab

18 www.alliedjournals.com

block. Firstly government of US adopted this AES but nowthe whole world is using this Advanced Encryption Standard.The main principle of AES is Permutations and substitutionsand combining the substitution and permutation,AES worksvery faster in case of both hardware and software. The numberof keys used in AES are depended upon the number of cyclesused for 128 bit keys repetition of 10 cycles takes place ,for192 bit keys repetition of 12 cycles takes place, for 256 bits 14cycles of repetition takes place every round in AES hasseveral steps of processing.There are four different types of stages like substitution bytes,shift rows, Mix columns, Add Round key are used in AES

Fig 2: input state array and output, key and expanded key

A.Substitution bytes: For performing a byte to bytesubstitution an s-box is usedB.Shift rows: Shift rows is a simple type of permutationC.Mix columns: In mix columns the substitution uses anarithmetic of GF(8th power of 2)D.ADD round key: ADD round key is used as a XOR for thecurrent block by using an expanded key.This structure is very simple for the process of encryption anddecryption, the cipher starts by ADD round key ,the ninerounds that which has the four stages follows the Add roundkey

The AES encryption standard contains the AES encryptionround in which the process of encryption takes place, in thisprocess of encryption and in the process of decryption thereare different number of transformations, thesetransformations are consecutively applied at the data blocksThis encryption process contains a number of iterations thatwhich are fixed these are called as rounds, these number ofiterations or rounds are depended upon the key length for theprocess of encryption .10 iterations are required for keylength of 128 bits. The key will be used by only the ADDround key, the starting and the ending of the key will be takenplace at the ADD round key only. The expanded key will beused by the decryption algorithm the expanded key will beused in reverse order, at the final stage for the process ofencryption and for the process of decryption there are onlythree stages

Fig 3:AES Encryption Round

The key will be used by only the ADD round key, the startingand the ending of the key will be taken place at the ADDround key only. The expanded key will be used by thedecryption algorithm the expanded key will be used in reverseorder, at the final stage for the process of encryption and forthe process of decryption there are only three stages

III. SUBSTITUTION BYTES TRANSFORMATION

A. Forward and Inverse transformationIn the Forward substitution byte transformation, the bytes ofsubstitution that which are used for substitution, A matrix of16 X 16 bytes are defined by AES in a box that which is calledas S BOX

Rijndael S-BOX is nothing but a matrix that which is usedin AES and it is based on cryptographic algorithm of AES,thesubstitution box is served as a look up table

Rijndael algorithm has a very good flexibility for workingwith a key and size of block for that which it has any multiplesof 32 bit with the minimum number of bits of 128 bits andmaximum number of bits 256 bits [3]

A.Forward S-Box:The generation of S-Box takes place with the determining

multiplicative inverse of the number that which is givenGF(8th power of 2)= GF(2)[x]/(x8 + x4 + x3 + x + 1),Themapping of 0 will be done if the number is not inverse ,thetransformation of multiplicative inverse is done using theaffine transformation

The affine transformation is defined as the addition ofnumber of rotations on byte, the sum used here is the XOR

International Journal of Engineering, Management & Sciences (IJEMS)ISSN-2348 –3733, Volume-2, Issue-6, June 2015

19 www.alliedjournals.com

operationThe calculation of matrix multiplication can be done by usingthe following algorithm, the multiplicative inverse of twoinput numbers is stored in two 8-bit temporary variables a andb, the one bit value of a is rotated to the left, if the ‘a’ value ishigher bit of the one then make the low bit of one a, if not thelow bit value of a is zero,the value of ‘a’ should be XORedwith the ‘b’ so that the value will be stored in ‘a’the sameprocess will be repeated for two or three times now the finalresult will have a result that which is obtained by themultiplication,after the multiplication of matrix is completedthen the value will be XORed by the decimal number which is99 now a S-BOX with hexa decimal notation is obtained

Table 1: Sbox

B.Inverse S-BOXThe inverse S-Box can be defined as the inverse of the

S-Box, the calculation of inverse S-Box will take place by thecalculation of inverse affine transformation of an Input valuethat which is followed by multiplicative inverse

The representation of Rijndael's inverse S-box is asfollows

Table 2: Inverse Sbox

IV. SHIFT ROWS AND MIX COLUMNS

A.Shift rowsThe shift rows are used to operate on state of rows, the

bytes that which are present in each row are shifted by certainoffset. In case of AES there is no change in first row, the bytesthat which are present in the second row are shifted to the leftside, in the same manner the third and fourth rows are shiftedby using two, three offsets. In case of block sizes such as for128 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 byusing the shift rows technique the output of one column isconverted into the input state of another column

Fig 4:Shift Rows

B.Mix columnsIn case of Mix columns four bytes that which are present in

each column in a state are mixed with the help of invertiblelinear transformation. The function of mix columns will takeinput as four bytes and output as four bytes, each and everyinput byte will affect the all four output bytes that present, atthis time of operation each column will be transformed withthe help of fixed matrix. The mixed column layer is anoperational matrix layer in which a column of 4 byte isconsidered as a vector and then it is multiplied by a matrix of4X4 [4].

AES algorithm using matlab

20 www.alliedjournals.com

Fig 5:Mix columns

V. ADD ROUND KEY

In case of Add round key the combination of substitution keyand state takes place, for every round from the main keysubstitution byte will be derived with the help of Rijndael’skey schedule, substitution key and the state will have samesize, the substitution key will be added by the combination ofeach byte from the state with corresponding byte that which ispresent in the substitution key with the help of bitwise XOR

Fig 6: Add round key in AEs

VI. CONCLUSION

By using matlab software we have generated a structure withs-boxes, expanded key, encryption and decryption arrays ofAES

VII. RESULTS

Fig 7:S-Box creation in matlab

Fig 8: Inverse Sbox creation in matlab

Fig 9:R-Con creation in matlab

International Journal of Engineering, Management & Sciences (IJEMS)ISSN-2348 –3733, Volume-2, Issue-6, June 2015

21 www.alliedjournals.com

Fig 10: key expansion of AES inmatlab

Fig 11:Poly Mat creation of AES in matlab

REFERENCES

[1]. Minal Moharir1 and Dr A V Suresh ,“A Novel Approach UsingAdvanced Encryption Standard to Implement Hard Disk Security” Vol.4,No.1, January 2012, International Journal of Network Security & ItsApplications (IJNSA)[2]. Samir El Adib and Naoufal Raissouni, “AES Encryption AlgorithmHardware Implementation: Throughput and Area Comparison of 128, 192and 256-bits Key”, Vol. 1, No. 2, July 2012, “International Journal ofReconfigurable and Embedded Systems (IJRES)”[3]. Hamdan.O.Alanazi, B.B.Zaidan, A.A.Zaidn, Hamid A.Jalab, M.Shabbirand Y. Al-Nabhani, “New Comparative Study Between DES, 3DES andAES within Nine Factors” VOLUME 2, ISSUE 3, MARCH 2010,JOURNAL OF COMPUTING[4]. Amish Kumar, Mrs. Namita Tiwari, “EFFECTIVEIMPLEMENTATION AND AVALANCHE EFFECT OF AES”, Vol. 1, No3/4, August 2012, International Journal of Security, Privacy and TrustManagement (IJSPTM)

[5]. Chandra Prakash Dewangan, Shashikant Agrawal, “A Novel Approachto Improve Avalanche Effect of AES Algorithm”, Volume 1, Issue 8,October 2012[6]. O. Prasanthi, M. Subba Reddy, “Enhanced AES Algorithm”, volume2,issue 2,June 2012, International Journal of Computer Applications inEngineering Sciences

Jasmine Shafi Farha. Graduating B-tech in Electronics andcommunications at KLuniversity,published one journal on RSA andModified RSA using c programming ,member in IETE

M.Yamini. Graduating B-tech in Electronics and communications atKLuniversity, ,published one journal on RSA and Modified RSA using cprogramming member in IETE

N.Sandhya. Graduating B-tech in Electronics and communications atKLuniversity, ,published one journal on RSA and Modified RSA using cprogramming member in IETE

M.Puneeth Graduating B-tech in Electronics and communications atKLuniversity, published three International Journals on steganography usingmatlab ,Different types of aperture antennas using HFSS and RSA andModified RSA using c programming ,member in IETE