A method for generating and authenticating a secure QR code

By embedding three-dimensional images in the QR code and performing digital signature authentication, the QR code security and real-time problems are solved, and two-way authentication between merchants and users is realized, improving the security and real-time nature of the payment process.

CN108537315BActive Publication Date: 2025-08-29ENG UNIV OF THE CHINESE PEOPLES ARMED POLICE FORCE
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN201810330198.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-04-13
Publication Date
2025-08-29
Estimated Expiration
2038-04-13

AI Technical Summary

Technical Problem

The existing QR code has low security and poor real-time performance, making it difficult to meet the security and real-time requirements of mobile payments.

Method used

Computational integrated imaging technology based on intelligent depth inversion model is used to generate three-dimensional images, digitally sign and embed them into the QR code, and securely authenticate through optical information hiding technology to achieve two-way authentication.

Benefits of technology

It improves the security and real-timeness of QR codes, realizes two-way authentication between merchants and users, and ensures the security and convenience of the payment process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN108537315B_ABST
    Figure CN108537315B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for generating and authenticating a secure QR code, which comprises the following steps: first, using the computational integrated imaging technology of an intelligent depth inversion model to generate a three-dimensional digital watermark as a merchant identifier; second, performing an identity-based digital signature on the three-dimensional digital watermark; third, using a secure QR code system in the Fresnel domain to compress and encode the three-dimensional digital watermark carrying signature information and hide it in the QR code; finally, the user scans the code to identify and extract the secret data, and at the same time verifies the signature information. If the verification is successful, the three-dimensional digital watermark image is reconstructed and displayed. After user identification, the user confirms whether to pay, completing the two-way authentication process. The method provided by the present invention realizes two-way authentication, ensuring the security of scan-code payment. At the same time, the computational integrated imaging technology based on the intelligent depth inversion model makes authentication more intuitive and easy, and improves the real-time performance of scan-code payment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of security authentication technology, and more specifically to a method for generating and authenticating a secure two-dimensional code. Background Art

[0002] With advances in communication networks and technology, as well as the ubiquity of smartphones, two-dimensional (2D) barcodes have found widespread application in e-commerce, identity verification, and convenient payments. Whether it's shopping in supermarkets, dining, connecting with friends, or using shared bikes (or cars) for travel, QR codes have brought numerous conveniences to our lives.

[0003] With the increasing popularity of QR codes, research on QR code anti-counterfeiting and secure payment technologies has intensified. Currently, Professor Wai-Chi Fang has proposed a QR security protection technique based on reversible information hiding via histogram shifting. However, the excessive amount of embedded secret data reduces QR image quality and recognition accuracy. Because QR codes contain little redundant data, the ciphertext capacity significantly increases compared to the plaintext, resulting in weak system anti-attack performance and limited practicality. Holographic technology can generate three-dimensional holographic color images as anti-counterfeiting authentication credentials, preventing the illegal copying of confidential documents and authentication information. However, image encryption and information hiding techniques based on holography require a coherent light source. The generation of dynamic three-dimensional images is also affected by factors such as the spatial light modulator (SLM) and computer processing speed. There are practical challenges, such as low information storage efficiency, large holographic image data volumes, high equipment costs, low image resolution, small image size, poor dynamic real-time performance, numerous environmental restrictions, weak resistance to phase index recovery attacks, high optical precision requirements, long production times, and complex on-site assembly processes. Clearly, there are still some technical difficulties to be overcome before holographic technology can be used for real-time mobile payments.

[0004] In summary, existing QR codes have the problems of low security and poor real-time performance. Summary of the Invention

[0005] The embodiment of the present invention provides a method for generating and authenticating a secure two-dimensional code, so as to solve the problems of low security and poor real-time performance of the prior art.

[0006] An embodiment of the present invention provides a method for generating and authenticating a secure QR code, comprising:

[0007] S1. Computational integrated imaging technology based on intelligent depth inversion model to generate three-dimensional images;

[0008] S2. Performing an identity-based digital signature on the three-dimensional image to obtain a three-dimensional image carrying signature information;

[0009] S3. Embed the three-dimensional image carrying the signature information into the QR code image to obtain a secure QR code;

[0010] S4. Obtain a secure QR code image scanned by the user using a code scanning application;

