Conference PaperPDF Available

Exploiting the Error Correction Mechanism in QR Codes for Secret Sharing

Authors:

Abstract and Figures

This paper investigates a novel approach to secret sharing using QR codes. The proposed QR code secret sharing approach exploits the error correction mechanism inherent in the QR code structure, to distribute and encode information about a secret message in a number of shares. Each share in the scheme is constructed from a cover QR code, and each share itself is a valid QR code which can be scanned and decoded by a QR code reader. The secret message can be recovered by combining the information contained in the QR code shares. Since each share is a valid QR code, the proposed scheme has the advantage of reducing the likelihood of attracting the attention of potential attackers. In addition, the shares can be distributed via public channels without raising suspicion. Moreover, shares do not have to be stored or transmitted electronically, as QR codes can be distributed via printed media.
Content may be subject to copyright.
Exploiting the Error Correction Mechanism in
QR Codes for Secret Sharing
Yang-Wai Chow1, Willy Susilo1, Guomin Yang1, James G. Phillips2, Ilung
Pranata3and Ari Moesriami Barmawi4
1Centre for Computer and Information Security Research, School of Computing and
Information Technology, University of Wollongong, Australia
{caseyc, wsusilo, gyang}@uow.edu.au,
2Department of Psychology, Auckland University of Technology, New Zealand
jphillip@aut.ac.nz,
3School of Design, Communication and Information Technology, University of
Newcastle, Australia
ilung.pranata@newcastle.edu.au,
4School of Computing, Telkom University, Indonesia
mbarmawi@melsa.net.id
Abstract. This paper investigates a novel approach to secret sharing
using QR codes. The proposed QR code secret sharing approach ex-
ploits the error correction mechanism inherent in the QR code structure,
to distribute and encode information about a secret message in a num-
ber of shares. Each share in the scheme is constructed from a cover QR
code, and each share itself is a valid QR code which can be scanned and
decoded by a QR code reader. The secret message can be recovered by
combining the information contained in the QR code shares. Since each
share is a valid QR code, the proposed scheme has the advantage of re-
ducing the likelihood of attracting the attention of potential attackers. In
addition, the shares can be distributed via public channels without rais-
ing suspicion. Moreover, shares do not have to be stored or transmitted
electronically, as QR codes can be distributed via printed media.
Keywords: Error correction, QR code, secret sharing
1 Introduction
A secret sharing scheme refers to a method by which a dealer encodes a secret
into a number of shares and distributes these shares to a group of participants.
Individually, the shares reveal no information about the secret. The secret can
only be reconstructed when information from an authorized number of shares is
combined [2]. By splitting and encoding a secret into a number of shares, secret
sharing overcomes the problem of storing a secret in a single information-carrier,
which can easily be lost or damaged [19, 21]. Secret sharing schemes are impor-
tant tools that have found many applications in cryptography and distributed
computing [2]. In addition, secret sharing is also regarded as a mechanism that
2 Y.W. Chow et al.
can be used to transfer secret information via public channels in cryptography
[25]. This paper investigates a novel approach to secret sharing by distributing
and encoding a secret into a set of Quick Response (QR) codes.
The concept of secret sharing was first introduced independently by Blakley
[3] and Shamir [18]. The secret sharing schemes that they proposed are known
as k-out-of-n, or (k,n), threshold schemes. In a (k,n) secret sharing scheme, a
secret is divided into nshares, where n>1, and k, or more, shares are required to
reconstruct the secret. Even complete knowledge of any k1, or fewer, shares will
reveal no information about the secret. Since its inception, many different secret
sharing schemes have been proposed [1, 2, 8, 7, 16, 17, 19–22, 25]. Some schemes
require complex numerical computation, whilst others require little or no com-
putation [21]. Of the varying approaches, image sharing can be seen as a subset
of the general secret sharing problem as the secret is a concealed image [22]. One
of the popular ways of secret image sharing is known as visual cryptography [17].
Visual cryptography is a method of encoding and distributing a binary image
into a number of shares, each to be printed on separate transparencies. When
the qualified number of shares are stacked together, the human visual system
can recover the secret image without the need for any computation.
Each share in visual cryptography looks like a random pattern of pixels. In
an extension to visual cryptography, known as extended visual cryptography,
each share is encoded using a meaningful cover image [1]. This means that when
viewed individually, a meaningful, albeit noisy, image is visible on each share.
The advantage of encoding the secret image into shares containing ‘innocent-
looking’ meaningful cover images is that it reduces the likelihood of attracting
the attention of attackers [20].
While the advantage of these visual secret sharing schemes is that decryption
can be performed by the human visual system without any computation, these
approaches suffer from a number of problems, including pixel expansion, contrast
issues, share misalignment and the visual quality of the reconstructed image [4,
8, 16, 26]. Secret image sharing techniques have also been proposed to share and
hide a secret image by distributing and embedding the information required to
reconstruct the secret image in a number of digital images, each of which is
a meaningful cover image [19]. However, these techniques hide information in
digital images. Therefore, decryption must be performed on the digital image
shares, which necessitates that the shares must be distributed via electronic
means.
Our Contribution. This paper introduces a novel approach to secret sharing
by distributing and encoding a secret message into a number of QR code shares.
The proposed approach exploits QR code error correction redundancy, which is
an inherent feature of the QR code structure. The advantage of this approach is
that each share is a meaningful QR code, which individually does not reveal the
secret message. The secret message can be recovered by combining the informa-
tion contained in the QR code shares. Since each QR code share can be scanned
and decoded by any standard QR code reader, this means that the shares can be
QR Code Secret Sharing 3
distributed via public channels without raising suspicion. In addition, since QR
codes are meant to be scanned by a QR code reader, the shares do not have to
be stored or transmitted electronically and can be distributed via printed media.
Furthermore, the shares can be constructed using any artistic QR code method
as long as it can be scanned and read. Therefore, each QR code share can be
constructed using a different artistic QR code scheme in order to increase the
secret sharing subterfuge by reducing the likelihood of attracting the attention
of potential attackers.
2 Related Work
The QR code is a two-dimensional code that was invented by the company Denso
Wave [10]. In recent years, QR codes have seen widespread adoption due to its
convenience and ease of use, as any smartphone equipped with a camera and
QR code reader can retrieve the information encoded within a QR code. The
application of the QR code in the area of information security has previously been
proposed for a number of different purposes. For example, QR codes have been
used for authenticating visual cryptography shares [23], e-voting authentication
[11] and for digital watermarking [14].
QR codes have also been used in the area of data hiding and steganography.
Among the work conducted in this area, Wu et al. [24] proposed a data embed-
ding approach for hiding a QR code in a digital image. Their purpose was to
camouflage the appearance of a QR code in an image so as not to degrade the
visual quality of the picture. Huang et al. [12] developed a reversible data hiding
approach for images with QR codes. The purpose of their method was to avoid
a QR code from degrading the quality of the image or concealing information
contained in the image. In their approach, using reversible data hiding a portion
of an image is hidden in the rest of the image. This portion is replaced with
a QR code. Once the QR code has been scanned, it will be removed from the
image and the original image will be restored using the data that was previously
hidden in the rest of the image. A nested image steganography scheme was pro-
posed by Chen and Wang [6] using QR codes. In their approach, two types of
secret data, in the form of text (lossless) and image (lossy), are embedded into a
cover image. The text portion of the secret data is embedded using a QR code.
A similar approach was also reported in Chung et al. [9].
Unlike approaches that first convert a secret into a QR code before embed-
ding it into a cover image, Lin et al. [15] introduced a scheme for concealing
secret data in a cover QR code. Their approach capitalizes on the error correc-
tion property of a QR code in order to conceal secret data. The amount of secret
data that can be concealed depends on the QR code version and error correction
level that is used. Bui et al. [5] also investigated the problem of hiding secret
information in a QR code. They argue that previous approaches to embedding
secret messages in QR codes use bit embedding which is vulnerable to modifica-
tion attacks. Consequently, they propose a method of using Reed-Solomon code
and list decoding to hide a secret message in a QR code.
4 Y.W. Chow et al.
3 Background
The International Organization for Standardization (ISO) has established a stan-
dard for the QR code (ISO/IEC18004) [13]. This section outlines the basic QR
code structure and error correction feature as defined by the ISO standard.1
3.1 The QR Code Structure
A QR code symbol is constructed as a two-dimensional array of light and dark
squares, referred to as modules. There are forty sizes of QR code symbol versions
ranging from version 1 to version 40. Each QR code symbol version is comprised
of a different number of modules, and as such different QR code versions give rise
to different data capacities. Version 1 is made up of 21×21 modules, and each
successive version increases by 4 additional modules per side, up to version 40
which is made up of 177×177 modules. The appropriate version to use depends on
the amount and the type of data (alphanumeric, binary, Kanji or a combination
of these) to be encoded as well as the error correction level. The error correction
level will be described in Section 3.2 to follow.
The QR code structure consists of encoding regions and function patterns
[13]. An example of the encoding regions and function patterns for a QR code
version 7 symbol is illustrated in Fig. 1. As can be seen from the figure, a
QR code symbol is surrounded by an empty region known as the quiet zone,
which should have the same reflectance value as the light modules. Function
patterns do not encode data, they consist of the finder patterns, separators,
timing patterns and alignment patterns. There are three identical finder patterns
located at each corner, except the bottom right corner, of the symbol. These
are used by a QR code reader to recognize the QR code and to determine the
rotational orientation of the symbol. The separators are one module wide, and
are constructed from light modules to separate the finder patterns from the
encoding region. Timing patterns are alternating light and dark modules used
to determine module coordinates in the symbol. Alignment patterns allow QR
code readers to compensate for image distortion. Different QR code versions
have a different number of alignment patterns.
3.2 Encoding and Error Correction
The encoding region consists of data codewords and error correction codewords,
format information and version information (version information is only used in
QR code version 7 and above). Message data is encoded as a bit stream which
is divided into a sequence of codewords. All codewords are 8-bits in length.
The codewords are divided into a number of error correction blocks, based on
the QR code version and error correction level, and an appropriate number of
error correction codewords are generated for each block. Error correction allows
1For a comprehensive description of the QR code structure and error correction mech-
anism, please refer to the ISO standard (ISO/IEC18004) [13].
QR Code Secret Sharing 5
Fig. 1. QR code version 7 structure.
correct decoding of the message in the event that part of the symbol is dirty or
damaged. This error correction feature has also been exploited to embed art or
other information in QR code symbols.
The QR code employs Reed-Solomon error control coding for error detection
and correction [13]. There are four error correction levels that the user can select.
Each level provides a different error correction capacity (L 7%, M 15%, Q
25% and H 30%). Higher error correction levels improve the recovery capacity,
but also increases the amount of data to be encoded. This means that if the same
message were to be encoded using a higher error correction level, a larger QR
code version may be required. The number of data codewords, error correction
blocks and error correction codewords depend on the QR code version and error
correction level. Table 1 shows these characteristics for QR code version 4 and
5. In the table, the error correction codewords for each block is given as (c,k,r),
where cis the total number of codewords, kis the number of data codewords and
ris the error correction capacity. Note that some QR code versions have blocks
with different (c,k,r) values for certain error correction levels. For example, it
can be seen in Table 1 that QR code version 5 with an error correction level of Q
has a total of 4 error correction blocks. The (c,k,r) values for the first 2 blocks
are (33, 15, 9) while the values for the next 2 blocks are (34, 16, 9).
The codewords from the blocks are encoded in an interleaved manner, with
the error correction codewords appended to the end of the data codeword se-
quence. This is done to minimize the possibility that localized damage will cause
the QR code to become undecodable. Fig. 2 shows the data codeword and error
correction codeword arrangement for QR code version 4, with an error correc-
tion level of H. After encoding the codewords, a data mask is applied to the
encoding region. There are a total of eight data mask patterns. The purpose of
the data mask is to balance the light and dark modules, as well as to minimize
the occurrence of undesirable patterns that may potentially confuse a QR code
reader. Note that the data mask is not applied to the function patterns.
The format information is a 15-bit sequence consisting of 5 data bits and 10
error correction bits. Two copies of this information are encoded in a QR code
symbol, as can be seen in Fig. 1. Of the 5 data bits, the first 2-bits indicate the
error correction level and the next 3-bits indicate the data mask pattern used in
6 Y.W. Chow et al.
Table 1. Error correction characteristics for QR code version 4 and 5 [13].
Total Error Number Error correction
Version codewords correction of blocks codewords per block2
level (c, k, r)
4 100
L 1 (100, 80, 10)
M 2 (50, 32, 9)
Q 2 (50, 24, 13)
H 4 (25, 9, 8)
5 134
L 1 (134, 108, 13)
M 2 (67, 43, 12)
Q 2 (33, 15, 9)
2 (34, 16, 9)
H 2 (33, 11, 11)
2 (34, 12, 11)
the QR code symbol. Error correction for the format information is performed
using the Bose-Chaudhuri-Hocquenghem (15, 5) code, which allows for an error
of 3-bits, or less, to be corrected. The 15-bit long data bit string is XORed with
a specific mask to ensure that the format information bit sequence does not
contain all zeros for any combination of data mask pattern and error correction
level.
Version information is only contained in QR code version 7 and above. It
consists of an 18-bit sequence consisting of 6 data bits and 12 Golay error cor-
rection bits. The (18, 6) Golay code allows up to 3-bit errors to be corrected. Its
purpose is to convey version information to a QR code reader, for example, for
QR code version 7 the 6-bit data string is 000111. QR code version 7 and above
contain two copies of this information, as depicted in Fig. 1.
4 Proposed QR Code Secret Sharing (QRCSS) Scheme
The error correction mechanism in the QR code makes it possible to manipulate
some of the codewords, while still maintaining a QR code symbol that can be
correctly decoded. The approach proposed in this paper is an (n,n) secret shar-
ing scheme which will be referred to as QR Code Secret Sharing (QRCSS). The
idea behind QRCSS is to exploit the error correction redundancy in the QR code
structure, in order to take a QR code containing a secret message and to dis-
tribute and encode its information into nQR code shares. Each share is a valid
and decodable QR code in themselves, which are each constructed from a mean-
ingful cover QR code. The secret message can be recovered by first XORing the
light and dark modules contained in the encoding region of the nQR code shares
and adding the function patterns. This will produce a resulting QR code that
when decoded will reveal the secret message. In the proposed scheme, the cover
2c = total number of codewords, k = number of data codewords, r = error correction
capacity
QR Code Secret Sharing 7
Fig. 2. Data and error correction codeword arrangement for QR code version 4 with
error correction level H.
QR codes and the secret QR code must be of the same QR code version with
the same error correction level. This is so that all the codewords and codeword
blocks are at exactly the same locations across all the QR code symbols.
4.1 Number of Shares
An indication of the minimum number of QR code shares, n, required to share
a secret QR code can be determined using the approximate recovery capacity
previously discussed in Section 3.2. For example, to share a secret QR code using
the error correction level H (i.e. 30%), the minimum number of QR code shares
required is 3. This is because up to 30%3of the codewords per block in each
QR code share can be manipulated, which allows up to 30% ×390% of the
codewords in the secret QR code to be distributed across the QR code shares.
This means that the error in the reconstructed secret QR code is at least 10%.
As long as the error in the reconstructed secret QR code is no more than its error
correction capacity, which is 30%, the secret can be recovered. It can easily be
seen that it is not possible to share the secret using only 2 QR code shares, as
the reconstructed secret QR code will contain a minimum of 40% error, which
overwhelms the error correction capacity and hence cannot be decoded correctly.
This also means that the greater the number of shares used to share a secret, the
smaller the amount of error that has to be introduced in each QR code share. An
indication of the minimum number of shares required for the proposed QRCSS
scheme for the respective error correction level is as follows: L (n14), M (n
6), Q (n4), and H (n3).
3In practice, it is not advisable to introduce this much error in the QR code shares,
because any damage or dirt may make the QR code symbol undecodable.
8 Y.W. Chow et al.
4.2 Codewords
The QR code error correction levels of L 7%, M 15%, Q 25% and H 30%,
are merely approximate values. The exact error correction capacity depends on
the QR code characteristics, which varies between the different QR code versions
and error correction levels, as can be seen from the characteristics for QR code
version 4 and 5 that were previously shown in Table 1.
The error correction capacity per block, r, for a QR code represents the
maximum number of codewords that can be in error per block. In other words, a
QR code cannot be decoded if more than rcodewords per block contain errors.
This means that to split the secret QR code across the QR code shares, the
maximum number of codewords that can be changed across the QR code shares
per block is r×n. However, since cis the total number of codewords per block,
there is no point changing more codewords than c, even in the case where r×nis
greater than c. Hence, the maximum number of codewords that may be changed
should be the smaller of the two values. This will be referred to as m, where m
=min(r×n,c).
In order for a QR code to be correctly decoded, there must be a minimum
number of codewords per block that cannot contain any errors. This value will
be referred to as l, where l=cr. This also means that in the reconstructed
secret QR code, each block must have l, or more, correct codewords in order to
decode the reconstructed QR code and to reveal the secret message.
The proposed QRCSS scheme requires that m > l for each block. Otherwise,
it will not be possible to split information required to reconstruct the secret QR
code across the shares, while maintaining valid QR code shares. This also means
that the number of codewords that have to be altered per block, t, can lie any-
where between land m. Nevertheless, in practice it is best to evenly distribute
the error among the shares and the reconstructed secret. Given that lis the
minimum number of codewords per block that have to be changed across the
shares, to evenly distribute the error among the shares, at least l
ncodewords
per block have to be changed for each share. However, using this value would
mean that the reconstructed secret has absolutely no error tolerance. As such,
in the proposed QRCSS scheme, the error correction capacity for each block of
the reconstructed secret was taken as the ratio between the total error correc-
tion capacity of the shares and minimum number of codewords that had to be
changed, i.e. r×n
lrounded to the nearest integer. Hence, to balance between the
error correction capacity of the reconstructed secret and the number of errors
that have to be introduced in the shares, t=min(l+round(r×n
l), m), since t
ranges between land m. In general, the larger the value of n, the larger the error
correction capacity of the reconstructed secret, for cases where t < m. If t=m,
the error correction capacity of the reconstructed secret QR code is equal to the
error correction capacity of the original secret QR code, i.e. r.
Let ebe the maximum number of codewords in a block to change per share,
or in other words the maximum number of errors that will be introduced to a
block per share in order to distribute the secret. To evenly distribute the error
across the shares, the value of eshould be t
nrounded up to the nearest integer,
QR Code Secret Sharing 9
i.e. e=round up( t
n). This means that the larger the value of n, the smaller the
amount of error per share e. So while the original cover QR code error capacity
per block is r, the resulting error capacity per block for each QR code share
in this QRCSS scheme is re. For the reconstructed secret QR code, since t
codewords per block were altered in the shares, ctcodewords per block will
be in error when reconstructed. So the error correction capacity per block in the
reconstructed secret QR code is r(ct).
4.3 Format and Version
The format information for a QR code contains 15-bits and allows for an error
of 3-bits, or less. The first 2-bits in the bit sequence represent the error correc-
tion level, which in the proposed QRCSS scheme must be the same for all the
shares and the secret. Hence, these 2-bits do not have to be altered as only the
next 13-bits may vary between the individual shares and the secret. The format
information allows for an error of up to 3-bits in each share to be corrected.
In addition, the reconstructed secret itself allows for a 3-bit format information
error to be corrected. As such, to evenly distribute the error across the shares,
the maximum number of format information bits to change per share f, should
be 13
n+1 rounded up to the nearest integer, i.e. if n= 3 then f= 3, otherwise
f=round up(13
n+1 ).
QR code version 7 and above have additional version information. However
since the proposed QRCSS scheme uses QR codes of the same version, the version
information modules are the same for all QR code shares. As such, the unaltered
version information simply has to be added to the reconstructed secret QR code.
In the proposed scheme, the choice of QR code version used to share a secret
has a direct bearing on its security. The security of the QRCSS scheme is gov-
erned by a security parameter λ. The size of λdepends on the data capacity of a
QR code. The more data a QR code can contain, the larger λwill be. Hence, the
QR code version has to be taken into consideration when determining security
of the scheme. This is because the larger the QR code version, the higher its
data capacity.
4.4 Algorithm
The proposed (n,n) QRCSS scheme can formally be described as follows. The
algorithm takes one secret QR code, S, and ncover QR codes, C1,C2, ..., Cn,
as input and outputs nQR code shares, S1,S2, ..., Sn. The minimum required
value of nfor each error correction level was previously discussed in Section
4.1. Each QR code share S1to Snis a valid QR code that when decoded by
a QR code reader will produce the same information as their respective cover
QR codes C1to Cn. Pseudocode for the proposed QRCSS scheme is presented
in Algorithm 1. In should be noted that the input QR codes can be generated
using any standard QR code generator.
To recover the secret, XOR the modules in the encoding regions of all the
shares S1S2...Snand add the function patterns to produce a reconstructed
10 Y.W. Chow et al.
QR code, Sr. When decoded by a QR code reader, Srwill produce the same
message as S.
5 Analysis and Discussion
A secret sharing scheme can be evaluated based on a number of properties, in-
cluding its security, reconstruction precision, computation complexity and stor-
age requirement [21]. This section presents an analysis and discussion of the
QRCSS scheme based on these properties.
A program implementing the proposed (n,n) QRCSS scheme, using the
pseudocode shown in Algorithm 1, was developed. An example of the results
produced by the QRCSS scheme is depicted in Fig. 3 and Fig. 44. The example
shown in these figures is for the case where n= 3, using QR code version 4 with
error correction level H. Fig. 3(a)-(c) show the three cover QR codes, C1,C2and
C3, while Fig. 4(a) shows the original QR code containing a secret message, S,
which is to be encoded into the shares. Fig. 3(d)-(f) show the QR code shares
resulting from the proposed QRCSS scheme, i.e. S1,S2and S3, which were
obtained from their respective covers. Note that these shares are valid QR codes
that can be read by any standard QR code reader. Fig. 4(b) in turn shows
the reconstructed QR code, Sr, which was obtained by XORing the modules in
the encoding regions of all the shares, S1S2S3, and appending the function
patterns. The secret message can be recovered by decoding Srusing a QR code
reader.
A description of the characteristics for the example results shown in Fig. 3 and
Fig. 4 is as follows. The codewords in QR codes of version 4 and error correction
level H are divided into 4 error correction blocks, with the characteristics of
c= 25, k= 9 and r= 8 for all blocks (refer to Table 1). Using the proposed
algorithm, l= 17 and m= 24, while t= 20 and e= 7 for each block. As such,
a maximum of 7 codewords per block were altered in S1,S2and S3(i.e. a total
of 20 codewords were changed per block, so two of the shares had 7 codewords
altered while the remaining share had 6 codewords altered). This means that
each block in S1,S2and S3has an error correction capacity of at least 1 and
each block in Srhas an error correction capacity of 3. Hence, even if there are
some errors introduced to Sr, due to damage or other reasons, the secret message
can still be recovered.
Fig. 3(g)-(i) show the respective difference images between the cover QR
codes and the resulting QR code shares, while Fig. 4(c) show the differences
between the secret QR code and the reconstructed secret QR code. In the dif-
ference images, gray represent no change, while white represents a change in the
reflectance value from a dark module in the cover QR code to a light module in
the QR code share, and conversely black represents a change from a light mod-
ule in the cover to a dark module in the resulting share. The difference images
4Please note that all QR codes presented in this paper are valid QR codes that can
be decoded by a QR code reader.
QR Code Secret Sharing 11
Algorithm 1 QRCSS pseudocode
function GenerateShares()
Input: A secret QR code, S, and ncover QR codes, C1,C2, ..., Cn
/* Create nshares and copy contents of each cover to the respective share */
for ifrom 1 to ndo
Create Si
SiCi
end for
/* Data and error correction codewords */
for each QR code block do /* Some QR code versions have 2 different block sizes
*/
Calculate land m
if mlthen
Quit /* Scheme requires m > l, otherwise input is not valid */
else
Determine tand e
for ifrom 1 to tdo
Randomly select a codeword, w, within the block that has not previ-
ously been changed
Select a random share, Sx, where 1 xn, that has not exceeded
the value of e
for each module jin wdo /* where 1 j8 (a codeword contains
8 modules) */
if Sj
1Sj
2... Sj
n̸=Sjthen
/* Sj
kdenotes the j-th module of win the k-th share */
/* Sjdenotes the j-th module of win the secret */
Flip the reflectance value of Sj
x
end if
end for
end for
end if
end for
/* Format information */
Determine f/* The maximum number of format information bits to change per
share */
for jfrom 3 to 15 do /* For each module of the format information, except the
first 2-bits */
if Sj
1Sj
2... Sj
n̸=Sjthen
Select a random share, Sx, where 1 xn, that has not exceeded the
value of f
Flip the reflectance value of Sj
x
end if
end for
Output S1,S2, ..., Sn
end function
12 Y.W. Chow et al.
(a) (b) (c)
(d) (e) (f)
(g) (h) (i)
Fig. 3. Example of a (3, 3) QRCSS; (a) C1, (b) C2, (c) C3, (d) S1, (e) S2, (f) S3,
(g) Difference image between C1and S1, (h) Difference image between C2and S2, (i)
Difference image between C3and S3.
(a) (b) (c)
Fig. 4. Secret and reconstructed secret for the example shown in Fig 3. (a) Original
QR code containing the secret message, S. (b) Reconstructed secret QR code, Sr. (c)
Difference image between Sand Sr.
QR Code Secret Sharing 13
indicate the error that was deliberately embedded into the QR codes for the
purpose of sharing the secret.
5.1 Properties
From a computational complexity point of view, the QRCSS scheme is not com-
putationally complex, as encoding and decoding in the scheme is based on the
simple Boolean XOR operation. In addition, despite the deliberate error incor-
porated in the shares by the proposed scheme, the scheme is still able handle
a small amount of error when decoding the reconstructed secret QR code. The
greater the number of shares used to distribute the secret, the smaller the amount
of error that has to be encoded into each of the QR code shares. This will also
increase the recoverability of the secret, because the reconstructed secret QR
code will contain less errors.
Since the secret is encoded as a QR code, the size of the secret message is
governed by the QR code data capacity. The size of of each share in the proposed
scheme is the same as the size of the secret QR code. One of the advantages of
the QRCSS scheme is that the shares do not have to be stored in digital form,
as they can be distributed on printed media.
5.2 Security
Individual QR code shares by themselves do not reveal the secret message. How-
ever, since shares and the secret QR code use the same QR code version and
error correction level, an adversary who can identify a QR code share will have
this knowledge. In addition, given any QR code share, it is trivial to obtain its
cover QR code. This can be done by simply decoding the information in the QR
code share, then using this information to generate a QR code of the appropriate
version and error correction level. This will produce the original cover QR code.
As such, it is easy to find the differences between the original cover QR code and
the modified QR code. This property also makes it possible to identify potential
QR code shares. Based on the information about the differences between the
original and the modified QR code, the value of ncan be inferred. Nevertheless,
it is not possible to reconstruct the secret with this information alone.
Brute Force Attack. In light of the fact that in QRCSS the secret message is
encoded as a QR code, an adversary can adopt a brute force strategy akin to a
dictionary attack. This is because the secret must be in the form of a valid QR
code. Thus, if an attacker has information about the version and error correction
level of the secret QR code, the attacker can go through all the possibilities of
valid QR codes with the same version and error correction level. Let Sdenote
a valid, or in other words ‘meaningful’, QR code of the known version and error
correction level, and |S|be the cardinality of all the valid QR codes with the
same version and error correction level. The probability of success for this attack
will be bounded by 1
|S|. The size of |S|is governed by the size of data that a
14 Y.W. Chow et al.
QR code can contain, which is determined by the specific QR code version used
to encode the message. Hence, the larger the secret QR code, the larger |S|will
be, which in turn lowers the success of an attack. Let dbe the number of data
codewords for a QR code of a given version and error correction level. Since each
codeword contains 8 modules, |S|= 28d.
Collusion Attack. It is conceivable that n1 participants may collude and
combine the information from their shares together in an attempt to find S.
Since S1S2...Sn=Sr, in a collusion attack where n1 participants
combine their shares, they will have S1,S2, ..., Sn1. Let S
ndenote a possible
Sn, or in other words the attacker’s ‘guess’ of Sn. Furthermore, let Srdenote
a valid QR code that when decoded will give the same information as S, and
let Srrepresent the set of all valid QR codes created by modifying the modules
of all QR codes in S. This is in line with the fact that the modules in the
reconstructed secret QR code, Sr, are not the same as the secret QR code, S.
Hence, even though when decoded Srand Swill give the same information,
the modules in Srand Sare not the same. This means that the entries in Sr
must be created by going through all the possible modifications of all QR codes
in Sthat will produce valid QR codes. Therefore, the cardinality of Sr,|Sr|,
will be very much larger than |S|.
|Sr|can be determined based on the specific QR code version and error
correction level. Each block of a QR code has ccodewords and an error capacity
of rcodewords. Each codeword contains 8 modules. This means that a block can
correctly be decoded as long as there are r, or less, codewords in cthat are in
error. However, as previously shown in Table 1, some QR code versions have 2
different block characteristics, B1and B2. Let c1and c2denote the number of
codewords per block, and let r1and r2represent the error correction capacity
per block, for blocks of type B1and B2respectively. In addition, let n1and n2
represent the number of blocks of type B1and B2for that specific QR code. For
a QR code of a given version and error correction level, |Sr|can be determined
as follows:
|Sr|=[[(
r1
i=0 (c1
i)).28]n1.[(
r2
j=0 (c2
j)).28]n2].|S|
A collusion attack may take the following form. By going through the en-
tries in Srusing S1S2...Sn1Sr=S
n, if S
nis not a valid QR code, i.e.
cannot be decoded, then Srcan be removed from Sr. Thus, reducing the space
of potential reconstructed secret QR codes, |Sr|, to contain less possibilities.
Nevertheless, it should be noted that this space will still be very large as |Sr|
is very much larger than |S|. Let |S′′|denote this reduced space. It is obvious
that the value of |S′′|will increase for the cases of n2, n3, etc.
Security Parameter. The security underlying the QRCSS scheme is therefore
governed by the security parameter λ=min(|S|,|S′′|). Clearly, larger QR code
versions will increase the size of λ, thereby increasing the security of the scheme.
QR Code Secret Sharing 15
Concealment. One of the primary advantages of this scheme stems from the
fact that since each share is a meaningful QR code in itself, this will reduce the
likelihood of attracting the attention of potential attackers. In addition, since
the modules in QR codes do not have to be black and white squares, it would be
advantageous if each QR code share were to be constructed using different artistic
QR code schemes. The QRCSS scheme will work as long as the modules in each
share can be scanned. The use of different artistic schemes will not only increase
the secret sharing subterfuge by using meaningful innocent-looking QR code
shares, but will also improve concealment as shares will appear to be unrelated.
6 Conclusion and Future Work
This paper presents a novel approach to secret sharing using QR codes. In QR
code secret sharing, a QR code containing a secret message is distributed and
encoded into a set of meaningful QR code shares. The proposed approach uses
the error correction feature, which is an inherent part of the QR code structure,
to distributed and hide information about the secret. Each share is a valid QR
code which contains meaningful information when scanned individually. Hence,
this reduces the likelihood of attracting the attention of potential attackers when
distributed via public channels. When all shares are made available, the secret
message can be recovered. Unlike a number of other secret sharing schemes
where the shares are digital images, which have to be stored and transmitted
electronically, the QR code shares in this approach can be distributed using
printed media.
References
1. G. Ateniese, C. Blundo, A. De Santis, and D. R. Stinson. Extended capabilities
for visual cryptography. Theor. Comput. Sci., 250(1-2):143–161, Jan. 2001.
2. A. Beimel. Secret-sharing schemes: A survey. In IWCC, pages 11–46, 2011.
3. G. Blakley. Safeguarding cryptographic keys. In Proceedings of the 1979 AFIPS
National Computer Conference, pages 313–317, 1979.
4. C. Blundo, P. D’Arco, A. D. Santis, and D. R. Stinson. Contrast optimal threshold
visual cryptography schemes. SIAM J. Discrete Math., 16(2):224–261, 2003.
5. T. V. Bui, N. K. Vu, T. T. Nguyen, I. Echizen, and T. D. Nguyen. Robust mes-
sage hiding for qr code. In Intelligent Information Hiding and Multimedia Signal
Processing (IIH-MSP), 2014 Tenth International Conference on, pages 520–523.
IEEE, 2014.
6. W.-Y. Chen and J.-W. Wang. Nested image steganography scheme using qr-
barcode technique. Optical Engineering, 48(5):057004–057004, 2009.
7. Y. Chow, W. Susilo, M. H. Au, and A. M. Barmawi. A visual one-time password
authentication scheme using mobile devices. In Information and Communications
Security (ICICS’14), volume 8958 of Lecture Notes in Computer Science, pages
243–257. Springer, 2015.
8. Y.-W. Chow, W. Susilo, and D. S. Wong. Enhancing the perceived visual quality of
a size invariant visual cryptography scheme. In Information and Communications
16 Y.W. Chow et al.
Security (ICICS’12), volume 7618 of Lecture Notes in Computer Science, pages
10–21. Springer, 2012.
9. C.-H. Chung, W.-Y. Chen, and C.-M. Tu. Image hidden technique using qr-
barcode. In Intelligent Information Hiding and Multimedia Signal Processing, 2009.
IIH-MSP’09. Fifth International Conference on, pages 522–525. IEEE, 2009.
10. Denso Wave Incorporated. QRcode.com, http://www.qrcode.com/en/.
11. S. Falkner, P. Kieseberg, D. Simos, C. Traxler, and E. Weippl. E-voting authen-
tication with qr-codes. In Human Aspects of Information Security, Privacy, and
Trust, volume 8533 of Lecture Notes in Computer Science, pages 149–159. Springer,
2014.
12. H.-C. Huang, F.-C. Chang, and W.-C. Fang. Reversible data hiding with
histogram-based difference expansion for qr code applications. Consumer Elec-
tronics, IEEE Transactions on, 57(2):779–787, 2011.
13. International Organization for Standardization. Information technology — auto-
matic identification and data capture techniques — qr code 2005 bar code sym-
bology specification. ISO/IEC 18004:2006, 2006.
14. H.-C. Lee, C.-R. Dong, and T.-M. Lin. Digital watermarking based on jnd model
and qr code features. In Advances in Intelligent Systems and Applications-Volume
2, pages 141–148. Springer, 2013.
15. P.-Y. Lin, Y.-H. Chen, E. J.-L. Lu, and P.-J. Chen. Secret hiding mechanism using
qr barcode. In Signal-Image Technology & Internet-Based Systems (SITIS), 2013
International Conference on, pages 22–25. IEEE, 2013.
16. F. Liu, T. Guo, C. K. Wu, and L. Qian. Improving the visual quality of size
invariant visual cryptography scheme. J. Visual Communication and Image Rep-
resentation, 23(2):331–342, 2012.
17. M. Naor and A. Shamir. Visual cryptography. In A. D. Santis, editor, EURO-
CRYPT, volume 950 of Lecture Notes in Computer Science, pages 1–12. Springer,
1994.
18. A. Shamir. How to share a secret. Commun. ACM, 22(11):612–613, 1979.
19. C.-C. Thien and J.-C. Lin. Secret image sharing. Computers & Graphics,
26(5):765–770, 2002.
20. D. Wang, F. Yi, and X. Li. On general construction for extended visual cryptog-
raphy schemes. Pattern Recognition, 42(11):3071–3082, 2009.
21. D. Wang, L. Zhang, N. Ma, and X. Li. Two secret sharing schemes based on
boolean operations. Pattern Recognition, 40(10):2776 – 2785, 2007.
22. J. Weir and W. Yan. A comprehensive study of visual cryptography. T. Data
Hiding and Multimedia Security, 5:70–105, 2010.
23. J. Weir and W. Yan. Authenticating visual cryptography shares using 2d barcodes.
In IWDW, volume 7128 of Lecture Notes in Computer Science, pages 196–210.
Springer, 2011.
24. W.-C. Wu, Z.-W. Lin, and W.-T. Wong. Application of qr-code steganography
using data embedding technique. In Information Technology Convergence, pages
597–605. Springer, 2013.
25. W. Yan, J. Wier, and M. S. Kankanhalli. Image secret sharing. In S. Cimato
and C.-N. Yang, editors, Visual Cryptography and Secret Image Sharing, pages
381–402. CRC Press, Taylor and Francis Group, 2012.
26. C.-N. Yang, A.-G. Peng, and T.-S. Chen. Mtvss: (m)isalignment (t)olerant (v)isual
(s)ecret (s)haring on resolving alignment difficulty. Signal Processing, 89(8):1602–
1624, 2009.
... Here, the secret image was not a QR code, but instead had to be deciphered by human vision. This type of scheme [3] became popular in the smartphone era, as the recovered secret could be interpreted directly by machines. However, the access structure discussed in [3] was limited to (n, n) and its security could be compromised when the cover messages are similar. ...
... This type of scheme [3] became popular in the smartphone era, as the recovered secret could be interpreted directly by machines. However, the access structure discussed in [3] was limited to (n, n) and its security could be compromised when the cover messages are similar. Cheng et al. [4] discussed the approach which improves the security and access structure of previous visual secret sharing schemes for QR code applications. ...
... The statistical results demonstrate that the proposed approach produces better results. Table IV shows a comparison of the parameters between the suggested scheme and existing schemes [3]- [10]. The table provides a side-by-side comparison of each parameter for the different schemes, allowing for an easy comparison of their capabilities. ...
Conference Paper
The traditional way of sharing secret images through Secret Image Sharing (SIS) has become more susceptible to malicious users due to its noise-like shared images. Therefore, it is important to investigate new techniques that can provide a secure way of distributing secret images as meaningful shares. To this end, researchers have been exploring different encryption methods, secure communication protocols, and complex patterns for sharing secrets as meaningful shares, which can make it harder to be identified by malicious users. This proposed approach introduces a QR shares-based secret sharing scheme using Discrete Wavelet Transform (DWT), Random Permutation (RP), and Arithmetic Modulo (AM) operation. The proposed (n, n) perfect secret sharing scheme requires exactly n shares to reconstruct the secret, and its lightweight operations make it computationally efficient. Although it may not be the most robust approach, it provides a high level of protection as malicious attacks cannot reverse or restore the data. The experimental results demonstrate that the proposed method produces QR shares of better quality and a restored QR secret with a lossy nature with better visual quality. The performance of the scheme is evaluated using parameters such as correlation, RMSE, PSNR, NPCR, and UACI, showing that it gives better results for QR secrets.
... Fang's scheme is pixel-expansible. Chow et al. used XOR to achieve a scheme without pixel expansion [42]. This scheme is an (n, n)-VCS, improved by Chen to (k, n)-VCS [43]. ...
... Compared with [42], this paper can recover a QR code losslessly. The capacity of the ECC is not sacrificed in the recovered QR code. ...
... Compared with the proposed VCS, this is a pixelexpansible scheme [41]. The two schemes belong to two non-pixel-expansible VCSs [42,43]. However, they can recover the secret image with errors. ...
Article
Full-text available
The visual cryptography scheme (VCS) distributes a secret to several images that can enhance the secure transmission of that secret. Quick response (QR) codes are widespread. VCS can be used to improve their secure transmission. Some schemes recover QR codes with many errors. This paper uses a distribution mechanism to achieve the error-free recovery of QR codes. An error-correction codeword (ECC) is used to divide the QR code into different areas. Every area is a key, and they are distributed to n shares. The loss of any share will make the reconstructed QR code impossible to decode normally. Stacking all shares can recover the secret QR code losslessly. Based on some experiments, the proposed scheme is relatively safe. The proposed scheme can restore a secret QR code without errors, and it is effective and feasible.
... QR codes are frequently used to convey information that functions as a locator, an identifier, or a pointer that directs users to a certain internet site or service. In the scheme by Chow et al. [174], a QR code containing a confidential message is encoded as a collection of significant QR-code shares transmitted via printed media. Each share is a valid QR-When scanned one at a time, each individual share produces a valid QR code that provides access to relevant information. ...
Article
Full-text available
The safeguarding of digitized data against unwanted access and modification has become an issue of utmost importance as a direct result of the rapid development of network technology and internet applications. In response to this challenge, numerous secret image sharing (SIS) schemes have been developed. SIS is a method for protecting sensitive digital images from unauthorized access and alteration. The secret image is fragmented into a large number of arbitrary shares, each of which is designed to prevent the disclosure of any information to the trespassers. In this paper, we present a comprehensive survey on SIS schemes along with their pros and cons. We review various existing verifiable secret image sharing (VSIS) schemes that are immune to different types of cheating. We have identified various aspects of developing secure and efficient SIS schemes. In addition to that, a comparison and contrast of several SIS methodologies based on various properties is included in this survey work.We also highlight some of the applications based on SIS. Finally, we present open challenges and future directions in the field of SIS.
... Leveraging computer-based controlling and communicating systems, systems engineering, as well as natural realities, CPSs and IoT will change the world. Fuzzy computing is built on the concept of an embedded system in which programs, programs, and computers are included [20]. Examples include connected vehicles, medical devices, etc. ...
Article
Full-text available
There is a link between the cloud and the Internet of Things (IoT). The layer that makes up the dispersed network environment is exactly what it is. Cloud computing is brought out to the edge of the network through the type of networking topology referred as fog computing. Users can benefit greatly from fog computing. Fog's primary role, similar to cloud computing, is to allow people mobility. Fog computing is becoming more and more popular, whereas at the same time, security dangers are growing every day. Users' identification & verification are crucial. The fact of fog computing cannot effectively utilize the security and privacy solutions provided by cloud computing must be emphasized. The risks, issues, and solutions linked to security in fog computing are outlined throughout this study. The poll then includes information on ongoing research projects as well as open security and safety concerns for fog computing.
Chapter
In this modern data-centric era, securing information that is transferred over the internet is a serious concern. Various cryptographic and stenographic methods play a vital role in this purpose. In this work, we develop a multi-layered steganographic system capable of hiding payloads in different hidden layers inside QR codes. Furthermore, each layer is compressed and encrypted separately to secure the payload data. Hence, we use the QR (Quick Response) Code as the cover medium to achieve and implement the above principles. In the proposed multi-layered QR Code approach, the top layer works as a standard QR Code while the layers beneath it act as private data. The secret is efficiently compressed to accommodate more information within the same space provided, thereby increasing the holding capacity of the QR code. The data in each layer are retrieved using different methods according to the type of compression used during the encoding process of the specified layer. The proposed model can store up to nine hidden layers of data. Various robustness tests are carried out to validate the efficiency of the hidden layers in the QR code and to check whether the hidden layers can withstand alterations without any data loss. Importantly, the resulting QR code works identically to a normal version upon scanning with any typical QR code scanner.
Chapter
In recent years, the use of technology has increased rapidly as many people send a lot of text or image information every day, and also sometimes in schools or different study centers, teachers need to send private information such as grades to their students or their parents. In addition, this information is generally for a particular student, so it is necessary to implement some tool that helps them send secure information through to the Internet. And in these cases, encryption plays a fundamental role in security. On the other hand, the quick response (QR) code is used widely to provide easy access to information, and also it could be applied for secured communications using different devices to access the internet. For that reason, this paper proposes a new method to send secure information about students’ grades using a QR code, and in order to keep the information safe, we have proposed to use \(3\times 3\) patterns to represent any number and the information into the QR code which has been distributed in random positions whose average variation percentage was 1.142857143, which is within the margin of error allowed in QR codes. Finally, the experiments have demonstrated that the proposed method can achieve successful results and each student with the correct password can be able to retrieve only their grades.KeywordsQR codeEncryptionPatternsData hiding
Chapter
Full-text available
Ternary Quantum-Dot Cellular Automata (TQCA) is a developing nanotechnology that guarantees lower power utilization and littler size, with quicker speed contrasted with innovative transistor. In this article, we are going to propose a novel architecture of level-sensitive scan design (LSSD) in TQCA. These circuits are helpful for the structure of numerous legitimate and useful circuits. Recreation consequences of proposed TQCA circuits are developed by utilizing such QCA designer tool. In realization to particular specification, we need to find the parameter values by using Schrodinger equation. Here, we have optimized the different parameter in the equation of Schrodinger.KeywordsTQCALSSDQuantum phenomenon for combinational as well as sequential logicJ-K flip-flopSchrodinger equationEnergyPower
Conference Paper
Full-text available
The use of passwords for user authentication has become ubiquitous in our everyday lives. However, password theft is becoming a common occurrence due to a variety of security problems associated with passwords. As such, many organizations are moving towards adopting alternative solutions like one-time passwords, which are only valid for a single session. Nevertheless, various one-time password schemes also suffer from a number of drawbacks in terms of their method of generation or delivery. This paper presents the design of a challenge-response visual one-time password authentication scheme that is to be used in conjunction with the camera on a mobile device. The main purpose of the proposed scheme is to be able to send a challenge over a public channel for a user to obtain a session key, while safeguarding the user’s long-term secret key. In this paper, we present the authentication protocol, the various design considerations and the advantages provided by the scheme.
Conference Paper
Full-text available
In this paper we propose an e-voting authentication scheme combined with QR-codes and visual cryptography. We focus on the usability, in order to supply voters with less technical experience with a usable scheme. The only requirement is that the user needs to handle a device containing a QR-code reader, most probably a smartphone. This approach is based on visual cryptography as the work horse: The e-voting passwords for authentication are encoded as QR-codes and later encrypted into shadow transparencies. Thus, the transparency by itself conveys no information but when the layers are combined, the secret password is revealed.
Conference Paper
Full-text available
Two of the main areas of research in visual cryptography have been on improving the visual quality of the recovered image and in reducing the pixel expansion of the shares. This paper addresses both of these visual cryptography issues. First, a method to enhance the perceived visual quality of the recovered image using various image filtering techniques is presented. In particular, these image filtering techniques are used to enhance the local and global contrasts of a grayscale image. Second, a multi-pixel block size invariant visual cryptography scheme that maintains the relative density of local neighboring pixels is proposed. This method encrypts blocks of pixels based on whether the total number of black pixels within the respective blocks is above or below a certain threshold. In conjunction, these approaches effectively improve on the perceived visual quality of a recovered visual cryptography image.
Article
Quick response (QR) code is a convenient product for mobile phone user. People can use the Smartphone camera to capture the code, and then decode it through dedicated reader application. Usually the code stands for text, contact information, or a web hyperlink. Users scan the image of QR code to display information or open a website page in the phone's browser. QR codes appear everywhere on posters, publicity flyers, TV advertisements, and even business cards. Since QR code looks like random noise, its existence may hurt the picture of commodities. In this paper, we propose a data embedding scheme to camouflage the existence of QR code. Experimental results showed that the proposed scheme hides the QR code successfully. Moreover, the quality of stego-images is nearly to 30 dB.
Chapter
In this study, we proposed a method to hide QR Codes into images; the method combines JND model and digital watermark techniques and consists of three parts. First, Using JND Model to find the JND map of images and using Sobel operation to find contour of images. Second, find the area there QR Code will embed by scanning the JND map and contour of images with the mask. Finally, in order to hide QR Codes in Images, we adjust the pixel value in the area QR Code embedded and add in invisible watermark and verify information for security propose. Experimental results showed that the proposed method performs better than the way that puts QR Code in the image without processing, we can not only hide QR Code into images but also the QR Code can be detected clearly.
Conference Paper
One of the problems pertinent with many visual cryptography (VC) schemes is that of authentication. VC provides a way of sharing secrets between a number of participants. The secrets are in the form of an image that is encoded into multiple pieces known as shares. When these shares are physically superimposed, the secret can be instantly observed. A known problem is that of authentication. How is it possible to know that the secret being recovered is genuine? There has been some work devoted to this using so called cheating prevention schemes which attempt to provide a means of traceability or authentication via a set of additional shares that are used to check authenticity. This paper proposes a scheme that attempts to alleviate this suspicion by using 2D barcodes as a means of authentication which may have more practicality in terms of real world usage. Results are provided using an application that is available on mobile devices for portable barcode reading.
Conference Paper
QR code is the commonly used two-dimensional (2D) barcode recently with the advantages of larger QR content and error correction capability. Based on the error correction property of QR code, we designed a secret hiding technique for QR barcode. The proposed scheme can conceal the secret data into the cover QR code without distorting the readability of QR content. That is, general browsers can read the QR content from the marked QR code for the sake of reducing attention. Only the authorized receiver can encrypt and retrieve the secret from the marked QR code. The secret payload of the designed scheme is adjustable. The scheme can convey larger secret into a QR code according to the selection of the QR version and the error correction level. The simulations demonstrate that the designed scheme is efficient and low computational complexity. The mechanism can be applied to the QR reader and mobile phone.
Article
In this paper, we propose a new algorithm in reversible data hiding, with the application associated with the quick response (QR) codes. QR codes are random patterns, which can be commonly observed on the corner of posters or webpages. The goal of QR codes aims at convenienceoriented applications for mobile phone users. People can use the mobile phone cameras to capture QR code at the corner of web page, and then the hyperlink corresponding to the QR code can be accessed instantly. Since QR code looks like random noise and it occupies a corner of the original image, its existence can greatly reduce the value of the original content. Thus, how to retain the value of original image, while keeping the capability for the instant access for webpages, would be the major concern of this paper. With the aid of our reversible data hiding technique, the QR codes can be hidden into the original image, and considerable increase in embedding capacity can be expected. Next, we propose a scheme such that when the image containing the QR code is browsed, the hyperlink corresponding to the QR code is accessed first. Then, the QR code could get vanished and the original image would be recovered to retain the information conveyed therein. Simulation results demonstrate the applicability of the proposed algorithm.