A method for joint-transform correlator (JTC) multiple-image encryption based on a quick-response (QR) code key is proposed. The QR codes converted from different texts are used as key masks to encrypt and decrypt multiple images. Not only can Chinese text and English text be used as key text, but also symbols can be used. With this method, users have no need to transmit the whole key mask; they only need to transmit the text that is used to generate the key. The correlation coefficient is introduced to evaluate the decryption performance of our proposed cryptosystem, and we explore the sensitivity of the key mask and the capability for multiple-image encryption. Robustness analysis is also conducted in this paper. Computer simulations and experimental results verify the correctness of this method.
Nowadays, optical information security has increasingly become an international hot issue, and a lot of studies have been done. Due to the advantages of optical encryption, many methods have been proposed [1-9], among them the JTC cryptosystem [3, 10-13], which has no need to generate a complex-conjugate key, and can be used without accurate optical alignment. Moreover, the ciphertext is the joint power spectrum. It can be recorded as the squared magnitude of the amplitude and phase information. Thus JTC encryption has become a practical system.
To improve the encryption efficiency, many multipleimage optical encryption approaches have been researched [14-24]. For example, Situ
Because noise-free recovery of the plaintext can be realized by using a QR code as an “information container”, a series of encryption methods based on QR codes have been studied and increasingly valued by the researchers in this field [25-33]. However, QR codes are used as the “information container” [29] in these encryption applications. To use the QR code more reasonably, we have considered a new application of the QR code, which is used as the key mask to realize multiple-image encryption in a JTC cryptosystem. Using this method, users have no need to transmit the whole key mask, but need only to transmit the key text. This masks key transmission more convenient, rapid and secure.
In Section 2, a brief introduction to QR codes and QR code keys is presented, and the principle of multiple-image encryption is introduced. In Section 3, the correctness of our proposed method is verified by computer simulations. In Section 4, the actual experiment results are presented.
2.1. QR Codes and QR Code Keys
A QR code is a type of two-dimensional code that can encode various types of information, including text and image. It was first designed by a subsidiary of Toyota for the vehicle industry in 1994. When using the QR code, there is no need for a mechanical scanning device; only a semiconductor image sensor is needed. After being scanned by a smart phone, the QR code can respond quickly, and the data can be read correctly regardless of the viewpoint. Therefore, in recent years QR codes have become very popular in many fields.
One of the most excellent features of QR codes is their level of error correction. Some redundant data are also created when information is encoded in a QR code, so a smart phone can read out the correct information from the QR code even if it is partially obstructed. The degree of error correction is classified according to four levels. The lowest is L level, which allows correct information to be read out if 7% of the QR code is obstructed. After that is M level, which provides 15% error correction, then Q level, which provides 25%, and finally there is H level, which provides 30%. Correct information can always be recovered without any noise, within the scope of the level of error correction. In this sense, a QR code can be seen as an “information container”. Figure 1 shows examples of QR codes with the different levels of error correction, all generated from the same text, “optical image encryption method”. Despite that the same text can be recovered from these QR codes by a smart phone, the structures of the QR codes with different levels of error correction are different. Of course, the structures of QR codes encoding different texts are also different, so we want to use QR codes as key masks to encrypt multiple images.
2.2. Principle of Multiple-image Encryption
To encrypt the multiple images, we convert the QR code
A schematic diagram of the JTC cryptosystem is shown in Fig. 2.
A confused random phase mask (RPM)
here
|
When we recover the plaintext, the key mask
We can see that the plaintext is recovered at (−
The process of multiple-image encryption and decryption is similar to that for a single image. We can use several different texts to encode different QR codes, convert the QR codes into the phase key masks, and encrypt different images. Then, we subtract the two undesired direct-current quantities |
where denotes the
If we want to decrypt the
where
We can see that the
Gaussian low-pass filtering is conducted to reduce the high-frequency niose in the decrypted images. The flow diagram of the method is shown in Fig. 3.
III. SIMULATION AND RESULTS ANALYSIS
3.1. Simulation of QR Multiplexing for Multiple-image Encryption
In this paper, the value of the correlation coefficient (CC) is used as the criterionto evaluate the quality of the decrypted images The closer CC is to 1, the more similar the two images are, and the better the quality of the decrypted image is. The definition of CC is expressed in Eq. (7):
where
Computer simulations are conducted to verify the correctness of the method we have proposed. For simplity, three images of the letters A, B, and C are used as the original images in the simulation. The QR code phase key masks corresponding to the letters A, B, and C are converted using the texts “Shijiazhuang Engineering College”, “Yantai Aeronautical University”, and “Hangzhou Electronic School” respectively. The level of error correction for these three key masks is H. We use the software “QR code master” to convert the texts into QR codes. The size of the input plane background is 896 × 896 pixels, and the sizes of the original image and QR code phase mask are both 256 × 256 pixels. The center distance between the original image and the QR code phase mask is 640 pixels. The original images to be encrypted and the QR code phase masks on the input plane as shown in Fig. 4. The simulations are conducted according to Eqs. (2)~(5) and Fig. 2. Figures 5(a)~5(c) show the images recovered using the QR code phase masks converted from the texts “Shijiazhuang Engineering College”, “Yantai Aeronautical University” and “Hangzhou Electronic School”. Meanwhile, when an incorrectQR code phase mask, generated from the text “Control Engineering Department”, is used to decrypt the complex ciphertext, we can only see noise (Fig. 5(d)). Thus the simulation proves that we can recover the plaintext using the key mask generated from the correct texts; otherwise, we can recover nothing. The CC values are noted in Fig. 5.
Another important index of a multiple-image encryption system is the number of encrypted images
Robustness is very important for an encryption system, so we test the robustness of our proposed system in this section. We conduct an occlusion attack on the ciphertext, and observe the quality of the decrypted images. The simulation conditions are the same as in Section 3.1. The ciphertexts with 10%, 25%, and 50% occluded are shown in Figs. 6(a), 6(e), and 6(i) respectively, and the decrypted images of the letters A, B, and C corresponding to these ciphertexts are shown in Figs. 6(b)~6(d), 6(f)~6(h), and 6(j)~6(l), respectively. The curve of CC value of decrypted image versus percent occluded area of the ciphertext is shown in Fig. 7. The CC values are all greater than 0.65, so the ability of our proposed system to resist an occlusion attack is good.
The ability to resist a noise attack is another important index of robustness for an encryption system, so we also test this for our proposed system. The simulation conditions are also the same as in Section 3.1. We added salt-and-pepper noise to the ciphertext, and recorded the decrypted effect of the ciphertext being covered with different percentages of salt-and-pepper noise. The curve of CC value of decrypted image versus percentage area of ciphertext covered by noiseis shown in Fig. 8. The CC values are all less than 0.7, so it can be seen that noise attack has a slight impact on the system.
3.3. Validation of the Level of Error Correction as a Key Parameter
In order to verify that the level of error correction can be used as a key parameter, we replace the key mask in Figs. 4(a)~4(c) with that in Figs. 1(a)~1(c), other conditions being the same as in the above paragraph. The decrypted results as shown in Fig. 9. Figures 9(a)~9(c) are the decrypted images when the level of error correction of the QR code phase masks are L, M, and Q respectively. In Fig. 9(d) we use anincorrect key mask of error-correction level H to decrypt the complex ciphertext. From Fig. 9, we can see that the images can be recovered using the key with the right level of error correction, but we cannot recover anything using a key with the wrong level of error correction. This simulation proves that the level of error correction can be used as a key parameter. The CC values are noted in Fig. 9.
3.4. Sensitivity of the QR Code Key
Of course, the sensitivity of the key is an important feature. Similar text can convert to a similar QR code, so we should explore how many characters need to be wrong before we cannot recover the original image. We still use the QR code phase mask generated from the text “optical image encryption method” as the correct key to encrypt the original image letter E. The level of error correction of the key is H. We change a character of the correct text and encode a new QR code as a wrong key to decrypt the ciphertext generated from the right key and the original image letter E. The decrypted results are shown in Fig. 10. In Fig. 10(a), we use the QR code phase mask generated from the wrong text “aptical image encryption method” to decrypt the ciphertext. In Fig. 10(b), we use the key generated from the text “aatical image encryption method” to decrypt the ciphertext; in Figs. 10(c) and 10(d), the keys are generated from “aaaical image encryption method” and “aaaacal image encryption method” repectively. We can see that in the Figs. 10(a)~10(c), the outline of the image is clear, but after changing four characters, we cannot see any information about the original image. Thus we can conclude that the QR key mask is relatively sensitive to English characters.
Chinese characters can also be encoded ina QR code, so the application scope of our proposed method is not limited to English text. To verify that a QR code encoded by Chinese characters can also be used as a key, simulations are conducted. Other conditions are the same as in Section 3.1; only the correct QR code key mask is changed. We use the QR code phase mask generated from the Chinese text “光学图像加密方法” as the correct key mask. (In Chinese, this means “optical image encryption method”). The wrong key is generated from the Chinese text “咣学 图像加密方法”, and is used to decrypt the ciphertext generated from the original image and the correct key mask. In the wrong key, the first Chinese character is changed to 咣; the shape and pronunciation of 咣 are similar to those of 光. The other Chinese characters are not changed. The key masks and simulation results are shown in Fig. 11. The right QR code key mask is shown in Fig. 11(a), and the wrong mask in Fig. 11(b). From Fig. 11(c), we can see that with a change in only one Chinese character in the text, the original image cannot be recovered. Thus we conclude that the QR key mask is very sensitive to Chinese characters.
3.5. QR Code Key Generated by “Space Key Text”
Not only texts can be encoded into QR code, but also the symbol “space” can be. Using this feature, we propose a method for “space key text”. The key text is madeentirely of “space” symbols. When this QR code is scanned, we cannot see any information; it seems blank, like there is no key text. This can be used to confuse an attacker or thief. We use the QR code phase mask generated from a key text made of different numbers spaces to encrypt different images. To verify this the correctness, three original image letters A, E, and U are used in the simulation. The key text corresponding to letters A, E, and U are texts consisting of 12, 13, and 14 “space” symbols respectively. An incorrect key text is also generated, which is made up of 15 spaces. Other conditions are the same as in Section 3.1. The images and masks on the input plane are shown in Fig. 12.
The decrypted results are shown in Fig. 13. Figures 13(a)~13(c) are the decrypted images when the QR code mask is generated from key text consisting of spaces. The numbers of “space” symbolsare 12, 13, and 14 respectively. In Fig. 13(d) we use a wrong key mask with 15 spaces to decrypt the complex ciphertext. From Fig. 13, we can see that the images can be recovered using the key with the right number of spaces, but we cannot recover anything using a key with the wrong number of spaces. The CC values are included in Fig. 13.
To confirm the correctness of the method, an experimental optical encryption system is established. Here the encryption process is optical, and the decryption process is digital. The experimental setup for encryption and decryption is shown in Fig. 14. In the cryptosystem, a He-Ne laser (wavelength 632.8 nm) is used as the light source, and a phase-only spatial light modulator (SLM) is used (Holoeye, PLUTO-VIS-014). The resolution of the SLM is 1920 × 1080 pixels, and the pixel pitch of the SLM is 8 µm. The resolution of the CCD camera is 768 × 576 pixels, with a pixel pitch of 8.3 µm. The focal length of the Fourier lens in this experiment is 300. The original images are binary images of the letters D, E, and O. The QR code phase key masks corresponding to these three images are generated from the texts “Shijiazhuang Engineering College”, “Yantai Aeronautical University”, and “Hangzhou Electronic School” respectively. The level of error correction for these three key masks is H. The input images and masks are illuminated by the collimated light source; we record the JPS and subtract the direct-current quantities, and at last add them together. The complex ciphertext after denoisingis shown in Fig. 15. The image is decrypted from the complex ciphertext using the key corresponding to the original image. The decrypted images in the experiment are shown in Fig. 16. They are all decrypted successfully, and we can see them clearly, verifying the correctness of this method.
In this paper, an optical method based on QR code keys to encrypt multiple images under a JTC encryption system is proposed. The QR codes generated from different texts can be used as key masks, and the error-correction level of the QR code can be used as a key parameter. We can encrypt multiple images into one ciphertext, and decrypt them using the QR code generated from the corresponding text. It is more convenient to transmit the text than the whole key mask. The QR code key mask is sensitive to both Chinese and English text, and even space-bar symbols. The ability of our proposed system to resist both occlusion and noise attacks is good. We also use the CC value to judge the encryption capability and decryption performance. Computer simulations and an initial experiment are conducted to confirm the feasibility of this method.