Abstract

In the modern world, the security of the digital image is vital due to the frequent communication of digital products over the open network. Accelerated advancement of digital data exchange, the importance of information security in the transmission of data, and its storage has emerged. Multiple uses of the images in the security agencies and the industries and the security of the confidential image data from unauthorized access are emergent and vital. In this paper, Bose Chaudhary Hocquenghem (BCH) codes over the Galois field are used for image encryption. The BCH codes over the Galois field construct MDS (maximum distance separable) matrices and secret keys for image encryption techniques. The encrypted image is calculated, by contrast, correlation, energy, homogeneity, and entropy. Histogram analysis of the encrypted image is also assured in this paper. The proposed image encryption scheme’s security analysis results are improved compared to the original AES algorithm. Further, security agencies can utilize this work for their confidential image data.

1. Introduction

Nowadays, cryptography plays a primary role in information security and embedded system design. The use of mobile communication and the Internet rapidly increases and occupies wide-ranging areas in daily life. There is an increase in the number of users and unauthorized users who try to fetch data illegally, causing data security issues. To solve this problem, encrypted data is generated, unreadable for unauthorized users. Cryptography is the science of information security which secures the data while it is stored or transmitted. Claude Shannon [1] describes the two basic properties, diffusion and confusion for the design of block ciphers in a communication theory of secrecy systems. Substitution boxes are the block ciphers’ only nonlinear component that confuses the ciphertext. Many researchers have created highly nonlinear and influential S-boxes to provide secure communication. The diffusion layer has been neglected in cryptographic research, juxtaposed to confusion layers for a long time. The replacement of the permutation layer of substitution-permutation networks (SPNs) by a diffusion layer enhances the avalanche property of the block cipher. It makes the cipher’s resistance to linear and differential cryptanalysis explained by Heys and Tavare in [24]. Thus, MDS (maximum distance separable) matrices provide diffusion in cryptographic algorithms and are the main component in the architecture of block ciphers to make resistance against the linear and differential cryptanalysis. The keystream generator is added to the AES algorithm to improve encryption performance [5]. The modified AES algorithm is explained in [6]. The image and video encryption based on chaos with security analyses are presented in [7]. The existing image encryption techniques are reviewed in [8]. The article explains the simulation of image encryption using the AES algorithm [9]. Using Gaussian Distribution Cryptographic Substitution Box is designed in [10]. The present age ciphers SHARK [11], Advanced Encryption Standard (AES) [12], and Twofish [13,1 4] have a diffusion layer that depends on the mix column operation step. The least weight maximum distance separable (MDS) matrices constructed by comprehensive search from the companion matrices are given in [11]. Zhang et al. [15] presented chaotic research encryption, combining the image and DES encryption algorithm. Logistic chaos sequencer is used in the new encryption scheme to create the pseudorandom sequence and then makes double-time encryption with improvements in DES. Their results show high security and encryption speed and high starting value sensitivity. Shah et al. [16] propose a criterion to examine the prevalent S-boxes and study their strength and weaknesses to define their correctness in image encryption applications. The bases of the AES key expansion image encryption scheme are explained in [17]. Error-correcting codes, particularly BCH codes, are helpful to reduce the rate of decryption failure [18]. Walter et al. [18] analyze the decoding algorithm of the BCH code and design a constant-time version of the BCH decoding algorithm. Asif et al. [19] constructed BCH codes with a computational approach and applied those codes in data security. Different image encryption techniques are utilized by various authors [2024].

The modified AES algorithm for image and text encryption based on bit permutation instead of mixed column operation is presented in [25]. But we used BCH codes to construct MDS matrices and private keys to secure image data. The proposed criteria use correlation analysis, entropy analysis, homogeneity analysis, contrast analysis, energy analysis, and histogram analysis. This paper presents a new symmetric algorithm based on BCH codes over the Galois field. MDS matrices and secrete keys of the proposed algorithm are derived from the generator polynomials of the respecting BCH codes over the Galois field. We furnished a novel technique for constructing the building components of the block cipher. The rest of the paper is organized as follows: some basic concepts of coding theory and cryptography are presented in Section 2. Section 3 contains the proposed algorithm and its components with an example. Section 4 has statistical analyses of the encrypted image by the proposed algorithm. Conclusion and future application are discussed in Section 5.

