0% found this document useful (0 votes)
65 views4 pages

Secure QR Code Scheme Based On Visual Cryptography: Xiaohe Cao, Liuping Feng, Peng Cao and Jianhua Hu

A beautiful story

Uploaded by

Bach Don
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views4 pages

Secure QR Code Scheme Based On Visual Cryptography: Xiaohe Cao, Liuping Feng, Peng Cao and Jianhua Hu

A beautiful story

Uploaded by

Bach Don
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Advances in Intelligent Systems Research, volume 133

2nd International Conference on Artificial Intelligence and Industrial Engineering (AIIE2016)

Secure QR Code Scheme Based on Visual


Cryptography
Xiaohe Cao, Liuping Feng*, Peng Cao and Jianhua Hu
Beijing Key Laboratory of Signal and Information Processing for High-end Printing Equipments, Beijing Institute of Graphic
Communication, Beijing, China
*
Corresponding author

Abstract—With the wide application of QR code, the security and QR codes[1]. S. Khairnar used extended visual
problem of QR code is serious, such as information leakage cryptography technique to solve the problem of phishing and
and data tampering. In order to solve the QR information done the relevant validation. The method of visual encryption
security problem, this paper proposed a secure QR code schema combined with QR code is mentioned more than once. A lot of
based on visual cryptography. The QR code is divided into two researchers have done the experiment to confirme the
share images that can be transmitted separately. The generation feasibility of this method. M.A. Kute, Ms. Ashvini, and M. D.
of the two share images is based on the pseudo-random matrix, Deokar described a scheme using the visual cryptography and
that is, the pixels in the two share images are determined by the QR code in their paper[2]. S. Falkner, P. Kieseberg, D. E.
corresponding values in the pseudo-random matrix. The two
Simos proposed an e-voting authentication scheme[3]. This
share images can be stacked simply to restore the information.
Simulation results show that the QR code image can be well
approach is based on visual cryptography as the work frame
hidden, and it can be restored effectively. and also combined with QR codes, focusing on the usability. D
Li, Z Liu, and LH Cui proposed scheme for identification
Keywords-QR code; visual cryptography; secret sharing; photos based on QR Code and Visual Cryptography[4]. The
pseudo-random modulation visual cryptography scheme is applied to generate the secret
images from the feature values in their research.
I. INTRODUCTION
Visual cryptography is a new secret sharing technology. It
In recent years, the QR code is widely used. First, the QR improves the secret share images to restore the complexity of
code is easy to be computer equipment identification, for the secret, relying on human visual decryption. Compared with
example, mobile phones, scanning guns. Second, QR code has traditional cryptography, it has the advantages of concealment,
a large storage capacity, anti-damage strong, cheap and so on. security, and the simplicity of secret recovery. The method of
Because of the advantages of the QR code, it is used in many visual cryptography provided high security requirements of the
areas. Train ticket real-name authentication uses QR code to users and protects them against various security attacks. It is
approve identity. In the supermarket, commodity packaging is easy to generate value in business applications.
now also in the application of QR code to distinguish true or
false. Scanning the QR code to pay attention to WeChat public In this paper, we proposed a secure QR code scheme to
number or download App. Now, QR code is the most popular protect the user's information not be stolen using visual
application. And the mainstream mode of payment is to encryption technology. The scheme can be applied in the fields
complete the Alipay or WeChat pay by scanning the QR code. of document management, customs security system, medical
QR code logos are almost full of our lives anywhere. With the medicine and other fields.
wide application of QR code, the security problem of QR code The organization of this paper is as follows. In Section II,
is serious, such as information leakage and data tampering. The we explained the basic principles and methods of visual
coding rules of the QR code are gradually being familiar to the cryptography technology. We proposed the security QR code
researchers. Some attackers according to the encoding rules scheme based on visual cryptography in Section III, and
forged the same code for the QR code pattern through illegal evaluated the performance through experimental results in
operation. For example, the pirates can obtain personal Section IV. Finally, we concluded this paper in Section V.
information (such as name, ID number) just through the waste
real-name system of train tickets, then they can forge a same II. VISUAL CRYPTOGRAPHY
code pattern ticket with the same encoding to pass the ticket
Visual cryptography is a cryptographic technique which
verification. The use of QR code is no longer safe. Therefore,
allows visual information (pictures, text, etc.) to be encrypted
in order to make the QR code authentication more safe and
in such a way that the decryption can be performed by human
reliable to use, the introduction of new technology is urgently
visual without the aid of computers [5]. In 1994, M. Naor and
needed. Many researchers are devoted to study the safe and
A. Shamir firstly introduced visual cryptography and provided
reliable QR code authentication.
their constructions of visual cryptographic solutions for the
S. Khairnar proposed a new authentication scheme for general k out of n secret sharings problem at their paper[6].
secure OTP(One Time Password) distribution in phishing
Visual cryptography scheme is a method to encode a secret
website detection through EVC(extended visual cryptography)
image into n noise-like shadow images called share images,