[0011] S5. Extracting a three-dimensional image carrying signature information from the secure QR code image;

[0012] S6. Obtaining signature information carried by the three-dimensional image;

[0013] S7, verifying the signature information. When the signature information verification is successful, executing the following step S8;

[0014] S8, integrated imaging display technology based on intelligent depth inversion model, reconstructing and displaying three-dimensional images;

[0015] S9. When receiving the message indicating that the three-dimensional image verification is successful, the payment step is completed.

[0016] Preferably, the step of digitally signing the three-dimensional image to obtain the three-dimensional image carrying the signature information includes:

[0017] (211) generating a public-private key pair, and storing the public key in a correspondence between the public key and the merchant information; wherein the public key is the merchant identification information, and the merchant information includes: the merchant name, the merchant address, and the merchant serial number;

[0018] (212) Calculating a first hash value of the three-dimensional image using a one-way hash function;

[0019] (213) Encrypting the first hash value using a private key to obtain signature information;

[0020] (214) Carrying the signature information in the three-dimensional image to obtain a three-dimensional image carrying the signature information.

[0021] Preferably, embedding the three-dimensional image carrying the signature information into the two-dimensional code picture to obtain a secure two-dimensional code includes: using a three-dimensional digital watermark recording and embedding subsystem to embed the three-dimensional image carrying the signature information into the two-dimensional code picture, and the three-dimensional digital watermark recording and embedding subsystem includes: a microlens array, a spectrometer, a random phase mask, an imaging lens, and a CCD camera.

[0022] Preferably, a three-dimensional digital watermark recording and embedding subsystem is used to embed the three-dimensional image carrying the signature information into the two-dimensional code image to obtain a secure two-dimensional code, including:

[0023] The three-dimensional image carrying the signature information is collected using integrated imaging technology to generate a micro-unit image;

[0024] performing Huffman coding, optical image encryption, and encoding on the micro-unit image in sequence to form a ciphertext image;

[0025] The front surface image of the lens is generated by using the light field distribution of the discrete Fresnel diffraction transformation of the QR code, the ciphertext image and the random phase mask to the front surface of the imaging lens respectively;

[0026] The image on the front surface of the lens is transformed by the imaging lens to generate an image on the back surface of the lens;

[0027] The image on the rear surface of the lens is subjected to discrete Fresnel diffraction transformation to generate a secret QR code.

[0028] Preferably, extracting a three-dimensional image carrying signature information from the secure two-dimensional code image includes:

[0029] Calculating the contribution of the random phase mask in the process of embedding the three-dimensional image carrying the signature information into the two-dimensional code image;

[0030] Subtract the contribution from the secret QR code to obtain the light field distribution image;

[0031] Performing a discrete Fresnel diffraction inverse transform on the light field distribution image according to a distance parameter between the QR code and the ciphertext image to generate a QR code and a ciphertext image respectively;

[0032] Decoding, optical image decryption and Huffman decoding the ciphertext image to restore the micro-unit image corresponding to the merchant logo;

[0033] The micro-unit image is reconstructed into a three-dimensional image carrying signature information using the computational reconstruction algorithm of integrated imaging.

[0034] Preferably, the verifying the signature information includes:

[0035] (811), determining merchant information based on the signature information;

[0036] (812) Based on the merchant information, obtain the public key from the corresponding relationship between the public key and the merchant information;

[0037] (813) decrypting the signature information using the public key to obtain a second hash value;

[0038] (814) Matching the second hash value with the first hash value of the three-dimensional image calculated using a one-way hash function. When the match is successful, the signature information is successfully verified.

[0039] In an embodiment of the present invention, integrated imaging technology is first used to generate a three-dimensional digital watermark as a merchant identifier. Secondly, an identity-based digital signature is applied to the identifier. Thirdly, in the Fresnel domain, a secure QR code system is used to compress and encode the three-dimensional digital watermark carrying the signature information and hide it within the QR code. Finally, the user scans the code to identify and extract the secret data, while also verifying the signature information. If the verification is successful, the three-dimensional digital watermark image is reconstructed and displayed. After user authentication, payment is confirmed. In other words, the present invention completes the merchant's authentication of the user by verifying the signature information, and enables user authentication of the merchant by reconstructing and displaying the three-dimensional digital watermark image after user verification, thereby achieving two-way authentication and ensuring the security of scan-to-pay. Furthermore, computational integrated imaging technology based on an intelligent depth inversion model makes authentication more intuitive and easy, improving the real-time nature of scan-to-pay. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A schematic diagram of generating and authenticating a secure QR code according to an embodiment of the present invention;

