Sie sind auf Seite 1von 6

A Neural Network Approach for Visual Cryptography

Tai-Wen Yueand Suchen Chiang


Department of Computer Science and Engineering, Tatung University
40 Chungshan North Road, Section 3, Taipei 104, Taiwan
twyu@cse.ttu.edu.tw snd suchentlcomm.cs e.ttu.edu.tw

Abstract
Visual cryptography finds many applications in cryptographic field such as key management, message con-
cealment, authorization, autbentication, identification, and entertainment. In the paper, we propose a novel
approach for visual cryptography using neural networks (NNs). To perform encrypting, the input to the NN
is a set of graylevel images, and the output is a set of binary images (shares) that fulfills the desirable access
scheme. This approach is considerably different from the traditional one, and can be applied to cope with very
complex access schemes.

1 Introduction
Visual cryptography is a cryptographic scheme to achieve visual secret sharing [5, 6]. Given a visually rec-
ognizable target image, the (n, k) encrypting scheme (or access scheme) is to cryptologically separate the image
into a set of n shares, called shadow images which are recorded in transparencies, such that the pictorial meaning
stored in the original image is recognizable if and only if a viewer is able to acquire at least k shares and stack
them together. One can also define more complex encrypting schemes using the so-called access structures [1, 2].
Figure l(a) shows the code book devised by Naor and Shamir to fulfill the (2, 2). Figure l(b) shows an example that
uses such a encrypting strategy. Apparently, complicated code books should be required to account for complex
access schemes. Besides? using such a table lookup strategy, the target image must be a binary one, and the size
of the shadow images w1ll be enlarged.
In this paper, we propose a neural network (NN) approach for visual cryptography. The NN model to conduct
this research is the so-called quantum neural networks (Q’tron NNs; for short) [7, 9, 10]. For encrypting, the target
image input to the NN is a gray image. After the NN settles down, a set of binary shadow images, each of them
has the same size as the target, will be resulted. By stacking enough number of the shadow images, the superposed
version will be a halftone image to mimic the target image. This implies that decrypting is performed by eyes,
i.e., done without the help of machines. Because Q ‘tron NN’s are intrinsically auto-invertible, the NN designed for
encrypting can automatically be used for decrypting. That is, by reversing the operating modes of Q’trons, the
NN then serves to reconstruct the target image using the set of shadow images as input. This, hence, allows us to
perform decrypting with the help of machines, although this is not absolutely needed.
We propose a Q’tron NN paradigm to achieve the aforementioned goals. In the article, a Q’tron NN for
the (2, 2) access scheme will be built to enlighten the main concept. However, with skillful modification of the
energy function and applying the persistent noise-injection mechanism [7, 10] peculiarly for a Q’tron NN, we can
generalize the paradigm to cope with complex access schemes. Although the generalized version is not discussed
in the paper, some experimental results corresponding to various access schemes will be demonstrated to manifest
the effectiveness of the approach.
The content of the paper is organized as follows: In Section 2, we’ll give a brief introduction on the Q’tron NN
model. Section 3 reviews the strategy of using a Q’tron NN for image halftoning and restoration [8]. Section 4
discusses the strategy to build a Q’tron NN for the (2,2) visual cryptography. Section 5 gives experimental results.
Finally, we will draw some conclusions in section 6.

2 Q’tron NN Model
In this model of NN, the basic processing elements are called Q’tron’s. The number of output-level of each Q’tron
can be greater than two. Specifically, let pi represent the ith Q’tron in a Q’tron NN, where the output of Ki, denoted
as Qi, takes up its value in a finite integer set {O, 1,..., qi – 1} with qi (z 2) being the number of output-level. In
addition, Q~ is also weighted by a specific positive value a~ called active weight, which stands for the unit excitation
strength of that Q’tron. The term a~Q~ is thus referred to as the active value of vi, which represents the total
excitation strength of that Q’tron. In a Q’tron NN, for a pair of connected Q’trons LLi and M, there is only one
connect ion strength, i.e. Tij = Tji. In Q’tron NN model, each Q’tron in the NN is allowed to be noise-injected.
Thus, noise-injected stimulus gi for the Q’tron pi is defined as:
n
fii = ‘Hi +Ni = ~Tij(ajQj) +Ii +Ni, (1)
j=l