Copyright © 2016, the Authors. Published by Atlantis Press. 433


This is an open access article under the CC BY-NC license (http://creativecommons.org/licenses/by-nc/4.0/).
Advances in Intelligent Systems Research, volume 133

and the share images need some processing to reconstruct the III. THE NEW SCHEME OF VISUAL CRYPTOGRAPHY ON THE
secret image[7]. The detailed principle of visual encryption is QR CODE SECURITY
that the secret image is divided into several share images by
In this section, We will introduce our secure QR code
cryptographic operations and distributed to different
scheme. In order to hide the QR code information, we proposed
participants. The pixels of each share image appear to be
an improved visual encryption technology based on the existing
randomly distributed[8]. Decryption is possible by stacking an
visual encryption technology to realize the concealment of the
adequate number of shares. The secret image will be revealed
QR code pattern. Through this method of encryption, the
and can be decoded by the human visual system (HVS) on the
information hidden in QR code is more difficult to be accessed
condition of the absence of any complicated computation or
by forgers. So as to achieve the purpose of hidden information
replacement algorithms[7]. Moreover, no knowledge of
more secure.
sophisticated cryptographic techniques is needed for the
encryption and decryption processes. However, the secret The QR code with hidden information is the original secret
image will be invisible if the number of stacked shares is less image, using a special encryption method that pseudo-random
than t. This is so called (t,n)-threshold visual cryptography matrix combined with visual cryptography algorithm to
scheme ((t,n)-VCS)[9]. generate two shared images. Steps are as follows.
Consider the simplest two-out-of-two visual threshold A. The Collections of the Encoding Matrices C0 and C1
scheme where each pixel of the image is encoded into a pair of
subpixels in each of the two shares. If the pixel is white, one of The two collections of the encoding boolean matrices C0
the two columns tabulated under the white pixel in Fig. I. is and C1 , respectively, representing a white pixel and a black
selected. If the pixel is black, one of the two columns tabulated pixel of the original secret image.
under the black pixel is selected. In each case, the selection is
performed by randomly flipping a fair coin, such that each B. Generation of a Pseudo-Random Matrix
column has equal probability to be chosen. Then, the first two Generate a pseudo-random matrix of the same size as the
pairs of subpixels in the selected column are assigned to share original secret image, which is in the range of 0~3, each value
A and share B, respectively[10]. Now consider the corresponds to the basic matrix of C0 and C1 , respectively.
superposition of the two shares as shown in the last row of Fig.
I. The basic matrix in C1 is XORed by the basic matrix in C0
and the all-1 matrix.
C. Selection of the Basic Matrix
The pixel matrix of the share image is the basic matrix
selected from C0 or C1 , but the chosen rule is determined by the
participation of the pseudo-random matrix.
a) When generating the share image A, the rule as follows:
the position of pixel (including white pixels and black pixels)
in the secret image are mapped to the corresponding position in
the pseudo-random matrix, and then selected the corresponding
basic matrix from C0 according to the value in the pseudo-
random matrix.
FIGURE I. CONSTRUCTION OF A TWO-OUT-OF-TWOVC SCHEME: A b) When generating the share image B, the rule is slightly
SECRET PIXEL CAN BE ENCODED INTO TWO SUBPIXELS IN
EACH OF THE TWO SHARES
different when white pixels and black pixels mapped to the
pseudo-random matrix.
The greatest advantage of this decryption process is that it If the case of white pixel, the rule is as follows: the position
is only through the human vision system. No complex of the white pixel in the secret image is mapped to the
computations and knowledge of Visual Cryptography Scheme corresponding position in the pseudo-random matrix, and then
is required. the corresponding basic matrix is selected from the
In the visual encryption scheme proposed by Naor and C0 according to the value in the pseudo-random matrix.
Shamir, share image A pixels in the basic matrix are randomly
selected, while share image B pixels are to select the other In the case of a black pixel, the rule is as follows. The
basic matrix. These two basic matrices are a pair of. The result position of the black pixel in the secret image is mapped to the
of their encryption is to generate two gray images, which can corresponding position in the pseudo-random matrix, and the
not see the original image information of the two images. So corresponding basic matrix is selected from C1 according to the
the information in secret images can not be obtained. value in the pseudo-random matrix.
D. Reconstructed Secret Image
In the reconstructed secret image, a white or black pixel in
the original secret image is represented by one sub-pixel.

