High-capacity encryption system based on single-shot-ptychography encoding and QR code

High-capacity encryption system based on single-shot-ptychography encoding and QR code

Accepted Manuscript High-capacity encryption system based on single-shot-ptychography encoding and QR code Yupeng Zhu, Wenhui Xu, Yishi Shi PII: DOI:...

2MB Sizes 0 Downloads 31 Views

Accepted Manuscript High-capacity encryption system based on single-shot-ptychography encoding and QR code Yupeng Zhu, Wenhui Xu, Yishi Shi

PII: DOI: Reference:

S0030-4018(18)30992-1 https://doi.org/10.1016/j.optcom.2018.11.040 OPTICS 23625

To appear in:

Optics Communications

Received date : 9 September 2018 Revised date : 13 November 2018 Accepted date : 16 November 2018 Please cite this article as: Y. Zhu, W. Xu and Y. Shi, High-capacity encryption system based on single-shot-ptychography encoding and QR code, Optics Communications (2018), https://doi.org/10.1016/j.optcom.2018.11.040 This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.

High-capacity encryption system based on single-shot-ptychography encoding and QR code Yupeng Zhu , 1 Wenhui Xu , 1 and Yishi Shi 1,2,* 1 School of Optoelectronics, University of Chinese Academy of Sciences, Beijing 100049, China 2 Aerospace Information Research Institute, Chinese Academy of Sciences, Beijing 100094, China * [email protected] Abstract: We proposed a high-capacity optical encryption system based on single-shot-ptychography encoding (SPE) technique and quick response (QR) code. Two QR codes are utilized as date containers, one of which is encoded into random binary images (one is encoded image, another one is key) through visual cryptography (VC). Finally, the encoded images are encrypted by single-shot-ptychography encoding technology. It increases the variety of system-keys and overcomes the disadvantages of encrypting only binary images in SPE encoding systems. The security of the proposed system is mainly supported by VC extension encoding. The result of recovery does not have any distortion compared to the original plaintext. Simulation results show that this system has large-capacity information storage, powerful error correction capability, higher security and robustness. Keywords: QR code, single-shot-ptychography, visual cryptography 1. Introduction In the past two decades, optical information encryption technologies have been widely applied in the field of information security, mainly as a result of its high parallelism, high speed, high storage. Various optical encryption technologies continue to emerge. For example, double random-phase encoding technology[1], Ptychography[2-7], Holographic technology[8], Modulus-decomposition technology[9], phase-truncated technology[10], Mach-Zehnder interference technology[11], polarized technology[12] ,etc. Since the popularity of QR codes in China has been widely used in recent years, it has initiated the majority of scholars’ further exploration of its application. Due to its large storage capacity, fast readability and strong error correction capabilities, QR codes have been applied to multifarious optical encryption systems [13-17]. In the optical encryption system, the QR code is used as a high data container, and at the same time, which could be tolerant to speckle noise. The system has a lossless decryption quality. The proposed single-shot-ptychography encoding (SPE) technique breaks through the paradox of traditional double-random-phase encoding schemes and eliminates the use of random phase plates as a tool for information scrambling. In this article, we take full advantage of the convenience of mobile devices and networks to use QR code as a container for all kinds of data [18-19]. In this way, the system can encrypt grayscale or color images more stably, which breaks through the limitations of current SPE encoding systems that are limited to encrypt binary images. Compared to previous literature [20-21], this article adopts visual cryptography to perform pixel expansion on the two-dimensional code carrying secret information[22], which can further improve the diversity of security keys, thereby improving the security of the encryption system. In addition, due to the extremely high error tolerance rate of QR codes, the robustness of optical encryption system can be greatly improved. We actualize a large capacity optical encryption system by numerical 1   