where Hi denotes the noise-free net stimulus of pi, which apparently k equal to the sum of internal stimuli, namely,

~Tij(a~Q~), and eXteWWLl


StimUIUSI The term Ni denotes the additive noise that is fed into pi, and n denotes
j=l

0-7695-0619-4/00/$10.00 (C) 2000 IEEE


Shares Supeqmsition of
Pixel Probability #l
#2 the twos hares
❑ m

❑ P=O.5
❑ m ❑
p = 0.5
■ P:O.5 ❑ m ■
~ -0.5 ■ S1 S2 S1+S2

(a) 0)
Figure 1: (a) Code book for (2, 2); (b) a (2,2) example.

the number of Q’trons in the NN. A Q’tron NN is said to run in simple mode if it is noise-free, i.e., Ni = O for all
i; otherwise, it is said to run in full mode. At each time step only one Q’tron is selected for level transition subject
to the following rule:

+1 whenever fii (t) > ~ lTiiai \and Q~(t) < q~– 1;


Qi(t + 1) = Qi(t) + AQ~(t), with AQ,(t) = –1 whenever fii(t) < –~ lTiiail and Qi(t) > O; (2)
{ o otherwise;

where we have assumed that the Z?hQ’tron is selected at time t+ 1. From the model description for a Q’tron NN,
one can easily seen that if we let each Q’tron, say ~i have qa = 2, ai = 1 and Tai = O, and let the NN run in simple
mode, then the Q’tron NN model is reduced to the original Hopfield model [3, 4].
The system energy 8 embedded in a Q’tron NN, called Liapunov energy, is defined by the following form:

Where n is total number of Q’trons in the NN, and K can be any suitable constant. It was shown that, in
simple mode, the energy & defined above will monotonically decrease with time. Therefore, if a problem can be
mapped into one which minimizes the function & given in the above form, then the corresponding NN, hopefully,
will autonomously solve the problem after & reaches a global/local minimum. However, there may be enormous
number of local minima which, in fact, represent unsatisfactory solutions. In the Q ‘tron NN approach, Ni serves
to control the solution quality to a problem [9]. In brief, given the desirable solution quality, the allowable range of
noise strength injected into each Q’t ron can be systematically determined. By persist ently injecting such strength-
bounded noises into Q’trons, the NN eventually will settle down on a state corresponding to a satisfactory solution
provided such a solution does exist.
To solve visual cryptography described by a complex access structures, the so-constructed Q’tron NNs, however,
are almost useless if the NN is to run in simple mode. Interestingly, one can avoid injecting noise to the Q’t ron
NN for the (2,2) access scheme if its energy function is ‘magically’ constructed (to be discussed shortly).
In addition, to make each Q’tron to be able to function either as an input or as an output node, a Q’tron can
either be operated in clamp-mode, i.e., its output-level is clamped fixed at a particular level, or in free mode, i.e.,
its output-level is allowed to be updated according to the level transition rule specified in Eq. 2.

3 Image Halftoning
Halftoning is a process to convert gray (continuous-tone) images into binary (halftone) images. Upon display, it is
hoped that, by blurring the eyes, the halftone image will appear similar to the original gray image. In the sequel,
we’ll use an integer value between O and 255 to represent a pixel value in a gray image, where O represents a pure
white and 255 a darkest black, and use O and 1 to represent an uninked (white, or more precisely, transparent)
pixel and an inked (black) pixel in a halftone image, respectively. Consider two M x N images, say, G and H which
represent a graytone and a halftone image, respectively. We’ll use two M x N Q’tron planes, say Plane-G and
Plane-H to represent images G and H, respectively, as shown in Figure 2 (a).. With such a representation scheme,
we’ll use Q: ~ {O, 1, ..., 255} and Q~ E {O, 1} to represent the ijih and klth pixels in Plane-G and Plane-H,
respectively. This implies aijG– — a G=landq$=q G = 256 for Q’tron in Plane-G, and akl‘– — a ‘=255 and
qfi = qH = 2 for Q’tron in Plane-H.
The Energy Function for Image Halftoning and Restoration
Given a gray image, image halftoning can be done by constructing a binary image that, in average sense, preserves

0-7695-0619-4/00/$10.00 (C) 2000 IEEE


Pkine-G (Gray Image)

‘Z’s~
Plan-Ii (Halftone image ) Halftone Reconstructed
Original
(a) (b)
Figure 2: (a) Q’tron NN for image halftoning and restoration; (b) a simulation reult.

Table 1. Error squares for stackingrule


❑ nnoclnn

❑ ❑
12nnnn ❑ tlnclncln S1 %hp S1 szh~
❑ 00 ❑ 0000 clcmcmnu 0000 00 0 00 on lB
❑ mo ❑ nmln ❑ nnmclun 2.2s
❑ 00 ❑ 0000 ❑ clnclclcln on In In 0.25 ❑ lmon 1
❑ 0000 ❑ ncinoun lBOD 1~ 0.25 lEOEIOCI 1
❑ 000000
l~lm 1~ 0.25 lmlnocl 4
j-cl )’4 f’=3