434
Advances in Intelligent Systems Research, volume 133

The basic matrices of the collections of the encoding IV. EXPERIMENTAL RESULTS AND ANALYSIS
matrices C0 and C1 are as follows: Based on the process described above, we constructed a
two-out-of-two visual cryptography experimental scheme. This
 0 1 0 1 0 1 1 0 1 0 1 1 0 1 1 0  experiment is based on MATLAB platform. The original image
       
 1 0 1 0 1 0 0 1 0 1 0 1 1 0 0 1  is a 120×120 binary QR image, it is as shown in Fig III. (a).
C0    
0 1 0 1

0

1 1 0

1

0 1 0

1

0 0 1 

 1 0 1 0 1 1 0 
 1 0 0 1 0 1 0 0 0
1 0 1 0 1 0 0 1  0 1 0 0  1 0 0 1 
       
 0 1 0 1  0 1 1 0  1 0 1 0 0 1 1 0 
C1   
 0 1 0 1 0 0 1  0 1 0 1  0 1 1 0 
1       
 0 1 0 1 0 1 1 0 1 0 1 1 1 0 0 1 

The principle of pixel superposition based on AND in this
scheme is shown in Fig. II
(a) (b)

(c) (d)
FIGURE III. TWO-OUT-OF-TWO VC SCHEME: (A) THE SECRET
IMAGE WAS ENCODED INTO (B), (C) THE TWO SHARES, AND
WAS (D) DECODED BY SUPERIMPOSING THESE TWO SHARES
WITH 50% LOSS OF CONTRAST. (A) SECRET IMAGE. (B)
SHARE A. (C) SHARE B. (D) DECODED IMAGE

Encoding the QR code in Fig III (a) through our scheme,


