Image Encryption Using AES Key Expansion
Image Encryption Using AES Key Expansion
CHAPTER 1
Introduction
This chapter gives a brief introduction to Image Encryption and its advantages. The topics covered are: Introduction to Image Encryption, Problem statement, Objective and scope of Study, Literature Review and the need for proposed algorithm. Finally, limitations of the study and organisation of chapters in this report are given.
Page 1
However images are different from text. Although the traditional cryptosystems, such as RSA and DES-like cryptosystems may be used, to encrypt images directly, it is not a good idea for two reasons. One is that the image size is always much greater than that of text. Therefore, the traditional cryptosystems need much time to directly encrypt the image data. The second is that, the decrypted text must be equal to that of original text. However, this requirement is not necessary for image data. This is due to the characteristics of human perception; a decrypted image containing small distortion is usually acceptable. A digital image is defined as a two dimensional (2D) rectangle array. The elements of this array are denoted as pixels. Each pixel has an intensity value (digital number) and a location address (row, column). An image can be encrypted by combining MATLAB with the encoder. Each pixel in an image is represented by 8 bits, i.e., 1 byte. Using MATLAB the pixel values can be converted into bytes. These byte values are then used as input to the encoder. The 128 bit encoder then convert this byte into corresponding encoded byte. The encoded bit values are then converted into decimal values for pixels. This operation is then repeated for each pixel to generate a 2D text array corresponding to the pixel value. For protecting the stored 2D data, they must be converted to one dimensional (1D) arrays before using various traditional encryption techniques. The raster sequence of image data can be encrypted into blocks by using block cipher or a stream cipher. A product cipher can also be used to encrypt a file of image data. However, it is more efficient to encrypt an image after employing some compression techniques. This will reduce the computational requirement and also the increases the speed of processing (which is of high importance in real time scenario).
Page 2
without compromising security. An encryption scheme which runs very slowly, even though may have higher degree of security features would be of little practical use for real time processes. Hence a trade off has to be made. Many encryption methods have been proposed in literature, and the most common way to protect large multimedia files is by using conventional encryption techniques. Private Key bulk encryption algorithms, such as Triple DES or Blowfish, are not suitable for transmission of large amounts of data (such as images). Due to the complexity of their internal structure, they are not particularly fast in terms of execution speed and cannot be applied for images in the real time scenario. Also traditional cryptographic techniques such as DES cannot be applied to images due to the intrinsic properties of images such as bulk data capacity, redundancy and high correlation among pixels. Image encryption algorithms can become an integral part of the image delivery process if they aim towards efficiency and at the same time preserve the security level.
Page 3
1.4
Related Works
Due to the differences between images and text, a wide variety of cryptographic
algorithms have been proposed for image security. In the paper [2], Kuo proposed an image encryption method - image distortion, which obtains the encrypted image by adding the phase spectra of the plain image with those of the key image. This method is safe but the image is not compressed, thus encryption & decryption is inefficient. In the paper [3], Bourbakis and Alexopoulos developed a new method which performs both lossless compression and encryption of binary and gray-scale images. The compression and encryption schemes are based on SCAN patterns generated by the SCAN technique. SCAN is a formal language-based two-dimensional spatial- access methodology which can efficiently specify and generate a wide range of scanning paths or space filling curves. Here again security is high but no image compression is considered. In the paper [4], Chin-Chen Chang, Min-Shian Hwang, and Tung-Shou Chen used one of the popular image compression techniques, vector quantization, to design an efficient cryptosystem for images. The scheme is based on vector quantization (VQ), cryptography, and other number theorems. In VQ, the images are first decomposed into vectors and then sequentially encoded vector by vector. Major advantage- simple hardware structure; required bit-rate for VQ is also small. In the paper [5], Fridrich demonstrated the construction of a symmetric block encryption technique based on 2D standard chaotic map. In this paper to encrypt large data files private-key symmetric block encryption schemes are used because public key encryption schemes are not suitable for encrypting of large amounts of data and archival due to their relatively slow performance. Also, the security of public key cryptographic schemes lies in the computational complexity of certain problems, such as factorization of large numbers or computing of the discrete logarithm problem. Advances in algorithmic techniques, number theory force us to re-encrypt large databases and archives with a longer key to maintain a sufficient degree of security. Here a chaotic map is first generalized by introducing parameters and is then discretized to a finite square lattice of points (image) which represent data items (pixel). The discretized map is further extended
Department of Telecommunication Engineering, PACE, Mangalore. Page 4
to three dimensions and composed with a simple diffusion mechanism to obtain a block product encryption scheme. The main features of the encryption scheme studied in this paper are a variable key length, a relatively large block size (several kB or more), and a high encryption rate. However, the drawback here is the choices for the ciphering key depend on the block size. Files with size smaller than 10kB would have to be padded to guarantee sufficiently many encryption keys which will increase the size of the data to be transmitted. In the paper [6], Mitra had used a random combination of bit, pixel, and block permutations. The permutation of bits decreases the perceptual information, whereas the permutation of pixels and blocks produce high level security.
1.5
Also the S-box used here provides only 70% non linearity to algorithm. Sbox with better non linearity may be designed in future to increase the avalanche effect of encrypted Image.
1.6
Chapter Organisation
The first 2 Chapters of this report, discusses the theoretical concepts required to
understand the image encryption and its importance. The next 4 chapters deal with introduction to image cryptosystems and the proposed method to overcome the problems faced in real time implementation of image cryptosystems. Last chapter deals with Experimental analysis of proposed method and comparative results. The list of chapters and brief description of their contents is given below. Chapter 1: Gives the brief idea of image encryption requirements. It explains the scope, literature survey, methodology and overall general view of this study. Chapter 2: Gives a brief background to cryptography and some of the common terms used in cryptography. It also discusses about the different types of cryptographies and the types cryptanalysis attacks possible on images.
Department of Telecommunication Engineering, PACE, Mangalore.
Page 5
Chapter 3: Gives a brief overview of some of the image cryptosystem implemented so far, its efficiency and drawback in regard to real time application. Chapter 4, 5 ,6 & 7 : In these chapters, AES standard, mathematical preliminaries required to understand AES Algorithm, AES algorithm with the transformations used and Key expansion schedule ,An example for AES Key Expansion and modification to AES Key Expansion to suite Image Cryptosystems in real time application have been explained. The chapter 7 gives Experimental analysis and results of proposed method.
Page 6
CHAPTER 2
Basics of Cryptography
This chapter just gives a basic idea about cryptography and its types, so that the concepts in image cryptosystems can be understood better. The topics covered are: Definition of cryptography and cryptanalysis, types of cryptography, types of cryptanalysis attacks for evaluating the security of image cryptosystems.
2.1
enables us to store sensitive information or transmit it across insecure networks (like the Internet) so that it cannot be read by anyone except the intended recipient. While cryptography is the science of securing data, cryptanalysis is the science of analyzing and breaking secure communication. Classical cryptanalysis involves an interesting combination of analytical reasoning, application of mathematical tools, pattern finding, patience, determination, and luck. Cryptanalysts are also called as attackers. Cryptology embraces both cryptography and cryptanalysis. Cryptography can be strong or weak; its strength is measured in the time and resources it would require to recover the plain-text. The result of strong cryptography is cipher-text that is very difficult to decipher without possession of the appropriate decoding tool. A cryptographic algorithm, is a mathematical function used in the encryption and decryption process. it works in combination with a keya word, number, or phraseto encrypt the plain-text. The same plain-text encrypts to different cipher-text with different keys. The security of encrypted data is thus entirely dependent on two things: the strength of the cryptographic algorithm and the secrecy of the key. A cryptographic algorithm, plus all possible keys and all the protocols that make it work comprise a cryptosystem.
Page 7
2.2
Types of cryptography
Cryptography is usually of two types based the type of key used. They are: Secret
Advantages of conventional cryptography are, i. ii. It is very fast. It is especially useful for encrypting data that is to be stored securely and not transmitted.
Main problem in conventional or secret key cryptography is Key Distribution. For a sender and recipient to communicate securely using conventional encryption, they must agree upon a key and keep it secret between themselves. If they are in different physical locations, they must use some secure communication medium to prevent the disclosure of the secret key during transmission else a third party intercepting the key in transit can later read, modify or forge all information encrypted.
Page 8
Advantages of Public Key Cryptography are, i. The primary benefit of public key cryptography is that it allows people who have no pre-existing security arrangement to exchange messages securely. ii. The need for sender and receiver to share secret keys via some secure channel is eliminated; all communications involve only public keys, and no private key is ever transmitted or shared.
Page 9
2.3
cryptosystems. Each of them assumes that the cryptanalyst has the complete knowledge of the encryption algorithm used. The first attack is called the cipher-image-only or brute force attack. In this attack, an illegal user is assumed to obtain the cipher-image from networks, but does not have the private key. In other words, a cryptanalyst must determine the private key solely from an intercepted cipher-image. The second attack is called the known-plain-image-only attack. The illegal users are assumed to have obtained several plain-image and cipher-image pairs in this attack. A cryptanalyst must deduce the private key used to encrypt the plain images or the algorithm to decrypt any new cipher image encrypted with same private key. The third attack is called the chosen plain-image attack. In this attack, the illegal users are able to select the plain-images and obtain the corresponding cipher-images this is more powerful than the known-plain-image-only attack, because cryptanalysts can choose some specific pain-images to encrypt, and this yields more information about the private key. The cryptanalysts uses this information to deduce the private key used to encrypt the plain images. The fourth attack is called jigsaw puzzle attack. In this attack, the illegal users first divide a cipher-image into many small areas. The cryptanalysts then breaks these areas one by one. Since each area is much smaller than the entire cipher-image, the computational load for breaking each area is much less than that for breaking the entire cipher-image. The jigsaw puzzle attack is therefore more efficient than other attacks. The fifth attack is called the neighbour attack. In this attack, the illegal users are assumed to know a part of the plain-image. The changes across the boundaries of the areas are smooth in most images. Therefore, the cryptanalysts use this attribute to speed up the selections for the boundaries of the neighbouring areas; and can derive the neighbouring pixels for the known part of plain image and break the whole cipher efficiently.[3]
Department of Telecommunication Engineering, PACE, Mangalore. Page 10
CHAPTER 3
Different combinations of SCAN letters generate different kind of secret images. Once the combination of SCAN letters is determined, the scheme generates a SCAN string which defines the SCAN order of the original image. The algorithm then scans the image and encrypts the SCAN string using commercial cryptosystems. Since illegal users
Department of Telecommunication Engineering, PACE, Mangalore.
Page 11
cannot obtain correct SCAN string, the original image is therefore secure. Figure 3.2 shows an example of SCAN key patterns.
Drawbacks of Image Encryption using SCAN patterns are, This method does not consider the advantages of image compression. As a result, the size of the image is very large and is inefficient to encrypt or decrypt images directly for real time applications. Also, due to large image size encryption/decryption process is consumes lot of time and hence is slow. Although it provides fair enough security it is not preferred for real time application because the time taken by this method to produce cipher image is not acceptable for real time scenerio.
3.2
techniques for image encryption. This technique uses a random combination of bit, pixel, and block permutations. The permutation of bits decreases the perceptual information, whereas the permutation of pixels and blocks produce high level security. It is observed that the permutation of bits is effective in signicantly reducing the correlation thereby decreasing the perceptual information, whereas the permutation of pixels and blocks are good at producing higher level security compared to bit permutation. A random
Department of Telecommunication Engineering, PACE, Mangalore. Page 12
combination method employing all the three techniques thus is observed to be useful for tactical security applications, where protection is needed only against a casual observer. The security of images used in electronic communication may be needed against two types of attackers; casual listeners/observers or professional unauthorized recipients, termed as cryptanalysts. In the former case, the security is needed only in terms of hours while in the later it may be in terms of years. The duration roughly indicates the amount of time that is needed to analyze the information available in unintelligible form in the insecure channel without the knowledge of keys to derive the underlying information. The scenario where security is needed against casual listener/observer, the cryptographic structure should be as simple as possible in order to reduce the cost. The present work focuses on development of improved private key cryptographic methods for providing security against such casual observers in the context of image communications. In designing private key cryptographic techniques, permutation methods and pseudo random sequence generators play important roles due to their simple yet effective information coding performances. This method uses many good keys, selected using pseudo random index generators (PRIG), for different permutation operations. Since a large number of keys are used, the security level offered is comparatively high. Further, the amount of redundant information available in the encrypted image is kept as low as possible, thereby providing fairly high security level against casual observers. In image communication, the image is represented as a group of bits, pixels and blocks and therefore, the encryption is done by permuting the respective groups. Further, to make it more robust against casual attacks, a random combinational image encryption approach with bit, pixel and block permutations is used. It is also shown that if the random combinational sequence of permutations is not known to the observer, it will not be possible for him/her to retrieve the original information, even if the permutation private keys are known to that person. The Pseudo random index generator (PRIG) for permutation purpose is usually constructed using the linear feedback shift registers (LFSR). A PRIG contains n shift registers and is initiated with a starting seed, which is usually transmitted through a secured channel for intended users only. The outputs of the shift registers are multiplied with the coefcients (Cn1,Cn2,...,C1,C0) of a primitive polynomial with respect to mod-2
Department of Telecommunication Engineering, PACE, Mangalore.
Page 13
operation. The resultant output obtained by the modulo operation is then fed back to the rst shift register. The shift register output values are converted into decimal index using binary to decimal converter. The general structure of such a PRIG is shown in Fig. 3.3. Note that the periodicity of such a random index generator is 2n1.
In the context of images, three basic permutation techniques, they are, 1) Bit permutation: The image can be seen as an array of pixels, each with eight bits for 256 gray levels. In the bit permutation technique, the bits in each pixel taken from the image are permuted with a key chosen from the set of keys by using the PRIG. The entire array of these permuted pixels forms the encrypted image. The encrypted image obtained from the bit permutation technique is transmitted to the receiver through the insecure channel. At the receiver the encrypted image is decrypted using the same set of keys and same pseudo random index generator. As the number of bits in each pixel is eight, the key length is also taken equal to eight. The number of permutations obtained with eight elements is 8! (=40320) but the number of good keys formed by such eight elements is only 121. Therefore, to get 127 keys using a PRIG of maximal length 127, other 6 keys are taken randomly from these 121 good permutation keys to form the complete set. 2) Pixel permutation: In this scheme each group of pixels is taken from the image. The pixels in the group are permuted using the key selected from the set of keys. The encryption and decryption procedure is same as the bit permutation technique. The size of the pixel group is same as the length of the keys, and all the keys are of same length. If the length of the keys is more than the size of pixel group, the perceptual information
Department of Telecommunication Engineering, PACE, Mangalore. Page 14
reduces. In this work the group of pixels is taken along the row without the loss of generality, i.e., the column wise procedure would yield same kind of results. 3) Block permutation: In this technique, the image can be decomposed into blocks. A group of blocks is taken from the image and these blocks are permuted same as bit and pixel permutations. For better encryption the block size should be lower. If the blocks are very small then the objects and its edges do not appear clearly. In this block permutation the blocks are permuted horizontally in the image. The permutation of blocks along vertical side is also similar to horizontal side block permutation. At the receiver the original image can be obtained by the inverse permutation of the blocks.
The main idea behind this method is that an image can be viewed as an arrangement of bits, pixels and blocks. The intelligible information present in an image is due to the correlations among the bits, pixels and blocks in a given arrangement. This perceivable information can be reduced by decreasing the correlation among the bits, pixels and blocks using certain random permutation techniques. The advantage offered by this scheme is that even if the private key is known to the attacker somehow and the
Department of Telecommunication Engineering, PACE, Mangalore.
Page 15
random combination key is unknown, then the person will not be able to extract/tamper the image. Also, due the combination of three permutation approaches the redundancy, visual intelligence reduces. To get back the original image at the receiver, the order of the permutation processes should be exactly reverse to the order at the transmitter; otherwise the output will produce no visible information. Figure 3.4 shows the block diagram of this method. However the drawback in this approach is that it provides security only against casual observers and not against professional hackers; hence is not preferred for real time application because it is not possible to predict the type of attackers posing danger to the integrity of image data.
Page 16
CHAPTER 4
4.1
Introduction to AES
In January, 1997 NIST began its effort to develop the AES, a symmetric key encryption algorithm, and made a worldwide public call for the algorithm to succeed DES. Initially 15 algorithms were selected, which was then reduced down to 4 algorithms, RC6, Rijndael, Serpent and Two-fish, all of which were iterated block ciphers. The four finalists were all determined to be qualified as the AES. The final evaluation, which also solicited worldwide public input was based on three characteristics [see table 4.1] 1) Security: It encompassed resistance to known attacks, mathematical soundness, randomness of output and security compared to other algorithms. 2) Cost: encompassed encryption speed, required memory, and no licensing agreements i.e. the algorithm had to be available worldwide royalty free. 3) Algorithm and implementation characteristics: The algorithm had to be suitable across a wide range of hardware and software systems. The algorithm had to be relatively simple as well. After extensive review the Rijndael algorithm was chosen to be the AES algorithm. Speed Algorithm RC6 Rijndael Serpent Two Fish Security Adequate Adequate High High Encryption/Decryption High end High end Low end Average Key Average High end Average High end Memory RAM Average High end Average High end ROM Average High end Average Average
Table 4.1 Some evaluation criteria and results for AES finalists
Page 17
Image Encryption using AES Key Expansion AES was designed to have the following characteristics: Resistance against all known attacks. Speed and code compactness on a wide range of platforms. Design simplicity.
The AES Algorithm is a symmetric-key cipher, in which both the sender and the receiver use a single key for encryption and decryption. The data block length is fixed to be 128 bits, while the length can be 128, 192 or 256 bits. In addition, the AES is an iterative algorithm; each iteration being called a round. The total number of rounds Nr is dependent on Key length Nk, where Nr and Nk are specified in words. The 128 bit data block is divided into 16 bytes. These bytes are mapped to a 4x4 array called the State, and all the internal operations of the AES algorithm are performed on the State. The parameters for AES algorithm are shown in Table 4.2 Algorithm AES-128 AES-192 AES-256 Key length, Nk 4 6 8 Block size, Nb 4 4 4
Table 4.2 AES Parameters.
Most of the operations in the AES algorithm take place on bytes of data or on words of data 4 bytes long, which are represented in the field GF(28), called the Galois Field. These bytes are represented by the polynomial equation, b7x7 + b6x6 + b5x5 + b4x4 + b3x3 + b2x2 + b1x + b0 = bixi - - - - equation (4.1) Where, bi {0,1} and i = 0,1,2,...7. There are 256 elements in GF(28). For example, 0x11(00010001) identifies the specific finite field x4+1.
4.2
Mathematical Preliminaries
In abstract algebra, a finite field or Galois field is a field that contains a finite
number of elements. Finite fields are important in number theory, algebraic geometry, Galois theory, cryptography, coding theory and quantum error correction. The finite fields are classified by size; there is exactly one finite field up to isomorphism of size pk for each prime p and positive integer k. This is represented as GF(pk). Finite field elements
Department of Telecommunication Engineering, PACE, Mangalore. Page 18
can be added and multiplied, but these operations are different from those used in normal algebra. [7]
Consequently, subtraction of polynomials is identical to addition of polynomials. [7] Example: (0x57 + 0x83) = (x6+x4+x2+x+1) + ( x7+x+1) = x7+ x6+x4+x2 = 0xD4.
Page 19
shifting left by 1. If the result exceeds 0xFF then the result must be XORed with 0x1B. This will prevent any overflow errors if working with bytes thus keeping the results within range. 3) Multiplying by three is the same as multiplying by (1 + 2). Thus, a 0x03 = a (0x02 + 0x01) = (a 0x02) (a 0x01).
The basics of Galois field discussed in section 4.2, is required to understand AES Algorithm better.
Page 20
CHAPTER 5
AES Algorithm
This chapter gives detailed explanation about the steps involved in AES algorithm. The topics covered includes: AES encryption/decryption, Transformations used in AES and Key expansion Schedule.
5.1
AES Encryption/Decryption
For each round of AES, 128 bit input data and 128 bit key is required, i.e.., it needs 4 words of key in one round. Thus the input key must be expanded to the required number of words depending upon the number of rounds. The output of each round serves as input to the next stage. In AES system, same secret key is used for both encryption and decryption; thus simplifies the design. The block diagram for AES Encryption and Decryption is as shown in Figure 5.1
Page 21
For both its Cipher and Inverse Cipher, the AES algorithm uses a round function that is composed of four different byte-oriented transformations: 1) byte substitution using a substitution table (S-box), 2) shifting rows of the State array by different offsets, 3) mixing the data within each column of the State array, and 4) adding a Round Key to the State. The above 4 transformation are looped Nr-1 times. In the last round (i.e.., Nrth round) Mixcolumn is not performed. The AddRoundKey is performed at the beginning and at the end of the cipher in order to provide initial and final randomness to the algorithm. Without this, the first or last portion of the cipher could be easily deduced, and therefore would be irrelevant to the security of the cipher. The last round in the cipher is different from the other rounds in order to make the encryption and decryption routines more similar, allowing the complexity to be reduced in hardware and software implementations.
5.2
AES Transformations
The four transformations used in AES Encryption are : ByteSub, ShiftRows, MixColumns, AddRoundKey. The inverse of these operations are performed for decryption.
Page 22
The S-box, which is invertible, is constructed by composing two transformations, i. Take the multiplicative inverse in the finite field GF(28); the element {00} is mapped to itself. ii. Apply the following affine transformation (over GF(2) ) which is defined as, bi= bi b(i+4)mod8 b(i+5)mod8 b(i+6)mod8 b(i+7)mod8 Ci - - - - - -equation (5.1) Where, 0 i 8 and bi is the ith bit of byte and Ci is the ith bit of byte C whose value is 0x63 or (01100011). In matrix form, the affine transformation element of the S-box can be expressed as;
The S-box for ByteSub is as shown in Figure 5.3 The Inverse ByteSub is used to reverse this operation in decryption process. The affine transformation for Inverse ByteSub is as shown below;
The S-1 box for inv ByteSub operation is shown in Figure 5.4
Page 23
Page 24
a0 a1 a
2
02 03 01 01 01 02 03 01 01 01 02 03 03 01 01 02
a0 a1 a2 a3
a3
Page 25
Image Encryption using AES Key Expansion Figure 5.6 illustrates the mix column transformation.
InvMixColumns performs the reverse operation for decryption and can be described by the matrix equation is,
a0 a1 a2 a3
5.2.4 Add Round Key
0e 0b 0d 09 09 0e 0b 0d 0d 09 0e 0b 0b 0d 09 0e
a0 a1 a2 a3
It is the step that incorporates the round key, a portion of the expanded key, into the plaintext. This routine performs bitwise XOR of each byte of the state with the corresponding byte of the round key. If Add Round Key operates on a variable twice, the variable itself is returned. This property is used in decryption. Figure 5.7 illustrates this transformation.
Page 26
The above 4 transformation are looped Nr-1 times. In the last round (i.e.., Nrth round) Mixcolumn is not performed. The AddRoundKey is performed at the beginning and at the end of the cipher in order to provide initial and final randomness to the algorithm. Without this, the first or last portion of the cipher could be easily deduced, and therefore would be irrelevant to the security of the cipher. The last round in the cipher is different from the other rounds in order to make the encryption and decryption routines more similar, allowing the complexity to be reduced in hardware and software implementations.
applying SubByte transformation and rotate word on wi-1 and XORing the result with a round constant. Figure 5.8 shows the pictorial representation of AES key expansion.
Department of Telecommunication Engineering, PACE, Mangalore.
Page 27
Page 28
Image Encryption using AES Key Expansion Steps to find wi when ( i mod 4) = 0 i. ii. RotWord: performs one byte circular left shift on wi-1.
SubWord: performs a byte substitution on each byte of its input word, using the S-box.
iii.
The result of step (i) and (ii) is XORed with a round constant Rcon[j] whichis given by, Rcon[j]={RC[j],0,0,0},where RC[j]=2*RC[j-1], with multiplication over GF(28). J RC[j] 1 01 2 02 3 04 4 08 5 10 6 20 7 40 8 80 9 1B 10 36
W[0]
W[1]
W[2]
W[3]
Page 29
Image Encryption using AES Key Expansion W[0:3] forms the cipher key.
Step 2: calculate the first set of 16byte key to be used for 1nd round, i.e., w[4:7] Step 2a: to find w[4] , follow the steps discussed in section 5.3. Now, W[i-1] = W[3] = [ 09 cf 4f 3c ]. After shift row operation, W[3] = [ cf 4f 3c 09 ]. After SubByte transform, W[3]* = [ 8a 84 eb 01 ]. Now, W[i-4] = W[0] = [ 2b 7e 15 16 ] and Rcon[1] = [ 01 00 00 00]. W[4] = W[3]* W[0] Rcon[1]
[ 2b 7e 15 16 ]
[ 01 00 00 00].
Step 2b: To find W[5], W[i-1] =W[4] = [a0 fa fe 17] and W[i-4]= W[1] = [ 28 ae d2 a6 ]. W[5] = W[4] W[1]. [ 28 ae d2 a6 ].
Step 2c: Find W[6] and W[7] using the same procedure as 2b. Thus W[6] = [ 23 a3 39 39 ]. And W[7] = [ 2a 6c 76 05 ]. Therefore, the 2nd round key is, A0 Fa Fe 17 88 54 2c B1 23 A3 39 39 2a 6c 76 05
Page 30
Step 3: Similarly find rest of the 9 round keys using the step 2.
Page 31
Page 32
Page 33
CHAPTER 6
6.1
Certain changes made to the AES key expansion process (discussed in the section 5.3) improves the encryption quality, and also increases the avalanche effect in the resulting cipher image. The changes are, The initial key is expanded based on the number of pixels in the image. The Rcon value is not constant instead it is being formed from the initial key itself. Both the s-box and Inverse s-box are also used for the modified Key Expansion process because it improves non-linearity in the expanded key and also improves the encryption quality. The S-box and Inverse S-box are however not directly used in this algorithm; instead some circular shifts are performed on the boxes based on the initial key. The above changes in the algorithm can be represented as discussed in the sections below.
Page 34
6.2 Steps Involved in Image Encryption/Decryption Using Modified AES Key Expansion
The steps involved in Image Encryption/Decryption using Modified AES Key Expansion include: Key selection, Generation of multiple keys, Encryption and Decryption. Each of these steps are explained briefly below.
Page 35
The key is represented as blocks k[0],k[1]...k[15]. Where each block is 8bits long (8*16=128 bits).
6.2.3 Encryption
Encryption is done in spans, where 16 pixels are processed in each span. This Algorithm performs two XOR operations and a SubBytes Transformation for each set of pixels. Since two XOR operations are performed using the expanded key for every set of pixels it is impossible to get the key from plain image and cipher image, and to improve the non linearity the s-box values used in AES may also be used. This is shown in figure 6.1.
6.2.4 Decryption
The decryption process shown in figure 6.1 is similar as encryption, but here Inverse SubByte Transformation is used and also the order of XOR operation using the expanded key is reversed.
Figure 6.1 Encryption/Decryption process for image encryption using modified aes key expansion
Page 36
CHAPTER 7
Experimental Analysis
The algorithm has been implemented in Mat Lab 6.0 in windows environment with a system configuration of PIV processor with 1 GB RAM. The proposed algorithm has been tested with various images in USC-SIPI repository which is a collection of digitized images primarily to support image processing, image analysis and machine vision.
Page 37
Page 38
Page 39
Page 40
Page 41
CHAPTER 8
Page 42
References
[1] B.Subramanyan, Vivek.M.Chhabria, T.G.Sankar babu, Image Encryption Based On AES Key Expansion, 2011 Second International Conference on Emerging Applications of Information Technology, page 217-220. [2] C.J.Kuo, Novel image Encryption Technique and its application in progressive transmission. Journal of Electron imaging 24 1993 pp 345-351. [3] N.J.Bourbakis , C.Alexopoulos, Picture data encryption using SCAN patterns. Pattern Recognition 256 1992 pp567 -581. [4] Chin-Chen Chang, Min-Shian Hwang, Tung-Shou Chen, A new encryption algorithm for image cryptosystems, The Journal of Systems and Software 58 (2001), 8391. [5] Fridrich Jiri, Symmetric ciphers based on two dimensional chaotic maps, Int. J. Bifurcat Chaos 8 (1998) (6), pp. 1259 1284. [6] Mitra, Y. V. Subba Rao, and S. R. M. Prasanna, A new image encryption approach using combinational permutation techniques, International Journal of Computer Science, vol. 1, no. 2 , pp. 1306- 4428, 2006.. [7] http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf.
Page 43