[0041] Figure 2 A diagram of the structure of a QR code provided by an embodiment of the present invention;

[0042] Figure 3 A flowchart of encoding a QR code provided by an embodiment of the present invention;

[0043] Figure 4 A flowchart of decoding a QR code according to an embodiment of the present invention;

[0044] FIG5( a ) is a schematic diagram of the structure of a three-dimensional digital watermark recording and embedding subsystem provided by an embodiment of the present invention;

[0045] FIG5( b ) is a schematic diagram of the structure of a three-dimensional digital watermark extraction and display subsystem provided by an embodiment of the present invention;

[0046] Figure 6 A flowchart of digital signature and signature authentication for a three-dimensional image provided by an embodiment of the present invention;

[0047] Figure 7 A schematic diagram of a bulletin board provided in an embodiment of the present invention;

[0048] FIG8( a ) is a schematic diagram of a QR code generated by a test according to an embodiment of the present invention;

[0049] FIG8( b ) is a diagram of the main interface of the test software provided in an embodiment of the present invention;

[0050] Figure 9 This is a diagram of the QR code scanning interface provided by an embodiment of the present invention;

[0051] FIG10( a ) is a diagram of a scanned verification result provided by an embodiment of the present invention;

[0052] FIG10( b ) is a stereoscopic display of a micro-unit image at different viewing angles according to an embodiment of the present invention;

[0053] Figure 11 A secure login website provided by an embodiment of the present invention;

[0054] Figure 12 The web page connected after successful verification provided by the embodiment of the present invention;

[0055] Figure 13 This is a prompt interface provided by an embodiment of the present invention when verification fails. DETAILED DESCRIPTION

[0056] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0057] Figure 1 The present invention proposes a flow chart of a method for generating and authenticating a secure QR code. Figure 1 As shown, the method includes:

[0058] S1. Computational integrated imaging technology based on intelligent depth inversion model to generate three-dimensional images.

[0059] The three-dimensional image is used to identify the merchant.

[0060] Integrated imaging technology, as a new type of naked-eye 3D display technology, has attracted increasing attention. Its imaging and display process consists of two stages. The first stage is the recording stage of the integrated imaging system. A 3D scene is captured by an elemental lens array (ELA), generating a series of elemental images (EI) containing different perspective information. These elemental image arrays (EIA) are recorded and stored by a charge-coupled device (CCD). Therefore, a 3D EIA image is a set of overlapping tiny images that contain different brightness and orientation information of the 3D object. The second stage is the 3D display stage of the integrated imaging system. The EIA image is transmitted via a secure communication channel to the receiver. The receiver or receiving device displays the EIA on a 2D display panel. After passing through the ELA, the light converges in space, recreating the 3D scene image and displaying it. At this point, the observer sees a true 3D image, not a stereoscopic vision synthesized by the human brain. Therefore, integrated imaging technology, as a "true three-dimensional" and physically feasible stereoscopic display technology, has good application value and broad development prospects in the fields of military simulated combat training, stereoscopic television, remote visual medical three-dimensional imaging, spatial stereoscopic projection display, helmet-free virtual simulation and augmented reality.

[0061] S2. Perform an identity-based digital signature on the three-dimensional image to obtain a three-dimensional image carrying signature information.

[0062] The step of digitally signing the three-dimensional image to obtain the three-dimensional image carrying the signature information includes:

[0063] (1) Generate a public-private key pair and store the public key in a corresponding relationship between the public key and the merchant information, wherein the public key is the merchant identification information, and the merchant information includes: merchant name, merchant address and merchant serial number.

[0064] (2) Calculate a first hash value of the three-dimensional image using a one-way hash function.

[0065] (3) The first hash value is encrypted using a private key to obtain signature information.

[0066] (4) The signature information is carried in the three-dimensional image to obtain a three-dimensional image carrying the signature information.