simulations. Our series of numerical simulations verify that the high security and the strong robustness are all attained in the proposed method. 2. Theory 2.1.Encryption process The encryption process of the proposed high-capacity optical encryption system is shown in Fig. 1. First, two plaintext data are converted into two QR codes (QR1 and QR2) respectively by using available software on the internet. According to the mathematical matrix principle, each pixel in the QR code image is processed as a basic information unit. We introduce a two-dimensional matrix a 

of the

1,1 and assume that the QR code function is H V  . If each pixel 0, 0

H V  matrix satisfies: H V   d ,  0  d  1 , the matrix ‘a’ and the random

generating matrix ‘randperm’ function are multiplied to replace the original pixels. Otherwise the matrix ‘randperm’ function is randomly generated to replace the original pixel point directly. According to the principle, all pixels in the matrix are transformed to achieve pixel expansion. Based on the above theory, the basic 2×2 visual cryptography scheme[21] is applied to extend the two QR codes. Each QR code is expanded into two randomly distributed binary images. The two random binary images K1 and K2 are used as keys. The two random binary images E1 and E2 are converted into two QR codes (QR3 and QR4). QR3 is used as the amplitude of the object, and QR4 is regarded as the phase of the object. The complex-valued object is encoded by SPE technique, as shown in Fig. 1. One of the images that we wish to encrypt is placed at distance

d  0 before or after the Fourier plane of the 4f system. A plate of N × N multi-pinhole square array (N = 4 in our experiment) is located at the input plane of the 4f system, the diameter of the circular pinhole is d, and the distance between the consecutive pinholes is b. The encoding process can be expressed as the following 3 steps: 1. A plane wave is divided into N2 beams by a multi-pinhole square array. Near the Fourier spectrum of the 4f system, the two adjacent beams will overlap. N × N probes U illuminating on the complex-valued image are generated simultaneously: Un   f1 d  f1 P r  Rn  t  U  U n , n

2. The intensity diffraction pattern

I

(1)

 n  1, 2,   , N 

(2)

2

is obtained at the output plane of the 4f system.



I n   f 2   f 2  d  U n  f  x, y    t



I   In

(4)

n

3. Then we compress and scramble the diffraction pattern

2   

(3)

I

to get the ciphertext.

Figuure 1. Encryptioon process schematic of opticaal encryption sy ystem based on single-shot ptycchography enco oding and QR Q code (VC deenotes visual cry yptography enccoding) 2 2 where   is thee angular speectrum propaagation with the distance d, t  exp  j·k·/2 f   x  y   is

hich is applieed to simulatte the modulaation of lenss, the the qquadratic phaase factor wh

 Pr  R  n

n

standds for the N × N pinholees, R n is thee center of th he n th pinho ole, and U n is the n th probe p illum minating on the image. Where I n is the n th diffraction d sp pot corresponnding to thee n th pinhhole for the I th hidden im mage, and f  x , y  is the co omplex-valued d image. In the encryyption processs, two sets oof two QR co odes (QR1 an nd QR2) corr rresponding to the origiinal plaintextt are encrypteed into a patttern (cipherteext) formed by b a series off diffraction spots. s The keys are generated by visual crypttography and d SPE proceess. In the pprocess of visual v crypptography, thee key K1 and d K2 are geneerated for two o sets of plaintext respecttively. In SPE E, the key is a large num mber of scram mbling modees, the diversiity of multi-p pinhole array and the strucctural paraameters (λ, f1,, f2 and d) of the single-shhot-ptychograaphy imaging system. 2.2 D Decryption prrocess The processs of system decryption iis divided in nto two majo or steps. Firsst of all, we take mbling modee, the advaantage of the keys to inveerse transform m the SPE. The T keys incllude the scram diveersity of the multi-pinho ole array andd the structu ural parameters (λ, f1, ff2 and d) off the single-shot-ptychhography imaaging system m. The phase (QR3) and amplitude a (Q QR4) of the im mage [23] can be reconstruucted with thee standard PIIE algorithm . Then we w use mobilee phones or other deviices that can scan QR co odes to read E1 and E2. Finally, we add E1 and E2 to restore the origiinal plaintextt. The processs of reconstruucting QR3 an nd QR4 can be b described aas follows: 1). S Split the ciphhertext into N2 spot blockks, and then arrange thesse patterns I n in the co orrect distrribution modees. 2). F For each imaage, guess th he complex vvalue of the input imagee 3   