Figure 3: The r-neighborhood


structures for r=l, 2, and 3.

the luminance everywhere in a small area on the original image. We define energy function ~1 for that as follows:
2

El=;x ~ Z55Q;- ~ Q$ 2=; ~ ~ aHQfi – x aGQfl ,


::;:fi { (k,l)efvr(i,j) (k,l)ENr(2,j) }{ ;:;:y (k,l)EA?r(i,’j) (k,l)<’vr(i,j) }
—— ——
(4)
where IVr(i, j) denotes the r-neighborhood of ij~h Q’tron in a Q’tron Plane, defined by

Nr(i, j) = {(k,l) : \i–kl <rancl lj–11 < r}, (5)

Figure 3 shows r-Neighborhood structures for r = 1,2,3. The terms in the brace of Eq. (4) represent the error of
total luminance between a pair of small rectangular areas located at the same place in images G and H. Therefore,
the minimization the tot al sum of such squared errors, indeed, fulfiIls the goal of halftoning.
Although image restoration is not absolutely needed in visual cryptography, we include it here to manifest the
auto-inverse feature of a Q’tron NN. As will be seen, this feature will make the Q’tron NN constructed for visual
crypt ography to be able to function either as an encryptor or a decrypter. Consider the following energy function
&.2:

&2=: ~ ~ (aGQ~ - aGQ~)2 ~ (6)


l<i<M (k,l)GNr(i,j)
l<j<N { (k,l)#(?, j) }
With a little investigation, it is then seen that &z tends to locally preserve pixel values, i.e., no abrupt change of
graylevels on neighboring pixels, in a gray image. From another perspective, &2 serves as a low-pass filter in the
image reconstruct ion process.
The Q’tron NN for Image Halftoning and Restoration
Considering l-neighborhood (3x 3) locality for halftoning and 2-neighborhood (5x 5) locality for image restora-
tion, then the energy function & for such a dual-function NN will be:
: = )!1s1 + k?’%, (7)

where Al, AZ >0, and

(8)

0-7695-0619-4/00/$10.00 (C) 2000 IEEE


Plane-G
(Gray image)

g
Target

Plane -S1 Plane -S2


(Share 1 ) (Share 2 )

S1
(a) (b)
Figure 4: (a) The Q’tron NN architecture for (2, 2) Visual Cryptography; (b) a simulation result,

The connection strengths of the Q’tron NN can, then, be found by mapping Eq. (7) to the energy function for the
two-dimensional Q’tron planes shown in Figure 2, namely,

(lo)

where P = {H, G}, T,~kLrepresents the connection strength between the Zjth and the klth Q’trons on the Q’tron
planes z and y, and 1: represents the external stimulus fed into the ijth Q’tron in the Q’tron plane z. It is easily
seen that lZY = I,: = O. To perform image halftoning, put a graylevel image in Plane-G, and let the Q ‘trons
in Plane-G be operated in clamp-mode and those in Plane-H free. To perform image restoration, put a halftone
image in Plane-H, and the mode setting is the converse.