[0067] S3. Embed the three-dimensional image carrying the signature information into the two-dimensional code image to obtain a secure two-dimensional code.

[0068] S4. Obtain the secure QR code image scanned by the user using a code scanning application.

[0069] S5. Extract a three-dimensional image carrying signature information from the secure QR code image.

[0070] S6. Obtain signature information carried by the three-dimensional image.

[0071] S7. Verify the signature information. When the signature information verification is successful, execute the following step S8.

[0072] S8, integrated imaging display technology based on intelligent depth inversion model, reconstructs and displays three-dimensional images.

[0073] S9. When receiving the message indicating that the three-dimensional image verification is successful, the payment step is completed.

[0074] Among them, we designed an optical information hiding system based on integrated imaging, which consists of two parts: a three-dimensional digital watermark recording and embedding subsystem and a three-dimensional digital watermark extraction and display subsystem, as shown in Figure 5(a) and Figure 5(b).

[0075] Assume that in the three-dimensional digital watermark recording and embedding subsystem shown in Figure 5(a), it consists of a microlens array, a beam splitter, a random phase mask, an imaging lens, a CCD camera, etc. j ,j=1,2,…i∈Z + represents the distance between different planes, g represents the distance from the pinhole array to the micro-unit image plane, D represents the size of the micro-unit image, φ represents the spacing between microlens centers, the focal length of the imaging lens ρ is f, and its transmittance spectrum function is T(s, t; f). The encrypted carrier image containing the 3D watermark generated by the system is recorded and stored by a CCD camera.

[0076] Assuming that the plane where the generated micro-unit image array is located is represented by A and B, according to the discrete Fresnel diffraction transformation DFD [G0 (m u ,m v );λ,z], for three-dimensional digital watermark, let A=W,z=z w , B=L; for the three-dimensional carrier image, let A=I, z=z I ,B=L; For random phase mask, let A=R,z=z R , B=L. Then, the weighted sum of the three-dimensional digital watermark, the three-dimensional carrier image, and the random phase mask template after DFD transformation on the front surface of the imaging lens can be expressed as formula (1):

[0077]

[0078] Among them, the diffraction distances are: z w =z3+z4,z I =z5+z4,zR =z8+z4,

[0079] And F w =DFD[W,L,m,n;z w ,λ],F I =DFD[I,L,m,n;z I ,λ],F R =DFD[R,L,m,n;z R ,λ], respectively, represent the DFD transformation results of the 3D digital watermark, 3D carrier image, and random phase mask to the front surface of the lens. α1, α2, and α3 represent weight factors used to control the strength of the watermark addition, and α1+α2+α3=1.

[0080] Based on the explanation of the above three-dimensional digital watermark recording and embedding subsystem, embedding the three-dimensional image carrying signature information into the QR code image includes:

[0081] (311) The three-dimensional image carrying the signature information is collected using integrated imaging technology to generate a micro-unit image.

[0082] (312) The micro-unit image is subjected to Huffman coding, optical image encryption and compression coding in sequence to form a ciphertext image.

[0083] Among them, the QR code, also known as the two-dimensional barcode, was first invented in Japan. It uses certain geometric shapes that are distributed in a plane in a certain pattern to record data symbol information in black and white. In the compilation of the code, it cleverly uses the concept of "0" and "1" bit streams that constitute the internal logic basis of the computer, and uses several geometric shapes corresponding to binary to represent textual numerical information. It is automatically read through image input devices or photoelectric scanning devices to realize automatic information processing. It has some common characteristics of barcode technology: each code system has its own specific character set; each character occupies a certain width; it has certain verification functions, etc. At the same time, it also has the function of automatically identifying information in different rows, and processing graphic rotation changes. The structural diagram of the QR code is as follows: Figure 2 shown.

[0084] Nowadays, there are many code systems in the research of QR code technology, the most common ones are PDF417, QRCode, Code49, Code16K, DataMatrix, etc.

[0085] QR codes convey information in two dimensions. Compared to the single-dimensional nature of 1D codes, they can convey greater amounts of information and are suitable for conveying complex text. Their complex internal structure allows for efficient space utilization and robust error correction capabilities. Due to their complex internal structure, QR codes are difficult to modify after they are generated, making them more secure.