f g  x, y  ,

annd then begin n the

following iterative process. 3). In the mth iteration,

f ngm  x , y 

is illuminated by the n th probe, and the intensity

m I ng

is

acquired at the output plane of the 4f system:



m   f 2   f 2  d  U n  f ngm  x , y    t I ng

4). Substitute the amplitude term of



2



with the recorded pattern I n , while preserving the phase:

m I ng

Inm  In  Ingm Ingm  . 5). Take the inverse transform of I nm to the object plane: m Inm  fngNew  x, y  f12 d  f21  Inm   t*  ,

where t* is the conjugate of t . 6). Renew f mn1 g with

m f ngNew  x, y  according

f (nm1) g ( x, y )  f ngm ( x, y ) 

to

U n 2

max( U n )

m  ( f ngNew ( x, y )  U n  f ngm ( x, y )) .

where U n* is the conjugate of U n . 7). Repeat the above steps 3 through 6 for N × N separate patterns to complete an entire iteration. 3. Numerical simulation results and analysis 3.1 Feasibility analysis In this section, numerical simulation has been carried out to verify the feasibility of the proposed system. First, the two sets of plaintexts are encoded into QR1 and QR2 as described in Fig. 1. Then, the QR1 is extended and encoded into image E1 and key K1 by visual cryptography, and QR2 is extended and encoded into E2 and key K2, as shown in Fig. 2. After that, E1 and E2 are transformed into QR3 and QR4 respectively, as shown in Fig. 3(a) and Fig. 3(b). The QR superposition pattern is proposed to make the size of the complex-valued object in the SPE equal to the size of the diffraction window, so that it is in accordance with the numerical simulation scheme of the angular spectrum propagation theory. In the SPE simulation experiment, the wavelength of the light source used is 473 nm, and the focal length f1 and f2 of Lens 1 and Lens2 are 75 mm. The multi-pinhole array is a 4 × 4 square array, the diameter d of the circular pinhole is 44 μm, and the distance b between consecutive pinholes is 1.54 mm. The complex-valued QR code image is placed at a distance d = 23 mm before the Fourier plane of the 4f system. The probe distribution on the surface of the object is shown in Fig. 3(c), and the field of view is about 550 × 550 pixels. Therefore, the size of QR3 and QR4 is set to 512 × 512 pixels. The final ciphertext is shown in Fig. 3(d), which is composed of a series of small diffraction spots that are scrambled.

4   

ge E1 and key K K1 correspondiing to QR1. (c) and (d) Encodeed image E2 an nd key Figuure 2. (a) and (b) Encoded imag K2 coorresponding to o QR2.

5   

