You are on page 1of 7

International Journal of Advances in Science and Technology,

Vol. 4, No.2, 2012



Visual Cryptograms using Halftone
Techniques

Mr. Firoj Hussain Shaik
1
, Smt. U V Ratna Kumari
2
, Mr. K. Anantha Kumar
3


Department of Electronics and Communication Engineering, University College of Engg, Kakinada, AP, India
azaad_1310@yahoo.co.in
Abstract

Visual Cryptograms of n random grids (VCRG_n) is a perfectly secure way to protect
secrets. VCRG_n methods are based on visual secret sharing schemes in which a secret image split
into a set of random grids/ shares. To recover the secret image, one has to collect a set of qualified
shares and print them onto transparencies. As long as all the transparencies are stacked up, the
secret image will reveal on the stacked image. Since the secret image can be identified with human
eyes without any complex decryption algorithms or the aid of computers. In this paper the features
of random grids were further explored and the encryption schemes for color/gray-level pictures
using halftone technology by two or more random grids were presented. Since the decoding process
in these schemes is done by human visual system, i.e. simply by observing the superimposed result,
there is no need of any computation.

Key Words: Visual Cryptogram, halftone technology, random grids, shares.

1. Introduction

The encryption of pictures by two random grids was first introduced by Kafri and Keren in 1987 [1]
where binary pictures were considered. Their algorithms encrypt a secret picture or shape into two
random grids which are printed on transparencies such that the areas containing the secret information
in the two grids are inter-correlated. With the same idea that the decryption needs only human visual
ability, Naor and Shamir introduced [2] the terminology, visual cryptography, to describe the study of
the visual version of the secret sharing problem. Cryptography as the study of secret (crypto) writing
(graphy) and is defined as the study of mathematical techniques related to aspects of information
security. Visual cryptography is based on cryptography where n images are encoded in a way that only
the human visual system can decrypt the hidden message without any cryptographic computations
when all shares are stacked together. Visual cryptography is a very secure and unique way to protect
secrets.
Basically, visual cryptography has two important features. The first feature is its perfect secrecy,
and the second feature is its decryption method which requires neither complex decryption algorithms
nor the aid of computers. They gave a formal definition to a k out of n visual secret sharing scheme,
proposed the constructions and analyses of the visual cryptographic schemes. Consider a binary secret
image B and a set of n participants sharing B. A k out of n visual secret sharing scheme encrypts B into
n transparencies (called shares) which are distributed to the n participants one by one in such a way
that only when k or more shares are stacked together can the participants see B by their visual system;
while any group of less than k shares obtains nothing about B.
Visual cryptography proposed by Naor and Shamir [3] discloses the possibility for using human
visual ability to perform the decryption process. Specifically, one secret image is encoded into two
shares that are seemingly random pictures. By xeroxing them onto transparencies, the dealer distributes
the two random transparencies to two participants (one share for each participant). Each participant
cannot tell the secret from his own transparency, but when the two participants superimpose their
transparencies pixel by pixel, they recognize the secret from the superimposed result by their visual
system. Neither computational devices nor cryptographic knowledge is required for the decryption
process. With such an interesting characteristic that the decryption process is by the human visual
Special Issue Page 13 of 92 ISSN 2229 5216
International Journal of Advances in Science and Technology,
Vol. 4, No.2, 2012

system only, instead of any computational device, visual cryptography attracts much attention from
researchers. In particular, it is much useful in situations where computing devices are not available or
not possible to use. Naor and Shamir [3] first presented k out of n visual secret sharing schemes, which
ensure that the secret is concealed from groups of less than k participants, while it can be seen by
groups of at least k participants when they stack their shares altogether. Since this pioneer research,
many theoretical results on the construction or contrast (the relative difference between the
reconstructed white and black pixels in the superimposed image) of visual secret sharing schemes for
binary images have been proposed in the literature [4, 5, 6, 7]. Some studies [8, 9, 10] focused on the
practical realization of visual cryptographic schemes for gray-level or color images. The preliminary
importance visual cryptogram schemes are to protect binary images.
The rest of this paper is organized as follows. Section 2 reviews two halftone methodologies. In
Section 3, the secret hiding techniques is described in detail. Next in Section 4 shows the experimental
results of the descried methods. Finally, the conclusions are given in Section 5.

2. Halftone Technology

