Efficient Segment-based Image Ciphering using Discretized Chaotic Standard Map with ECB, OFB and CBC

—This paper presents a block-based ciphering scheme that employs the 2D discretized chaotic Standard map (CSM) in three different operation modes. The employed operation modes include the electronic codebook (ECB), the output feedback (OFB) and the cipher block chaining (CBC) modes. In the presented 2D discretized CSM with the OFB and CBC, the initiation vector (IV) is employed as the primary secret key. The presented 2D discretized CSM with the CBC has two merits. The first merit is the ability of the presented 2D discretized CSM with the ECB, OFB and CBC to encipher images of any dimensions in a comparatively short time. The second merit is the high level of security of the presented 2D discretized CSM with the OFB and CBC through the integration of both diffusion and confusion operations. Different security key metrics like histogram deviation, irregular, and coefficient of correlation, are examined to assess the functionality of the presented 2D discretized CSM with the OFB and CBC. The resistance to noise, uniformity of histogram, and encryption speed are also investigated. The suggested 2D discretized CSM with the OFB and CBC is compared with the 2D discretized CSM in ECB. The achieved outcomes demonstrate that the proposed 2D discretized CSM with the OFB and CBC has a high security than in ECB from cryptographic viewpoint. Also, achieved outcomes demonstrate that the proposed 2D discretized CSM has better noise immunity in OFB compared with ECB and OFB.


I. INTRODUCTION
The cryptography field is especially important in the modern era, where information security is paramount. Security is an important issue for image communications and storage, and ciphering is considered as one of the most important ways to realize and ensure security. Ciphering has a lot of applications such as online communications, multimedia communications, medical image protection, telemedicine, military communications, pay TV, and video conferencing. Chaotic ciphering has an important role in current cryptography. The attraction of utilizing chaotic ciphering for implementing the current cryptosystems is due to several reasons which satisfy the traditional Shannon requirements of both diffusion and confusion [1][2][3]. These reasons may include its random-like behavior and parameters setting sensitivity and preconceived conditions [4]. Chaotic-based schemes have demonstrated some positive features in many of the affected areas in terms of speed, integration complexity, security, power, and computational overhead. Now, some ciphers for securing images have been presented [5][6][7][8]. Other cryptosystems based on discrete chaotic systems have been suggested, but still they have some concerns about their security [9][10][11][12][13][14][15].
Actually, there exists two basic ways to approach digital images chaotic ciphering. In the first approach, a chaos-based stream cipher model is employed for generating pseudorandom access keys to hide the source plaintext [16]. This model is known as stream cipher. In the other scheme, the source text or secret key can be employed as initialization conditions or control parameters, and the chaotic system is iterated for several rounds to deliver the final encrypted data [17][18]. This model is known as block cipher. Now, the chaotic 2D maps have been developed into 3D to design symmetric cryptosystems, which are intended to increase security. The 3D chaotic Baker mapping introduced by Mao et al. and 3D chaotic Cat mapping introduced by Chen et al. [19][20] represent some examples of 3D chaotic maps.
In the article, a block-based ciphering scheme that employs the 2D discretized CSM with the ECB, OFB and CBC is presented. In the presented 2D discretized CSM with the OFB and CBC, the image is split into blocks, and the encryption is applied for each one of these blocks using the 2D discretized CSM with the ECB, CBC and OFB. The initiation vector (IV) is employed as the primary secret key. The 2D discretized CSM with the CBC provides two advantages. The first is the ability of the presented 2D discretized CSM with the ECB, OFB and CBC to encipher images of any dimensions in a comparatively short time. The second one is the high level of security of the presented 2D discretized CSM with the ECB, OFB and CBC through the integration of both diffusion and confusion operations. Several security key performance metrics like histogram deviation, irregular, and coefficient of correlation, are examined to assess the functionality of the presented 2D discretized CSM with the ECB, OFB and CBC. The resistance to noise, uniformity of histogram, and encryption speed are also investigated. The suggested 2D discretized CSM with the ECB, OFB and CBC is compared with the 2D discretized CSM and the RC5. The achieved outcomes demonstrate that the proposed 2D discretized CSM with the ECB, OFB and CBC has a high security from cryptographic viewpoint. www.ijacsa.thesai.org The remainder of this paper is structured as follows. Section II provides an overview of the traditional 2D CSM, 2D discretized CSM in addition to the utilized ECB, OFB and CBC operation modes. Section III presents the introduced image cryptosystem using 2D discretized CSM with the ECB, OFB and CBC. Section IV gives the design issues of the proposed image cryptosystem using 2D discretized CSM with the ECB, OFB and CBC cryptosystem. Section V provides encryption quality metrics used to evaluate the performance of the proposed image cryptosystem using 2D discretized CSM with the ECB, OFB and CBC. Section VI provides the results of the presented image cryptosystem using 2D discretized CSM with the ECB, OFB and CBC. Finally, the paper conclusions are listed in Section VII.