[0086] Compared to other QR codes, QR codes offer the following advantages: ultra-fast reading speed; omnidirectional reading; strong error correction capabilities; and the ability to more efficiently represent Chinese characters. QR codes are widely used in mobile payment systems both domestically and internationally, and therefore are the subject of this article's research. Throughout this article, all references to the term "QR code" will be understood as referring to QR codes.

[0087] The encoding process of the QR code is as follows Figure 3 As shown, the steps are:

[0088] 1) First, analyze the original data information and select different encoding modes for different data types.

[0089] 2) Convert the data into a bit stream. 3) Set the QR code's error correction capability, selecting one of four levels: L, M, Q, and H, and generate the corresponding error correction codeword. 4) Arrange all processed data according to the data arrangement rules in the QR code pattern to obtain the final data. 5) Select a suitable mask pattern to avoid position detection patterns in the data area, improving the readability of the barcode. 6) Add formatting and version information, and finally generate the pattern.

[0090] The decoding process of the QR code, such as Figure 4 As shown, the steps are:

[0091] 1) Locate and identify the symbol image. 2) Identify the format and version information. 3) Use the bitmap of the encoding area derived from the format information to perform an XOR operation to remove the mask. 4) According to the module arrangement rules, read the symbol characters and recover the data and error correction codewords of the information. 5) Use the error correction codeword corresponding to the error correction level information to detect errors. If an error is found, it is immediately corrected. 6) Reassemble the data codewords into the original information based on the mode indicator and character count indicator, and decoding is complete.

[0092] It can be seen that QR codes are used to store information, and mobile phones can scan them to read the information contained therein, which can be text, website links, files, images, even videos, software installation packages, etc. This easily creates opportunities for unauthorized individuals to profit, because you don't know what information is contained in the QR code before scanning it. If you don't know how to determine whether the information is safe after scanning and reading it, continuing to operate it can easily lead to problems such as phone poisoning and malicious deductions.

[0093] (313) The light field distribution of the discrete Fresnel diffraction transformation of the two-dimensional code, the ciphertext image and the random phase mask template to the front surface of the imaging lens is used to generate the front surface image of the lens.

[0094] (314) The image on the front surface of the lens is transformed by the imaging lens to generate an image on the back surface of the lens.

[0095] (315) Perform discrete Fresnel diffraction transformation on the image on the rear surface of the lens to generate a secret QR code.

[0096] In the 3D digital watermark extraction and display subsystem shown in FIG5(b), the legally authorized user receives the encrypted carrier image containing the watermark transmitted via the communication link, then subtracts the contribution of the random phase mask in the above embedding process, extracts the watermark using the inverse transform of discrete Fresnel diffraction, and displays the 3D object image corresponding to the 3D digital watermark using the computational reconstruction algorithm of integrated imaging. Therefore, based on the 3D digital watermark extraction and display subsystem shown in FIG5(b), a 3D image carrying the signature information is extracted from the secure QR code image, including:

[0097] (411) Calculate the contribution of the random phase mask template in the process of embedding the three-dimensional image carrying the signature information into the two-dimensional code image.

[0098] (412) Subtracting the contribution from the secret QR code to obtain a light field distribution image. Subtracting the contribution from the secret QR code is used to eliminate the influence of the random phase mask.

[0099] (413) According to the distance parameter between the two-dimensional code and the ciphertext image, the light field distribution image is subjected to a discrete Fresnel diffraction inverse transform to generate a two-dimensional code and a ciphertext image respectively.

[0100] (414) The ciphertext image is decoded, optically decrypted, and Huffman decoded to restore the micro-unit image corresponding to the merchant logo.

[0101] (415) The micro-unit image is reconstructed into a three-dimensional image carrying signature information using a computational reconstruction algorithm of integrated imaging.

[0102] To prevent 3D images (3D digital watermarks) from being tampered with or forged by unauthorized users during network transmission, or from being denied by merchants for some reason, we use digital signature technology to allow merchants (senders) to sign 3D images. Users can then use the merchant's APP to scan the QR code and verify the 3D image.