Halftoning is the process of transforming an image with greater amplitude resolution to one with
lesser amplitude resolution. This has been practiced for over a hundred years in the printing industry:
the solution for displaying continuous tone images with only black or white dots. In digital printing and
display systems today the problem is essentially the same: how to produce the illusion of the original
tonal quality of an image by judicious placement of dots. The goal of all halftoning techniques is to
generate an image with fewer amplitude levels that is perceptually similar to the original. They are
many different approaches are there to get a halftoned image for a color image. In our work, we shall
present two approaches namely Otsu method and order dither approach.

2.1 Otsus Method

In Otsu's method we exhaustively search for the threshold that minimizes the intra-class variance,
defined as a weighted sum of variances of the two classes:
) ( ) ( ) ( ) ( ) (
2
2 2
2
1 1
2
t t t t t o e o e o
e
+ =
(1)

Weights
i
are the probabilities of the two classes separated by a threshold t and
2
i
o variances of
these classes.
Otsu shows that minimizing the intra-class variance is the same as maximizing inter-class variance:
| |
2
2 1 2 1
2 2 2
) ( ) ( ) ( ) ( ) ( ) ( t t t t t t
b
e e o o o
e
= = (2)
Which is expressed in terms of class probabilities
i
and class means
i
.
The class probability
1
(t) is computed from the histogram as t:

= ) (
0
) (
1
i P
t
t e
(3)
While the class mean
1
(t) is:
) ( ) ( ) (
0 1
i x i p t
t
- =

(4)
Where x(i) is the value at the center of the i
th
histogram bin. Similarly, you can compute
2
(t) and
t

on the right-hand side of the histogram for bins greater than t.
The class probabilities and class means can be computed iteratively. This idea yields an effective
algorithm.
1) Algorithm:
1. Compute histogram and probabilities of each intensity level.
2. Set up initial
i
(0) and
i
(0).
3. Step through all possible thresholds t=1maximum intensity Update
i
and
i.
, Compute
) (
2
t
b
o .
4. Desired threshold corresponds to the maximum ) (
2
t
b
o .
Special Issue Page 14 of 92 ISSN 2229 5216
International Journal of Advances in Science and Technology,
Vol. 4, No.2, 2012

2.2 Order Dither

Noises need not be random and a threshold matrix can be generated with a certain order. Ordered
dither generates a binary image by comparing a pixel of an original continuous-tone image with a
threshold value of the periodic ordered matrix.
Ordered dithering uses straightforward 1-bit quantization with fixed pseudo random threshold patterns
to give halftone images with reasonable visual quality.


Figure 1: Samples of Dither matrices

Dither turns adjacent pixels on which form a cluster in the matrix. The period length of dots is
determined by that of the matrix. The tone level of a region is modulated by the area size of dot.


Figure 2. (a) Color image, (b) Halftoned image using Otsus method, (c) halftoned image using
order dither method
Fig. 2. Shows the experimental results using halftoning techniques discussed above. These halftoned
images are taken as input images for Visual cryptograms.

3. Visual Cryptogram by random Grids

Visual Cryptogram encryption algorithms encrypt a secret picture or shape into two random
grids which are printed on transparencies such that the areas containing the secret information in
the two grids are inter-correlated.

3.1 Random Grids

A random grid was defined as a transparency comprising a two-dimensional array of pixels.
Each pixel is either fully transparency or simply opaque and the choice between the alternatives is
made by a coin-flip procedure. Thus, no correlation exists between the values of different pixels in the
array. Due to the facts that the transparent pixels let through the light (while the opaque pixels stop it)
and the number of transparent pixels is stochastically equal to the number of opaque pixels in a random
grid, the average light transmission of a random grid is . Some important properties of random grids
as follows:
Assume that R is a random grid. Let the average light transmission of R as, T (R) = .
Regarding a certain pixel in R, say r R, the probability for r to be transparent is equal to that for r to
be opaque. That means, Prob (r = 0) = Prob (r = 1) = .
Special Issue Page 15 of 92 ISSN 2229 5216
International Journal of Advances in Science and Technology,
Vol. 4, No.2, 2012

Where 0 denotes a transparent pixel and 1 denotes an opaque pixel. So that r is called as a random pixel
of R with a light transmission of t (r) = 1/2.
Corresponding Pixels:
Let R
1
and R
2
be two independent random grids with the same dimension. The pixels r
1
R
1

and r
2
R
2
are called as corresponding pixels if and only if r
1
and r
2
have the same position in R
1
and
R
2
respectively.
That is, r
1
= R
1
[a, b] and r
2
= R
2
[u, v] are corresponding pixels if and only if a = u and b = v. When R
1

and R
2
are superimposed pixel by pixel, r
1
(= 0 or1) has an equal possibility to be stacked onto r
2
= 0
or r
2
= 1.
Let denote the generalized OR operation which describes the relation of the
superimposition of two random grids (or two random pixels).

Table 1: Results of the superimposition of two random pixels
r
1
r
2
r
1
r
2

0 0 0
0 1 1
1 0 1
1 1 1

From table 1 there is only one among the four possible combinations of r
1
r
2
shows
transparent (0). Since the four possible combinations occur with an equal probability, the probability
for r
1
r
2
to be transparent is . It means that the average light transmission of the superimposition of
two independent random grids is .
In addition, it is easy to see that the order of the two random grids does not affect the superimposed
result. Indeed, is a commutative operation, i.e.
R
1
R
2
= R
2
R
1
.
Obviously, when two same random grids are superimposed then the resultant will be same grid:
R
1
= R
1
R
1
(or R
2
= R
2
R
2
).

Lemma 1: If R
1
and R
2
are two independent random grids with T (R
1
) = T (R
2
) = ,
(1) T (R
1
R
2
) = T (R
2
R
1
) = .
(2) T (R
1
R
1
) = .
Furthermore, the random grids maintain an important property, the principle of combination. Consider
two arbitrary random grids X and Y with the same dimension and T (X) = T (Y). Let A be a section of
X and B be a section of Y. Here A and B are with the same shape and size. Let Z denote the result of
replacing A by B in X. The principle of combination asserts that Z is still a random grid with
T (Z) = T (X) = T (Y).
Few algorithms for hiding a secret image onto random grids is given below.

3.2 Encryption algorithm 1

Encrypting a halftone image into a set of VCRG-n[11].
Input: an h w halftone image G and an integer n
Output: a set of n random grids E = {R
1
, R
2
, ..., R
n
} constituting a VCRG-n of G
1. Apply halftone algorithm for B(x, y), if input image is a color image.
2. for (1 k n1) do
{
R
k
as a random grid, T (R
k
) = }
3. for ( each pixel B[i, j], 1 i h and 1 j w) do
{ a
1
= R
1
[i, j]
for (2 k n1) do {
a
k
= f (R
k
[i, j], a
k1
)
}
Special Issue Page 16 of 92 ISSN 2229 5216
International Journal of Advances in Science and Technology,
Vol. 4, No.2, 2012

R
n
[i, j] = f (B[i, j], a
n1
)
}
4. Output (R
1
, R
2
, . .., R
n
)


3.3 Encryption algorithm 2

Encrypting a halftone image into a set of VCRG-n[11].
Input: an h w halftone image G and an integer n
Output: a set of n random grids E = {R
1
, R
2
, ..., R
n
} constituting a VCRG-n of G
1. Apply halftone algorithm for B(x, y), if input image is a color image.
2. for (1 k n1) do
{
generate R
k
as a random grid, T (R
k
) =
}
3. for (each pixel B[i, j], 1 i h and 1 j w) do
{
a
1
= R
1
[i, j]
for (2 k n1) do
{
a
k
= f (R
k
[i, j], a
k1
)}
if (B[i, j] = 0)
R
n
[i, j] = f (B[i, j], a
n1
) ( = f (0, a
n1
) = a
n1
)
else R
n
[i, j] = random_ pixel( )
}
4. Output (R
1
, R
2
, ..., R
n
)

3.4 Encryption algorithm 3

Encrypting a halftone image into a set of VCRG-n
Input: an h w halftone image G and an integer n
Output: a set of n random grids E = {R
1
, R
2
, ..., R
n
} constituting a VCRG-n of G
1. Apply halftone algorithm for B(x, y), if input image is a color image.
2. for (1 k n1) do
{
generate R
k
as a random grid, T (R
k
) =
}
3. for (each pixel B[i, j], 1 i h and 1 j w) do
{
a
1
= R
1
[i, j]
for (2 k n1) do
{
a
k
= f (R
k
[i, j], a
k1
)
}
if (B[i, j] = 0)
R
n
[i, j] = random_ pixel( )
else
R
n
[i, j] = f (B[i, j], a
n1
) (=f (1, a
n1
) = a
n1
)
}
4. Output (R
1
, R
2
, . .., R
n
)

The decryption algorithm for encryption algorithms 1, 2 and 3 are same. This is very simple one. The
secret image can be reveled if and only all the random grids are stacked together.

Special Issue Page 17 of 92 ISSN 2229 5216
International Journal of Advances in Science and Technology,
Vol. 4, No.2, 2012

Decryption algorithm
Input: random grids R
1
, R
2
, . .., and R
n


Output: a reconstructed image B.
1. Perform OR operation between three generated grids R
1
, R
2
, . .., and R
n
. i.e.,
B =
n
R R R ...
2 1
.
2. Output (Recovered image B)

4. Experimental Results

There are many applications where a visual cryptogram has got its own importance. Some of them
are: authentication, human identification, copyright protection and watermarking, mobile ticket
validation, electronic cash, visual signature checking and computer generated hologram, , etc. This
section gives the results of encryption and decryption algorithms (VCRG_n). The simulation results of
above mentioned algorithms using Otsus and Dither techniques for n=3 are as follows:


Figure 3. Encryption algorithm 1 results (a) random grids generated by encryption algorithms 1,2
and 3 (b) decrypted image of Otsu method (c) decrypted image using Dither method.


Figure 4. Encryption algorithm 2 results (a) random grids generated by encryption algorithms 1,2
and 3 (b) decrypted image of Otsu method (c) decrypted image using Dither method.


Figure 5. Encryption algorithm 3 results (a) random grids generated by encryption algorithms 1,2
and 3 (b) decrypted image of Otsu method (c) decrypted image using Dither method.
Special Issue Page 18 of 92 ISSN 2229 5216
International Journal of Advances in Science and Technology,
Vol. 4, No.2, 2012


5. Conclusions and future directions

The pixel expansion used by these schemes is only one. They provide cost-effective, handy and
portable solutions to image encryption or sharing even for inexperienced users, especially for
circumstances where no computer can be accessed. A secret image can be encrypted/shared among n (
2) participants (instead of only two). These encryption algorithms can be easily hardwired by
incorporating a 0/1 random number generator with T flip-flops or Exclusive- OR gates. It would be an
interesting challenge to design a special VCRG hardware for image encryption. For VCRG there are
many kinds of halftoning, which generate halftone images in different ways. So some effort need
whether these halftoning techniques may make any difference on the visual effect of the stacked image.

6. References

[1] O. Kafri, E. Keren, Encryption of pictures and shapes by random grids, Opt.Lett.12 (1987)377379.
[2] Naor, M. and Shamir, A., (1995). Visual cryptography, Advances in Cryptology
EUROCRYPT94, Lecture Notes in Computer Science 950, Springer- Verlag, pp. 1 12.
[3] M. Naor and A. Shamir. Visual cryptography. in: A. De Santis (Ed.), Advances in Cryptology:
Eurpocrypt'94, Lecture Notes in Computer Science, 950:1-12, 1995.
[4] G. Ateniese, C. Blundo, A. De Santis, and D.R. Stinson. Visual cryptography for general access
structures. Inf.Comput., 129:86-106, 1996.
[5] D.R. Stinson. An introduction to visual cryptography. Public Key Solution '97, pages 28-30, April
1997.
[6] E.R. Verheul and H.C.A. Van Tilborg. Constructions and properties of k out of n visual secret
sharing schemes. Designs Codes Cryptography, 11:179-196, 1997.
[7] C. Blundo, A. De Santis, and D.R. Stinson. On the contrast in visual cryptography schemes. J.
Cryptogr., 12:261-289, 1999.
[8] Y.-C. Hou. Visual cryptography for color images. Pattern Recognition, 36:1619{1629, 2003.
[9] C.-C. Lin and W.-H. Tsai. Visual cryptography for grey-level images by dithering techniques.
Pattern Recognition Lett., 24:349{358, 2003.
[10] S.J. Shyu. Efficientcient visual secret sharing scheme for color images. Pattern Recognition,
39:866{880, 2006.
[11] Shyong Jian Shyu, Image encryption by Random grid pattern Recognition, Volume 40, Issue 3,
march 2007, Pages 1014-1031.

Authors Profile:






Mr. Firoj Hussain Shaik completed his M.Tech in JNT University Kakinada and
working as a Lecturer in University College of Engineering Kakinada. He is currently doing
his Research in the area of Secret Sharing Schemes.
Smt. U V Ratna Kumari completed her M.E in Andhra University Visakhapatnam and
working as an Assistant Professor in University College of Engineering Kakinada. She is
currently doing her Research work in the area of Antennas and Microwaves.

Mr. Anantha Kumar K Completed his graduation in aditya college of engineering,
Andhra Pradesh. He is currently doing his M.Tech in JNT University Kakinada. He is
currently doing his Research in the area of Secret Sharing Schemes with halftoning
techniques.

Special Issue Page 19 of 92 ISSN 2229 5216

You might also like