You are on page 1of 9

VSS TECHNIQUE USING THE COMBINATION OF HILL CIPHER,

RANDOM GRID AND LINEAR EQUATION BASED METHOD


NARESH BABU S
M.Tech, Department of ECE, VTU University,MITE Moodbidre, Karnataka, India
nareshbabu60@gmail.com

GIRISH K.A
Assistant Professor, Department of ECE, VTU University, MITE Moodbidre, Karnataka, India
girish@mite.ac.in

ABSTRACT In this paper, a visual secret sharing scheme for gray-scale images has been
proposed. Image is compressed by using discrete wavelet transform technique. Linear equations of
Hill cipher are used to divide an image into sub-images and then the concept of random grid is
applied to sub- images for construction of encrypted image. This scheme can be implemented
easily and can be applied for visual secret sharing. However, the scheme suffers from security
problems. Although, the random grid is used as a second layer of security, it does not play any
effective role during decryption. Secondly, even a crude guess of the coefficient matrix used in
Hill cipher equations can reveal the secret. To overcome these drawbacks, a new scheme based on
linear equation is proposed in this paper. Experimental results demonstrate that the method is
effective and secure.

KEYWORDS. Visual secret sharing, Hill cipher and Random grid

INTRODUCTION

With the rapid advancement in network technology especially Internet, it has become possible to
transmit any type of data across networks. This has raised concern for the security of the
transmitted data as access to data which has become easier by interception of communication
media. Hence, data security is becoming an imperative and critical issue in data storage and
transmission to prevent it from attacks. Images are widely used in several processes. Therefore, the
protection of image data from unauthorized access is important. As a solution to secure image
sharing problem, Naor and Shamir proposed a Visual Secret Sharing (VSS) scheme in 1994, that
laid the foundation of visual cryptography. VSS scheme is a cryptographic technique suitable for
applications to image data. In this scheme, a secret image is decomposed into n (n > 1)
meaningless shares. Stacking k (k n) or more shares reveals the secret. The most important
feature of this technique is that the decryption does not require any complex computation and
depends only on the human visual system. This scheme is also known as (k, n) VSS scheme, as
any set of less than k shares does not reveal any information about the secret. This technique
suffered from two main drawbacks. First, every pixel of an image was represented by more than
one pixel in a given share. This is known as pixel expansion.

Second, the recovered image suffers from low contrast. Further, each image is split into share
images of higher size, resulting in high memory requirement.

A VSS scheme based on Boolean operations was proposed in 2007 by Wang et. al . The secret
image A is decomposed into n shadow images. First of all n+1 number of random matrices are
generated to compute n intermediate matrices. Then AND operation is applied between the
random matrices and the secret image A; exclusive OR operation is then performed between the
last random matrix and intermediate matrices to obtain n shadow images. Original image is
revealed by applying exclusive OR operation again on shadow images.

A mathematic model for the VC construction problem is formulated to find the column vectors for
the optimal VC construction. A simulated-annealing-based algorithm is devised to solve the
problem. Many other techniques involving multi secret sharing have been proposed in the
literature over the years and references therein to address one or more problems related to visual
cryptography. However, most of the above mentioned schemes suffer from one problem or the
other, like lossy recovery, pixel expansion and high storage requirement. In order to overcome
these drawbacks, Wei-Kuei Chen proposed an image sharing method for gray-level images. In this
scheme Hill cipher encryption is used to divide a secret image into sub images and then XOR
operation is performed between sub images and a random grid to encrypt the images further [5].

The scheme claims to provide secure communication with easy decryption. However, the present
authors have observed the following issues with the scheme (1) Even an approximate guess of
encryption key can reveal the secret information (2) Even if the attacker does not have Hill cipher
keys, secret image is partly revealed if random grid is simply XORed with the encrypted sub
images. This method motivated us to define another VSS scheme using linear equations and
random grid. The proposed scheme takes care of issues mentioned above and hence provides a
more secure solution. In the proposed method, a system of linear equations with secret keys is
used to divide a secret image into sub images of smaller size.

Then the concept of random grid with XOR operation is applied to the sub images for construction
of the shared images. It is impossible to reveal the secret image without the knowledge of four
coefficients values, encoded shares and random grid.

Image compression is important for many applications that involve huge data storage, transmission
and retrieval such as for multimedia, documents, videoconferencing, and medical imaging.
Uncompressed images require considerable storage capacity and transmission bandwidth.

