A Novel Image Encryption Technique Based on Cyclic Codes over Galois Field

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.


Introduction
Nowadays, cryptography plays a primary role in information security and embedded system design. e use of mobile communication and the Internet rapidly increases and occupies wide-ranging areas in daily life. ere 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. e diffusion layer has been neglected in cryptographic research, juxtaposed to confusion layers for a long time.
e 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 [2][3][4]. us, 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. e keystream generator is added to the AES algorithm to improve encryption performance [5]. e modified AES algorithm is explained in [6].
e image and video encryption based on chaos with security analyses are presented in [7]. e existing image encryption techniques are reviewed in [8]. e article explains the simulation of image encryption using the AES algorithm [9]. Using Gaussian Distribution Cryptographic Substitution Box is designed in [10]. e 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. e 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. eir 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. e 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 [20][21][22][23][24]. e 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. e proposed criteria use correlation analysis, entropy analysis, homogeneity analysis, contrast analysis, energy analysis, and histogram analysis. is 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. e 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.

Cyclic Codes.
e linear mapping ρ: F n ⟶ F n is defined by It is called a cyclic shift. A linear code C ⊂ F n is called cyclic code if (2)

Irreducible Polynomial.
A polynomial is called irreducible if it cannot be written as the product of two polynomials. For example, P(x) � x 3 + x + 1 is an irreducible polynomial of degree 3 over Z 2 .

Primitive
Polynomial. An irreducible polynomial P(x) is primitive polynomial if α is a primitive root of P(x), that is, where p is prime and m is the degree of the irreducible polynomial. For example, P(x) � x 4 + x + 1 is a primitive, irreducible polynomial over Z 2 . [26]. Let αϵF q m . en, α, α q , α q 2 , α q 3 , . . . have the same minimal polynomial over F q .

eorem
2.5. BCH Code. BCH codes are cyclic linear codes. Let c, d, q, n be positive integers such that 2 ≤ d ≤ n, q is a power of some prime number, and (n, q) � 1. Let m be the least positive integer such that us, n|q m − 1. Let α be a primitive nth root of unity in 5 q m . Let m i (x) ∈ 5 q [x] denote the minimal polynomial of α i . Let g(x) be the product of distinct minimal polynomials among m i (x), i � c, c + 1, . . . , c + d − 2, that is, Since m i (x) divides y n − 1 for each i, it follows that g(x) divides x n − 1. Let C be a cyclic code with generator polynomial g(x) in the ring 5 q [x] n . en, C is called a BCH code of length n over 5 q with designed distance d.
Nowadays, BCH codes have many applications; BCH codes are used in satellite communication, hard disc, compact disc, storage systems, and data security.
2.6. eorem [26]. Let C be BCH code of length n over F q with designed distance d. en 2.7. eorem [26]. Let C be a BCH code of designed distance d. en, where d(c) is the minimum distance and d is designed to distance.
where p is prime and P(x) is a primitive, irreducible polynomial of degree m over Z p . erefore, 2.9. MDS (Maximum Distance Separable) Matrices. MDS (Maximum Distance Separable) matrices have many applications in data security and channel coding. ey create diffusion in block cipher data. ese 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.

Proposition.
If l × l MDS matrices can be generated from BCH code [n, k, d] over Galois field GF(2 m ) then m, l, and d must satisfy 2.11. Proposition. Let g(x) be the generator polynomial of [n, k] cyclic code over the field F. Let H be the k × n − k matrix whose jth row is rem g(x) (x n− k+j− 1 ) , j � 1, 2, 3 . . . , k. en, the canonical parity check and generator matrices of the code are . en the elements of Galois field GF(2 7 ) are shown in Table 1.
We want to construct the BCH code of length 127 with designed distance d � 60. en find minimal polynomials corresponding to each α i where i � 1, 2, 3, . . . , 59. By using eorem 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.

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. ese two steps are not constant for each round. Perhaps these steps introduced new entry in the next round, making the cryptanalysis more difficult.

Steps of Encryption
(i) Step 1: convert 128 bits of data into 16 data bytes and write these 16 bytes into a 4 * 4 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. en the current state matrix is multiplied with the different MDS matrix in each round. e multiplication is modulo multiplication over the Galois field GF(2 8 ).
(iv) Step 4: then, take the analyses of the encrypted image and compare it with the original image.

Construction of Round
Keys. e construction technique of round keys is followed by the binary representation of the generator polynomials of BCH codes over GF (2 7 ) (2 7 ).

Construction of Mixed Column Matrix.
is is a significant step in the proposed algorithm which creates confusion and diffusion. We construct a mixed column matrix by following steps: 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.
Computational Intelligence and Neuroscience 5 ese are the required matrices used in the proposed algorithm in the mixed column transformation step for image data security.

Key Space Analysis.
e 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. e proposed algorithm has 2 128 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.

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. e proposed algorithm is tested for different keys with a minimal difference. is 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. e strength of an algorithm is that if a key is changed by a single bit, then the original image cannot be obtained.

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

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 1-6 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. e histograms of the ciphered images are appreciably uniform and are quite dissimilar from the test images. e suggested encryption technique has fulfilled all the test image features and has convoluted the statistical bond between the test image and its cipher image.
n(g, h) denotes the number of grey-level cooccurrence matrices and g, m are the pixels of an image. e strength of contrast between the pixels and their adjacent pixels is compared in the full image.

Correlation.
e correlation analysis is used to break the relationship between the neighboring pixels. e test image correlation is approaching one. e 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. e correlation coefficient is calculated by formula δ and µ and denote the variance and expected value.

Energy.
In this analysis, we compute the energy of the encrypted images by applying S-boxes. is measure gives the sum of squared elements in the grey-level cooccurrence matrix where p(l, m) is the number of grey-level cooccurrence matrices.

Homogeneity.
In homogeneity, the grey-level cooccurrence matrix explains the proficiency of arrangements of pixel brightness results in tabular form. e 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. e 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 as where P(x i ) contains the histogram counts. Entropy must be close to 8 for better image quality.

Image Encryption.
e image is encrypted using the proposed scheme. Figure 7 shows the original Lena image, and Figure 8 shows the encrypted Lena image. e  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. e 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.

Conclusion
is 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 (2 7 ). en 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. e unauthorized user cannot access the data without permission. is 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
e authors declare that they have no conflicts of interest.