Enhancing Image Encryption with the Kronecker xor Product, the Hill Cipher, and the Sigmoid Logistic Map

: In today’s digital age, it is crucial to secure the ﬂow of information to protect data and information from being hacked during transmission or storage. To address this need, we present a new image encryption technique that combines the Kronecker xor product, Hill cipher, and sigmoid logistic Map. Our proposed algorithm begins by shifting the values in each row of the state matrix to the left by a predetermined number of positions, then encrypting the resulting image using the Hill Cipher. The top value of each odd or even column is used to perform an xor operation with all values in the corresponding even or odd column, excluding the top value. The resulting image is then diffused using a sigmoid logistic map and subjected to the Kronecker xor product operation among the pixels to create a secure image. The image is then diffused again with other keys from the sigmoid logistic map for the ﬁnal product. We compared our proposed method to recent work and found it to be safe and efﬁcient in terms of performance after conducting statistical analysis, differential attack analysis, brute force attack analysis, and information entropy analysis. The results demonstrate that our proposed method is robust, lightweight, and fast in performance, meets the requirements for encryption and decryption, and is resistant to various attacks.


Introduction
Recently, a lot of digital data has been transmitted over the Internet. This data can be in the form of semi-structured, unstructured, or structured data. In this digitally driven world, information security is of great importance. Various organizations and institutions invest a lot of money in the security of their resources, especially in protecting the privacy of employees, online transactions, and confidential information stored or transmitted in the form of video, text, audio, or image. This means that in today's era of the Internet of Things, everything is connected to the Internet, and therefore, the security of information must be ensured. Here, it is imperative to preserve the integrity, confidentiality, and availability of information system resources on all communication channels, starting from hardware, software, data, or telecommunications. There are various protection methods, such as antivirus programs, firewalls, intrusion detection systems, biometric verification processes, routing controls, and cryptographic techniques.
Text encryption is a widely used technique to secure sensitive information from unauthorized access, which is usually achieved through the use of cryptography. However, when it comes to image encryption, additional techniques are required to preserve the visual content and quality of the image while ensuring its confidentiality. In this context of image encryption, both chaotic and non-chaotic methods have been used, where chaotic methods have been found to be more effective due to their ability to provide higher security, faster encryption, and better resistance to attacks. Some studies, such as [1], have incorporated chaotic systems into their image encryption algorithms with other cryptography techniques.
The complexity of chaotic systems can provide a higher level of security for encrypted information, and key attributes to consider when using chaos for encryption include initial condition sensitivity, ergodicity, simplicity, and randomness. Generally, different techniques of image encryption have been introduced and used, such as Chaos-Based Encryption [1], which is a modern and innovative method for securing digital images. This technique utilizes the principles of chaos theory to scramble the original image in a way that is not only secure but also visually pleasing. Unlike traditional image encryption methods that rely on mathematical algorithms, chaos-based image encryption uses the inherent randomness and unpredictability of chaotic systems to generate a key that can be used to encrypt and decrypt the image. This means that the encrypted image is not susceptible to attacks based on the prediction or manipulation of algorithmic patterns. The use of chaos theory in image encryption has several advantages over traditional methods because they provide a high level of security due to their unpredictability and retain their visual quality, which makes them ideal for applications such as medical imaging and digital art. There are several chaotic maps that have been used to generate random sequences of numbers in chaotic systems, including the Sine map [2], Henon map [3], and logistic map [4]. The logistic map is a one-dimensional chaotic system that can be modified to create more complex confusion in two-or three-dimensional space.
Transform Domain Encryption [5] is a method of securing digital images by transforming the image from the spatial domain to a different domain, such as the frequency or wavelet domain, before encryption. The goal of this technique is to utilize the unique properties of different transform domains to enhance the security of the encrypted image. Transform Domain image encryption has several advantages over traditional image encryption methods. Firstly, the transformed image often has a lower correlation between its adjacent pixels, which makes it more difficult for attackers to use statistical attacks to reverse the encryption. Secondly, the transformed image often has a more robust representation of the image content, which makes it more resilient to attacks based on image manipulation. Examples include discrete cosine transform (DCT) and discrete wavelet transform (DWT). This method has the drawback of being vulnerable to chosen-text attacks, in which the attacker examines the coefficients of the plaintext and encrypted image in order to recover the secret keys. Another weakness is the susceptibility to brute-force attacks, which take place when the key is too small. Although we did not incorporate any transform domain encryption techniques into our proposed study, we did integrate multiple techniques with long and complex secret keys.
Cryptographic Hash Functions play an important role in the field of image encryption by providing a secure method of verifying the authenticity and integrity of an encrypted image. A cryptographic hash function is a mathematical algorithm that takes an input, such as an image, and produces a fixed-length output, called a hash, that is unique to that input. When an image is encrypted, the hash of the original image can be computed and stored alongside the encrypted image. When the encrypted image is decrypted and the original image is retrieved, a new hash of the recovered image can be computed and compared to the stored hash. If the two hashes match, it is evidence that the encrypted image has not been tampered with and is a secure representation of the original image. The use of cryptographic hash functions in image encryption provides several advantages. Firstly, it allows for the verification of the authenticity and integrity of the encrypted image without the need to compare the entire image to the original. Secondly, it provides a way to detect any changes made to the encrypted image, even if the changes are small and go unnoticed by the human eye. Collision attacks, pre-image attacks, salt attacks, and rainbow table attacks are some of the drawbacks of hash functions in image encryption. Although we have not used a hash function, our proposed technique ensures that it is not possible to use a fake image to obtain the secret key or tamper with the final product by comparing its hash value with the encrypted image.
Visual Cryptography [6] is a method of encrypting images using techniques that are based on visual perception, rather than purely mathematical algorithms. The goal of visual image cryptography is to make the encrypted image appear as a random, meaningless pattern to an unauthorized observer, while still preserving the original information when decrypted by the intended recipient. Visual image cryptography can be more secure and robust against attacks, as it takes advantage of the human visual system and its limitations. Another approach used in image encryption is the use of steganography techniques. Steganography is the practice of hiding secret information [7] within an image in a way that is not noticeable to the human eye. The goal of image steganography is to provide a covert communication channel that can be used to transmit sensitive information without being detected by unauthorized parties. The secret information can be in the form of text, images, or other digital data, and it is embedded into the host image in such a way that it does not alter the visual appearance of the image. The ability to hide sensitive data within digital media files that are resistant to file compression, cropping, and scaling is one of the advantages of using steganography. However, its weaknesses include easy detection of the original information when skilled attackers use specialized tools to detect the presence of hidden data and extract information, and the technique also has a limited amount of data that can be hidden within other digital files. Despite these weaknesses, steganography remains an effective way to hide sensitive data, as it allows users to embed private information within a digital file in an inconspicuous way.
A research study titled "A Secure Image Encryption Method Using Chaotic Map" by [8] explored the use of chaotic maps for image encryption. The authors proposed a technique that involves dividing the image into blocks and encrypting each block using a chaotic map. The effectiveness of this method was tested on various images and found to provide security for the images. One of the benefits of the image encryption technique proposed in this study is that it is simple to use and does not require a lot of computing power, which makes it suitable for use in real-time applications. While the image encryption technique proposed in this study has some strengths, it also has some limitations. One potential weakness is that chaotic maps, which are used in the proposed method, can be susceptible to statistical analysis attacks. In the study "A New Image Encryption Algorithm Based on Chaotic Maps and DNA encoding" by [9], the authors presented a new approach for encrypting images that combines chaotic maps with DNA encoding and Huffman coding algorithms. The proposed method was tested on various images and found to be effective in providing security. One advantage of this technique is that it uses multiple encryption techniques, which can enhance the overall security of the method. However, it is possible that the DNA encoding and Huffman coding algorithms may be susceptible to certain attacks, which could potentially compromise the security of the proposed method. The study "Selective image encryption method based on dynamic DNA coding and a new chaotic map" by [10] introduced a new method for encrypting images that combines chaotic maps with DNA sequence operations. The proposed technique was tested on various images and found to be effective in providing security. One benefit of this method is that it uses both chaotic maps and DNA operations, which can enhance the overall security of the technique. However, it is possible that DNA operations may be susceptible to certain attacks, which could potentially compromise the security of the proposed method.
For example, in the study by Xishun et al. [11], the authors propose a novel image encryption method that combines the Kronecker product with DNA computing. The authors demonstrate that their method is able to achieve high levels of security and efficiency, making it a promising approach for image encryption. Several other researchers [12][13][14] have used the Kronecker product in their image encryption techniques. For instance, in the study by [15], the authors use the Kronecker product to combine multiple encryption keys in order to achieve a higher level of security. Similarly, in [15], the semi-tensor product theory is used to combine a boolean network in order to encrypt images.
The Hill cipher has been widely used in image encryption due to its simplicity and effectiveness in providing security. In a previous study [16], the authors proposed an image encryption technique based on the Hill cipher, which involves dividing the image into blocks and encrypting each block using the Hill cipher algorithm. The proposed method was tested on various images and was found to be effective in providing security for the images. However, the Hill cipher has some weaknesses that may make it vulnerable to attacks. One weakness is its reliance on a fixed key, which can be discovered through a brute force attack. Additionally, the Hill cipher is vulnerable to known-plaintext attacks, where an attacker with access to both the plaintext and the corresponding ciphertext can easily recover the key. This can be mitigated by using a large key size and regularly changing the key, but it is still potentially vulnerable.
There is a lack of studies that have successfully integrated Hill cipher, chaotic map, and the Kronecker xor product for image encryption. As such, this study represents a significant innovation in the field by presenting a unique combination of these encryption techniques. The combination of the Hill cipher, chaotic map, and Kronecker xor product is expected to provide robust security for images, as each technique brings its own strengths to the table; it should also be able to overcome the problem of plain text attacks due to having more than one secret key. Hill cipher is a well-known and widely-used technique for symmetric key encryption, the chaotic map is a powerful tool for generating randomness and unpredictability, and the Kronecker product is a mathematical operation that can be used to create complex, nonlinear transformations. By leveraging the strengths of these techniques, this study's proposed image encryption method is expected to be highly effective in protecting the confidentiality and integrity of images.