Experimental Results
We have performed an experiment that uses a Q’tron NN of size 128 x 128 x 2 and uses “Lena” as the original
image. The result ed halftone and reconst rutted images are shown in Figure 2(b). In this experiment, we set Al = 1
and AZ = 2, and run the NN in simple model.

4 The (2,2) Visual Cryptography


Figure 4(a) shows the Q’tron Planes for the (2,2) scheme. To perform encrypting, clamp a gray image in Plane-G,
and let the Q’tron in other planes free. As the NN settles down, the images in Plane-Sl and PIane-S2 represent
the two shares, and the image in Plane-H represents the binary version of image in Plane-G, which, in turn, has
to coincide with the one obtained by the superposition S1 and S’2. To perform decrypting, clamp the two share
images in Plane-Sl and Plane-S2, and let the other planes free. As the NN settles down, the superimposed image
can be observed either from Plane-H or from Plane-G.
The Energy Function for Encrypting and Decrypting
In visual cryptography, decrypting is, in fact, equivalent to image stacking. Let S1, sz = {O, 1} be two pixeI
values of Share 1 and Share 2, respectively, and let h ~ {O, 1} be the pixel value obtained by the superposition of
the two shares’ pixels. There are eight possibilities, as shown in Table 1. In the figure, the left side lists the pixel
values corresponding to feasible stacking, while the right infeasible. Now, consider the following cost function E2.

E2 = [1.5h – (SI + S2)]2. (11)

Fix the values of S1 and S2. Referring to Table 1, one then see that E2 will reach a the minimum whenever h is
feasibly ‘decoded’. From another perspective, which corresponds to encryption, if the value of h is held fixed, then
E2 will reach the minimum whenever S1 and S2 are feasibly ‘encoded’. Although Eq (11) is ‘magically’ found, it
functions (for (2, 2) only). Accordingly, the energy function S3 for encryption/decryption is defined as:

& = ~}: fi[l.5(aHQ~) - (as’Q~ + aS2Q~)]2. (12)


Z=l j=l

Since Plane-H, Plane-Sl and Plane-S2 represent binary images, Q~3 e {O, 1} and a’ = 255 for x G {H, S1, S2}.

0-7695-0619-4/00/$10.00 (C) 2000 IEEE


S1 S2 S3

S1+S2 S1+S3 S2+S3

Figure 5: A simulation result for full access scheme (a 7-character Chinese verse).

The Energy Function to Build Plain Shadow Images


For simplicity, we will make the two shares to mimic plain images. A plain image, we mean that all pixels in
the image have the same graylevel. Suppose that shares S1 and S2 are to mimic plain images with graylevels K1
and K2, respectively. Adopting l-neighborhood cellular structure, the energy functions E4 for generating the two
plain shares is defined by:
’54 = &jl + 15;l, (13)
where

‘?’=;$${
a=l J=l
F
k=i–1
?
l=j–1
““Q::”’K1}2 -fz=;e?{ i=l j=l
2 E
k=i–1 l=j–1
“2Q::-’K2}2

Clearly, minimizing Ssl and S~2 makes the average of pixel values in each small area (3 x 3) in Plane-Sl and
Plane-S2 to close to #l and K2, respectively.
The Q’tron NN for (2,2) Visual Cryptography
The total energy function & for (2,2) visual cryptography now is described as follows:

$ = Al&l + A2c$2+ A3S3 + A4$4, (14)


where Al, AZ,AS,AA > 0 are constants. The connection strengths and external stimuli of the Q’tron NN can be
determined by mapping Eq. (14) into the form described in Eq. (10) by letting P = {H, G, S1, S2}.
Experimental Results
Feeding gray images into the NN for encrypting, their histograms usually have to be reallocated. For example,
stacking a given subset of shares together, it is impossible to get an image that is brighter than any of the shares.
We call the problem to determine the set of graylevel ranges to make an access scheme realizable as the histogram
allocation problem.
In a experiment, we still used “Lena” as the target image. Its histogram is reallocated to [135, 235]. The mean
graylevels K1 and Kz for plain shares are set to K1 = Kz = 128. The corresponding Q’tron NN is to run in simple
mode. The result is shown in Figure 4(b).