II. PRELIMINARY TOOLS
This part provides a compact overview for three conventional cryptosystems, the 2D CSM, 2D discretized CSM, and RC5 ciphers in addition to the utilized ECB, OFB and CBC operation modes. All of 2D CSM, 2D with the ECB, OFB and CBC are symmetric block ciphers. In both crypto ciphers, the utilized key is the same for both of encryption and decryption.

A. The 2D Chaotic Standard Map (2D CSM) and 2D
Discretized CSM Cipher With chaos-based image ciphering, the positions of pixels are arbitrarily changed. Different chaotic-based maps may be employed with chaos-based image ciphering like 2D Cat, 2D Henon, 2D Baker, line, and General maps. The Standard mapping, Cat mapping, Henon mapping, and Baker mapping employ processes of geometric modifications. The line mapping employs stretching of the whole pixels form a straight line, and employs folding according to certain rules. Then, the plainimage pixels are chaotically distributed in the resulted cipherimage and nearby pixels are no longer important. On contrary, a typical 2D CSM was developed by Boris Chirikov in 1969. The 2D CSM with continuous confusion is described as follows [21]: If Eq. 1 is discretized, it will be mapped from [0,2π], to M×M through putting u = uM/2π, v=vM/2π, and k=kM/2π to transform the 2D CSM to the 2D discretized CSM as follows [21]: where k denotes a non-negative integer.
If the 2D discretized CSM is employed for image ciphering, u(i) and v(i) represent the pixel coordinates of the plainimage. u(i + 1) and v(i + 1) represent the pixel coordinates of the cipherimage.
The 2D discretized CSM is intended to achieve continuous map properties; it must be very close to the base map as the number of pixels is usually endless [21]. The resulted cipher of the 2D discretized CSM is a permutation cipher, which cannot modify the cipherimage histogram from its corresponding plainimage. Since this cipher is simple and fast, it does provide a high level of security, and its processing time grows as image dimensions increases.