•
This paper presents a novel image encryption method that combines the Hill Cipher, sigmoid logistic map, and Kronecker xor product matrix techniques. The sigmoid logistic map was modified in this method to generate complex pseudo-random numbers that are effective in encrypting images. By integrating these three techniques, the proposed image encryption method offers a new approach to digital encryption that has not been explored previously. The combination of the Hill Cipher, sigmoid logistic map, and Kronecker xor product matrix brings together a range of strengths to provide robust security for images. This contribution is expected to be a valuable addition to the field of image encryption. • One contribution of this paper is the use of the Kronecker bitwise exclusive OR operation to make the image pixels more obscure and increase the size of the image. The Kronecker product of matrices is a well-known technique that is often used for digital watermarking, encryption, and compression. In this study, we adapted the Kronecker product approach by replacing the product operator with the xor operator, which generates extremely large and complex keys. These keys are then combined with the complex keys generated by the modified sigmoid logistic map through the xor operation. This contribution represents a new application of the Kronecker product and xor operator for image encryption and adds to the growing body of knowledge in this field.

•
It is important to note that the Kronecker product used in this paper is the Kronecker xor product, not the Kronecker tensor product. The Kronecker xor product can significantly increase the size of the data being stored when used for encryption. While this additional storage space may be a consideration, it is essential to weigh this against the importance of protecting the sensitive information being stored. The Kronecker xor product is an effective method for ensuring that data is secure and not accessible to unauthorized parties. • Another contribution of this paper is the thorough testing and evaluation of the encrypted image, which was performed and compared to other similar studies. The results of these tests suggest that the proposed image encryption method meets all the criteria for good encryption. The effectiveness of the proposed method was demonstrated through comparison with other techniques, providing confidence in its ability to secure images against potential threats.
The structure of this study can be summarized as follows. Section 2 provides an overview of the basic concepts and background information necessary for understanding the proposed image encryption method. In Section 3, the details of the encryption process and its implementation are described and illustrated. Section 4 presents the simulation results, analysis, and evaluation of the proposed encryption scheme, as well as a comparison with other studies. Finally, the conclusions of the study are presented in the last section.