[0103] Since the entire 3D image is encrypted and the public key cryptography algorithm has low processing efficiency, the signing and verification process is time-consuming. To solve this problem, a one-way hash function (hash function) is used to calculate the hash value (hash value) of the 3D image, and then the hash value (hash value) is signed and verified. The block diagram of digitally signing a 3D image and verifying the digital signature is as follows: Figure 6 shown.

[0104] Specifically, the step of digitally signing the three-dimensional image to obtain the three-dimensional image carrying the signature information includes:

[0105] (211) generating a public-private key pair, and storing the public key in a correspondence between the public key and the merchant information; wherein the public key is the merchant identification information, and the merchant information includes: the merchant name, the merchant address, and the merchant serial number;

[0106] (212), calculating a first hash value of the three-dimensional image using a one-way hash function;

[0107] (213) Encrypting the first hash value using a private key to obtain signature information;

[0108] (214) The signature information is carried in the three-dimensional image to obtain a three-dimensional image carrying the signature information.

[0109] Specifically, verifying the signature information includes:

[0110] (611), based on the signature information, determining the merchant information;

[0111] (612) Based on the merchant information, obtain the public key from the corresponding relationship between the public key and the merchant information;

[0112] (613) decrypting the signature information using the public key to obtain a second hash value;

[0113] (614) Matching the second hash value with the first hash value of the three-dimensional image calculated using a one-way hash function. When the match is successful, the signature information is successfully verified.

[0114] The purpose of the notice board is to prevent criminals from using their own legitimate QR codes to replace the legitimate QR codes of merchants and thus make profits. The notice board contains information such as a public key (ID), serial number, store name, etc. for each merchant. Figure 7 As shown. Before the user jumps to the corresponding web page, the user and the merchant should verify the information on the bulletin board. First, the client actively identifies the merchant's public key information (ID) in the QR code. Secondly, the client automatically jumps to the bulletin board and queries other information corresponding to the displayed merchant ID. Finally, the user and the merchant need to check whether the serial number and other information in the bulletin board are the same as the merchant's own information. If they are the same, it can be confirmed that the QR code was generated by the merchant. Otherwise, the QR code may have been replaced. Note that the serial number information is different for each merchant. The serial number information can also be distinguished using a mobile phone number that uniquely represents the merchant's identity. This verification process is performed before verifying the signature.

[0115] In this embodiment of the present invention, a three-dimensional digital watermark (3D image) is first generated using computational integrated imaging technology based on an intelligent depth inversion model to serve as the merchant's identifier. Secondly, an identity-based digital signature is applied to the 3D digital watermark. Thirdly, the 3D digital watermark carrying the signature information is compressed and encoded in the Fresnel domain using a 3D digital watermark embedding algorithm, effectively hiding the 3D watermark information within a QR code. Finally, the user scans the code to identify and extract the 3D digital watermark. After verifying the signature information is correct, the 3D digital watermark is reconstructed and displayed using integrated imaging display technology. User authentication is successful, confirming the payment operation, and completing the two-way authentication process. This invention leverages the advantages of optical parallelism to improve the real-time and convenient processing and implementation. Because the wavelength of the illuminating light, the distance from the object plane to the front surface of the lens, the focal length of the lens, the encoding of the random phase mask, and the characteristic parameters of the optical imaging device can all serve as keys, this effectively increases the key dimensionality, broadens the key space, increases the difficulty of attack, and improves the security and robustness of the system. The use of identity-based digital signature technology effectively prevents tampering, forgery, and unwarranted repudiation of the 3D digital watermark. Moreover, by adding an authentication process for the QR code, the invention allows consumers to move from the one-way passive scanning payment stage to the two-way authenticated and trusted scanning payment stage, ensuring the security of users' personal funds and maintaining the reputation and property safety of merchants.

[0116] The present invention has been tested and used in the following test environment:

[0117] Table 1 Test environment parameters

[0118]

[0119] Functional testing:

[0120] Due to the complexity of optical information decryption algorithms and the various computational considerations involved, some calculations implemented in Java code are inevitably inefficient. However, in some cases, writing the corresponding calculation functions in MATLAB and packaging them into a JAR file for Java to call can be more convenient. Therefore, the core algorithm in this work was written in MATLAB software and then packaged into a JAR file using MATLAB Builder for Java (also known as Java Builder) in MATLAB 2011b for Java to call from Java, enabling the decryption functionality to be implemented in Android projects and subsequent software.

