Testing Image Encryption by Output Feedback (OFB)

: When it is necessary to securely transmit data in open networks, the encryption must be performed. Most of the cryptographic algorithms were mainly developed for text data. Unfortunately, algorithms those are good for textual data might not suitable for image. The OFB mode of encryption implemented to test five images of different resources, by using three combinations (schemes): a combination of an 8-bit input block with an 8-bit feedback block, a combination of an 8-bit input block with a 16-bit, or a combination of a 16-bit input block with a 16-bit feedback block. Results showed that higher degree of encryption achieved when the input block and the feedback block are of the same size. The OFB mode achieved a mid range level of encryption with a mean entropy value of 7.93.


INTRODUCTION
Internet and wireless network offer powerful channels to deliver and exchange images. The increased popularity of image exchange places a great demand on efficient image storage and transmission techniques. The major hurdle for allowing much broader access of digital images lies in how to make sure that an image is used for its intended purpose, by its intended recipients. Sensitive and confidential information is vulnerable to various kinds of misuse when data is transmitted to/from computer system. Many business and medical organizations worry about users finding ways to alter the contents of their image files. Such alteration might be used, for example, to change an x-ray photograph, discover a debit card number, or forget a hand-written signature on the bitmap of a check [1] . The core issue then becomes the development of secure management usage of digital images across communication networks [2] .

SECURITY ISSUES OF A CRYPTOGRAPHIC ALGORITHM
One of the most important properties of a cryptographic system is a proof of its security. Different algorithms offer different degrees of security; it depends on how hard they are to break. If the cost required breaking an algorithm is greater than the value of encrypted data, or if the time required to break an algorithm is longer than the time the encrypted data must remain secret, then the algorithm is secure [3] .

OUTPUT FEEDBACK MODE (OFB)
This mode prevents the same block of data from generating the ciphered block by using an internal feedback mechanism that is independent of both the original data and the ciphered data. Figure (1a) shows the mechanism of encryption. Figure (1b) shows the mechanism of decryption.
Where: IV: The random Initial Vector P n : The n th original block C n : The n th ciphered block

ENTROPY VALUE MEASUREMENT
Entropy value, a concept of information theory, can be thought of as a mathematical measure of information or uncertainty of a true value of a random variable. If (X) is a random variable which takes values according to a probability distribution p (X), then the entropy value H (X) can be computed by using this quantity: Entropy is also useful for approximating the average number of bits required to encode the elements of (X). In general, the greater the entropy, then it is harder to break a cryptosystem [4] .

IMPLEMENTATION OF (OFB)
For applications in which all error propagation must be avoided, OFB mode of operation may be used. Its structure is similar to that of CFB [5] , but the output of encryption function is fed back to the shift register (IV) as shown in Fig. 1. If the same key is used for different images, IV value must be changed; otherwise, there is no security [3,6] . Each ciphered block is independent of both the original data and the previous ciphered blocks. This mode is implemented by using a flowchart shown in Fig. 2.
Since OFB has the same structure as that of CFB [7] , then there are two main factors that may affect on encryption degree: input block size and feedback block size. To do this, the three schemes of block size (8-bit, 16-bit, and 32-bit), in addition to, the three schemes of feedback size (8-bit, 16-bit, and 32-bit) are employed. In fact, there are three combinations (schemes): a combination of an 8-bit input block with an 8-bit feedback block (scheme1), a combination of an 8-bit input block with a 16-bit (scheme2), or a combination of a 16-bit input block with a 16-bit feedback block (scheme3).
When OFB mode is implemented by using, these three schemes, then the result in the experimental results are shown in Fig. 3. Figure 3b shows the encrypted image of the LENNA with its histogram by using scheme1 (8-bit input block with 8-bit feedback block), Fig. 3c shows the encrypted image with its histogram by using scheme2 (8-bit input block with 16-bit feedback block). Figure 3d shows the encryption by using scheme3 (16bit input block with 16-bit feedback block), with its histogram.
In fact, there are some boundaries and edges exist to the encrypted image, but in different scales. It seems that the scheme1 and scheme3 achieved higher degree of encryption than that achieved by using scheme2 because there are less boundaries and edges. Which mean that, the OFB mode can achieve the highest degree of encryption when it's implemented with a scheme of an 8-bit input block and an 8-bit feedback block or with a scheme of a 16-bit input block and a 16bit feedback block. In other words, the OFB mode can achieve the highest degree of encryption when it is implemented with an input block of the same size as that of the feedback block.
When applying the same procedure of OFB to SAT image, the experimental results are shown in Fig. 4. Figure 4b shows the encrypted image of SAT with its histogram by using scheme1 (8-bit input block with 8bit feedback block). Figure 4c shows the encryption of As seen from the histograms of the encryption of the LENNA image, pixel values don't dissipate in a uniform distribution, but they dissipate in a wide range especially in the cases of scheme1 and scheme3. This may result in a mid-range degree of encryption in scheme 2. On the other hand, pixel values in the case of scheme 1 and scheme3 dissipate in a distribution that it not gave useful information to cryptanalyst. As a result, scheme1 and scheme3 achieve a good encryption degree, whereas, scheme2 achieves a low degree of encryption. Pixel values don't dissipate equally but they dissipate in a wide range especially those pixel values  Fig. 6: The entropy to the encrypted images by using OFB mode with the different three schemes in the cases of scheme1 and scheme3. Whereas, pixel values in scheme 2 dissipated in a way that it may gave useful information to cryptanalyst. These analyses show that OFB mode achieves its highest degree of encryption in cases of scheme1 and scheme3 in which the feedback block is the same size as that of input block.

RESULT AND DISCUSSION
The security level of this mode can be measured by computing entropy value. Entropy values are computed to the five images of different resources before and after encryption by using different schemes as shown in Table 1.
These results also can be illustrated in Fig. 6, by constructing the bar chart to the computed entropy values.
It is clear from this figure that the OFB achieves the highest degree of encryption, when it is implemented by using scheme1 or scheme3, which means that when OFB is implemented by using an input block of the same size as that of the feedback block.

CONCLUSIONS
For image encryption purposes, there are two important things that must be taken in account when we are encrypting images: the mode of encryption and the block size of the input data.
The size of the input data block and the size of the feedback block, play an important role in determining the degree of encryption. The highest degree of encryption can be obtained, when both the size of the input block and the feedback block are of the same size of 8 bits or 16 bits. We can conclude that the highest degree of encryption can be obtained when the input data block and the feedback block are of the same size.