Professional Documents
Culture Documents
Efficient QR Code Secret Embedding Mechanism Based On Hamming Code
Efficient QR Code Secret Embedding Mechanism Based On Hamming Code
Efficient QR Code Secret Embedding Mechanism Based On Hamming Code
ABSTRACT QR code is designed as machine readable symbol, which is widely used in various fields of
life due to its large message capacity and fast decoding speed. However, as a public standard, it will give rise
to the security issue when delivering sensitive information with QR code. To overcome this weakness, this
paper explores the characteristic of QR code to propose an efficient secret hiding mechanism to protect the
sensitive information within QR code. The secret message would be embedded into cover QR code based on
(8, 4) Hamming code. The error correction capacity (ECC) of QR code would correct the errors produced in
the secret embedding procedure, and the valid marked QR code would reduce people’s curious. Compared to
the state-of-art works, the proposed scheme achieves a better performance on the aspects of secret payload
and embedding efficiency.
INDEX TERMS Secret hiding, QR code, Hamming code, error correction capacity.
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
86706 VOLUME 8, 2020
P.-C. Huang et al.: Efficient QR Code Secret Embedding Mechanism Based on Hamming Code
of research is embedding the secret message in the space TABLE 1. The error correction capacity of QR code.
domain of cover QR code, the generated marked QR code
would be kept valid because of the fault tolerance of QR code.
The valid and meaningful marked QR code would reduce
people’s attention when delivering in the public channel.
Chang et al. [10] exploited the Wet Paper Codes algo-
rithm [11] to uniformly distribute secret message in the
cover QR code. To enhance the security of secret mes-
sage embedded in the QR code, Lin et al. [12] pro-
posed a new QR code secret hiding scheme to encrypt the
secret message before embedding procedure. Then many
researchers [13]–[16] study new secret embedding strategies
for QR code to further improve the secret payload. However,
these methods have low embedding efficiency, which is the
codeword data error. Table 1 lists the fault tolerance of QR
average number of secret message bits carried by one bit
code for some specific version and error correction level.
flipping in the cover QR code. The lower the embedding
efficiency, the more bits are modified in the cover QR code
B. HAMMING CODE
to embed a bit of secret message. The greater the difference
Hamming codes [18] are a class of linear block codes, they
before and after embedding, the higher the probability of
were designed by Bell Labs in 1950 to detect and correct
being discovered.
errors when the error rate is low. They have been widely
To improve the embedding efficiency, this paper proposes
used in digital communication and data storage systems as
a new secret message embedding scheme to embed sensitive
error control codes. The (n, k) Hamming code is n bits in
message in the public message of a meaningful cover QR
length, it consists of k data bits and (n − k) parity check bits.
code. The new embedding mechanism designs a data bit
The minimum distance of a Hamming code is 3, it implies
flipping rule to hide a hexadecimal secret digit into data
that Hamming code can detect and correct single-bit error
codeword based on (8, 4) Hamming code. The fault tolerance
or detect double-bits errors. Take the most basic Hamming
of cover QR code would correct the errors caused by the
code (7, 4) code as an example, (7, 4) Hamming code is 1-bit
embedding procedure. The valid and meaningful marked QR
error correcting linear code which consists of 4 data bits and
code would divert people’s attention. Experimental result
3 parity check bits. The bit string b1 b2 b3 b4 gets encoded as
shows that, the proposed secret embedding scheme achieves
c1 c2 b1 c3 b2 b3 b4 with:
a high secret payload, and its embedding efficiency is close
to 2.9, which is much better than the state-of-art works. c1 = b1 ⊕ b2 ⊕ b4
This paper is organized as follows: Section 2 briefly c2 = b1 ⊕ b3 ⊕ b4
introduces QR code technology and Hamming code.
c3 = b2 ⊕ b3 ⊕ b4 . (1)
Section 3 presents the state-of-art works. Section 4 presents
the proposed secret embedding strategy for QR code based This three parity check bits could potentially specify not
on (8, 4) Hamming code. Section 5 shows the experimental only that an error occurred but also the error bit location.
results and the comparison with previous works. Finally, An additional parity bit c0 can be added at the beginning or at
Section 6 makes a conclusion. the end of each codeword of (7, 4) Hamming code to derive
an extended (8, 4) Hamming code.
c0 = c1 ⊕ c2 ⊕ b1 ⊕ c3 ⊕ b2 ⊕ b3 ⊕ b4 . (2)
II. PRELIMINARY
A. QR CODE TECHNOLOGY This way, the minimum hamming distance of the Hamming
QR code is an effective information transmission medium, code is increased form 3, in (7, 4) Hamming code, to 4 in
it is widely used in product traceability, advertising, mobile (8, 4) Hamming code. Therefore, the (8, 4) Hamming code
payment and other filed. According to the QR code bar has the ability to detect up to 3 errors. It is also called Single
code symbology specification [17], QR code is defined into Error Correction Double Error Detection (SECDED), and
40 symbol versions and 4 user-selectable error correction widely used in the computer ECC memory system. Figure 1
level (ECL): L, M, Q and H, it can correct up to 7%, 15%, illustrates the bit position of the data bits and parity bits for
25% and 30% error codewords when attacked by defacement, Hamming (7, 4) and Hamming (8, 4) in Venn diagrams.
respectively. This is due to the fault tolerance mechanism
introduced by QR code standard. QR code employs Reed- III. RELATED WORKS
Solomon code to realize the fault tolerance, the error correc- A. LIN et al.’s METHOD
tion codewords would be generated by Reed-Solomon code In 2017, Lin et al. [15] improved the LSB matching revisited
algorithm and added in the tail of QR code data codewords. embedding scheme [19] to hide secret message into cover QR
Normally two error correction codewords could correct one code. The secret hiding procedure is outlined below.
TABLE 2. The data bit flipping rules based on the check matrix.
FIGURE 2. Example for QR code in version 5-M; (a) the cover QR code;
(b) the marked QR code.
= HcwT + HeTi
= 0 + hi
= hi (8) TABLE 3. The secret embedding capacity of the proposed scheme.
FIGURE 5. The results of marked QR code in Figure 2 (b) after suffering noise attacks.
version 10-Q and version 40-H after embedding secret secret payload of cover QR code with different versions and
message ‘‘1234567890987654321123456789098765432- different error correction levels.
1234567890’’, respectively.
secret digit, and zero bit when embedding secret message TABLE 5. The flipping number of data pair when hiding secret
digits 0-7 in it in the field of GF(8).
‘‘0’’. Suppose that the probability of sixteen hexadecimal
secret digits is equal, so the secret message embedding effi-
ciency ee of the proposed scheme could be calculated as
following.
16 × 4
ee = ≈ 2.9. (13)
8×1+7×2+1×0
This means that the proposed scheme embeds nearly
2.9 secret bits into cover QR code when modifying one bit
in public message codeword of cover QR code.
TABLE 6. The comparison of previous QR code secret hiding methods [10] Y.-J. Chiang, P.-Y. Lin, R.-Z. Wang, and Y.-H. Chen, ‘‘Blind QR code
with the proposed scheme. steganographic approach based upon error correction capability,’’ KSII
Trans. Internet Inf. Syst., vol. 7, no. 10, pp. 2527–2543, Oct. 2013.
[11] J. Fridrich, M. Goljan, and D. Soukal, ‘‘Wet paper codes with improved
embedding efficiency,’’ IEEE Trans. Inf. Forensics Security, vol. 1, no. 1,
pp. 102–110, Mar. 2006.
[12] P.-Y. Lin, Y.-H. Chen, E. J.-L. Lu, and P.-J. Chen, ‘‘Secret hiding mech-
anism using QR barcode,’’ in Proc. Int. Conf. Signal-Image Technol.
Internet-Based Syst., Dec. 2013, pp. 22–25.
[13] P.-Y. Lin and Y.-H. Chen, ‘‘QR code steganography with secret pay-
load enhancement,’’ in Proc. IEEE Int. Conf. Multimedia Expo Work-
shops (ICMEW), Seattle, WA USA, Jul. 2016, pp. 1–5.
[14] M. Luo, S. Wang, and P.-Y. Lin, ‘‘QR code steganography mechanism
with high capacity,’’ in Proc. Int. Conf. Commun. Problem-Solving (ICCP),
Sep. 2016, pp. 1–2.
[15] P.-Y. Lin and Y.-H. Chen, ‘‘High payload secret hiding technology for QR
codes,’’ EURASIP J. Image Video Process., vol. 2017, no. 1, pp. 1–14,
Dec. 2017.
Table 6 lists the performance comparison of the proposed [16] P.-C. Huang, Y.-H. Li, C.-C. Chang, and Y. Liu, ‘‘Efficient scheme for
scheme with Lin et al.’s scheme and Huang et al.’s scheme. secret hiding in QR code by improving exploiting modification direction,’’
It can be seen from table 6, the proposed scheme achieves KSII Trans. Internet Inf. Syst., vol. 12, no. 5, pp. 2348–2365, 2018.
[17] Denso Wave Incorporated. QR Code Standardization. Accessed:
a better performance in secret payload and embedding effi- May 21 2019. [Online]. Available: https://www.qrcode.com/en/about
ciency aspects. /standards.html
[18] R. L. Rivest, A. Shamir, and L. Adleman, ‘‘A method for obtaining digital
signatures and public-key cryptosystems,’’ Commun. ACM, vol. 26, no. 1,
VI. CONCLUSION pp. 96–99, Jan. 1983.
This paper presents a new secret hiding scheme for QR [19] J. Mielikainen, ‘‘LSB matching revisited,’’ IEEE Signal Process. Lett.,
vol. 13, no. 5, pp. 285–287, May 2006.
code based on (8,4) Hamming code, the proposed scheme [20] X. Zhang and S. Wang, ‘‘Efficient steganographic embedding by exploit-
improves the embedding efficiency on the basis of keeping ing modification direction,’’ IEEE Commun. Lett., vol. 10, no. 11,
good secret payload. This method can effectively protect pp. 781–783, Nov. 2006.
the sensitive information in QR code from being discovered
while transmitting in the public channel. Although the error
correction capacity of QR code keeps the marked QR code
valid after embedded secret message, it also limits the upper
bound of secret payload. For future work, we plan to invest
the linear characteristic of Reed-Solomon code employed by
QR code to improve the secret payload.
PENG-CHENG HUANG received the B.S. degree
from the Xiamen University of Technology,
REFERENCES in 2007, and the M.S. degree in computer archi-
[1] J. Cucurull, S. Guasch, A. Escala, G. Navarro-Arribas, and V. Acín, tecture from Fuzhou University, in 2010. He is
‘‘QR steganography—A threat to new generation electronic voting sys- currently pursuing the Ph.D. degree from Feng
tems,’’ in Proc. 11th Int. Conf. Secur. Cryptogr., 2014, pp. 1–8. Chia University. He is currently a Lecturer with
[2] Y.-Y. Chen, K.-Y. Chi, and K.-L. Hua, ‘‘Design of image barcodes for the Xiamen University of Technology. His cur-
future mobile advertising,’’ EURASIP J. Image Video Process., vol. 2017, rent research interests include multimedia security,
no. 1, pp. 1–12, Dec. 2017. image processing, and the Internet of Things.
[3] A. Avidan, C. Weissman, and P. D. Levin, ‘‘Integration of QR codes into
an anesthesia information management system for resident case log man-
agement,’’ Int. J. Med. Informat., vol. 84, no. 4, pp. 271–276, Apr. 2015.
[4] L. Tarjan, I. Šenk, S. Tegeltija, S. Stankovski, and G. Ostojic, ‘‘A read-
ability analysis for QR code application in a traceability system,’’ Comput.
Electron. Agricult., vol. 109, pp. 1–11, Nov. 2014.
[5] Y.-W. Chow, W. Susilo, G. Yang, M. H. Au, and C. Wang, ‘‘Authentication
and transaction verification using QR codes with a mobile device,’’ in Proc.
9th Int. Conf. Secur., Privacy, Anonymity Comput., Commun., Storage,
SpaCCS, Zhangjiajie, China, Nov. 2016, pp. 437–451.
[6] J. Gao, V. Kulkarni, H. Ranavat, L. Chang, and H. Mei, ‘‘A 2D barcode-
CHIN-CHEN CHANG (Fellow, IEEE) received
based mobile payment system,’’ in Proc. 3rd Int. Conf. Multimedia Ubiq-
uitous Eng., Jun. 2009, pp. 320–329.
the B.S. degree in applied mathematics and the
[7] J. Lu, Z. Yang, L. Li, W. Yuan, L. Li, and C.-C. Chang, ‘‘Multiple schemes
M.S. degree in computer and decision sciences
for mobile payment authentication using QR code and visual cryptogra- from National Tsing Hua University, Taiwan,
phy,’’ Mobile Inf. Syst., vol. 2017, pp. 1–12, Mar. 2017. in 1977 and 1979, respectively, and the Ph.D.
[8] I. Tkachenko, W. Puech, C. Destruel, O. Strauss, J.-M. Gaudin, and degree in computer engineering from National
C. Guichard, ‘‘Two-level QR code for private message sharing and doc- Chiao Tung University, Taiwan, in 1982. He is
ument authentication,’’ IEEE Trans. Inf. Forensics Security, vol. 11, no. 3, currently a Professor with Feng Chia University.
pp. 571–583, Mar. 2016. He is also the author of more than 900 journal
[9] W. Erlangga and A. M. Barmawi, ‘‘Increasing secret data hiding capacity in articles and has written 36 book chapters. His
QR code using 3×3 subcells,’’ in Proc. Int. Workshop Digit. Watermarking, research interests include computer cryptography, data engineering, and
2016, pp. 327–342. image compression.
YUNG-HUI LI (Member, IEEE) received the B.S. YANJUN LIU received the Ph.D. degree from
degree from National Taiwan University, in 1995, the School of Computer Science and Technol-
the M.S. degree from the University of Pennsylva- ogy, University of Science and Technology of
nia, in 1998, and the Ph.D. degree from the School China (USTC), Hefei, China, in 2010. She has
of Computer Science, Language Technology Insti- been an Assistant Professor with Anhui University,
tute, Carnegie Mellon University, in 2010. He China, since 2010. She currently serves as a Senior
is currently an Assistant Professor with National Research Fellow with Feng Chia University, Tai-
Central University. He is also the author of more wan. Her specialties include E-business security
than 30 conference and journal articles and has and electronic imaging techniques.
written five book chapters. His current research
interests include image processing, machine learning, pattern recognition,
and biometric recognition.