Logistic Map
The logistic map results from the logistic equation, sometimes called the Verhulst model [17], which is often used to predict the growth of the population of living beings or the occurrence of natural phenomena. The logistic equation is described by the following differential Equation (1).
where r is the Malthusian parameter [18] that determines the growth of a living organism at a given time, and K is called a carry. If we let x = N/K, then the described Equation (1) after dividing both sides with K becomes the following Equation (2).
which can be written as Equation (3).
In the logistic map, "r" is a positive value known as the "biotic potential". When the value of "r" is greater than 3.5 and an initial parameter, "x 0 ∈ [0, 1]," is used, the map produces a chaotic system that can be used for encryption. This has been demonstrated in reference [19], where the logistic map is used to encode the selected content of an image. The combination of the logistic map and sine map results in a complex, chaotic map that offers good security performance. The use of these maps in image encryption is rapidly increasing, as demonstrated in references [19][20][21][22]. This trend is likely to continue as researchers continue to explore the potential of chaotic maps for image encryption.

Sigmoid Function
This is a mathematical function that maps any input value between 0 and 1, mostly as the probability of a binary number. The sigmoid function is expressed in different ways, but the most used is defined as in Equation 4, known as the logistic function.
where x is the input value, e is the mathematical constant e, and f (x) is the output value. The sigmoid function has been used in many applications, including machine learning, neural networks, and logistic regression. As explained in depth in [23], the shape of the sigmoid function is characterized by the steep slope around the origin and the shallow slope away from the origin. Any changes in the input value near the origin result in larger changes in the output values. The disadvantage of the sigmoid function is that it is prone to saturation, which means the slope of the function becomes small as input values become very large or very small. To overcome this limitation, this study integrates the sigmoid function and the logistic map, which means the logistic map is the alpha, and the sigmoid function is the omega, as seen in Equation (7). In the proposed system, the chaotic behavior begins when the control parameter "r" is set to 7.0158 and persists throughout the process. In order to achieve a good encryption result, we used a value of "r" equal to 20.1245 for K 2 and 20.1254 for K 3 . Its corresponding bifurcation diagram is shown in Figure 1. To obtain good and complex chaotic results, it is important that the proposed map has a Lyapunov exponent with a positive value greater than one. This is because the Lyapunov exponent reflects the rate of separation between initially close trajectories in the phase space of the system, and a positive value indicates that the system is chaotic. In this study, we have analyzed the Lyapunov exponent of both the basic logistic map and the modified sigmoid logistic map, as shown in Figure 2. The results demonstrate that both maps have Lyapunov exponents with positive values, indicating that they are suitable for use in image encryption. come very large or very small. To overcome this limitation, this study integrates the sigmoid function and the logistic map, which means the logistic map is the alpha, and the sigmoid function is the omega, as seen in Equation (7). In the proposed system, the chaotic behavior begins when the control parameter "r" is set to 7.0158 and persists throughout the process. In order to achieve a good encryption result, we used a value of "r" equal to 20.1245 for 2 K and 20.1254 for 3 K . Its corresponding bifurcation diagram is shown in Figure 1. To obtain good and complex chaotic results, it is important that the proposed map has a Lyapunov exponent with a positive value greater than one. This is because the Lyapunov exponent reflects the rate of separation between initially close trajectories in the phase space of the system, and a positive value indicates that the system is chaotic. In this study, we have analyzed the Lyapunov exponent of both the basic logistic map and the modified sigmoid logistic map, as shown in Figure 2. The results demonstrate that both maps have Lyapunov exponents with positive values, indicating that they are suitable for use in image encryption.

Kronecker Product
The Kronecker product, also known as the tensor product, is a fundamental operation in mathematics and engineering. It is a way to combine two matrices or tensors into a single matrix or tensor, and has a wide range of applications, including signal processing, image processing, machine learning, error correction, repeated replication of equilibrium, quantum gates, and statistics in variance estimation. The concept of the Kronecker product has a long history dating back to the 19th century, and has been extensively studied and applied in many different fields, as explained in detail in [24]. moid function and the logistic map, which means the logistic map is the alpha, and the sigmoid function is the omega, as seen in Equation (7). In the proposed system, the chaotic behavior begins when the control parameter "r" is set to 7.0158 and persists throughout the process. In order to achieve a good encryption result, we used a value of "r" equal to 20.1245 for 2 K and 20.1254 for 3 K . Its corresponding bifurcation diagram is shown in Figure 1. To obtain good and complex chaotic results, it is important that the proposed map has a Lyapunov exponent with a positive value greater than one. This is because the Lyapunov exponent reflects the rate of separation between initially close trajectories in the phase space of the system, and a positive value indicates that the system is chaotic. In this study, we have analyzed the Lyapunov exponent of both the basic logistic map and the modified sigmoid logistic map, as shown in Figure 2. The results demonstrate that both maps have Lyapunov exponents with positive values, indicating that they are suitable for use in image encryption.