The objective of image compression technique is to reduce redundancy of the image data in order
to be able to store or transmit data in an efficient form. This results in the reduction of file size and
allows more images to be stored in a given amount of disk or memory space. In this paper
compression technique called discrete wavelet transform has been used to reduce the file size and
can be helpful for storage and transmission.

The paper is organized as follows. In Section II, Hill cipher based VSS scheme introduced in [5]
is presented. In Section III, the proposed scheme based on linear equations and random grid is
discussed in detail. Encryption and decryption algorithms are also presented in this section.
Section IV presents numerical implementation of the proposed scheme. Results are also compared
with Chens scheme [5]. Section V gives the concluding remarks with future scope of work.

613
RELATED WORK

Hill cipher
This Hill cipher method is a classical encryption method introduced by Lester Hill in 1929. Hill
cipher is a substitution technique based on matrix multiplication to encrypt the given plain text.
Hill Cipher in the present context of image encryption is explained below.. Suppose the English
alphabet characters are assigned values a = 0, b =1, c = 2, , z = 25.

Consider a column block [p1 p2] of two consecutive pixels in the given secret image. Its
equivalent block of pixels is obtained by the following equations [6]:

The above system of equations can also be represented as C = KP mod 26 Where

Further, inverse of matrix K is used to retrieve the original pixels P = K-1C mod 26 . The only
condition on K is that it should be non-singular with its inverse having integer entries only

Hill Cipher Equation based image sharing method forgray level images
Here, we briefly discuss a recently introduced VSS scheme based on Hill cipher and random grid
[5].

Let I be a secret image of size MN. The image is first subdivided into two intermediary
encrypted sub-images E1 and E2 using Hill cipher. Size of each of the sub-image would be
MN/2. Then a random grid R is generated, whose size is the same as that of the sub-images. By
random grid, we mean a matrix whose entries are 0 to 255, obtained using some random number
generator function. Bitwise XOR operation is applied to obtain the two final encrypted images C1
and C2 as follows

Also how the intermediary sub-images E1 and E2 are generated using Hill cipher is explained.
First a key matrix containing integer entries is chosen with its determinant having value 1 so that
its inverse is also an integer matrix. The secret image I is divided into blocks of two pixels. These
pixels can be chosen column wise or row wise. Here we shall take two consecutive row pixels to
subdivide I into blocks of two pixels. Let P1 and P2 be two pixels in a block of the original image.
Hill cipher is applied on P1 and P2 to obtain the pair of pixels for the sub-images as follows.

614
Here I1 and I2 will contribute to create the first and the second subimage respectively. It is clear
that the size of sub-images will be half of that of the original secret image. Then the random grid R
is used to obtain encoded images (shares) as mentioned above. In order to retrieve the secret
image, XOR operation is again performed between the shared images and the random grid to
obtain intermediary sub-images. When the elements of inverse of the key matrix and pixels of the
sub images are put into the equations (5), (6), pixels of the original image are obtained [5].

PROPOSED SCHEME

Basic idea of the proposed scheme is similar to the VSS scheme presented in Section II. However,
here we use a general system of equation in place of Hill cipher to obtain intermediary images.
This makes the scheme more secure on one hand and guessing of the coefficients more difficult (in
fact practically impossible). Hence the security issues arising in the previous scheme of [5] are
properly addressed.

This scheme allows encryption and decryption techniques simply by solving linear equation with
correct coefficient values.

Purpose of using the random grid is basically to randomize the coefficient values and to make the
shared images more secure.

Let us proceed to describe the scheme. Consider the system of equations

It is well know that the system will have a unique solution if its coefficient matrix is invertible
(AD-BC 0). In the present scheme, we assume that A = 1 and D = (BC 1) mod 256. This
ensures that the resulting coefficient matrix provides integer solutions also during decryption.
Suppose I is the secret image of the size M N and a R is a random grid of the size M N/2 as
before. Let P1 and P2 be the first two pixels of the first pixel row of I. Let us fix integer values of
B, C between 0 and 255.

So, the intermediary pixels will be

615
For subsequent pairs of pixels, values of B and C will be randomly selected with the help of R. All
the constants A, B, C,D will satisfy the same conditions as spelled out before (A =1 and D = BC -
1).

For any pair of consecutive pixels P1 and P2 from a block, encryption will be performed as
follows