B. The ECB Mode
The ECB mode starts through segmenting the input data into segments of equal sizes as illustrated in Fig. 1(a). Then every segment is separately encrypted using the same encryption key. The ECB operation mode can be mathematically represented using the following equation: The ECB deciphering process can be represented as: Plain j = DEC k (Cipher j  j=1,2,3,…..,n (4)

C. The OFB Mode
The OFB mode starts through ciphering the IV as illustrated in Fig. 1(b). Then, the resulted output bits are XORed with their corresponding plaintext block to result in the ciphertext block. In addition, the resulted ciphertext block bits are utilized an input IV to the next stage. The procedure is repeated till reaching the final block. The OFB operation mode can be mathematically represented using the following equation: Cipher j = Plain j I j , j=1,2,3,…..,n The OFB deciphering process can be represented as: Plain j = Cipher j I j j=1,2,3,…..,n where I j = ENC k (I j-1 ), j=1, 2, 3…n, and I 0 = IV.
As CBC mode, ciphering phase should be strong enough to provide efficient immunity to any attack attempts to break it.

D. The CBC Operation Mode
The CBC operation mode is a segment encryption mechanism as illustrated in Fig. 1(c). The CBC operation mode has been employed for use with the 2D discretized CSM in the introduced cipher. In the introduced 2D discretized CSM cipher with CBC, the CBC mode utilizes IV of equivalent size to the segmented block size. First, each one of IV pixels is XORed with its corresponding block pixel in the 1st block. After that, the outgoing pixels are ciphered. The first block pixels are employed as IV to encipher the second block. The process is repeated with the same sequence until reaching the final block. The CBC operation mode can be mathematically represented using the following equation: where Cipher 0 =IV, Cipher j denotes the ciphered block, represents the XOR operation, and ENK k denotes the 2D CSM encryption. The CBC operation mode employs an integration method that employs dependence on each cipherimage block for all the previous cipherimage blocks. As a consequence, all eligibility for all previous cipherimage blocks is contained in the previous cipherimage blocks [22]. The CBC basic drawback disadvantage lies in the fact that an attack on just single cipherimage segment affects two plainimage segments when employing decryption [23]. The CBC deciphering process can be represented as: where DEC k denotes the deciphering procedure.
III. PROPOSED 2D DISCRETIZED CSM-BASED IMAGE CIPHER WITH OFB AND CBC OPERATION MODES This part is to provide an overview of the introduced 2D discretized CSM cipher with the ECB, OFB and CBC. The proposed 2D discretized CSM cipher with the ECB, OFB and CBC is designed with the potential of enhancing the security the cipherimage and providing a reasonable encryption/decryption speeds. For realizing these objectives, 2D discretized CSM encryption is employed with the ECB, OFB and CBC [24][25][26][27][28][29]. Three schemes of the 2D discretized CSM with ECB, OFB and CBC are examined to determine which operation mode that will increase the efficiency of the proposed 2D discretized CSM cipher.
The operation of the proposed 2D discretized CSM cipher with the ECB, OFB and CBC may be summed up as shown below in the next three steps. The steps of the proposed 2D discretized CSM cipher with the ECB, OFB and CBC is depicted can be listed as: 1) The plainimage to be encrypted is scanned line by line.
2) The scanned image is segmented into blocks of; each block of has n x n pixels.
3) The segmented image blocks are ciphered using the proposed 2D discretized CSM cipher with the ECB, OFB and CBC modes of operation as depicted in Fig. 1.

IV. DESIGN POINTS OF THE 2D DISCRETIZED CSM CIPHER
WITH THE OFB AND CBC As mentioned previously, the proposed 2D discretized CSM cipher may be employed in ECB, OFB and CBC operating modes. It basically employs a 2D discretized CSM with the ECB, OFB and CBC as the main cipher scheme. It is EnkK www.ijacsa.thesai.org well known that scrambling employed in the 2D discretized CSM resembles like random behaviour [30]. The proposed 2D discretized CSM cipher with the OFB and CBC employs IV as a primary key. The IV should be random to be resistant against various types of brute force attacks. The utilized XOR among the IV fragments and data block fragments modifies pixel values, making the proposed 2D discretized CSM cipher with the ECB, OFB and CBC like a standard 3-D map. The proposed 2D discretized CSM cipher with the ECB, OFB and CBC also employs a secondary key, which is utilized in the 2D discretized CSM to shuffle pixels.
Finally, the proposed 2D discretized CSM cipher with the ECB, OFB and CBC image cryptosystem depends on segmenting the images to be cipher into various segments. The segment size in bits considered of a significant factor for affecting the performance of the proposed 2D discretized CSM cipher with the ECB, OFB and CBC. The segment size impact on cipher quality is examined in details in the experimental results part. Since the Section IV provides an equivalent bits size as plaintext segment size, increasing the segment size will result in increasing the security. In addition, the proposed 2D discretized CSM cipher with the ECB, OFB and CBC has the ability for encrypting digital images of any size after splitting them into smaller segments.