Kronecker Product
The Kronecker product, also known as the tensor product, is a fundamental operation in mathematics and engineering. It is a way to combine two matrices or tensors into a single matrix or tensor, and has a wide range of applications, including signal processing, image processing, machine learning, error correction, repeated replication of equilibrium, quantum gates, and statistics in variance estimation. The concept of the Kronecker product has a long history dating back to the 19th century, and has been extensively studied and applied in many different fields, as explained in detail in [24].

Kronecker Product
The Kronecker product, also known as the tensor product, is a fundamental operation in mathematics and engineering. It is a way to combine two matrices or tensors into a single matrix or tensor, and has a wide range of applications, including signal processing, image processing, machine learning, error correction, repeated replication of equilibrium, quantum gates, and statistics in variance estimation. The concept of the Kronecker product has a long history dating back to the 19th century, and has been extensively studied and applied in many different fields, as explained in detail in [24].
The Kronecker product, denoted by the symbol "⊗", is a binary operation that takes two matrices A and B and produces a new matrix C as the result. The size of the resulting matrix C is determined by the sizes of the matrices A and B. Specifically, if A is an m-by-n Appl. Sci. 2023, 13, 4034 7 of 23 matrix and B is a p-by-q matrix, then the resulting matrix C is an mp-by-nq matrix. The elements of matrix C are computed as follows in Equation (5).
where "mod" denotes the modulo operation and "div" is the integer division operator. The Kronecker product has many useful properties, including distributivity over addition and scalar multiplication and bilinearity. In this paper, we propose a new technique known as the Kronecker xor product that uses the same approach as the Hadamard matrix and Kronecker product to increase the size of the image from n × n to n 2 × n 2 . The operation is performed between two paired columns and adjacent rows, using the results of the pseudo-code random number of sigmoid logistic maps as the input source leading to the encrypted image.

Hill Cipher
The Hill cipher is a classic polyalphabetic substitution cipher technique that uses linear algebra to encrypt and decrypt messages. It was invented by Lester S. Hill in 1929 [25,26] and has since been widely used as a method of secure communication. In the Hill cipher, the plaintext message is represented as a matrix of numbers, and a key matrix is used to perform a series of matrix multiplications and additions to encode the message. The key matrix must be invertible so that it can be used to reverse the encryption process and decrypt the message. Some of the weaknesses when the hill cipher is used alone include having a fixed block size in which the size of plaintext and cipher text is always the same; this makes the cipher technique vulnerable to block analysis. Another weakness includes known plaintext attacks, in which the adversaries can decrypt the future image if it contains both plaintext and ciphertext.
To overcome these vulnerabilities, we propose an encryption method that integrates the Hill cipher with the sigmoid logistic map and the Kronecker bitwise exclusive OR operation. The resulting method is simple and effective, making it a promising candidate for secure image communication. However, as with any cryptographic technique, it is important to use the Hill cipher in combination with other methods to ensure the maximum level of security.

Design and Implementation of the Proposed Scheme
A cryptosystem is a system designed for secure communication that employs a set of algorithms and protocols to encode and decode messages. This study presents a technique that combines multiple encryption methods to enhance the security of digital images. The proposed approach first scrambles the pixels of an image and then applies confusion and diffusion techniques. The following steps outline the process used in this study.

Image Scrambling
Step 1: The scramble process is the same as that of AES encryption [27]. The shift rows operation works by shifting the values in each row of the state matrix to the left by a certain number of positions. The number of positions shifted by each row in the matrix is determined by its index. Specifically, the first row is not shifted at all, the second row is shifted by one position, the third row by two positions, and the fourth row by three positions; the process continues for the whole image. Figure 3 shows the example in a matrix P of size 4 × 4. Appl. Sci. 2023, 13, x FOR PEER REVIEW 8 of 24

Diffusion of Image Pixels
Step 2. The top values of matrix P are preserved, while the top value of each odd column is used to perform a bitwise exclusive OR operation with all values in the corresponding even column, excluding the top value. Similarly, the top value of each even column is used to perform a bitwise exclusive OR operation with all values in the corresponding odd column, also excluding the top value to obtain matrix H. Figure 4 and Equation (6) illustrate the process of performing a bitwise exclusive OR operation on the matrix, where x and y represent odd and even columns, respectively, and i, j represent the different image pixel positions within the matrix at the nth position. Step 3. In this process, all elements in a matrix ' H are encrypted using the Hill Cipher technique, in which a predefined 2 2 × secret key K is used to encrypt the diffusion matrix ' H . The process involves iterating over the 4 4 × block matrix until the entire image is encrypted. To ensure that the encryption is secure, a modulo operation of 256 is performed on each element of the matrix during the process, as shown in Equation (7), to have intermediary Ciphertext 1 K .
Step 4. In this process, a sigmoid logistic map is used to randomly generate secret keys 2 3 K & K according to Equation (8). Secret key 2 K is used in the exclusive operation with secret key elements 1 K to obtain intermediary Ciphertext 4 K , as shown in Equation (9). This helps to ensure that the secret keys are unique and more secure.

Diffusion of Image Pixels
Step 2. The top values of matrix P are preserved, while the top value of each odd column is used to perform a bitwise exclusive OR operation with all values in the corresponding even column, excluding the top value. Similarly, the top value of each even column is used to perform a bitwise exclusive OR operation with all values in the corresponding odd column, also excluding the top value to obtain matrix H. Figure 4 and Equation (6) illustrate the process of performing a bitwise exclusive OR operation on the matrix, where x and y represent odd and even columns, respectively, and i, j represent the different image pixel positions within the matrix at the nth position.