We now proceed to state stepwise encryption process.

Steps for Encryption


Step E1. A gray level image I of size M N is divided into disjoint blocks having two consecutive
pixels.

Step E2. For the first block of the image, its two pixels P1 and P2 are transformed to I1 and I2 .

Step E3. Substitute pixels Pij and Pij+1 from a block of the secret image into the equations (9) and
(10) to obtain pixels I1 and I2 of the intermediary image.

where Rij is the element of random grid R. Value for coefficient A is 1 and for D is (B*C-1) mod
256.

Step E4. Successively take the pixels of the blocks and put into Eq. (9) and (10) for construction of
two sub images I1 and I2 with size M N/2.

Step E5. Use random grid R and two sub-images I1 and I2 to construct the encrypted images
(shares) E1 and E2 by using

Eq. (13) and (14).

Steps for Decryption


Step D1. Collect the encrypted images E1 and E2, random grid R and initially taken values of B
and C.

616
Step D2. Use the random grid R, encrypted images E1 and E2 to construct the sub-images I1 and
I2 by using Eq. (15) and (16).

Step D3. With the help of I1 ,I2 and values of coefficients A, B, C and D solve Eq. (17) and (18)
get the values of X_ and Y_.

Key value of coefficients B and C are only for the very first pixel of sub images I1 ,I2 . For all the
rest pixels of I1 , I2 ,values of the coefficients B and C are:

Step D4. Put the value of X, Y, A and B into Eq. (19) and (20) to obtain pixels of retrieved secret
image.

Step5. Successively take the pixels from Eq. (19) and (20) to recover the original secret image without
distortion.

Discrete wavelet transform


Compression of image by using DWT technique is implemented here. DWT is a lossless
compression technique
.
Image is subdivided into highpass and lowpass images. ODD and EVEN pixels are separated and
filtered. The image is parted with four sub parts namely Low Low(LL), LowHigh(LH),
HighLow(HL), HighHigh(HH) and compressed. The compressed image is encrypted and
decrypted and eventually the original image is brought back by decompressing the image.

EXPERIMENTAL RESULTS AND DISCUSSION

In this section, the proposed method is implemented on the gray scale image Lena of the size 256
256 as the secret image (Fig.1 (a)). The random grid R with size 256128 generated using a
random number generating function is also shown in Fig.1 (c). Values for the coefficients A, B, C
and D are chosen as 12, 125, 209 and 1.

These values for the coefficients B and C are only to encrypt the first two pixels of the original
image. For further pixel blocks, these values will be randomized with help of the Eq. (11) and (12).

617
A will depend on B and C . D will remain 1 for the entire experiment. Images obtained after steps
E3-E4 are shown in Fig. 1(b) and the final encrypted images after step E5 are shown in Fig 1(d).

In order to decrypt the secret image, encrypted sub images, coefficients values and random grid are
collected (as shown in Fig. 2(a) and (b)) and after step D2 sub-images are obtained shown in Fig.
2(c). The pixels of the original image are obtained after step D3-D4 and as the all pixels are
obtained the secret image is retrieved as shown in Fig. 2(d). It may be noted that the sub-images
obtained after the first step of decryption in the case of Chens scheme reveal the secret image (as
shown in Fig.4). Also, if one makes a guess and applies even partially known secret keys, secret

(a) (b) (c) (d)

Figure 1. (a) The secret image with size 256 256, (b) the sub-images I1 and I2 with size 256
128, (c) the random grid R with size 256 128, and (d) the encrypted images E1 and E2 with size
256 128.

(a) (b) (c) (d)

Figure 2. (a) the encrypted images E1 and E2 with size 256128, (b) the random grid with size
256128, (c) the retrieved sub-images I1 and I2, (d) the retrieved original image with size
256256.

So, in the case of Chens scheme, random grid fails to provide second layer of security (Fig. 4, 5).
However, in the proposed scheme until the second layer of decryption is applied, nothing can be
guessed about the secret image as is evident from Fig. 2(c). Since the coefficients B, C are based
on random grid R and are different for each block of the image, it becomes highly impossible for
an intruder to guess the numbers. To recover the secret image, one must have encrypted images,
random grid and key values (coefficients A, B, C and D) hence the proposed scheme also increases
the security of the original image. Advantage of the scheme is that no one can retrieve the secret