2. Preliminaries

2.1. Cyclic Codes

The linear mapping is defined by

It is called a cyclic shift. A linear code is called cyclic code if

2.2. Irreducible Polynomial

A polynomial is called irreducible if it cannot be written as the product of two polynomials. For example, is an irreducible polynomial of degree 3 over .

2.3. Primitive Polynomial

An irreducible polynomial is primitive polynomial if is a primitive root of , that is,where is prime and is the degree of the irreducible polynomial. For example, is a primitive, irreducible polynomial over .

2.4. Theorem [26]

Let . Then, have the same minimal polynomial over .

2.5. BCH Code

BCH codes are cyclic linear codes. Let be positive integers such that , is a power of some prime number, and . Let be the least positive integer such that

Thus, . Let be a primitive nth root of unity in . Let denote the minimal polynomial of Let be the product of distinct minimal polynomials among , that is,

Since divides for each , it follows that divides . Let be a cyclic code with generator polynomial in the ring . Then, is called a BCH code of length over with designed distance .

Nowadays, BCH codes have many applications; BCH codes are used in satellite communication, hard disc, compact disc, storage systems, and data security.

2.6. Theorem [26]

Let C be BCH code of length over with designed distance Then

2.7. Theorem [26]

Let C be a BCH code of designed distance . Then,where is the minimum distance and is designed to distance.

2.8. Galois Field

A finite field is called Galois field. Galois field extension of the polynomial ring iswhere is prime and is a primitive, irreducible polynomial of degree m over . Therefore,

2.9. MDS (Maximum Distance Separable) Matrices

MDS (Maximum Distance Separable) matrices have many applications in data security and channel coding. They create diffusion in block cipher data. These matrices are constructed by using the elements of a finite field. MDS matrices are invertible because the inverse of the MDS matrix is used for the decryption of data. Nowadays, Reed Solomon codes and BCH codes construct MDS matrices.

2.10. Proposition

If MDS matrices can be generated from BCH code over Galois field then , and must satisfy

2.11. Proposition

Let be the generator polynomial of cyclic code over the field . Let H be the matrix whose row is , Then, the canonical parity check and generator matrices of the code are

2.12. Example

Suppose that is a primitive, irreducible polynomial of degree 8 and is the primitive root of over . Then the elements of Galois field are shown in Table 1.

We want to construct the BCH code of length 127 with designed distance . Then find minimal polynomials corresponding to each where . By using Theorem 2.4. and elements of the Galois field from Table 1, we get the following distinct minimal polynomials.

Now, by taking the LCM of all minimal polynomials from Table 2, we get generator polynomial of degree 119 for 127 length BCH code.

3. Proposed Algorithm

In this algorithm, the key and block size are 128 bits. Simple logical and arithmetic operations are like shifting and logical XOR. Mainly, 2 steps are repeated 10 times for encrypting plain image data. These two steps are not constant for each round. Perhaps these steps introduced new entry in the next round, making the cryptanalysis more difficult.

3.1. Steps of Encryption

(i)Step 1: convert 128 bits of data into 16 data bytes and write these 16 bytes into a state matrix.(ii)Step 2: construct keys using the BCH codes of length 128 by taking different designed distances over the Galois field, used as round keys. Key 0 is used in round 0; key 1 is used in round 1. Apply all 10 different keys in 10 rounds.(iii)Step 3: ten different MDS matrices are constructed for each round using the BCH codes over the Galois field. Then the current state matrix is multiplied with the different MDS matrix in each round. The multiplication is modulo multiplication over the Galois field .(iv)Step 4: then, take the analyses of the encrypted image and compare it with the original image.

3.2. Construction of Round Keys

