p577-acharya[1]

Upload: kamlesh-gupta

Post on 08-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 p577-acharya[1]

    1/5

    Image Encryption Using a New Chaos Based EncryptionAlgorithm

    Anuja Kumar Acharya

    School of Computer EngineeringKIIT University

    Bhubaneswar, Odisha, [email protected]

    ABSTRACT

    Encryption is a process of converting an image from readable tounreadable form. Various Image encryption algorithm based onpermutation and diffusion have been proposed However, most ofthe algorithm for the permutation process uses the chaos sequenceto permute the image and considerably takes more time in shuf-fling the position of the image pixel. In this paper we proposed anew effective algorithm based on permutation-diffusion for image

    encryption to reduce the processing time of the encryption con-siderably. To make the encryption more stronger and confused,same image is fed to the diffusion process after permutation pro-cess. In the present work diffusion process is carried out with thetraditional AES algorithm. Theoretical analyses and computer sim-ulations both confirm that the new algorithm has high security andis very fast for practical image encryption

    Categories and Subject Descriptors

    E.3 [Data Encryption]: Code breaking

    General Terms

    Algorithms,Theory.

    Keywords

    Image encryption, Chaotic system, Confusion, Diffusion.

    1. INTRODUCTIONThe rapid growth of computer networks allowed large files, such

    as digital images, to be easily transmitted over the internet [1]. Se-curity has been the major issue to protect the data from the unautho-rized access. Various image encryption algorithms are developedfor encrypting the image. There are various image encryption sys-tems to encrypt and decrypt data, and there is no single encryptionalgorithm satisfies the different image types. There are two ma-jor groups of image encryption algorithms: (a) non-chaos selectivemethods and (b) Chaos-based selective or non-selective methods.

    An image can be encrypted by permutation of the gray value of

    Permission to make digital or hard copies of all or part of this work forpersonal or classroom use is granted without fee provided that copies arenot made or distributed for profit or commercial advantage and that copiesbear this notice and the full citation on the first page. To copy otherwise, torepublish, to post on servers or to redistribute to lists, requires prior specificpermission and/or a fee.ICCCS11 February 12-14, 2011, Rourkela, Odisha, IndiaCopyright 2011 ACM 978-1-4503-0464-1/11/02 ...$10.00.

    Figure 1: Proposed Model with Confusion-Diffusion process

    the pixel. In the present paper we have consider the combinationprocess of permutation and diffusion for the image encryption

    A general permutation-diffusion architecture for chaos-based im-age encryption was employed in Refs. [2, 3, 7, 14] as illustrated inFig. 1. In the permutation stage, the image pixels are relocatedbut their values remain unchanged. In the diffusion stage, the pixelvalues are modified so that a tiny change in one-pixel spreads outto as many pixels as possible.

    In this paper we proposed a new encryption/decryption algorithmbased on the combination of permutation and diffusion process. Anewly integer pseudo random sequence is generated from the chaossequence by keeping the index position of their sorted value. On thebasis of this sequence the permutation process of the pixel is carriedout. The image is further fed to the AES algorithm to complete thediffusion process. Diffusion process is required to make the imagemore confused to the intruder. This process considerably reducethe encryption time. From the fig.1. Its clear that diffusion processfollows the permutation for encrypting the image. The number ofround can be varied from 1 to 16 in accordance to the security re-quirement.

    With the help of logistic map a chaotic sequence is generatedand then arranged those number in an ascending order and mark

    the shuffl

    ed position of the index. Next we map the pixel of theoriginal image on this generated matrix.

    1.1 Pseudorandom sequences generated fromchaos

    Chaotic dynamical systems are nonlinear dynamic behavior, theyare pseudorandom, sensitivity to the initialize conditions and gen-erate highly complicated signals by a simple recursive procedure.Because chaotic systems have good properties, chaotic systems arewidely used in communications, optimization, control and imageprocessing [1, 4, 6, 9, 10, 12, 16]. In 1989, Matthews used discrete

    577

  • 8/7/2019 p577-acharya[1]

    2/5

    chaotic dynamical systems in cryptography firstly [9]. He deriveda one-dimension chaotic map, which is used to generate a sequenceof pseudo-random numbers. Chaotic sequences are real valued se-quences. This real valued sequence can be converted into integervalued sequence. This generated sequence makes it much effectivefor pixel permutation, which can be used for image encryption.

    1.1.1 Logistic map

    The chaos sequence is most sensitive to the initial condition. Lo-gistic map is a classical one-dimensional chaotic map being usedwidely to generate the sequence of real number.

    ak+1 = ak (1 ak) (1)

    Here, Value of lies between 3.57 < < 4 and ak [0, 1]. Thisrecursive function of eq(1) can be used to generate a sequence upto length n.

    Pseudorandom number sequence can be generated using algo-rithm 1.

    Algorithm 1

    1: Generate the chaotic sequence of length n by using theformula (1) and store it in an one dimensional matrix

    {a1, a2, a3, a4, . . . . . . , an}2: Find the index of the smallest number from the sequence of n

    number and then store it in b(1).Next find the index of the 2ndsmallest number and store it in b(2). Repeat This process untilgetting the nth smallest number and store it in b(n).

    3: Now b contains sequence of n random number generated fromthe chaos sequence.

    The generation of this sequence is the strong part of this pro-posed model. As in every image permutation using chaos, reposi-tioning the image pixel is carried out by mapping the real value ofthe chaotic sequence with the original position of the image pixel.In the current context of the paper, reposition of the pixel is carriedout in the same fashion except the random sequence that is gener-

    ated is the sequence of integer value. The fig shows the sequenceof random number generated for the length of 30 numbers.

    Figure 2 shows the random number for 30 index and fig3 showsthe random number generated by varying the initial parameter from 3.6 to 3.6001

    0 10 20 300

    10

    20

    30

    40

    n

    Distributionofnumber

    Figure 2: Random Sequence of length 30 By taking initial con-

    dition a0 = 0.7 and = 3.6

    0 10 20 300

    10

    20

    30

    40

    n

    Distributionofnumber

    Figure 3: Random Sequence of length 30 for a0 = 0.7, = 3.6,a0 = .7 and = 3.6001

    Figure 4: Block Diagram for Substitution

    1.2 AES AlgorithmThe diffusion process of the image is carried out with the AES al-

    gorithm. This process changes the pixel value of the image.AES isa block cipher and AES merely allows a 128 bit data length that can

    be divided into four basic operation blocks. These blocks operateon array of bytes and organized as a 4 4 matrix that is called thestate. For full encryption, the data is passed through Nr rounds (Nr= 10, 12, 14) [9, 16]. These rounds are governed by the followingtransformations:

    1. Bytesub transformation: Is a non linear byte Substitution,using a substitution table (s-box), which is constructed bymultiplicative inverse and affine transformation. The Fig.4shows the step of the Bytesub transformation.

    2. Shiftrows transformation: Is a simple byte transposition,the bytes in the last three rows of the state are cyclicallyshifted. The offset of the left shift varies from one to threebytes.

    3. Mixcolumns transformation: Is equivalent to a matrix mul-tiplication of columns of the states. Each column vector ismultiplied by a fixed matrix. It should be noted that the bytesare treated as polynomials rather than numbers.

    4. Addroundkey transformation: Is a simple XOR betweenthe working state and the roundkey. This transformation isits own inverse.

    The encryption procedure consists of several steps as shown by Fig.5. After an initial addroundkey, a round function is applied to the

    578

  • 8/7/2019 p577-acharya[1]

    3/5

    data block (consisting of bytesub, shiftrows, mixcolumns and ad-droundkey transformation, respectively). It is performed iteratively(Nr times) depending on the key length. The decryption structurehas exactly the same sequence of transformations as the one in theencryption structure. The transformations Inv-Bytesub, the Inv-Shiftrows, the Inv-Mixcolumns, and the Addroundkey allow theform of the key schedules to be identical for encryption and de-cryption. The number of round of the AES is depend in accordanceto the necessary security condition.

    Figure 5: Block Diagram for the AES steps.

    2. PROPOSED ALGORITHMThe generation of the random sequence with the help of the

    chaos is the strong part of the current Image encryption techniques.From the inputted key i.e from the initial parameter first the pixelpermutation is carried out and after that the resultant matrix is fedto the AES to diffuse that is to modify the pixel value of the image.

    2.1 Encryption AlgorithmSuppose the image that is being encrypted Image.and the en-

    crypted image is Eimage .Both the Image and Eimage having thesize (m, n). The proposed algorithm permute the pixel of imagebased on chaotic sequence and then by the AES algorithm. Thealgorithm is described as follows.

    2.2 Description Of the AlgorithmThe algorithm begins with the generating a chaotic sequence.

    The initial condition a0 and treated as the key for the encryp-tion algorithm. Image is divided into j no of block each consistingof 16 no of pixel value. Next step 4-6 is used to generate the jpseudo random number sequence by keeping the index position ofthe sequence starting from smallest chaotic number to the largest inanother one dimensional matrix P. Using the logistic map we cangenerate the sequence of length j. Step7 place the pixel of plainimage into Eimage with respect to the position defined in the posi-tion vector P. Next the each block of the Eimage is fed to the AESalgorithm for further confusing the image.the number of round forAES is depend on the security c.

    Algorithm 2

    1: Load the Image and input the keys. Get the image width andheight as m x n from the Image I.

    2: Divide the image into j no of Block. Each block consisting of16 grey valued pixel. J= Integer(Height Width

    16).

    3: Rearranging the pixel of the plain image from mn matrix intoa matrix I of size (mn 1)

    4: Using the formula(1) of the logistic map generate the chaotic

    sequence of length j, {a1, a2, a3, a4, . . . . . . , a j}.5: Find the index of the smallest number from the sequence of j

    number and then store it in P(1).Next find the index of the 2ndsmallest number from the sequence a and store it in P(2).

    6: Repeat step(4) until getting the nth smallest number and storeit in P(n). P = k1, k2, k3, k4, . . . . . . , kj.Where ak1 < ak2 < ak3 < . . . < akl and ki [1, 2, . . . . . . , j]

    7: Now permute the pixel of the image and place it in Eimage bymapping it with P.

    8: Next Pass each permuted block to AES for modifying the pixelvalue.

    9: for (i=1 to j ) do10: Cipher(i) = Encrypt_AES(I, key)11: end for12: Reshape the resultant matrix of size(mn 1) to (m n) to get

    the final ciphered Image.

    Decryption process is also very easy. Its just the replication ofthe encryption process. On the receiver side for decrypting the ci-pher image first all the initial condition for the chaotic sequence isrequired and this initial condition can be treated as the key. Thereceiver generates the integer pseudo random sequence P using thekey and the real valued chaos. Finally rearrange the block of thecipher image into I to get back the original image. This permuta-tion is carried out in accordance to the value of the position vectorP. then after the permutation process the inverse cipher methodof the AES is used to bring back the modified pixel value into itscorresponding original value

    3. PERFORMANCE ANALYSIS

    3.1 Key space analysisThe strong point of the proposed algorithm is the generation of

    the permutation sequence with the chaos sequence. The key spaceshould also be sufficiently large to make brute-force attack infeasi-ble. In the proposed algorithm, we use 2 key, one is for confusionand another key is used for the diffusion of the image, for the per-mutation process the initial condition and a0 is considered as thekey and for the diffusion a 128 bit key is used. Its observed thatwith slightly varying the initial condition of the chaotic sequence.Its been almost impossible to decrypt the image.

    3.2 HistogramEncrypt the test image, leena.jpg, for one rounds, and then plotthe histograms of the plain-image and cipher-image as shown inFigs. 8(a) and (c), respectively. The latter figure shows that the his-togramof the cipher-image is nearlyflat, implying a good statisticalproperty.

    3.3 Speed analysisWhen the security requirement is fulfilled, the running speed be-

    comes an important factor for practical applications. speed analysisis the strong point of the proposed algorithm. Mainly the processor

    579

  • 8/7/2019 p577-acharya[1]

    4/5

    Original image

    (a)

    0 100 200

    0

    200

    400

    600

    800Histogram Of Original image

    (b)

    Figure 6: (a)Original Image (b)Histogram

    Image Encryption

    (a)

    0 100 200

    0

    100

    200

    300

    400

    500

    600

    Histogram Of Encrypted image

    (b)

    Figure 7: Results of Encryption Process with the key a0 = 0.6 and = 3.60. (a)Encrypted image (b)Histogram

    Decrypted image

    (a)

    0 100 200

    0

    200

    400

    600

    800Histogram Of Decrypted image

    (b)

    Figure 8: Results of decryption Process with the key a0 = 0.6 and = 3.60. (a)Encrypted image (b)Histogram

    time is reduced in generating the integer pseudorandom sequencefrom the chaotic sequence.

    In Ref. [11,13,14], the traditional chaos process of image encryp-

    tion uses the binary sequences for the image permutation. chaossequence are the real valued sequence and to convert it into its cor-responding binary sequence and followed by more than one logicoperation to generate the integer pseudo random number for im-age permutation is a time consuming process. As compared to this,our approach directly generate the integer pseudo number from thereal valued chaotic sequence. Compare to this context the currentmethod is more effective and low time consumption for image en-cryption.

    4. EXPERIMENT RESULTSUpon carrying out the encrypting process of the Image by tak-

    ing the initial condition, the encrypted image hides the totality ofthe information contained therein, as seen in figure 7(a) , Here thechaos initial condition is treated as the key for the encryption of theimage. The distribution of intensities of the encrypted image varieswhen changing the value of the initial condition. When the decryp-tion process is done with the same initial condition, we recover theoriginal image, as shown in figure 8(a).If the keys used in the de-cryption process are not equal to the keys used in the encryptionprocess, the image will not be recovered.

    From the figure 9 it is observed that by slightly varying the con-dition of from 3.60 to 3.62 its impossible to recover the image.

    580

  • 8/7/2019 p577-acharya[1]

    5/5

    Decrypted Image

    Figure 9: Results of decryption Process with the changing the key a0 = 0.6 and = 3.62

    So it is almost an impossible task for an cryptanalyst to decrypt theimage without knowing the proper value of the key.

    For the implementation of this encryption algorithm in Matlab-7.0, we used a Pentium 4 IBM computer with a 2.3 GHz proces-sor and 256 Mb RAM, obtaining the following encryption and de-cryption times for a 256 256 resolution image: Encryption Time:6.3256 Seconds. Decryption Time: 4.255seconds.

    5. CONCLUSIONIn this paper, we present image encryption using index based

    method for encrypting the gray scale image. Use of Chaotic systemin the digital image encryption greatly increases safety parametersin the encryption images , due to the sensitivity of chaotic systemto the initial condition..More over it is almost impossible for anycryptanalysts trying to decrypt the image without authorization.

    For the implementation of this algorithm in Matlab-7.0, we useda Pentium 4 IBM computer with a 2.3 GHz processor and 256 MbRAM, obtaining the following encryption and decryption times fora 256256 resolution image: Encryption Time: 4.668237 Seconds.Decryption Time: 2.214752 Seconds.

    6. REFERENCES

    [1] W. bin Lee, T. her Chen, and C. chieh Lee. Improvement ofan encryption scheme for binary images. Pakistan Journal ofInformation and Technology, 2(2):191 200, 2003.

    [2] J.-L. Fan and X.-F. Zhang. Image encryption algorithm basedon chaotic system. In Computer-Aided Industrial Design andConceptual Design, 2006. CAIDCD 06. 7th International

    Conference on, pages 1 6, nov. 2006.

    [3] Z.-H. Guan, F. Huang, and W. Guan. Chaos-based imageencryption algorithm. Physics Letters A, 346(1-3):153 157,2005.

    [4] T. Habutsu, Y. Nishio, I. Sasase, and S. Mori. A secret keycryptosystem by iterating a chaotic map. In Proceedings ofthe 10th annual international conference on Theory and

    application of cryptographic techniques, EUROCRYPT91,pages 127140. Springer-Verlag, 1991.

    [5] Z. Han, W. X. Feng, L. Z. Hui, L. D. Hai, and L. Y. Chou. Anew image encryption algorithm based on chaos system. In

    Robotics, Intelligent Systems and Signal Processing, 2003.

    Proceedings. 2003 IEEE International Conference on,volume 2, pages 778 782, oct. 2003.

    [6] I. Hen and N. Merhav. On the threshold effect in theestimation of chaotic sequences. Information Theory, IEEETransactions on, 50(11):2894 2904, nov. 2004.

    [7] S. Lian, J. Sun, and Z. Wang. A block cipher based on asuitable use of the chaotic standard map. Chaos, Solitons and

    Fractals, 26(1):117 129, 2005.[8] Y. Mao, G. Chen, and S. Lian. A novel fast image encryption

    scheme based on 3d chaotic baker maps. InternationalJournal of Bifurcation and Chaos, 14, 2004.

    [9] R. Matthews. On the derivation of a chaotic encryptionalgorithm. Cryptologia, 8:2941, January 1984.

    [10] C. Mirasso, J. Mulet, and C. Masoller. Chaos shift-keyingencryption in chaotic external-cavity semiconductor lasersusing a single-receiver scheme. Photonics TechnologyLetters, IEEE, 14(4):456 458, apr 2002.

    [11] F. Sun, S. Liu, Z. Li, and Z. L. A novel image encryptionscheme based on spatial chaos map. Chaos, Solitons andFractals, 38(3):631 640, 2008.

    [12] L. Wang and K. Smith. On chaotic simulated annealing.

    Neural Networks, IEEE Transactions on, 9(4):716 718, jul1998.

    [13] Y. Wang, K.-W. Wong, X. Liao, and G. Chen. A newchaos-based fast image encryption algorithm. Appl. SoftComput., 11:514522, January 2011.

    [14] K.-W. Wong, B. S.-H. Kwok, and W.-S. Law. A fast imageencryption scheme based on chaotic standard map. PhysicsLetters A, 372(15):2645 2652, 2008.

    [15] D. Xiao, X. Liao, and P. Wei. Analysis and improvement of achaos-based image encryption algorithm. Chaos, Solitonsand Fractals, 40(5):2191 2199, 2009.

    [16] L. Zhao, R. Furukawa, and A. de Carvalho. A network ofglobally coupled chaotic maps for adaptive multi-resolutionimage segmentation. In Neural Networks, 2002. SBRN 2002.

    Proceedings. VII Brazilian Symposium on, pages 92 97,2002.

    581