V. CIPHER QUALITY KEY INDICATORS
The cipher quality testing is very important for image cipher. Visual encryption quality is not sufficient for this test. So, there is a need for mathematical cipher quality key indicator metrics. Here, four cipher quality indicators will be considered to assess and compare the effectiveness of the proposed 2D discretized CSM cipher with the ECB, OFB and CBC. These quality key indicator metrics include correlation coefficient, irregular deviation, and deviations of histogram. In addition, two other quality key indicator metrics are also considered to assess cipher quality; histogram uniformity, and computational time [31][32][33][34][35][36][37][38][39][40].

A. The Correlation Coefficient
The correlation coefficient may be considered as a significant estimation for assessing the ciphering quality of any image cipher. As the correlation coefficient becomes near zero, the performance of the image cipher becomes good [31][32]. The correlation coefficient can be estimated as follows [31][32]: where x and y denotes the pixels intensity levels at the same location in both the plainimage and ciphered image. The definitions for the covariance, standard deviation and mean are given below as follows: (12) where, L denotes the pixels number. As the correlation becomes near zero, the better the image cipher quality.

B. Histogram Distribution
The cipherimage histogram distribution can be utilized as an indicator for assessing the quality of the proposed 2D CSM cipher with the ECB, OFB and CBC. As the cipherimage has a uniform histogram distribution, the proposed 2D CSM cipher with the ECB, OFB and CBC has a good ciphering quality.

C. The Irregular Deviation
The irregular may be employed for assessing the ciphering quality in terms of how much it can reduce the deviation to be near the histogram of an ideally ciphered image [33][34][35]. The process of estimating the irregular deviation starts by calculating the absolute deviation among the plainimage and the enciphered image. After that it calculates the histogram of the resulted absolute deviation. Then, calculate the mean histogram of the resulted absolute deviation. Finally, calculate the histogram deviation absolute mean value.
The irregular deviation can be computed as given below: As the irregular deviation becomes low, the performance of the image cipher becomes good.

D. The Deviation of Histogram
The deviation of histogram can be employed for assessing the ciphering quality in terms of how much it can magnify the difference among the plainimage and the enciphered image [36][37][38]. The process of estimating the deviation of histogram starts by calculating the histogram of the plainimage and the enciphered image. After that, calculate the absolute deviation among histogram of the plainimage and the enciphered image. Finally, compute the curve area beyond the absolute deviation divided by the total image area as follows [36][37][38]: where d i denotes is the absolute difference curve magnitude at intensity level i, M and N denote the image dimensions. As the deviation of histogram becomes high, the performance of the image cipher becomes good [25].

E. The Impact of Noise
Noise immunity demonstrates the cipher capability to withstand and against the noise. To examine and measure the impact of noise on the proposed 2D discretized CSM cipher with the ECB, OFB and CBC, noises of various SNRs are added to cipherimages, and after that the deciphering procedure is applied. If the resulted deciphered image is very close to its corresponding plainimage, it could mean that the proposed 2D www.ijacsa.thesai.org discretized CSM cipher with the ECB, OFB and CBC has a capability to resist the noise [39][40][41][42]. This proximity can be ensured numerically or visually using the correlation coefficients and the PSNR of the deciphered image, which can be denoted as follows [39][40][41][42] where  