5 Generalized Access Schemes


For complex access schemes, such as (n, k) and those described by access structures, their energy functions
can’t be constructed using the aforementioned method. However, by reformulating the problems as integer-
programmings, they can be straightforwardly converted into the Q’tron NNs’ energy functions based on which
the Q’tron NNs are then built. To run such a NN in simple mode (noise-free), it will be stuck at an infeasible
local minimum almost surely. However, such a formulation allows to define appropriate noise spectra for Q’trons.
To run the Q’tron NN in full mode by accompanying with such noise?, it finally will settle down on a state that
represents a satisfactory solution provided the solution is existent. Without giving the detail, we present several
experiment al results for other access schemes in Figure 5 and 6. Interestingly, the full access scheme demonstrated
in Figure 5 is, in fact, theoretically unrealizable using the code book approach. By tuning the noise spectra for
Q’trons to allow certain degradation of the solution quality, satisfactory result emerges.

0-7695-0619-4/00/$10.00 (C) 2000 IEEE


S1 S2 S3 S4

S1+S4

Figure6: A simulation result: S1, S2 and S2 look similar. When stacking with S4, different images
appear. The access scheme, e.g., can be used for autbentication.

6 Conclusions
In the paper, we propose the Q’tron NN paradigm for visual cryptography. The approach views the problem
from the perspective completely different the traditional one. Given an access schem~, its goal is reformulated as
to minimize the energy function of a Q’tron NN. Accordingly, a Q’tron NN is then budd to fulfill the scheme. For
(~, 2), a special energy function can be magically found. The corresponding NN, as a result, can effectively solve
the problem without incorporating any noise injection mechanism. The approach can also be extended to cope
with very complex access schemes. Some experiment al results are demonstrated to highlight the capability.

References
[1]G. Ateniese, C. Blundo, A. D. Santis, D. R. Stinson, “Visual Cryptography for General Access Structures”, Information
and Computation 129(2), 86-106 (1996)

[2] G. Ateniese, C. Blundo, A. D. Santis, and D. R. Stinson, “Extended Scheme for Visual Cryptography,”
http: //cacr math .uwaterloo. ca/ dstinson/visual. html.

[3] J. J. Hopfield, “Neural Networks and Physical Systems with Emergent Collective Computational Abilities,” PT-oc. Natl.
Acad. SCZ. USA, VO1.79, 2554-2558, April 1982.

[4] J. J. Hopfield and D. W. Tank, “Neural Computation of Decisions in Optimization Problems,” Biological Cybernetics,
52, pp.141-152,1985.

[5] M. Naor, B. Pinkas, “Visual Authentication and Identification,” CRYPTO 1997, pp. 322-336.

[6] M. Naor and A. Shamir, “Visual Cryptography, “ in Advances Cryptology-Eurocrypt ’94, A. DeSantis Ed. Vol. 950 of
Lecture Notes in Computer Science, Springer-Verlag, Berlin, pp. 1-12, 1995.

[7] Tai-Wen Yue, A Goal-Driven Neural Network Approach for Combinatorial Optimization and Invariant Pattern Recog-
nition, Phd’s Thesis, Department of Computer Engineering, National Taiwan University, Taiwan, 1992.

[8] Tai-Wen Yue and Guo-Tai Chen, “An Auto-Invertible Neural Network for Image Halft oning and Restoration,” IEEE
ICNN, pp. 1450-1455, 1995.

[9] Tai- Wen Yue and Li-Cheng Fu, “A Local-Minima-Free Neural Network Approach for Building A/D Converters and
associative Adders”, IEEE IJCNN-91-Seattle, Vol. 2, pp.976, 1991.

[10] Tai-Wen Yue and Li-Cheng Fu, “A Complete Neural Network Approach to Solving a Class of Combinatorial Problems”,
IEEE IJCNN-91-Seattle, Vol. 2, pp.978, 1991.

0-7695-0619-4/00/$10.00 (C) 2000 IEEE

Das könnte Ihnen auch gefallen