[0121] Scan the security QR code (with embedded verification information)

[0122] (1) Generate the QR code required for the test and open the secure QR code scanning software, as shown in Figure 8(a) and Figure 8(b):

[0123] (2) Scan the QR code that has been added with verification information, such as Figure 9 As shown:

[0124] (3) Scan the verification results and place the microlens array (composed of 60*60 unit lenses with a matrix aperture of 0.9836mm*0.9836mm) close to the mobile phone screen to observe the stereoscopic display effect from different viewpoints. As shown in Figure 10(a) and Figure 10(b):

[0125] (4) Confirm security and log in to the website. Figure 11 and 12 As shown:

[0126] (5) Scan unknown QR code (without verification information), such as Figure 13 As shown:

[0127] User feedback:

[0128] After using it for a period of time, the user's feedback is as follows:

[0129] (1) Merits of the work:

[0130] (1) Two-way authentication with high real-time performance. Users can scan the QR code at any location, at any time, and in any environment to authenticate the QR code. This method authenticates the user and can be combined with traditional methods of authenticating the user to form a two-way authentication with high reliability.

[0131] (2) Optical image information hiding technology with high embedding rate. This detection method uses optical methods when embedding image information. Compared with traditional methods, optical methods have fast authentication speed, high image embedding rate, and are more secure.

[0132] (3) Three-dimensional authentication information further enhances security.

[0133] (4) Good user experience and interactivity. After scanning the QR code, the user can actually see the 3D display of the authentication image embedded in the QR code with the naked eye, which gives the user a good experience and enhances interactivity.

[0134] (5) It is in line with the development trend of future mobile phone displays. In many recent news and reports on mobile phone development, naked-eye 3D technology has become the focus and highlight of the next generation of mobile phone technology.

[0135] (2) Deficiencies of the Work:

[0136] (1) The production process level of optical components is still not high. Imaging, processing and display are restricted by the manufacturing process level of optical imaging systems and components, resulting in a certain degree of quality degradation, greater equipment complexity and greater technical difficulty.

[0137] (2) Glasses-free 3D mobile phones are not yet popular. Although glasses-free 3D is the darling of the next generation of mobile phone new technologies, it has not yet been widely popularized and applied, which restricts the promotion of this technology.

[0138] (3) There are too few testable objects, and the QR code security experience is poor.

[0139] (3) Analysis of Works:

[0140] This software aims to demonstrate, to a certain extent, the value of secure QR codes and integrated imaging under optical encryption. The combination of these two significantly enhances both information security and the software's commercial value. While the app's basic functionality is largely demonstrated, the application and advantages of integrated imaging are also highlighted. Testing has proven that the app we developed is marketable, primarily for two-way authentication using QR codes, and is responsive to technological trends.

[0141] The next steps for improving this work mainly include:

[0142] (1) The production technology level of optical components is still not high.

[0143] Optical imaging, processing and display are restricted by the manufacturing process level of optical imaging systems and components, resulting in a certain degree of quality degradation, greater equipment complexity and greater technical difficulty.

[0144] (2) Glasses-free 3D mobile phones are not yet popular.

[0145] Although naked-eye 3D is the darling of the next generation of mobile phone new technology, it has not yet been widely popularized and applied, which restricts the promotion of this technology.

[0146] (3) Enrich and optimize functions and beautify the operation interface.

[0147] The work has not been promoted yet, and the current interface is only used to display basic functions. If we want to promote the application, we need to be closer to the actual user usage situation, investigate the user operation and use of the system, and make a product with an interface and operation process that suits the public taste.

[0148] (4) Expand application scenarios and improve the system.

[0149] We also need to create more QR code works containing verification information. Since the number of testable QR code samples is still too small, there may be potential bugs that are not detected and discovered in time. We will select more typical QR codes for verification testing and improve the works.