Figure 3. (a) ( and (b) Amp plitude and phasse encoded in single-shot ptychography. (c) Illluminating probe at obbject plane. (d) Ciphertext.

By using thee correct key, the key is a large numbeer of scrambliing modes, thhe diversity of o the hy imaging sy ystem multti-pinhole arrray and the sttructural paraameters of thee single-shot ptychography (lighht source wavvelength λ, fo ocal length ff1 and f2 of two t Fourier lenses, distannce from objeect to Fourrier spectral plane p d), the amplitude annd phase of th he recovered objects are sshown as Fig. 4(a) and Fig. 4(b). Figure F 4(e) shows the coorrelation coeefficient chan nge curve beetween ampllitude imagges when thee number of iterations is changed. Fig gure 4(f) sho ows the correelation coeffiicient channge curve bettween phase images i whenn the number of iterations is i changed. T The amplitudee and phasse are all connvergent, wheen the iteratioon is about 200 times. For 200 iteratioons, the ampllitude correelation coeffficient is 0.96 649, and the phase correllation coefficcient is 0.96775. The QR3 3 and QR44 are separateed from them m, and then thhe QR3 and QR4 Q are binaaryzated, as sshown in Fig.. 4(c) and Fig. 4(d). Thhe QR3 and QR4 Q are scannned on the ceell phone to get g E1 and E22 respectively y, and thenn the correct key k K1 and E1 E superposiition is QR1, as shown in n Fig. 5(a), thhe correct key K2 and E2 superposition is QR2,, as shown inn Fig. 5(b). Finally, F we usse mobile phoones to scan QR1 and QR2 separately, and get the t plaintext data shown in i Fig. 5(c) an nd Fig. 5(b). It shows thaat this systeem has a losssless decryption effect.

6   

F Figure 4. (a) andd (b) Decrypted d amplitude andd phase, respecttively. (c) and (d d) Decrypted Q QR3 and QR4. (e) ( Coorrelation coeffficient curve of amplitude betw ween Fig. 4(a) and a Fig. 3(a). (ff) Correlation cooefficient curvee of phase betweeen Fig. 4 (b) and a Fig. 3(b).

7   

Figure 5. (aa) QR1. (b) QR2 2. (c) and (d) Pllaintexts generaated by scannin ng decrypted QR R1 and QR2.

To sum up, this series off numerical ssimulation ressults show th hat the designn of large cap pacity opticcal encryptioon based on SPE and Q QR codes is feasible. The encrypted data can bee any com mputer supportted data such h as video, weeb page, imag ge, text and so o on. It has hi high flexibility y and freeddom in use. 3.2 S Security analyysis For the scrrambling mo ode, the divversity of the multi-pinh hole array annd the strucctural paraameters (λ, f1, f2 and d) off the single-shhot-ptychogrraphy imaging g system as tthe security of o the key is introducedd in the ref. [2 20,21]. Revieewing the VC C extension coding processs, this articlee uses a 2× ×2 visual cryyptography sccheme. Figure re 6 takes thee first pair off pixel-units as an examp ple to show w the rule of the pixel exp pansion. To ggain a black expanded-pix e xel, two differrent pixel-un nits in the ssame pair aree required to stack s togetherr, while the saame two pixeel-units are suuperimposed to be a whhite expandedd-pixel. In thiis way, accordding to the im mage transformed QR1 codde and QR2 code, c we rrandomly chooose the pixeel-units pair tto generate each e expandeed pixel sepaarately, and obtain o 8   

the ffour visual keeys shown in Fig. 2(a), (b)), (c), (d) as th he result of en ncoding. Assuming thhat we have already a obtaiined one of th he plaintext E1, E and needd to derive another key K1 correctlyy. Since each h pixel-unit is randomly chosen one by one in tthe encoding g, the pixeel-units in thee plaintext an nd key are inndependent off each other. Even if you know the co oding scheeme as shownn in Fig. 6, it i is only hallf the chance to successfu ully solve thee other key in n the samee location byy one pixel un nit in the plaaintext. In this article, the plaintext E1 is 400×400 pixel unitss, the other key K1 has a chance c of (1/2 /2)(400×400) to be b correctly deduced. d In faact, although there cognnition rate off the machinee visual systeem is quite close c to 100% % in one-timee recognition n, the com mputer cannott reach 100% %. Suppose tthat the oncee recognition n rate is 99.99999%. How wever, (400×400) undeer the condition of 2 key space, the total reco ognition rate will w be reducced to zero, so o it is obviiously impossible to find the only corrrect key. In other words, the plaintexxt and the key are com mpletely uncorrrelated. Therrefore, the VC C extension coding c techno ology has greeatly improveed the systeem's attack reesistance.

Figure 6. pixxel expansion rule r for a 2×2 arrray

We analyze the validity of K1 and K K2 as keys. From the an nalysis of thee system stru ucture abovve, the superpposition of E1 E and K1 caan obtain QR1, and the su uperposition oof E2 and K2 2 can get Q QR2. We supperimpose E1 and K2, andd superimpose E2 and K1. The results are shown in n Fig. 7(a) and Fig. 7(bb). Obviously y, we cannot identify any outline inforrmation abouut QR codes from Fig. 7(a) and Fig. 7(b). Thus, VC extensionn coding can enhance the security of thhe system. K1 1 and K2 ccan effectiveely protect the encryptionn system, and d the proposeed encryptionn system has high secuurity. 9   

Figuure 7 (a) Resultt generated by the t superpositioon of E1 and K2 2. (b) Result generated by the ssuperposition of o E2 and K1.

3.3 Robustness analysis First of all, we analyze the ability off the system to resist noise. Accordinng to our prev vious [20,21] workk ,SPE syystem is relattively weak inn resistance to o noise, and it i is unavoidaable to be pollluted by m many kinds off noise during g the transmiission process. In order to improve thee robustness of o the systeem, the ciphhertext can be b transformeed to QR co ode, making the most off QR code's error correecting capabbility. It not only o significcantly improv ves the robustness of thee system to noise n attaccks, but alsoo greatly imp proves the roobustness of the system to the shear attack. Then n we analyze the shearr resistance of o the system,, and a diffraaction spot off the ciphertexxt is cut out as an analytical methodd. The ciphertexts that shheared a diffr fraction spot information i aare shown in n Fig. 8(a) and Fig. 8(dd) respectively. The clippped part is marked m by thee dotted box.. Under the shear conddition of Figg. 8(a), the recovered Q QR3 and QR R4 are shown n in Fig. 8((b) and Fig. 8(c) respectively. Undder the shear condition c of F Fig. 8(d), thee recovered QR3 Q and QR4 are shown in n Fig. 10   

8(e) and Fig. 8(ff) respectively. When we block the tin ny diffraction n spot, it willl produce a black b areaa on the recoovered QR code. c The geeneration of the black areas is causedd by the missing inforrmation of thhe diffraction pattern in Fiig. 8(b) and Fig. F 8(e). How wever, due too the converg gence of thhe algorithm, most of thee remaining information can still be recovered, ev even though some diffrraction patterrn informatio on is lost. Allthough part of the QR code is not reecovered, it has h a stronng ability to correct c errorss. Therefore, even if there is a missing part of the coode shown in n Fig. 8(b), (c), (e), andd (f), it is stilll possible to rread the inforrmation contained in the Q QR code by using u readding device suuch as a mobiile phone. QR R code as info formation carrrier for inform mation encryption systeem can greatlly improve th he robustness of the system m against sheaar attacks.

11   

Figure 8 (a) and (d) The occluded ciphertexts. (b) and (c) The reconstructed amplitude (QR3) and phase (QR4) from ciphertext (a). (e) and (f) The reconstructed amplitude (QR3) and phase (QR4) from ciphertext (d).

4. Conclusions In summary, we have proposed and implemented a large capacity optical encryption system based on SPE and QR codes. The system makes full use of large capacity information storage and powerful error correction function of QR code. Further, the QR codes are encrypted into ciphertext through SPE and visual cryptography. Visual cryptography technology produces a pair of numeric keys, which further improves the security of the system. Because of the high fault tolerance and noise resistance of QR code, the system can greatly enhance the robustness of the system relative to the SPE encryption system. QR code can be easily generated by software, and its recognition can be scanned by mobile intelligent devices. QR code can encode all kinds of data which is supported by computer. It overcomes the shortcoming that only binary images can be encrypted in the SPE coding system, and it has a broad application prospect. References [1] Refregier P, Javidi B. Optical image encryption based on input plane and Fourier plane random encoding[J]. Optics Letters, 1995, 20(7): 767-769. [2] Shi Y, Li T, Wang Y, et al. Optical image encryption via ptychography[J]. Optics Letters, 2013, 38(9): 1425-1427. [3] Zhang J, Wang Z, Li T, et al. 3D object hiding using three-dimensional ptychography[J]. Journal of Optics, 2016, 18(9): 095701. [4] Rawat N, Hwang I C, Shi Y, et al. Optical image encryption via photon-counting imaging and compressive sensing based ptychography[J]. Journal of Optics, 2015, 17(6): 065704. [5] Rawat N, Shi Y, Kim B, et al. Sparse-based multispectral image encryption via ptychography[J]. Optics Communications, 2015, 356: 296-305. [6] Gao Q, Wang Y, Li T, et al. Optical encryption of unlimited-size images based on ptychographic scanning digital holography[J]. Applied Optics, 2014, 53(21): 4700-4707. [7] Li T, Shi Y. Security risk of diffractive-imaging-based optical cryptosystem[J]. Optics Express, 2015, 23(16): 21384-21391. [8] Shiu M T, Chew Y K, Chan H T, et al. Three-dimensional information encryption and anticounterfeiting using digital holography[J]. Applied Optics, 2015, 54(1): A84-A88. [9] Cai J, Shen X, Lei M, et al. Asymmetric optical cryptosystem based on coherent superposition and equal modulus decomposition[J]. Optics Letters, 2015, 40(4): 475-478. [10] Qin W, Peng X. Asymmetric cryptosystem based on phase-truncated Fourier transforms[J]. Optics Letters, 2010, 35(2):118-120. [11] Li J, Li J, Shen L, et al. Optical image encryption and hiding based on a modified Mach-Zehnder interferometer[J]. Optics Express, 2014, 22(4): 4849-4860. [12] Wang Q, Guo Q, Zhou J. Multiple-image encryption using polarized light encoding and the optical interference principle in the Fresnel-transform domain[J]. Applied Optics, 2013, 52(36): 8854-8863. [13] Barrera J F, Mira A, Torroba R. Optical encryption and QR codes: secure and noise-free information retrieval[J]. Optics Express, 2013, 21(5): 5373-5378. [14] Wang X, Chen W, Chen X. Optical information authentication using compressed double-random-phase-encoded images and quick-response codes[J]. Optics Express, 2015, 23(5): 6239-6253. 12   

[15] Barrera J F, Mira-Agudelo A, Torroba R. Experimental QR code optical encryption: noise-free data recovering[J]. Optics Letters, 2014, 39(10): 3074-3077. [16] Cheremkhin P A, Krasnov V V, Rodin V G, et al. QR code optical encryption using spatially incoherent illumination[J]. Laser Physics Letters, 2017, 14(2): 026202. [17] Ren Z, Su P, Ma J, et al. Secure and noise-free holographic encryption with a quick-response code[J]. Chinese Optics Letters, 2014, 12(1): 010601. [18] Wave D. Information technology automatic identification and data capture techniques QR code bar code symbology specification[J]. International Organization for Standardization, ISO/IEC, 2015, 18004. [19] Liao K C, Lee W H. A Novel User Authentication Scheme Based on QR-Code[J]. JNW, 2010, 5(8): 937-941. [20] Xu W, Luo Y, Li T, et al. Multiple-Image Hiding by Using Single-Shot Ptychography in Transform Domain[J]. IEEE Photonics Journal, 2017, 9(3):1-10. [21] Xu W H, Xu H F, Luo Y, et al. Optical watermarking based on single-shot-ptychography encoding[J]. Optics Express, 2016(24):27922. [22] Shi Y, Yang X. Optical hiding with visual cryptography[J]. Journal of Optics, 2017, 19(11): 115703. [23] Faulkner H M L, Rodenburg J M. Movable aperture lensless transmission microscopy: a novel phase retrieval algorithm[J]. Physical Review Letters, 2004, 93(2): 023903.

13   

  1. The result of recovery does not have any distortion compared to original plaintext.  2. Visual cryptography increases the variety of system‐keys.  3. The system has large‐capacity information storage, higher security, and robustness.