The construction technique of round keys is followed by the binary representation of the generator polynomials of BCH codes over for different designed distances. Convert each generator polynomial to its binary representation form of length 128 bits. If it is not 128 bits, add check bits on the left-hand side to make 128 bits long. Then convert the BCH of length 128 into 16 bytes. This 16-byte string serves as a round key. Key 1 is derived from the generator polynomial of BCH code with designed distance 65. By using the proposed technique, we get Key 1 as follows:(i)Key 1: 127 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255(i)Now we construct the next key by using BCH code of length 127 over Galois field with a designed distance of 60. Then convert the coefficients of generator polynomial which are in descending order into the block of 8 bits.(ii)00000000 10101011 00110001 00010110 10011100 10000100 10100100 11011011 10001111 01000001 10101000 11001011 10110000 11101011 11001111 10111111(iii)Convert each byte into the decimal form so that key 2 is as follows:(ii)Key 2: 0 171 49 22 156 132 164 219 143 65 168 203 176 235 207 191(i)Similarly, we construct all keys using BCH codes over the Galois field by changing the designed distance.(iii)Key 3: 0 1 101 123 192 163 7 249 56 40 16 229 154 109 22 187(iv)Key 4: 0 0 3 146 27 208 157 120 3 122 83 250 137 174 174 43(v)Key 5: 0 0 0 5 16 109 174 23 166 30 82 12 96 106 78 41(vi)Key 6: 0 0 0 0 13 83 6 214 191 219 200 87 71 25 231 13(vii)Key 7: 0 0 0 0 0 25 161 99 10 46 46 13 22 111 12 93(viii)Key 8: 0 0 0 0 0 0 41 19 31 9 172 122 28 6 238 111(ix)Key 9: 0 0 0 0 0 0 0 65 218 145 157 158 251 54 166 153(x)Key 10: 0 0 0 0 0 0 0 0 244 132 85 24 185 88 42 31

3.3. Construction of Mixed Column Matrix

This is a significant step in the proposed algorithm which creates confusion and diffusion. We construct a mixed column matrix by following steps:(i)Step 1: construct a generator polynomial of BCH code of length with designed distance where and is the degree of the primitive, irreducible polynomial.(ii)Step 2: select a value satisfying (iii)Step 3: calculate the dimension of the code, , where is the degree of the generator polynomial of BCH code.(iv)Step 4: divide the by generator polynomial and get remainder polynomial.(v)Step 5: convert each remainder polynomial into binary form, make a block of 8 bits, and convert each block into decimal form.(vi)Step 6: write coefficients of the remainder polynomial, which are in decimal form, into matrix such that matrix is nonsingular.

3.4. Demonstration

Suppose that we want to construct the MDS matrices with the help of BCH code of length 255 with designed distance  = 119. Here we take , so that satisfies the inequality Generator polynomial is for BCH code with . The coefficients of generator polynomial in descending form are as follows:

101101010011001110000010100010111111111001010111011111100101100110000100111111011011100000011101101011111101000110111000100001011101000010110011100100011000010000010010000100100101111001100001110100001100010001000100101001011111010100010010111.

We find the , that is, . Coefficients of the polynomial are into the block of 8 bits. Here is the remainder polynomial after dividing by generator polynomial of BCH code. The coefficients of remainder polynomial are as follows.

11101001 00010101 11110100 10100100 01000100 01100001 01110000 11001111 01001001 00001001 00000100 00110001 00111001 10100001 01110100 00100011 10110001 01111110 10110111 00000011 10110111 11100100 00110011 01001111 11011101 01001111 11111010 00101000 00111001 10010101 110100100

Now, converting each block into decimal form

Similarly, we construct 9 more MDS matrices for each round using BCH codes of length 127 corresponding to different designed distances for the image encryption scheme.

These are the required matrices used in the proposed algorithm in the mixed column transformation step for image data security.

4. Analysis

4.1. Key Space Analysis

The asset of an algorithm of cryptography depends on the space of the key, so the length of the key must be large for a brute force attack. The proposed algorithm has 2128 possible keys, which are very large. Suppose any unauthorized person tries for a brute force attack. In that case, the acute sensitivity is very high for this algorithm, so he has to try all possibilities of keys for the decryption of the image, which is very difficult to do computationally.

4.2. Key Sensitivity Analysis

High key sensitivity is vital for image security, which means that the encrypted image cannot be converted into a plain image correctly even if there is a small change between decryption or encryption keys. The proposed algorithm is tested for different keys with a minimal difference. This is the same as an avalanche effect in text encryption, where a minimal change in the key gives a major difference in the encrypted text. The strength of an algorithm is that if a key is changed by a single bit, then the original image cannot be obtained.

4.3. Statistical Analysis for Image Encryption