VI. EXPERIMENTAL TESTS AND DISCUSSION
In experimental tests, test experiments were employed to investigate and examine the proposed 2D discretized CSM cipher with the ECB, OFB and CBC With respect to the proposed 2D discretized CSM cipher with the ECB, OFB and CBC, the IV is employed as a portion of the enciphered Pirate image, and has an equivalent size with respect to the chosen segment size. Various segments of different sizes were examined in testing the proposed 2D discretized CSM cipher with the ECB, OFB and CBC as shown below: The enciphered Pirate images using the proposed 2D discretized CSM cipher with the ECB, OFB and CBC and various segment sizes are depicted in Fig. 2. It is clearly noted from Fig. 2 that the proposed 2D discretized CSM cipher with the OFB and CBC has a better performance than the proposed 2D discretized CSM cipher with ECB especially with small segment sizes. Also, with increasing the segment size, the proposed 2D discretized CSM cipher with the OFB and CBC has a good performance in hiding all the details of the enciphered images.
The histograms distribution of Pirate plainimage and its enciphered image using the 2D discretized CSM image cipher with the ECB, OFB and CBC are depicted in Fig. 3. It is clearly noted from Fig. 3 that the 2D discretized CSM image cipher with ECB does not provide histogram uniformity and it has the same histogram of the original Pirate plainimage. This is due to the fact that the 2D discretized CSM image cipher with ECB performs just permutation which does not change the histograms of the encrypted images which may be considered as a basic weakness. Finally, it is clear from Fig. 3  Tables I, II, and III illustrates the numerical estimations of the evaluated key performance metrics like correlation coefficient (CC), irregular deviation (ID) and maximum deviation (MD) for the proposed 2D discretized CSM cipher with the ECB, OFB and CBC and various segment sizes. Table I demonstrated that the proposed 2D discretized CSM cipher with the OFB and CBC has lower CC values than in the proposed 2D discretized CSM cipher with the ECB. Also, with increasing the segment size, the CC values of the proposed 2D discretized CSM cipher with the ECB, OFB and CBC becomes near the zero value. Table II  The MD outcomes results are listed in Table III and the outcomes results demonstrated that the 2D discretized CSM image cipher with ECB provides zero MD values. This is due to the fact that the 2D discretized CSM image cipher with ECB performs just permutation which does not change the histograms of the encrypted images.

The ID outcomes results listed in
Also, the proposed 2D discretized CSM cipher with the OFB and CBC has better MD values than in the proposed 2D discretized CSM cipher with the ECB.  To examine the impact of the noise for the proposed 2D discretized CSM cipher with the ECB, OFB and CBC, the additive white Gaussian noise (AWGN) of SNR equals to 5 dB is summed to the enciphered Pirate image, and the deciphering procedure is applied. The deciphering outcome results of the proposed 2D discretized CSM cipher with the ECB, OFB and CBC and various segment sizes are depicted in Fig. 4. It is clearly noted from Fig. 4 that the proposed 2D discretized CSM cipher with the OFB has a better performance than the proposed 2D discretized CSM cipher with the ECB and CBC with small segment sizes. Also, the proposed 2D discretized CSM cipher with the OFB is more resistant to noise than the proposed 2D discretized CSM cipher with the ECB and CBC.
In addition, the OFB and CBC operation modes provide approximately equivalent performance in the existence of noise. Finally, the segment size has no impact on noise resistance of the proposed 2D discretized CSM cipher with the ECB, OFB and CBC.    Also, the proposed 2D discretized CSM cipher with the OFB is more resistant to noise than the proposed 2D discretized CSM cipher with the ECB and CBC. Finally, it can be confirmed and ensured that the proposed 2D discretized CSM cipher with the OFB can provide a better trade-off among the security level and noise immunity.

VII. CONCLUSION
This paper introduces a 2D discretized CSM cipher with the ECB, OFB and CBC that depends on dividing the plainimage to be enciphered into segments and enciphering each segment with the 2D discretized CSM cipher with the ECB, OFB and CBC. The proposed 2D discretized CSM cipher with the OFB provides a better trade-off among the high noise resistivity and high security level. The tests demonstrated that the 2D discretized CSM cipher with the OFB and CBC also achieve a uniform histogram distribution that cannot be achieved using the proposed 2D discretized CSM cipher with the ECB. The 2D discretized CSM is compared in different modes of operation. The outcomes demonstrated that the proposed 2D discretized CSM with the OFB and CBC has a high security. Finally, the proposed 2D discretized CSM cipher with the OFB has good noise immunity than the proposed 2D discretized CSM cipher with the ECB and CBC.