[0150] The above disclosure is merely a few specific embodiments of the present invention. Those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. If these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for generating and authenticating a secure QR code, characterized in that: include: S1. Computational integrated imaging technology based on intelligent depth inversion model to generate three-dimensional images; S2. Performing an identity-based digital signature on the three-dimensional image to obtain a three-dimensional image carrying signature information; S3. Embed the three-dimensional image carrying the signature information into the QR code image to obtain a secure QR code; S4. Obtain a secure QR code image scanned by the user using a code scanning application; S5. Extracting a three-dimensional image carrying signature information from the secure QR code image; S6. Obtaining signature information carried by the three-dimensional image; S7, verifying the signature information. When the signature information verification is successful, executing the following step S8; S8, integrated imaging display technology based on intelligent depth inversion model, reconstructing and displaying three-dimensional images; S9. When receiving the message indicating that the three-dimensional image verification is successful, the payment step is completed.

2. The method for generating and authenticating a secure two-dimensional code according to claim 1, wherein: Digitally signing a three-dimensional image to obtain a three-dimensional image carrying signature information includes: (211) generating a public-private key pair, and storing the public key in a correspondence between the public key and the merchant information; wherein the public key is the merchant identification information, and the merchant information includes: the merchant name, the merchant address, and the merchant serial number; (212) Calculating a first hash value of the three-dimensional image using a one-way hash function; (213) Encrypting the first hash value using a private key to obtain signature information; (214) Carrying the signature information in the three-dimensional image to obtain a three-dimensional image carrying the signature information.

3. The method for generating and authenticating a secure two-dimensional code according to claim 1, wherein: The method of embedding the three-dimensional image carrying the signature information into the two-dimensional code image to obtain a secure two-dimensional code includes: using a three-dimensional digital watermark recording and embedding subsystem to embed the three-dimensional image carrying the signature information into the two-dimensional code image; the three-dimensional digital watermark recording and embedding subsystem includes: a microlens array, a spectrometer, a random phase mask, an imaging lens and a CCD camera.

4. The method for generating and authenticating a secure two-dimensional code according to claim 3, wherein: The method of using the three-dimensional digital watermark recording and embedding subsystem to embed the three-dimensional image carrying the signature information into the two-dimensional code image includes: The three-dimensional image carrying the signature information is collected using integrated imaging technology to generate a micro-unit image; performing Huffman coding, optical image encryption, and encoding on the micro-unit image in sequence to form a ciphertext image; The front surface image of the lens is generated by using the light field distribution of the discrete Fresnel diffraction transformation of the QR code, the ciphertext image and the random phase mask to the front surface of the imaging lens respectively; The image on the front surface of the lens is transformed by the imaging lens to generate an image on the back surface of the lens; The image on the rear surface of the lens is subjected to discrete Fresnel diffraction transformation to generate a secret QR code.

5. The method for generating and authenticating a secure two-dimensional code according to claim 4, wherein: Extracting a three-dimensional image carrying signature information from the secure QR code image includes: Calculating the contribution of the random phase mask when embedding the three-dimensional image carrying the signature information into the two-dimensional code image to obtain a secure two-dimensional code; Subtract the contribution from the secret QR code to obtain the light field distribution image; Performing a discrete Fresnel diffraction inverse transform on the light field distribution image according to a distance parameter between the QR code and the ciphertext image to generate a QR code and a ciphertext image respectively; Decoding, optical image decryption and Huffman decoding the ciphertext image to restore the micro-unit image corresponding to the merchant logo; The micro-unit image is reconstructed into a three-dimensional image carrying signature information using the computational reconstruction algorithm of integrated imaging.

6. The method for generating and authenticating a secure two-dimensional code according to claim 1, wherein: Verifying the signature information includes: (611), determining merchant information based on the signature information; (612) Based on the merchant information, obtain the public key from the corresponding relationship between the public key and the merchant information; (613) decrypting the signature information using the public key to obtain a second hash value; (614) Matching the second hash value with the first hash value of the three-dimensional image calculated using a one-way hash function. When the match is successful, the signature information is successfully verified.

Citation Information

Patent Citations

  • Safety payment method and device based on credible two-dimension code

    CN103617531A

  • Identity authentication method based on trusted tag and identity authentication system based on trusted tag

    CN105634741A

  • BGN type cryptograph decryption outsourcing scheme based on attributes

    CN107154845A

  • Method and System for Verification and Authentication Using Optically Encoded QR Codes

    US20150295711A1