FIGURE II. CONSTRUCTION OF A TWO-OUT-OF-TWO SCHEME OF you can get the two shares shown in Fig. the III. (b) and (c),
THIS PAPER: A SECRET PIXEL CAN BE ENCODED INTO TWO respectively. Superimposing these two shares leads to the
SUBPIXELS IN EACH OF THE TWO SHARES output secret as shown in Fig. III. (d). The decoded image is
clearly identified, although some contrast loss is observed.
In this scheme, secret share images A and B are generated Some binary pixels appeared to be “grey” due to the shrinking
by using the visual cryptography scheme based on the AND of the image for layout purpose. The width of the decoded
operation. From the basic principle of the visual cipher and the image is fourth that of the original secret image since each
nature of the operation, the two share images A and B can be pixel is expanded to sixteen subpixels in each share as shown
used to recover the secret image. in Fig. II. This effect is referred to as pixel expansion.
The share images generated in this scheme are related to the Based on the experimental results, this scheme realized the
pseudo-random matrix. Pixels in Share image A are randomly complete restoration of the secret image at the cost of pixel
selected from the basic matrix, and the pixels in share image B expansion, which only needed two participants to carry a share
are also generated from the basic matrix as described above. image.
Even if the basic matrix is obtained by them, the attacker can
neither break the encrypt nor obtain the secret information. From the experimental results, the design of the visual
However, the stacked secret image had a contrast loss encryption of the security QR code scheme is feasible. But this
compared with the original secret image. A basic matrix scheme can still be improved to make it more suitable for
replaced a pixel in the original image that caused this market applications.
phenomenon. This is normal, and it is expected to be the result
of the experiment. The size of the share images and the V. CONCLUSION
stacked secret image expanded to four times compared with the In this paper, we proposed a scheme for information
original image. It also related to the replacement of pixels. prevention using visual cryptography and QR code techniques.
Because a pixel of the original image is replaced by a basic We apply the pseudo-random matrix in the visual cryptography
matrix of 4  4 , so the share images and the QR image after in this scheme, and conduct experiments to verify this scheme’s
overlay recovery would be four times as much as the original feasibility. Experiments show that this scheme is efficient. And
secret image. it also show that this scheme is a reliable method through
combining visual cryptography with pseudo-random matrix for
detecting attacker. It provided better security for QR code.

435
Advances in Intelligent Systems Research, volume 133

In view of the operability of the scheme proposed in this


paper, we can apply it to the commercial platform. The share
image A of the program can be applied to various products.
The possibility of information leakage is very small. And the
shared image B is retained by the issuing authority, and the
original QR code image can be restored when the two images
are subjected to the operation. The share images are
meaningless images that are random distribution images of
black and white pixels. The attacker using mathematical
analysis and other means is unable to determine the original
secret image at a point of the pixel is black or white. At the
same time, the scheme ensured the safe storage of the
customer information of the issuing authority.
ACKNOWLEDGMENT
This paper is supported by the National Natural Science
Funds project, No.61370140; Collaborative Innovation Center
of Green Printing & Publishing Technology project, No.
PXM2016_014223_000025; Beijing Undergraduate science
research project, No. 22150116005/033.
REFERENCES
[1] S. Khairnar, “Anti-Phishing framework based on Extended Visual
Cryptography and QR code,” International Journal of Computer
Applications vol. 142, May 2016
[2] M.A. Kute, Ms. Ashvini, and M. D. Deokar, "Modern Method for
Detecting Web Phishing Using Visual Cryptography (VC) and Quick
Response Code (QR code)," International Journal of Engineering
Research & Applications vol.5, 2015
[3] S. Falkner, P. Kieseberg, D. E. Simos, et al. “E-voting Authentication
with QR-codes,” Human Aspects of Information Security, Privacy, and
Trust. 2014, pp.149-159
[4] D Li, Z Liu, and LH Cui, “A Zero-Watermark Scheme for Identification
Photos based on QR Code and Visual Cryptography” , International
Journal of Security and Its Applications vol. 10, 2016, pp.203-214
[5] P. S. Revenkar, A. Anjum, and W. Z. Gandhare, "Survey of Visual
Cryptography Schemes," International Journal of Security & Its
Applications 4.vol. 4, 2010
[6] M. Naor and A. Shamir, "Visual cryptography," Lecture Notes in
Computer Science vol.950, 1994, pp.1-12
[7] S. Agrawal, "Impact of Error Filters on Shares in Halftone Visual
Cryptography," International Conference on Computer Science,
Engineering and Applications , 2012, pp.139-148
[8] L. P. Feng , et al. "A halftone visual cryptography schema using ordered
dither," vol.9159, 2014, pp.4177-4180
[9] Y.C. Hou , Z.Y. Quan , C.F. Tsai , D.S. Wang, “(3,n)-Visual Secret
Sharing Scheme with Unexpanded Shares”. Chinese Journal Of
Computers, vol.39, Mar 2016
[10] Z. Zhou, G. R. Arce, and G. D. Crescenzo. "Halftone visual
cryptography." Image Processing, 2003 International Conference
on IEEE, I-521-4 .vol.1, 2003

436

You might also like