A Modified Binary Encryption Algorithm based on Diffuse Representation

In the era of Internet, the multimedia data can be used by anyone. There is a chance that unintended users get access to the data so, encryption is needed to hide the multimedia data from the unauthorized users. This paper proposes a modified binary encryption algorithm based on diffuse representation. Here a binary image is XORed with a random matrix and is divided into more number of non-overlapping sub-images. The modified encryption algorithm will produce an encrypted image with ¼th of dimension and increased number of bits. The proposed encryption algorithm is a symmetric encryption algorithm. The number of keys generated is equal to the number of non-overlapping sub-images. The key shall be transmitted by a private key encryption algorithm. The encryption of the key is not of interest in this paper. The proposed algorithm has high performance that it gives BER as 0% and infinite PSNR. Even grayscale images can be encrypted using this algorithm considering each bit-plane as a binary image.


I. INTRODUCTION
Internet is accessible by anyone in the world. When a multimedia data is shared through the internet there is a danger of unintended users getting access to it. To avoid this encryption is used. The visual cryptography technique is to support the encryption process where the secret information is converted into a unreadable form [2]. Encryption is a method in which the meaningful data is transformed into meaningless data and is sent through the internet. To get access to the data one should do the reverse process called the decryption to get the data in the original form. Encryption is originally done for the text data where the transformed content is not understandable. Encryption algorithms are divided into two major categories: Symmetric and asymmetric encryption. In symmetric encryption, the key that is used for encryption and decryption are same. But in the asymmetric encryption, the key used during encryption differs from that used during decryption.
The key that is used during the cryptographic process can be categorized into various types. The symmetric encryption uses secret key that is shared between sender and receiver for encryption and decryption. The asymmetric encryption uses (private key, public key) pair to perform the cryptographic operations. The key pair is generated by the user and the public key is made available to anyone. The sender encrypts the message using private key of their own and receiver decrypts the encrypted message using sender's public key which is available in public. The various visual cryptographic schemes are mentioned in [6], [10] for binary image, gray-colored images. [4] address the Extended Hamming Code to generate key for encryption and decryption through which the code is selfcorrecting. A new symmetric key cryptographic algorithm is proposed in [5] where the algorithm withstands the security. A lossless and reversible encryption algorithm was introduced in [1] to address the pixel oversaturation by embedding the secret data into the several least significant bit planes of cipher text pixels by wet paper coding. The algorithm [7] presents the probabilistics model which adopts the (t, n) visual cryptography scheme. This model efficiently manages the dynamically changing user group. The security level is improved using the bit level permutation technique in [8] for chaos based image ciphers. This technique proves better performance because the bits are shuffled between different bit planes. The error diffusion method [9] is used to provide the solution for management problem. This method adds a cover image to each share to make the share visible. The error diffusion method is also used for shadow images [11]. This improves the quality of shadow image when compared to the existing algorithms. The proposed algorithm in this paper is a symmetric encryption algorithm for binary images. The key used in symmetric encryption algorithm should not be disclosed publicly. The work in the paper is inspired from [3] which uses a diffuse representation for encryption. A similar method is used to encrypt the binary image. However, the encryption algorithm used to encrypt the random matrix and the key is not the intent of this paper. Any asymmetric encryption algorithm may be used. The rest of the paper is organized in the following manner. Section II discusses the existing algorithm from which this paper has been developed. Section III discusses the proposed algorithm of encryption and decryption. Section IV discusses some theoretical aspects by which the security in the algorithm can be increased. Section V discusses about the experimental results and Section VI gives the conclusion of the paper. (1) (d) The encrypted shares are formed from the key and the share by the equation (2) and (

II. EXISTING ALGORITHM
The encrypted shares are formed by subtracting the share from the key. Knowing the key β, the random matrix and the encrypted shares the decryption can be done with the following decryption algorithm.

Decryption Algorithm
(a) The encrypted shares are taken The key β is taken (c) All the encrypted shares are subtracted from the key and added together to from the decrypted binary image Here a single key is used and the number of encrypted shares denotes the numbers of subimages. So once the key is hacked, then the image can be easily decrypted. To overcome this disadvantage the modified encryption algorithm based on diffuse representation is proposed. The proposed algorithm is discussed in section III.

III.
PROPOSED ALGORITHM The possibility of the hacker decrypting the encrypted image can be reduced by applying the proposed modified encryption algorithm.   Fig. 1 shows the encryption algorithm in detail. The input image is read as the binary image and a random matrix is generated to perform XOR operation. This converts the image matrix into a random matrix. The matrix is scanned from left to right and top to bottom by taking a 2 x 2 sized matrix each time and converted into a decimal numbers. The resultant matrix is of m/2 x n/2 sized matrix of decimal numbers.
The key for each non overlapping matrix (share) is calculated using the equation (4) The Ikey is used to encrypt the shares and finally all the shares are concatenated to obtain the encrypted image. The decryption process is the reverse of the encryption algorithm. The random matrix and keys are shared with the end user. The share of keys are not a part of this paper. The decryption algorithm is stated in the Fig 2.

Number of Keys
The proposed algorithm uses the symmetric encryption algorithm which takes the secret key for encryption and decryption. As per the theory of cryptography, the security increases when the size and number of keys increases. The proposed algorithm has 8 keys for 8 different shares that makes the hacker feel difficult to hack the key and identify the respective key for each share. Since, the secret key has to be shared among the users it has to be secured using private key cryptosystem.

Joining all the shares and shares of variable sizes
The encrypted image is a combination of all shares. The shares can be decrypted with the respective keys. If the keys are not in the order then it is not feasible to decrypt the image. The keys can be send to the receiver by shuffling and encrypting which may be baffle the hacker to rearrange the key. There are (8! -1) ways to shuffle the key. 4.4 Mapping of the 2 x 2 pixel matrix to a decimal number The 16! ways of mapping 0000 -1111 binary to decimal 1 -16. One such mapping is as follows 0000 -15 0100 -11 1000 -7 1100 -3 0001 -14 0101 -10 1001 -6 1101 -2 0010 -13 0110 -9 1010 -5 1110 -1 0011 -12 0111 -8 1011 -4 1111 -0 A random mapping can be used so that the mapping may not be deciphered by the hacker. These are some of the methods by which security has been added to encryption algorithm.

V.
EXPERIMENTAL RESULTS The proposed algorithm is tested with the standard images like lena, cameraman, Barbara, baboon and Peppers. These image are converted into binary images and taken as test images. The binary images (I1) are encrypted and then decrypted (I2) using the proposed algorithm. The performance of the algorithm is calculated by using the metrics like Bit Error Rate (BER) and Peek Signal to Noise Ration (PSNR). The PSNR is Peak Signal to Noise Ratio is an error comparison metrics to ensure that the decrypted image looks similar to the encrypted image. The PSNR value is calculated using the formula mentioned in equation (5) and (6).  (7) shows the calculation of BER value.

VI. CONCLUSION
The security is a major factor in the data transmission. The hacker should not be able to decipher the data even if it is hacked. A novel algorithm is proposed to increase the complexity of the encryption. The complexity of the algorithm has been increased by having 1) Random matrix XORing 2) Number of Keys Used 3) Joining all the Shares and Shares of Various Sizes 4) Wide Range of Mapping Function of the 2 x 2 pixel matrix to a decimal number. The results show that the algorithm is more secure. Also, BER and PSNR value proves that the algorithm decrypts perfectly.