Statistical analyses are used to determine the statistical features of the encryption technique. These analyses include correlation, information entropy, contrast, homogeneity, and energy. These analyses determine the strength of the encryption scheme. Statistical analyses decide whether the encryption scheme is secure for image encryption or not. The details of statistical analyses are briefly discussed as follows.

4.3.1. Histogram Analysis

Histogram analysis is used to see how much encryption procedure is needed to change test image compared to the encrypted image. For good encryption, the histogram of the ciphered image should have a uniform distribution that indicates that the anticipated scheme can resist statistical attacks. Figure 16 shows the histogram analysis of test images and encrypted images. Figure 1 shows original image histogram and Figure 4 shows the histogram of encrypted image through blue channel. Figure 2 shows histogram of original image and Figure 5 shows histogram of encrypted image through green channel. Figure 3 is showing histogram of plain image and Figure 6 shows histogram of encrypted image through red channel.

The histograms of the ciphered images are appreciably uniform and are quite dissimilar from the test images. The suggested encryption technique has fulfilled all the test image features and has convoluted the statistical bond between the test image and its cipher image.

4.3.2. Contrast

Contrast analysis organizes the objects in an image. A secure encryption technique has high contrast values. It measures the color difference, which identifies the distinctive in an object. More briefly, it measures the change in brightness, color, and other objects within a similar frame of view. Contrast can be measured mathematically by the equation denotes the number of grey-level cooccurrence matrices and , m are the pixels of an image. The strength of contrast between the pixels and their adjacent pixels is compared in the full image.

4.3.3. Correlation

The correlation analysis is used to break the relationship between the neighboring pixels. The test image correlation is approaching one. The encrypted image should correlate coming zero for better encryption. To determine the encryption effect of the proposed technique, perform correlation analysis on the plain and encrypted image. The correlation coefficient is calculated by formulaδ and and denote the variance and expected value.

4.3.4. Energy

In this analysis, we compute the energy of the encrypted images by applying S-boxes. This measure gives the sum of squared elements in the grey-level cooccurrence matrixwhere is the number of grey-level cooccurrence matrices.

4.3.5. Homogeneity

In homogeneity, the grey-level cooccurrence matrix explains the proficiency of arrangements of pixel brightness results in tabular form. The closeness of the distribution in the grey-level cooccurrence matrix to its diagonal is measured through the homogeneity analysis. If the homogeneity is as small as possible, then encryption is better. The following formula measures homogeneity:

4.3.6. Entropy

Information entropy measures the disorder which is created by the encryption process. Entropy measures the strength of the encryption technique. An encryption technique is good if it has more disorder and randomness. Entropy is defined aswhere contains the histogram counts. Entropy must be close to 8 for better image quality.

4.3.7. Image Encryption

The image is encrypted using the proposed scheme. Figure 7 shows the original Lena image, and Figure 8 shows the encrypted Lena image. The comparison results of the original AES algorithm and proposed encryption technique are shown in Table 3.

Table 3 shows results of the encryption technique using the original AES algorithm and proposed AES algorithm through the red, green, and blue channels. The contrast of the proposed AES is better than the original AES. Correlation and energy are also close to zero. Proposed homogeneity is also good as compared to the original AES. Entropy is close to 8, which shows that our image encryption technique is good.

5. Conclusion

This paper encrypts the image using the novel technique based on BCH codes over the Galois field. We introduce a new method for image encryption using Bose Chaudhary Hocquenghem codes which secures our data. We constructed the secret keys and MDS matrices using the BCH codes of length 127 over the Galois field . Then encrypt the image using the proposed modified AES algorithm. Table 3 concludes that the proposed image encryption technique is better than the original AES algorithm. Correlation, homogeneity, and energy of encrypted image also show promising results for image data security. Our histogram analysis shows that the proposed encryption scheme is improved. We can conclude that the proposed algorithm gives a high-security level to image data using different tests and studies. The unauthorized user cannot access the data without permission. This algorithm can be used in various intelligence agencies, Forensics, and Military Communication in the future. Further, this work can be extended to apply text, audio, video encryption.

Data Availability

No such type of data were used in this manuscript.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

The authors extend their gratitude to the Deanship of Scientific Research at King Khalid University for funding this work through the research groups program under Grant no. R. G. P. 2/150/42.