618
without having random grid, coefficients value and encrypted images. In this scheme we are also
able to improve upon the issue of lossy recovery and pixel expansion. Random grid and encrypted
images have smaller size than the original secret image so storage space requirement is the same as
that in [5].

(a) (b) (c) (d)

Figure 3. (a) The secret image with size 256 256, (b) the two sub-images with size 256 128, (c)
the random grid with size 256 128, and (d) the encrypted images with size 256 128

(a) (b) (c) (d)

Figure 4. (a) the encrypted images 256128, (b) the random grid with size 256128, (c) the
retrieved sub-images and (d) the retrieved original image with size 256256.

(a) (b)

Figure 5. Retrieved image with key guessed partially in (a) chens scheme (b) in proposed scheme

CONCLUSION

In this paper its been suggested that it is an efficient and secure VSS scheme based on linear
equations. The scheme is more secure than the Hill cipher based scheme proposed in [5]. To
recover the secret image, availability of correct coefficient values, random grid and both encrypted

619
images are necessary. Proposed method uses simple linear equation and dependency among their
coefficients. Since the coefficients of linear equations employed during encryption are randomized
for each pixel block using the random grid, it is not possible to guess the coefficients. Numerical
results demonstrate the effectiveness of the method.

The method is proposed for single secret sharing and can also be extended for multi-secret sharing.
Further, color image cryptographic method can also be developed using the scheme.

REFERENCES

M. Naor, and A. Shamir , Visual cryptography, Advances in Cryptology-Eurocrypt, Lecture


Notes in Computer Science, vol. 950, pp. 112, 1994.
Daoshun Wang, Lei Zhang, Ning Ma, and Xiaobo Li, Two secret sharing schemes based on
boolean operations, J. Pattern Recogition Society, vol. 40, pp. 27762785, 2007.
Tzung-Her Chen, and Chang-Sian Wu, Efficient multi- secret image sharing based on boolean
operations, J. Signal Processing, vol. 91, pp. 9097, 2011.
Young-Chang Hou, Zen-YU Quan, and Chih-Fong Tsai,A-Yu Tseng Block-Based prigressive
visual secret sharing, J. Information Sciences, Vol. 233, pp. 290304, 2013.
Wei-Kuei Chen, Image sharing method for gray-leve l images, J. Systems and Software, vol.
86, pp. 581585, 2013.
Hill, L.S., Cryptography in an algebric alphabet, The American Mathematical Monthly, vol.
36, pp. 306312, 1929.
Chen, T.-H., Tsao, and K.-H., Visual secret sharing by random grids, J. Pattern Recognition,
vol. 42, pp. 2203 2217, 2009.
Jen-Bang Feng, Hsien-Chu Wu, Chwei-Shyong Tsai, and Yen-Ping Chu, A new multi-secret
images sharing shcems using Lagranges interpolation, J. Systems and Software, vol. 76, pp.
327339, 2005.
Tzung-Her Chen, Kai-Hsiang Tsao, and Yao-Sheng Lee, Yet another multiple-image encryption
by rotating random grids, J. Signal Processing, vol. 92, pp. 2229 2237, 2012.
Bibhudendra Acharya, Saroj Kumar Panigrahy, Sarat Kumar Patra, and Ganapati Panda,
Image encryption using advanced hill cipher algorithm, J. Recent Trends in Engineering, vol.
1, pp. 663667, 2009.
Feng Liu, Chuankun Wu and Xijun Lin, Step construction of visual cryptography schemes,
J. IEEE Transactions on Information Forensics and Security , vol 5, pp. 2738, 2010.
Kai-Hui Lee and Pei-Ling Chiu, Image size invariant visual cryptography for general access
structures subject to display quality constraints, J. IEEE Transactions on Image Processing, vol.
22, pp. 38303841, 2013
Z. X.Yin, C. C. Lin, and C. C. Chang, Image sharing with stegnography and authentication,
in Visual Cryptography and Secret Image Sharing, S. Cimato and C. N. Yang , Eds. New york:
CRC Press , 2012 pp.428 433.
Jen-Bang Fenga, Hsien-Chu Wub, Chwei-Shyong Tsaic, Ya-Fen Changb,and Yen-Ping Chu,
Visual secret sharing for multiple secrets, J. Pattern Recognition, vol 41, pp. 35723581,
2008.410 2014

620

You might also like