Diffusion of Image Pixels
Step 2. The top values of matrix P are preserved, while the top value of each odd column is used to perform a bitwise exclusive OR operation with all values in the corresponding even column, excluding the top value. Similarly, the top value of each even column is used to perform a bitwise exclusive OR operation with all values in the corresponding odd column, also excluding the top value to obtain matrix H. Figure 4 and Equation (6) illustrate the process of performing a bitwise exclusive OR operation on the matrix, where x and y represent odd and even columns, respectively, and i, j represent the different image pixel positions within the matrix at the nth position.
x i j n y i x i j n y i j n x i y i j n Step 3. In this process, all elements in a matrix ' H are encrypted using the Hill Cipher technique, in which a predefined 2 2 × secret key K is used to encrypt the diffusion matrix ' H . The process involves iterating over the 4 4 × block matrix until the entire image is encrypted. To ensure that the encryption is secure, a modulo operation of 256 is performed on each element of the matrix during the process, as shown in Equation (7) Step 4. In this process, a sigmoid logistic map is used to randomly generate secret keys 2 3 K & K according to Equation (8). Secret key 2 K is used in the exclusive operation with secret key elements 1 K to obtain intermediary Ciphertext 4 K , as shown in Equation (9). This helps to ensure that the secret keys are unique and more secure. Step 3. In this process, all elements in a matrix H are encrypted using the Hill Cipher technique, in which a predefined 2 × 2 secret key K is used to encrypt the diffusion matrix H . The process involves iterating over the 4 × 4 block matrix until the entire image is encrypted. To ensure that the encryption is secure, a modulo operation of 256 is performed on each element of the matrix during the process, as shown in Equation (7), to have intermediary Ciphertext K 1 .
Step 4. In this process, a sigmoid logistic map is used to randomly generate secret keys K 2 &K 3 according to Equation (8). Secret key K 2 is used in the exclusive operation with secret key elements K 1 to obtain intermediary Ciphertext K 4 , as shown in Equation (9). This helps to ensure that the secret keys are unique and more secure.
Appl. Sci. 2023, 13, 4034 9 of 23 Step 5. In this stage of the diffusion process, the Kronecker xor transformation process is applied to matrix K 4 , expanding the image from size n × n to size n 2 × n 2 . To further obscure the original message, the columns or rows of the matrix are shifted by the i th positions, where i acts as the secret key in the process. In the proposed technique, the rows are moved down, and the value of i is chosen as i = 3. Each element of the matrix K 4 undergoes a bitwise exclusive OR operation with the other elements of K 4 , while its value remains unchanged to form the image (secret keys) K 5 . The Kronecker xor product, as shown in Equation (11), illustrates the operation process on a 2 × 2 block matrix M, which is a part of K 4 , as shown in Equation (10). This helps to ensure that the diffusion process is secure and resistant to attacks. Figure 5 shows the expansion of the 2 × 2 encrypted image that results in the 4 × 4 matrix.
Step 5. In this stage of the diffusion process, the Kronecker xor transformation process is applied to matrix 4 K , expanding the image from size n n × to size 2 2 n n × . To further obscure the original message, the columns or rows of the matrix are shifted by the th i positions, where i acts as the secret key in the process. In the proposed technique, the rows are moved down, and the value of i is chosen as  (11), illustrates the operation process on a 2 2 × block matrix M, which is a part of 4 K , as shown in Equation (10). This helps to ensure that the diffusion process is secure and resistant to attacks. Figure 5 shows the expansion of the 2 2 × encrypted image that results in the 4 4 × matrix. The use of the Kronecker xor product aims to obscure the original message and prevent unauthorized access to the information being transmitted. By expanding the image and shifting the rows or columns, the resulting encrypted image can be made to appear significantly different from the original, making it more difficult for unauthorized users to infer the contents of the message. Additionally, the use of a secret key in the transformation process adds an additional layer of protection, as the original message can only be decrypted with knowledge of the key.
Step 6. The exclusive operation is performed between intermediary ciphertext 5 K and secret keys 3 K to obtain the last encrypted image C, as shown in Equation (12). The use of the Kronecker xor product aims to obscure the original message and prevent unauthorized access to the information being transmitted. By expanding the image and shifting the rows or columns, the resulting encrypted image can be made to appear significantly different from the original, making it more difficult for unauthorized users to infer the contents of the message. Additionally, the use of a secret key in the transformation process adds an additional layer of protection, as the original message can only be decrypted with knowledge of the key.
Step 6. The exclusive operation is performed between intermediary ciphertext K 5 and secret keys K 3 to obtain the last encrypted image C, as shown in Equation (12).

Flowchart of the Encrypted System
The following Figure 6 shows the encryption process of the whole operation of this proposed encryption mechanism.

Flowchart of the Encrypted System
The following Figure 6 shows the encryption process of the whole operation of this proposed encryption mechanism.

Decryption Step for Proposed Algorithm
The decryption process is described in the pseudo-code at the end of this paper in Appendix A. The steps for decrypting an encrypted image are provided below.
Step 2: Perform a bitwise exclusive OR operation between image (C) and secret key ( Step 3: Compress the intermediate image ( 5 K ) using the Kronecker xor operation to obtain a new image ( 4 K ).
Step 4: Perform a bitwise exclusive OR operation between the new image ( 4 K ) and secret keys ( 2 K ) from the sigmoid logistic map to obtain another new image ( 1 K ).
Step 5: Decrypt the new image ( 1 K ) using the inverse of the hill cipher and a key (K inverse) to obtain an intermediate image (H).
Step 6: For each element in an even column of the intermediate image (H), perform a bitwise exclusive OR operation with the top value of the corresponding odd column. For each element in an odd column, perform a bitwise exclusive OR operation with the top value of the corresponding even column, while preserving the top values of matrix (H).
Step 7: Determine the number of rows and columns in the intermediate image (H). Iterate over each row in the image (H), starting from the second row (the first row is not shifted). For the current row, shift it to the right by its index within the matrix by concatenating the portion of the row that was shifted off the end with the portion that was not shifted until you obtain the plain image (P).

Simulation Results and Analysis
In this study, the image sizes 16  were used as the dataset for encryption. Insufficient resources, such as computers with high pro-

Decryption Step for Proposed Algorithm
The decryption process is described in the pseudo-code at the end of this paper in Appendix A. The steps for decrypting an encrypted image are provided below.
Step 2: Perform a bitwise exclusive OR operation between image (C) and secret key (K 3 ) from the sigmoid logistic map to obtain an intermediate image (K 5 ).
Step 3: Compress the intermediate image (K 5 ) using the Kronecker xor operation to obtain a new image (K 4 ).
Step 4: Perform a bitwise exclusive OR operation between the new image (K 4 ) and secret keys (K 2 ) from the sigmoid logistic map to obtain another new image (K 1 ).
Step 5: Decrypt the new image (K 1 ) using the inverse of the hill cipher and a key (K inverse) to obtain an intermediate image (H).
Step 6: For each element in an even column of the intermediate image (H), perform a bitwise exclusive OR operation with the top value of the corresponding odd column. For each element in an odd column, perform a bitwise exclusive OR operation with the top value of the corresponding even column, while preserving the top values of matrix (H).
Step 7: Determine the number of rows and columns in the intermediate image (H). Iterate over each row in the image (H), starting from the second row (the first row is not shifted). For the current row, shift it to the right by its index within the matrix by concatenating the portion of the row that was shifted off the end with the portion that was not shifted until you obtain the plain image (P).

Simulation Results and Analysis
In this study, the image sizes 16 × 16, 32 × 32, 64 × 64, 128 × 128 and 256 × 256 were used as the dataset for encryption. Insufficient resources, such as computers with high processing speed and good resolution, have hindered this study's ability to conduct experiments on data sets exceeding 256 × 256 image pixels, including those up to 12 megapixels. The images used for testing the proposed encryption are presented in Figure 7. The secret key of the Hill cipher was comprised of K h = [8 7; 9 6], and r = [20.1245, 20.1254], x 0 = 0.71234 which serve as the control parameter for the logistic map and the initial conditional parameter, respectively. cessing speed and good resolution, have hindered this study's ability to conduct experiments on data sets exceeding 256 256 × image pixels, including those up to 12 megapixels. The images used for testing the proposed encryption are presented in Figure 7. The secret key of the Hill cipher was comprised of [ ] which serve as the control parameter for the logistic map and the initial conditional parameter, respectively.

Key Space
The proposed encryption algorithm utilizes a total of three different keys, which significantly increases the key space and makes it more difficult for unauthorized parties to decipher the encrypted information. The use of three keys in the proposed algorithm not only satisfies the requirements but also surpasses the standards set by IEEE [28], making it an ideal and secure option for encryption. These keys include K, which is the secret key for hill cipher, as well as 2  Table 1, the proposed algorithm compares favorably to other studies of a similar nature in terms of averages, further demonstrating its effectiveness as an encryption method. Overall, the use of multiple keys in the proposed algorithm effectively strengthens the security of the encryption and makes it a reliable choice for protecting sensitive information. Equation (13) is used to find the number of key spaces for three keys in general.

Key Sensitivity
It is crucial that encryption algorithms are sensitive to even small changes in the secret key. This is because even a slight change in the key can significantly affect the output.
As shown in Figure 8

Key Space
The proposed encryption algorithm utilizes a total of three different keys, which significantly increases the key space and makes it more difficult for unauthorized parties to decipher the encrypted information. The use of three keys in the proposed algorithm not only satisfies the requirements but also surpasses the standards set by IEEE [28], making it an ideal and secure option for encryption. These keys include K, which is the secret key for hill cipher, as well as K 2 and K 3 , generated from the modified sigmoid logistic function. According to the guidelines set forth by the IEEE [28], a key space of at least 2 100 is necessary for strong encryption. The Hill cipher (K) comprises four different positions due to the 4 × 4 square matrix, each of which has 254 possible values (ranging from 0 to 255). This results in a total of 2 254 combinations or key spaces. For the case of the Sigmoid logistic map (K 2 and K 3 ), the value of the key length varies depending on the size of the image. When using an image of 256 × 256, the resulting key length is 65,536. The keys consist of only two positions; each position can have two possible values (0 and 1 when converted to binary numbers), leading to a total combination of 2 65536 . The same approach can be used for the image of sizes 128 × 128, 512 × 512, and 32 × 32 to obtain the key length and number of key spaces. Additionally, as shown in Table 1, the proposed algorithm compares favorably to other studies of a similar nature in terms of averages, further demonstrating its effectiveness as an encryption method. Overall, the use of multiple keys in the proposed algorithm effectively strengthens the security of the encryption and makes it a reliable choice for protecting sensitive information. Equation (13) is used to find the number of key spaces for three keys in general. keys = 10 15×3 ≈ 2 149 (13)

Key Sensitivity
It is crucial that encryption algorithms are sensitive to even small changes in the secret key. This is because even a slight change in the key can significantly affect the output. As shown in Figure 8, we tested the initial value x 0 = 0.0117 of our proposed algorithm during the encryption process and slightly changed it to x 0 = 0.0117 ± 10 ±14 during decryption. The results demonstrate that our algorithm is highly sensitive to changes in the key, making it an effective and secure method for protecting data. This is an important consideration when choosing an encryption algorithm, as it ensures that the output will be protected even if the key is slightly altered during the encryption or decryption process. key, making it an effective and secure method for protecting data. This is an important consideration when choosing an encryption algorithm, as it ensures that the output will be protected even if the key is slightly altered during the encryption or decryption process.

Noise and Data Loss Analysis
When transmitting information online, it is important to consider the potential for it to become lost or overwhelmed by unrelated and unimportant data, known as noise. If digital images are not properly managed, this can negatively impact their usefulness when attempting to analyze, interpret, or retrieve the information they contain. It is important to handle digital information with care to ensure that it remains clear and meaningful. As shown in Figure 9, we evaluated the decryption outcomes of encrypted images that underwent varying levels of data loss. The recovery test was conducted across a range of data loss from 0.01% to 0.9%, and the results revealed that data loss up to 0.5% can be effectively recovered. Figure 10 shows the effectiveness of the proposed mechanism in handling various forms of noise, as demonstrated through the noise effect test. The test covered a range of gap sizes from 0.01% to 0.2% when applied to encrypted images, and the recovery results indicated that data up to 0.19% could be successfully recovered. However, beyond that point, the output quality deteriorates, as evidenced at the 0.2% level. The results demonstrate the capability of the mechanism to deal with various degrees of noise as well as data loss to a considerable extent. Our approach proves to be highly efficient in recovering lost or corrupted data during transmission. The design of the method aims to be highly effective in retrieving information, even in the presence of significant distortion during transmission.

Noise and Data Loss Analysis
When transmitting information online, it is important to consider the potential for it to become lost or overwhelmed by unrelated and unimportant data, known as noise. If digital images are not properly managed, this can negatively impact their usefulness when attempting to analyze, interpret, or retrieve the information they contain. It is important to handle digital information with care to ensure that it remains clear and meaningful. As shown in Figure 9, we evaluated the decryption outcomes of encrypted images that underwent varying levels of data loss. The recovery test was conducted across a range of data loss from 0.01% to 0.9%, and the results revealed that data loss up to 0.5% can be effectively recovered. Figure 10 shows the effectiveness of the proposed mechanism in handling various forms of noise, as demonstrated through the noise effect test. The test covered a range of gap sizes from 0.01% to 0.2% when applied to encrypted images, and the recovery results indicated that data up to 0.19% could be successfully recovered. However, beyond that point, the output quality deteriorates, as evidenced at the 0.2% level. The results demonstrate the capability of the mechanism to deal with various degrees of noise as well as data loss to a considerable extent. Our approach proves to be highly efficient in recovering lost or corrupted data during transmission. The design of the method aims to be highly effective in retrieving information, even in the presence of significant distortion during transmission. (e)recover loss 0.01% (f)recover loss 0.03% (g)recover loss 59% (h) recover loss 90% Figure 9. Data loss and recovery in different degrees. (e)recover loss 0.01% (f)recover loss 0.03% (g)recover loss 59% (h) recover loss 90%

Differential Attack
Two methods, namely, the number of pixel change rate (NPCR) and the unified average change intensity (UACI), are used to measure the resistance of differential attacks. The number of pixel change rate is a measure of the difference between two images. It is calculated by comparing the number of pixels that have changed between the two images and expressing the result as a percentage. An ideal NPCR value for an encrypted image is above 99%, indicating that all pixels have been significantly altered from their original positions. The UACI is calculated by comparing the pixel values of two images and quantifying the average intensity of the changes between the two images. It is expressed as a percentage and can range from 0 to 100, with higher values indicating a greater difference between the two images. To calculate the UACI, the differences between the pixel values of the two images are first determined. These differences are then averaged and expressed as a percentage by dividing the average difference by the maximum possible difference between the pixel values and multiplying by 100. The two methods are calculated using the following mathematical Equations (14) and (15).

Differential Attack
Two methods, namely, the number of pixel change rate (NPCR) and the unified average change intensity (UACI), are used to measure the resistance of differential attacks. The number of pixel change rate is a measure of the difference between two images. It is calculated by comparing the number of pixels that have changed between the two images and expressing the result as a percentage. An ideal NPCR value for an encrypted image is above 99%, indicating that all pixels have been significantly altered from their original positions. The UACI is calculated by comparing the pixel values of two images and quantifying the average intensity of the changes between the two images. It is expressed as a percentage and can range from 0 to 100, with higher values indicating a greater difference between the two images. To calculate the UACI, the differences between the pixel values of the two images are first determined. These differences are then averaged and expressed as a percentage by dividing the average difference by the maximum possible difference between the pixel values and multiplying by 100. The two methods are calculated using the following mathematical Equations (14) and (15).
where M × N represent the size of the image in terms of width and height, and c 1 and c 2 are two cipher images after changing one pixel position of their original plain image. Table 2 presents the NPCR and UACI values for the encrypted images. To find the average NPCR or UACI, we add up the results for all the image sizes and then divide by the total number of images. Table 2 shows the average NPCR and UACI values for about 24 images of different sizes. When comparing the NPCR and UACI values of two images of the same type and the change in pixel values, Table 3 compares these values with those from other similar studies using the Lena image of size 256 × 256. These results demonstrate the effectiveness of the proposed encryption in resisting differential attacks.

Histogram
The shape of the histogram of an image is influenced by the distribution of its pixel values. A histogram can be normal, skewed to the right, or skewed to the left. In the case of encrypted images, a flat histogram indicates a successful encryption process. Figure 11 shows encrypted and decrypted images with their corresponding histograms, while Figure 12 presents the spatiotemporal histogram of plaintext and ciphertext images of various images. These results suggest that the proposed encryption algorithm is effective in protecting against statistical attacks. Table 2 presents the NPCR and UACI values for the encrypted images. To find the average NPCR or UACI, we add up the results for all the image sizes and then divide by the total number of images. Table 2 shows the average NPCR and UACI values for about 24 images of different sizes. When comparing the NPCR and UACI values of two images of the same type and the change in pixel values, Table 3 compares these values with those from other similar studies using the Lena image of size 256 × 256. These results demonstrate the effectiveness of the proposed encryption in resisting differential attacks.

Histogram
The shape of the histogram of an image is influenced by the distribution of its pixel values. A histogram can be normal, skewed to the right, or skewed to the left. In the case of encrypted images, a flat histogram indicates a successful encryption process.

Information Entropy
Information entropy is a technique used to assess the randomness of variables in an image. When applied to both encrypted and original images, it can help to determine the variables present in the image. A high value of information entropy, close to 8, indicates a high level of randomness in the variables and a strong image encryption mechanism. Information entropy can be mathematically calculated using Equation (16).

Information Entropy
Information entropy is a technique used to assess the randomness of variables in an image. When applied to both encrypted and original images, it can help to determine the variables present in the image. A high value of information entropy, close to 8, indicates a high level of randomness in the variables and a strong image encryption mechanism. Information entropy can be mathematically calculated using Equation (16).
In this study, we have analyzed the values of information entropy for both plain and encrypted images, and the results are presented in Table 4. In addition, Table 5 presents the average results of the Lena image encrypted with all image sizes used in this study and compares them to those of other similar studies. These tables provide valuable insights into the security and performance of the proposed encryption method.

Correlation
Correlation analysis is a statistical method used to evaluate the strength and direction of the relationship between two variables. The correlation coefficient, a measure of association, quantifies the degree to which two variables are linearly related. The Pearson correlation coefficient is the most commonly used measure of association and can range from −1 to 1, with −1 indicating a perfect negative correlation, 1 indicating a perfect positive correlation, and 0 indicating no correlation. When the correlation coefficient value is significantly different from 0 on the encrypted image, it becomes difficult or impossible to interpret the data without using the appropriate decryption key or method. An effective image encryption scheme should result in a low correlation between adjacent pixels, which are randomly distributed in order to ensure secure protection of the image, as seen in Figure 13d-f. In the case of a plain image, the correlation among variables is concentrated, making it easier to predict the original image, as seen in Figure 13a-c. Equation (17) shows how to calculate the correlation coefficient of two variables in an image. Table 6 presents the correlation coefficient for plain and encrypted images of Lena, House, and Cameraman in various sizes and the average value of the horizontal, vertical, and diagonal correlation and compares the results to those of previous studies on the encrypted Lena image. This demonstrates the effectiveness of our proposed encryption techniques and their potential for use in image encryption.
where var(x) = 1 In our proposed scheme, the variables x i and y i represent the grayscale values of two adjacent pixels, with E(x) denoting the average of x i and E(y) denoting the average of y i . By applying Equation (16) to the proposed system, we observed a significant difference between the original and encrypted images. This indicates that the proposed system is resistant to statistical attacks.

Peak Signal-to-Noise Ratio (PSNR) and Mean Square Error Analysis (MSE)
Evaluating the quality of encrypted images is an important task in ensuring that the original image is accurately represented after being processed through an encryption algorithm. Two commonly used metrics for this purpose are the mean square error (MSE) and the peak signal-to-noise ratio (PSNR) [40]. The MSE is a measure of the similarity between the encrypted image and the original image. A low MSE value indicates that the two images are similar and that the encrypted image is of high quality, while a high MSE value indicates that the encrypted image is of poor quality. The MSE is calculated by subtracting the encrypted image from the original image, as shown in Equation (18). The PSNR is another useful metric for evaluating the quality of encrypted images. The higher the PSNR, the better the image quality; a lower PSNR value is an indicator of poor image quality. The PSNR is calculated mathematically, as shown in Equation (19).  Evaluating the quality of encrypted images is an important task in ensuring that the original image is accurately represented after being processed through an encryption algorithm. Two commonly used metrics for this purpose are the mean square error (MSE) and the peak signal-to-noise ratio (PSNR) [40]. The MSE is a measure of the similarity between the encrypted image and the original image. A low MSE value indicates that the two images are similar and that the encrypted image is of high quality, while a high MSE value indicates that the encrypted image is of poor quality. The MSE is calculated by subtracting the encrypted image from the original image, as shown in Equation (18). The PSNR is another useful metric for evaluating the quality of encrypted images. The higher the PSNR, the better the image quality; a lower PSNR value is an indicator of poor image quality. The PSNR is calculated mathematically, as shown in Equation (19). P(i, j) and E(i, j) represent the original and encrypted image pixels consecutively in this context. The mean square error (MSE) is always zero when the pixel values of the original and encrypted images are exactly the same (when P(i, j) and E(i, j) are equal). Table 7 demonstrates the effectiveness of the proposed image encryption method with the high values of the mean squared error (MSE) and low values of the peak signal-to-noise ratio (PSNR), which was conducted using images that were 128 pixels by 128 pixels in size. These results suggest that the proposed method is capable of effectively protecting the confidentiality of images, and thus, has the potential to make a significant contribution to the field of image encryption.

Conclusions
In this paper, we propose a new and innovative method for encrypting images that combines a variety of techniques to provide robust security. The proposed mechanism includes image scrambling, Hill cipher encryption, and the use of a sigmoid logistic map and Kronecker xor product techniques. The modified sigmoid logistic map, in particular, generates complex and secure pseudo-random numbers that are ideal for use in encryption. This enhances our understanding of digital encryption and helps to ensure the security of the proposed system.
The use of the Kronecker xor product in encryption can significantly increase the size of the data being stored. While the increased storage space required by the Kronecker xor product may be a consideration, it is important to balance this against the value of the data being protected. In today's digital age, data breaches and cyber attacks are becoming increasingly common, and the consequences of such events can be severe. By integrating techniques such as the Kronecker xor product to encrypt data, we can ensure that the proposed encryption algorithm is secure and can protect information and minimize the risk of data breaches and cyber attacks.
To verify the effectiveness and reliability of the proposed mechanism, we conducted a series of experiments and analyzed the results using various methods such as statistical attack analysis, differential attack analysis, brute force attack analysis, and information entropy analysis. The results of these tests demonstrate that the proposed system is highly secure and efficient and meets all the requirements necessary for protecting information stored using images. Overall, our proposed image encryption mechanism represents a significant advancement in the field and offers a reliable and effective way to secure sensitive information.