CN117729053B - Anti-counterfeiting verification method, device and storage medium based on quantum invisible transmission state - Google Patents

Anti-counterfeiting verification method, device and storage medium based on quantum invisible transmission state Download PDF

Info

Publication number
CN117729053B
CN117729053B CN202410172800.5A CN202410172800A CN117729053B CN 117729053 B CN117729053 B CN 117729053B CN 202410172800 A CN202410172800 A CN 202410172800A CN 117729053 B CN117729053 B CN 117729053B
Authority
CN
China
Prior art keywords
code
quantum
target object
information sequence
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410172800.5A
Other languages
Chinese (zh)
Other versions
CN117729053A (en
Inventor
曾祥洪
周卓俊
罗乐
陈柳平
李杨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qike Quantum Technology Zhuhai Co ltd
Guokaike Quantum Technology Anhui Co ltd
Guokaike Quantum Technology Beijing Co Ltd
Original Assignee
Qike Quantum Technology Zhuhai Co ltd
Guokaike Quantum Technology Anhui Co ltd
Guokaike Quantum Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qike Quantum Technology Zhuhai Co ltd, Guokaike Quantum Technology Anhui Co ltd, Guokaike Quantum Technology Beijing Co Ltd filed Critical Qike Quantum Technology Zhuhai Co ltd
Priority to CN202410172800.5A priority Critical patent/CN117729053B/en
Publication of CN117729053A publication Critical patent/CN117729053A/en
Application granted granted Critical
Publication of CN117729053B publication Critical patent/CN117729053B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

The application relates to an anti-counterfeiting verification method, device and storage medium based on quantum invisible state transmission, wherein the method is applied to a server and comprises the following steps: encrypting the combination of the information sequence of the target object to be anti-counterfeiting verified and the first quantum invisible state transmission code into a ciphertext; writing the ciphertext into any one of the multi-dimensional codes to generate an intermediate code; generating a verification code according to the information sequence of the target object; steganographically writing the verification code to the intermediate code to generate a final code comprising multiple layers of information; after the final code is sent to the user terminal, responding to the received measured value and the decrypted object information sequence from the user terminal, and determining the authenticity of the target object according to the measured value and the decrypted object information sequence; the measured value is obtained by measuring a quantum circuit generated by the user terminal based on the first quantum invisible state transmission code and the second quantum invisible state transmission code. The embodiment of the application can simplify the verification process and improve the security of anti-counterfeiting verification.

Description

Anti-counterfeiting verification method, device and storage medium based on quantum invisible transmission state
Technical Field
The application relates to the technical field of quantum computing, in particular to an anti-counterfeiting verification method and device based on quantum invisible transmission state, electronic equipment and a computer readable storage medium.
Background
In the technical field of anti-counterfeiting verification, various anti-counterfeiting technical treatments can be adopted for different anti-counterfeiting objects, so that the purpose of verifying authenticity is achieved. The traditional anti-counterfeiting technology is realized by adopting mechanical technology or chemical technology and physical technology, such as anti-counterfeiting ink technology, thermosensitive anti-counterfeiting technology, electromagnetic wave anti-counterfeiting technology, sealing strip or packaging anti-counterfeiting technology and the like; emerging anti-counterfeiting technologies based on electronic technology include two-dimensional code or bar code anti-counterfeiting, electronic tag or chip anti-counterfeiting and digital media technology anti-counterfeiting, and anti-counterfeiting verification can be completed in a hologram or visual identifier mode. The anti-counterfeiting technology is commonly used for anti-counterfeiting of medicines and foods, anti-counterfeiting of electronic products, anti-counterfeiting of certificates or bills, and the like. The anti-counterfeiting technology can help consumers to distinguish true from false, avoid purchasing fake products, protect rights and interests of the consumers, effectively hit fake behaviors and reduce market influence of the fake products. An effective anti-counterfeiting system is established, counterfeiters can be tracked, and market order and fair competition environment are ensured.
While existing anti-counterfeiting technologies can provide a degree of protection to merchants and consumers, they still face various challenges and limitations. For example, a method for verifying the authenticity of a commodity by using an electronic tag such as RFID or NFC has the disadvantages of high cost, easy tampering, low durability, and the like. As another example, chemical and physical security technologies, which require specific tools or equipment to test and verify, may be reverse engineered, and chemical marking may also contaminate the environment. For example, if a digital anti-counterfeit label is posted on the commodity package, the user needs to inquire the digital label through telephone, short message or internet to verify the authenticity, the verification process is complicated, the efficiency is low, the anti-counterfeit label is easy to forge, and the security is low.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide an anti-counterfeit verification method, device, electronic apparatus and computer readable storage medium based on quantum invisible state transmission.
According to one aspect of the application, the application provides an anti-counterfeiting verification method based on quantum invisible state transmission, which is applied to a server and comprises the following steps: encrypting the combination of the information sequence of the target object to be anti-counterfeiting verified and the first quantum invisible state transmission code into a ciphertext; writing the ciphertext into any multi-dimensional code to generate an intermediate code; generating a verification code according to the information sequence of the target object; steganographically writing the verification code to the intermediate code to generate a final code comprising multiple layers of information; after the final code is sent to the user terminal, responding to the received measured value and the decrypted object information sequence from the user terminal, and determining the authenticity of the target object according to the measured value and the decrypted object information sequence; the measured value is obtained by measuring a quantum circuit generated by the user terminal based on the first quantum invisible state transmission code and the second quantum invisible state transmission code, and the decrypted object information sequence and the first quantum invisible state transmission code are obtained by decrypting the final code by the user terminal.
Preferably, a combination of the information sequence of the target object and the first quantum invisible state transmission code is encrypted into a ciphertext by using an anti-quantum encryption algorithm based on a lattice password; and/or, steganographically writing the verification code into the intermediate code in a least significant bit mode.
Preferably, the generating the verification code according to the information sequence of the target object includes: randomly selecting a code from a pre-created code set by using a random selection function as a verification code, and associating the randomly selected verification code with the information sequence of the target object; or carrying out hash processing on the information sequence of the target object by utilizing a hash function, generating a verification code, and associating the generated verification code with the information sequence of the target object; or transforming the information sequence of the target object by using a transformation function to obtain a verification code, and associating the verification code obtained by transformation with the information sequence of the target object.
Preferably, the determining the authenticity of the target object according to the measured value and the decrypted object information sequence includes: and if the received decrypted object information sequence is consistent with the information sequence of the target object, and the frequency distribution of each quantum state in the measured value is uniform or consistent with the comparison result of the measured value of the server, determining that the target object is true.
Preferably, the final code containing the multi-layer information includes at least: the anti-counterfeiting verification method comprises the steps of an information sequence of a target object to be anti-counterfeiting verified, a first quantum invisible state transmission code and a verification code.
Preferably, the first quantum invisible state transmission code comprises a former part code of a designated quantum invisible state transmission code, and the second quantum invisible state transmission code comprises a latter part code of the designated quantum invisible state transmission code, wherein the former part code and the latter part code can be combined into a unified code, and a corresponding quantum circuit is generated when the unified code is executed.
Preferably, the information sequence of the target object to be anti-counterfeit verified is a commodity serial number, or a commodity bar code, or an IMEI code.
Preferably, the arbitrary multi-dimensional code includes a visualized code in the form of an arbitrary multi-dimensional code.
According to another aspect of the present application, an anti-counterfeit verification method based on quantum invisible state transmission is provided, applied to a user terminal, and includes: in response to receiving a final code containing multiple layers of information from a server, obtaining a verification code based on the final code by using an anti-steganography algorithm, wherein the final code is generated by the server by steganographically writing a verification code generated according to an information sequence of a target object to be anti-counterfeit verified into an intermediate code, and the intermediate code comprises a ciphertext encrypted by the information sequence of the target object and a first quantum invisible state transmission code; restoring the intermediate code based on the obtained verification code, decoding ciphertext in the intermediate code, and generating a private key matrix based on the obtained verification code; decrypting the information sequence of the target object and the first quantum invisible state transmission code based on the private key matrix and the decoded ciphertext; if the obtained verification code corresponds to the information sequence of the target object, combining the information sequence of the target object, the first quantum invisible state transmission code and the preset second quantum invisible state transmission code to generate a quantum circuit; performing the quantum circuit to obtain a measurement value; and sending the information sequence of the target object and the measured value to the server so that the server determines the authenticity of the target object.
Preferably, the generating a private key matrix based on the obtained verification code includes: obtaining a seed value corresponding to the verification code by utilizing a hash function and an abs function; generating an n multiplied by n random matrix corresponding to the seed value by utilizing a random number generator; and filling the obtained verification code into a random matrix to obtain a private key matrix.
Preferably, the quantum circuit is executed for multiple times to obtain a plurality of measured values, wherein the plurality of measured values are used for counting the distribution situation of quantum states corresponding to different measured values, and if the number of times of occurrence of each quantum state in the plurality of measured values is distributed uniformly, the information sequence of the target object is not tampered in the transmission process.
Preferably, the quantum circuit includes: a quantum circuit comprising x qubits; and executing the quantum circuit containing x quantum bits to obtain a measured value, wherein the measured value is used for comparing with a measured value of a server, and if the comparison result is consistent, the information sequence of the target object is not tampered in the transmission process, wherein x is an integer greater than or equal to 3.
Preferably, the final code includes trademark information of the target object.
According to another aspect of the present application, an anti-counterfeit verification device based on quantum invisible transmission is provided, comprising: the encryption module is used for encrypting the combination of the information sequence of the target object to be anti-counterfeit verified and the first quantum invisible state transmission code into a ciphertext; the intermediate code generation module is used for writing the ciphertext into any multi-dimensional code to generate an intermediate code; the verification code generation module is used for generating a verification code according to the information sequence of the target object; a final code generation module for steganographically writing the verification code to the intermediate code to generate a final code containing multiple layers of information; the sending module is used for responding to the received measured value and the decrypted object information sequence from the user terminal after the final code is sent to the user terminal, and determining the authenticity of the target object according to the measured value and the decrypted object information sequence; the measured value is obtained by measuring a quantum circuit generated by the user terminal based on the first quantum invisible state transmission code and the second quantum invisible state transmission code, and the decrypted object information sequence and the first quantum invisible state transmission code are obtained by decrypting the final code by the user terminal.
According to another aspect of the present application, there is provided a commodity anti-counterfeit verification device based on quantum invisible transmission, comprising: the system comprises an acquisition module, a verification module and a verification module, wherein the acquisition module is used for acquiring a verification code based on a final code containing multi-layer information by utilizing an anti-steganography algorithm in response to receiving the final code from a server, wherein the final code is generated by steganographically the verification code generated according to an information sequence of a target object to be anti-counterfeit verified to an intermediate code by the server, and the intermediate code comprises a ciphertext encrypted by the information sequence of the target object and a first quantum invisible state transmission code; the private key matrix generation module is used for restoring the intermediate code based on the obtained verification code, decoding the ciphertext in the intermediate code and generating a private key matrix based on the obtained verification code; the decryption module is used for decrypting the information sequence of the target object and the first quantum invisible state transmission code based on the private key matrix and the decoded ciphertext; the quantum circuit generation module is used for combining the information sequence of the target object, the first quantum invisible state transmission code and the preset second quantum invisible state transmission code to generate a quantum circuit if the obtained verification code corresponds to the information sequence of the target object; the execution module is used for executing the quantum circuit to obtain a measured value; and the sending module is used for sending the information sequence of the target object and the measured value to the server so as to enable the server to determine the authenticity of the target object.
According to another aspect of the present application, there is provided an electronic device including: a processor and a memory storing computer program instructions; the electronic device, when executing the computer program instructions, implements the method as described above.
According to another aspect of the application, a computer-readable storage medium is presented, having stored thereon computer program instructions, which when executed by a processor, implement a method as described above.
Compared with the prior art, the quantum invisible state-transfer-based anti-counterfeiting verification method, device, electronic equipment and computer-readable storage medium disclosed by the application have the following beneficial effects:
(1) And generating a verification code according to the information sequence of the target object, steganographically writing the verification code into a final code, and enabling a user to directly obtain the verification code in the final code at a user terminal side, so that the step of obtaining the verification code by interaction between the user terminal or a third party and a server is omitted, the verification process is more convenient, and the efficiency is improved.
(2) When verifying authenticity, the information sequence of the target object and the measured value obtained by the measuring quantum circuit are used for double verification, so that high safety is provided for verifying authenticity of the commodity by a merchant, and authenticity of the commodity is accurately verified.
(3) The target object is subjected to anti-counterfeiting verification based on quantum steganography state transmission technology, and due to the irreproducibility of quantum information, even if lawless persons intercept information transmitted between a remote terminal and a server, the specific content of the transmitted information cannot be known, an additional security layer is provided for the anti-counterfeiting technology, the anti-tampering capability of an information sequence of the target object is enhanced, and the security is improved.
Drawings
Preferred embodiments of the present application will be described in further detail below with reference to the attached drawing figures, wherein:
Fig. 1 is a flowchart of a method for verifying commodity anti-counterfeiting based on quantum invisible transmission by a server end according to an embodiment of the present application.
Fig. 2 is a flowchart of a commodity anti-counterfeiting verification method based on quantum invisible transmission state of a user terminal according to an embodiment of the present application.
Fig. 3 is a flow chart of a method of generating a private key matrix based on a verification code in accordance with an embodiment of the application.
Fig. 4 is an interaction diagram of a commodity anti-counterfeiting verification method based on quantum invisible transmission according to an embodiment of the present application.
Fig. 5 is a schematic diagram of a final two-dimensional code generation process according to an embodiment of the present application.
Fig. 6 is a schematic diagram of a single quantum invisible transmission state quantum circuit according to an embodiment of the application.
Fig. 7 is a statistical result of a plurality of measured values according to an embodiment of the present application.
Fig. 8 is a schematic diagram of a multiple quantum invisible transmission state quantum circuit according to an embodiment of the application.
Fig. 9 is a block diagram of a commodity anti-counterfeiting verification device based on quantum invisible transmission according to an embodiment of the present application.
Fig. 10 is a block diagram of a quantum invisible state transmission based commodity anti-counterfeiting verification device according to another embodiment of the present application.
Fig. 11 is a schematic diagram of an electronic device implementing a quantum invisible state-transfer-based commodity anti-counterfeiting verification method according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the following detailed description, reference is made to the accompanying drawings, which form a part hereof, and in which is shown by way of illustration specific embodiments of the application. In the drawings, like reference numerals describe substantially similar components throughout the different views. Various specific embodiments of the application are described in sufficient detail below to enable those skilled in the art to practice the teachings of the application. It is to be understood that other embodiments may be utilized or structural, logical, or electrical changes may be made to embodiments of the present application.
In order to overcome the defects, the application provides a multi-layer code commodity anti-counterfeiting technology based on a commodity anti-counterfeiting verification method of quantum invisible transmission state, which has the advantages of lower cost, higher safety, quick updating, no pollution, no harm to the environment, quantum attack resistance, convenient use for users, no need of special equipment, verification by mobile phone application and the like.
Fig. 1 is a flowchart of a method for verifying commodity anti-counterfeiting based on quantum invisible transmission by a server end according to an embodiment of the present application, including:
S101, encrypting a combination of an information sequence of a target object to be anti-counterfeiting verified and a first quantum invisible state transmission code into a ciphertext;
s102, writing the ciphertext into any multi-dimensional code to generate an intermediate code;
s103, generating a verification code according to the information sequence of the target object;
s104, steganographically writing the verification code to the intermediate code to generate a final code containing multi-layer information;
S105, after the final code is sent to the user terminal, responding to the received measured value and the decrypted object information sequence from the user terminal, and determining the authenticity of the target object according to the measured value and the decrypted object information sequence;
The measured value is obtained by measuring a quantum circuit generated by the first quantum invisible state transmission code and the second quantum invisible state transmission code of the user terminal, and the decrypted object information sequence and the first quantum invisible state transmission code are obtained by decrypting the final code by the user terminal.
In the embodiment of the application, the encrypted information is divided into two types, one is an information sequence (such as a commodity information sequence) of a target object to be anti-counterfeiting verified, and the other is a first quantum invisible state transmission code, and the other is used for verifying whether the information is eavesdropped or tampered in the transmission process. The first quantum invisible state transmission code can be a first half quantum invisible state transmission code or a second half quantum invisible state transmission code. The application only transmits a part of quantum invisible state transmission codes, can prevent the execution of the quantum circuit after the ciphertext is deciphered, and improves the safety. The commodity information sequence comprises a commodity serial number, a commodity bar code and an IMEI code, and the commodity serial number or the commodity number uniquely corresponds to the produced commodity. The commodity in the application can be a tangible commodity such as a computer, a knapsack and the like, and also can be an intangible commodity such as software, a game and the like. In particular in some high risk and high value areas, such as luxury goods or high end technical products, it is highly desirable to provide a security verification mechanism to ensure the authenticity of the goods.
In an embodiment of the present application, the measurement value may be further obtained by a quantum circuit measurement generated by the user terminal based on the decrypted object information sequence, the first quantum invisible state transmission code, and the second quantum invisible state transmission code.
In an embodiment of the present application, the arbitrary multi-dimensional code includes a visualized information code in the form of an arbitrary multi-dimensional code, for example, the multi-dimensional code may employ at least one of the following: two-dimensional codes, three-dimensional codes, bar codes. In order to avoid the complexity of the verification process and reduce the interaction steps between a user and a server, the application can steganographically write the verification code into the intermediate code to generate a final code containing multi-layer information. Taking two-dimensional codes as an example, the method comprises the steps of firstly writing encrypted ciphertext into any two-dimensional code to generate an intermediate two-dimensional code, then steganographically writing the verification code into the intermediate two-dimensional code to generate a final two-dimensional code containing multi-layer information. And pasting the final two-dimensional code on the commodity outer package, or sending the final two-dimensional code to a user through a network. In the traditional two-dimensional code commodity anti-counterfeiting verification method, verification codes and mobile phone short messages are required to be input for verification. The verification code is directly hidden on the final two-dimensional code and sent to the user, and the user can obtain the verification code in the final two-dimensional code only by using specific application, so that the counterfeiting difficulty is increased, the step of interaction with the server can be omitted, the verification process is more convenient, and the user satisfaction is improved.
And after the server determines the authenticity of the target object according to the measured value and the decrypted object information sequence, transmitting the authenticity information to the user terminal. The anti-counterfeiting information not only comprises information of whether the commodity is genuine or not, but also comprises information of the production date, the sales area and the like of the commodity, so that the commodity can be traced conveniently, and the channeling is prevented.
In the embodiment of the application, an anti-quantum encryption algorithm of a base Yu Ge password is utilized to encrypt the combination of the information sequence of the target object and the first quantum invisible state transmission code into a ciphertext; and/or, steganographically writing the verification code into the intermediate code in a least significant bit mode. Lattice-based quantum cryptography resistant algorithms (LEARNING WITH Errors, LWE for short) are the core of many lattice-based cryptography systems. The algorithm complexity of the lattice-based anti-quantum encryption algorithm is O (2-1024), the technology has resistance to future quantum computer attacks, is almost impossible to crack, has high security and has low encryption cost. Further, encryption can be performed by using a lattice-based anti-quantum encryption algorithm and/or a confusion manner, so that the security of the ciphertext is improved. The least significant bit (LEAST SIGNIFICANT bits, LSB) refers to the 0 th (i.e., lowest) bit in a binary number. The verification code is hidden in the intermediate code by utilizing the least significant bit to obtain the final code, so that the complexity of the final code is increased, and the forging difficulty is increased.
In an embodiment of the present application, generating a verification code according to an information sequence of a target object includes: randomly selecting a code from a pre-created code set by using a random selection function as a verification code, and associating the randomly selected verification code with an information sequence of a target object; or carrying out hash processing on the information sequence of the target object by utilizing a hash function, generating a verification code, and associating the generated verification code with the information sequence of the target object; or transforming the information sequence of the target object by using a transformation function to obtain a verification code, and associating the verification code obtained by transformation with the information sequence of the target object. And generating a verification code according to the information sequence of the target object, namely pairing the information sequence of the target object with the verification code, and correlating the information sequence of the target object with the verification code. When the verification code is acquired, the information sequence of the target object associated with the verification code can be acquired, and vice versa. Of course, the merchant may also pair and associate the information sequence of the target object with the verification code in its own manner, which is not limited herein.
In an embodiment of the present application, determining the authenticity of the target object according to the measured value and the decrypted object information sequence includes: and if the received decrypted object information sequence is consistent with the information sequence of the target object, and the frequency distribution of each quantum state in the measured value is uniform or consistent with the comparison result of the measured value of the server, determining that the target object is true. And the authenticity of the commodity is verified by utilizing the decrypted object information sequence and the measured value of the quantum circuit, so that the verification safety is improved. And if the decrypted object information sequence is consistent with the information sequence of the target object or the measured value is abnormal (the frequency distribution of each quantum state in the measured value is uneven or the comparison result of each quantum state in the measured value and the measured value of the server is inconsistent), verifying that the current object is false.
In an embodiment of the present application, the final code containing the multi-layer information includes at least: the anti-counterfeiting verification method comprises the steps of an information sequence of a target object to be anti-counterfeiting verified, a first quantum invisible state transmission code and a verification code.
In an embodiment of the present application, the first quantum invisible state transmission code includes a previous portion of a designated quantum invisible state transmission code, and the second quantum invisible state transmission code includes a subsequent portion of the designated quantum invisible state transmission code, wherein the previous portion of the code and the subsequent portion of the code can be combined into a unified code, and when the unified code is executed, a corresponding quantum circuit is generated.
Fig. 2 is a flowchart of an anti-counterfeiting verification method of a user terminal based on quantum invisible state transmission according to an embodiment of the present application, including:
S201, in response to receiving a final code containing multi-layer information from a server, obtaining a verification code based on the final code by using an anti-steganography algorithm, wherein the final code is generated by the server by steganographically writing the verification code generated according to an information sequence of a target object to be anti-counterfeit verified into an intermediate code, and the intermediate code comprises a ciphertext encrypted by the information sequence of the target object and a first quantum invisible state transmission code;
S202, restoring the intermediate code based on the obtained verification code, decoding ciphertext in the intermediate code, and generating a private key matrix based on the obtained verification code;
s203, decrypting the information sequence of the target object and the first quantum invisible state transmission code based on the private key matrix and the decoded ciphertext;
S204, if the obtained verification code corresponds to the information sequence of the target object, combining the information sequence of the target object, the first quantum invisible state transmission code and the preset second quantum invisible state transmission code to generate a quantum circuit;
S205, executing the quantum circuit to obtain a measured value;
s206, the information sequence of the target object and the measured value are sent to the server, so that the server determines the authenticity of the target object.
A specific application is installed on the user terminal, and a final code containing multiple layers of information is scanned by using a scanning function in the specific application. The verification code can be decoded in the final code through specific application, the intermediate code is restored according to the verification code, and the ciphertext is continuously decoded. The verification code has two functions, namely, the verification code is utilized to generate a private key matrix, and then the encrypted ciphertext is decrypted. And secondly, verifying whether the information sequence of the current object is consistent with the information sequence of the current object by using the verification code, and if so, indicating that the information sequence of the current object is real. And the consistency of the verification code and the information sequence of the current object is the precondition that the information sequence of the current object, the first quantum invisible state transmission code and the second quantum invisible state transmission code in the user terminal are combined to generate a quantum circuit, so that the authenticity of commodity information can be primarily judged at the user terminal.
When the verification code is consistent with the information sequence of the current object, combining the information sequence of the target object, the first quantum invisible state transmission code and the second quantum invisible state transmission code in the user terminal to generate a quantum circuit, and executing the quantum circuit to obtain a measured value. Quantum invisible transport is a technique that allows one quantum state to be transported between two remote users without directly transporting any physical particles. This means that even if someone intercepts this transmission process, no transmitted information is available, since quantum information cannot be duplicated, thus providing an additional layer of security for the anti-counterfeiting technique. In addition, the server can verify that the final code is not tampered in the transmission process according to the measured value of the quantum circuit, and a mechanism is provided for a merchant to determine that the current object is true. By utilizing the quantum invisible state transmission technology, high security can be provided for verifying the authenticity of the commodity by a merchant, and meanwhile, the complexity of the system is increased. However, this technique does not require specialized quantum equipment and expertise, and the verification cost is not increased. In practical application, considering the current state of the art, quantum technology can be widely applied to the anti-counterfeiting of daily commodities in the next decades. Such technology would be of great value, especially for certain specific high risk or high value areas, such as luxury goods or high end technical products.
FIG. 3 is a flow chart of a method of generating a private key matrix based on a verification code, the method comprising:
s301, obtaining a seed value corresponding to the verification code by utilizing a hash function and an abs function;
S302, generating an n multiplied by n random matrix corresponding to the seed value by utilizing a random number generator;
s303, filling the verification code into a random matrix to obtain a private key matrix.
A given authentication code (in the form of a string) can be converted into a private key matrix using the above functions. By using the function, a random matrix can be generated based on the verification code, and the random matrix uniquely corresponds to the verification code. The random matrix generated based on the verification code is unique whenever and wherever. The verification code is uniquely corresponding to the random matrix, so that accurate and smooth decryption of the information in the secret can be ensured.
According to the embodiment of the application, the quantum circuit can be executed for multiple times to obtain a plurality of measured values, and the plurality of measured values are used for counting the distribution situation of quantum states corresponding to different measured values, wherein if the number of times of occurrence of each quantum state in the plurality of measured values is distributed uniformly, the information sequence of the target object is not tampered in the transmission process.
The quantum circuit uses the state verification of 1 quantum bit, through the measured value of the quantum circuit, whether the receiving end successfully reconstructs the initial state of the transmitting end can be verified, if the condition of the receiving end is consistent with the initial state of the transmitting end, namely the occurrence times of each quantum state in a plurality of measured values are equally distributed, the condition that the receiving end reconstructs the quantum state of the transmitting end, namely the information sequence of the current object is not tampered or eavesdropped in the transmission process is indicated, and the commodity is genuine. The quantum bit circuit does not need to send a desired quantum state or a plurality of quantum states, a user and a server do not need any operation, the desired quantum states do not need to be additionally configured, verification can be completed, encryption burden of a merchant is reduced, and the quantum bit circuit is universally applicable to any commodity needing encryption.
According to one embodiment of the application, the quantum circuit comprises: a quantum circuit comprising x qubits; executing a quantum circuit containing x quantum bits can obtain a measured value, wherein the measured value is used for comparing with a measured value of a server, and if the comparison result is consistent, the information sequence of the target object is not tampered in the transmission process. Wherein x is an integer of 3 or more.
A quantum circuit containing x qubits uses state verification of x qubits, and a business can reserve any one state of x qubits as a verification state. Quantum circuits containing x qubits require more entangled states and more complex circuits. For example, when x is 3, a quantum circuit containing 3 qubits requires three pairs of entangled states, each pair of entangled states being used to transport 1 qubit. Quantum circuits containing x qubits increase the difficulty of counterfeiting compared to the above quantum circuits, and also make the protocol more complex, requiring more quantum resources and longer execution times. Thus, a quantum circuit containing x qubits can increase not only the security of verification, but also the complexity of verification.
In an embodiment of the application, the final code includes trademark information of the target object. The intermediate code and the final code of the application have the great characteristic of containing multiple layers of information, and trademarks are arranged on the intermediate code and/or the final code, so that the complexity of verification is increased, and the exposure of the trademarks of the commodity is increased.
The foregoing describes implementations and advantages of embodiments of the application in terms of a number of embodiments. The present application is exemplified by the case where the target object is a commodity, and the specific processing procedure of the embodiment of the present application is described in detail below with reference to specific examples.
Fig. 4 is an interaction diagram of a quantum invisible state based anti-counterfeit verification method according to an embodiment of the present application. The method comprises the following steps:
At the server side:
S401, encrypting a combination of an information sequence of a commodity to be anti-counterfeiting verified and a first quantum invisible state transmission code into a ciphertext;
The encryption can be performed by adopting an anti-quantum encryption and decryption algorithm and/or a confusing encryption algorithm, wherein the anti-quantum encryption and decryption algorithm comprises: a lattice-based encryption and decryption algorithm. The trellis-based encryption and decryption algorithm describes an encryptor who wishes to send certain information to a decryptor, but ensures that the information is kept secret from any potential eavesdropper. Specifically, there is a public, randomly selected matrix A, and a private vector s known only to the decryptor. The encryptor wishes to send a vector d such that: a random vector r is selected and ad+rs is then calculated. A vector y is generated, which is common. The decryptor may decrypt y using his private key s to obtain d.
The mathematical formulas involved in the encryption process are:
Encryption (Encrypt):
Given:
Public key a, b=a×s+e (where e is an error vector, typically a small random value)
Message m
A random vector r is selected and then calculated:
c1=A×r
c2=b×r+m
Ciphertext is c= (c 1, c 2)
For example, the message m (commodity information sequence and first quantum invisible transmission state code) to be encrypted in the present application is: m= "commodity serial number:
Code of the first half of the' invisible transmission state
import qiskit
def teleportation_front():
qr=qiskit.QuantumRegister(3, 'q')
crz=qiskit.ClassicalRegister(1, 'crz')
crx=qiskit.ClassicalRegister(1, 'crx')
circuit=qiskit.QuantumCircuit(qr, crz, crx)
# Creation of entanglement pair
circuit.h(qr[1])
circuit.cx(qr[1], qr[2])
Part of #Alice
circuit.cx(qr[0], qr[1])
circuit.h(qr[0])
circuit.measure(qr[0], crz[0])
circuit.measure(qr[1], crx[0])
return circuit
"""
Ciphertext encrypted by adopting a grid-based encryption and decryption algorithm is similar to the following matrix:
[(array([3252, 2567, 6461, 2225, 2809, 2231, 1241,656, 3762, 7772, 7869,
3566, 4682, 7633, 5757, 7910, 2483, 9, 3505, 1173, 2881, 1750,
6985, 1365, 3504, 6372, 5977, 232, 7443, 6719, 1557, 5281, 6164,
523, 2744, 5499, 3360, 3630, 6550, 5986, 5647, 5474, 7139, 880,
1202, 1265, 7118, 115, 6886, 4990, 6545, 2432, 5274, 5341, 335,
2950, 7856, 3995, 3870, 58, 5122, 5344, 5018, 1291, 3706, 2177,
5985, 744, 4291, 3001, 7363, 7150, 4300, 360, 7544, 6474, 3148,
4802, 397, 5129, 6555, 442, 317, 2083, 1709, 1200, 4423, 7572,
5762, 5735, 5386, 7668, 2222, 4664, 4016, 3239, 2183, 7592, 2240,
......
7975, 7501, 1172, 3548, 6870, 6392, 7589, 6392, 4125, 5990, 6608,
7857, 2540, 3988, 7034, 6030, 3235, 4434, 989, 3433, 5966, 7962,
2842, 1848, 966, 749, 7111, 3695, 4214, 532, 5870, 547, 3986,
7527, 4279, 6342, 6721, 6386, 3823, 5553, 4347, 3876, 454, 8073,
5481, 7126, 1259, 1092, 2880, 1764]), 3825)]
s402, writing the ciphertext into any multi-dimensional code to generate an intermediate code; generating a verification code according to the commodity information sequence;
Before writing the ciphertext into a multi-dimensional code to generate an intermediate code, the commodity trademark can also be written into the multi-dimensional code to generate a basic code, and then the ciphertext is written into the basic code to generate the intermediate code. Fig. 5 is a schematic diagram of a final two-dimensional code generation process according to an embodiment of the present application. Referring to fig. 5, the base code, the intermediate code, and the final code are sequentially from left to right. Taking a multi-dimensional code as an example of a two-dimensional code, firstly, generating a two-dimensional code with a commodity trademark by using a development tool. The encrypted ciphertext is written into the basic two-dimensional code to generate the intermediate two-dimensional code.
Generating the verification code from the merchandise information sequence may be accomplished using a generate_ keypair function, which includes but is not limited to the following 3 functions:
(1) Generating based on the randomly selected serial number and verification code:
S={s1,s2,…,sserial_length}
V={v1,v2,…,vcode_length}
Where each si is a serial number and vi is a verification code, si and vi are randomly selected from the set a= { a, B, C, …, Z,0,1, …,9 }.
(2) Generating a serial number and a verification code based on hash:
First, a serial number S is generated, as in method (1), and then a hash function H is used to generate a verification code from the serial number:
S={s1,s2,…,sserial_length}
V=H(S)
Where H is a hash function (e.g., SHA 256) and takes only its first hcode _length characters as the verification code.
(3) Generating a verification code based on the transformation of the serial number:
First, a serial number S is generated, as in method (1). Then, a validation code is generated from the serial number using some transformation function T:
S={s1,s2,…,sserial_length}
V=T(S)
where transform T is a simple inversion operation, but may be any other transform.
S403, the verification code is hidden in the intermediate code to generate a final code;
Taking the final code as the two-dimensional code as an example, the verification code is hidden in the middle two-dimensional code in fig. 5 to generate the final two-dimensional code. Wherein the verification code can be a 3-8 bit sequence of digits, e.g., the verification code is: 68824.
And S404, the final code is sent to the user terminal.
At the user terminal:
s405, obtaining a verification code based on the final code and an anti-steganography algorithm;
s406, restoring the intermediate code based on the verification code, decoding the ciphertext in the intermediate code, and generating a private key matrix based on the verification code;
The application can generate the private key matrix by using a private key matrix to verification code function (Vericode_to_ Prikey), and the functions of the function comprise:
receiving an identifying code message, a matrix size n and a modulus q as input parameters;
a matrix is generated using the entered verification code, which can be regarded as a private key matrix.
The realization principle is as follows:
the hash is converted into seeds: the input verification code message may be hashed using a built-in hash function of Python, which returns an integer value, possibly positive or negative; using abs function to ensure hash value is positive number to obtain seed value seed;
Setting a seed of a random number generator: setting the seed of the random number generator with np.random.seed ensures that the same random matrix is generated each time the same authentication code is used as input;
Generating a random matrix: generating an n x n size random matrix using np.random.random (0, q, size= (n, n)), wherein the value of each element is in the range of [0, q ]);
Filling verification codes into moments: traversing each character in the input verification code message; each digital character in the validation code is converted to an integer and filled into the first row of the matrix. Note that: if the length of the verification code exceeds the size n of the matrix, only the first n characters will be filled into the matrix.
Returning to the matrix: the function returns the generated matrix.
The key to the private key matrix-to-captcha function is to use the captcha as a seed to generate a deterministic random matrix and embed the captcha itself into the matrix, thereby ensuring that the captcha can be recovered from the matrix.
For example, having a verification code message= "68824" passing through the vericode_to_ Prikey function, the following private key matrix is obtained:
[[ 6 8 8 2 4 39 26 68 70 3]
[38 20 0 45 93 82 57 3 15 91]
[98 59 2 96 85 26 18 41 40 0]
[10 55 79 67 38 24 15 29 69 80]
[44 5 54 60 97 62 52 40 95 44]
[32 51 27 60 55 50 33 90 49 68]
[96 97 41 70 81 76 71 49 72 59]
[81 36 84 10 36 30 0 92 58 13]
[78 38 98 87 86 7 55 23 37 83]
[96 65 71 30 25 24 92 94 58 40]]
S407, decrypting the commodity information sequence and the first quantum invisible transmission state code based on the private key matrix and the ciphertext;
the step involves a decryption process using a trellis-based encryption and decryption algorithm, the specific decryption process comprising:
decryption (Decrypt):
Given:
Ciphertext c= (c 1, c 2)
Private key s
And (3) calculating: m' =c2-c1×s
When the error e is small enough, m' will be equal to the original message m, and the private key s is obtained by the vericode_to_ Prikey function described above.
Mathematical deduction of encryption and decryption processes
Encryption:
B=a×s+e is known. Then, a random vector r is selected to calculate c1 and c2:
c1=A×r
c2=b×r+m=(A×s+e)×r+m
Decryption:
the goal of decryption is to remove the effect of r from c2 to recover message m.
Calculating c2-c1×s to obtain:
m' = (a×s+e) ×r+m-a×r×s because a×r×s and a×s×r are equal and cancel each other out,
Obtained, m' =m+e×r
Since e is typically small, e x r will also be a small value. Thus, m' can be considered as m plus a small error. This means that the original message m can be recovered from m'.
To introduce a serial number and verification code into the LWE, the 2 functions described above are the vericode_to_ Prikey function and the generate_ keypair function. The public key consists of a random matrix a and a vector b generated from the private key and the error vector.
S408, when the verification code corresponds to the commodity information sequence, combining the commodity information sequence, the first quantum invisible state transmission code and the second quantum invisible state transmission code in the terminal to generate a quantum circuit, and executing the quantum circuit to obtain a measured value;
s409, sending the commodity information sequence and the measured value to a server;
s410, obtaining commodity authenticity information based on the commodity information sequence and the measured value;
s411, sending commodity authenticity information to the user terminal.
Fig. 6 is a schematic diagram of a single quantum invisible transmission state quantum circuit according to one embodiment of the application. As shown in fig. 6, the quantum invisible transmission circuit involves three quantum bits and two classical bits. The following is a detailed step explanation of the circuit:
assuming Alice is the user and Bob is the merchant, bob expects to receive a quantum state of |1>, then the following is required according to the invisible state transfer protocol.
Alice first prepares a qubit with a quantum state of |1> (by applying an X gate to the |0> -state).
Alice and Bob share an entanglement pair.
Alice performs a series of quantum operations and measurements on her two qubits.
Alice sends her measurements to Bob.
Bob performs a series of quantum operations on his qubits based on the measurements sent by Alice to him, thereby reconstructing Alice's original |1> state.
Code is then written to perform the above process.
Initializing: first, necessary libraries and modules are imported, and then a function teleportation _protocol () is defined to implement the quantum invisible transport protocol.
Preparation of Alice: creating 3 qubits and 3 classical bits. Qr [0] is initialized to the |1> state, which is the quantum state Alice wants to transfer to Bob by applying an X gate to the |0> state. Entanglement pairs are created using qr [1] and qr [2]. Hadamard gates are applied to qr [1], and then qr [1] and qr [2] are entangled using CNOT gates.
Alice's operation: CNOT gates are applied to qr [0] and qr [1], followed by Hadamard gates applied to qr [0 ]. Qr [0] and qr [1] are measured and the results are stored in classical registers crz and crx.
Bob operation: x-gate and Z-gate operations are applied to qr 2 based on measurements sent to him by Alice.
Wherein, X gate operation: if Alice's crx measurements are 1, bob applies an X gate on qr [2 ]. The function of the X gate is to change the |0> state to the |1> state and vice versa. Z gate operation: if Alice's crz measurement is 1, bob applies a Z gate on qr [2 ]. The function of the Z gate is to hold the |0> state unchanged, but to add a phase factor to the |1> state.
Measurement: all qubits are measured to obtain a measurement.
Fig. 7 is a statistical result of a plurality of measured values according to an embodiment of the present application. As shown in fig. 7, the resulting state on Bob's qubit is now the same as Alice's original |1> state. This means that the quantum state has already been transmitted. The analysis of the results was as follows:
The resulting format is { qr < 2 > qr < 1 > qr < 0 > crxcrz }.
Qr 0 and qr 1 are qubits of Alice, and qr 2 is a qubit of Bob.
Crx and crz are classical results of Alice measurements.
From the given results, it can be seen that:
'10000' means that qr [0] is measured as 0, qr [1] is measured as 0, qr [2] is measured as1, and Alice's measurement results are crx =0 and crz=0.
'10101' Means that qr [0] is measured as1, qr [1] is measured as 0, qr [2] is measured as1, and Alice's measurement results are crx =0 and crz=1.
'11010' Means that qr [0] is measured as 0, qr [1] is measured as1, qr [2] is measured as1, and Alice's measurement results are crx =1 and crz=0.
'11111' Means that qr [0] is measured as1, qr [1] is measured as1, qr [2] is measured as1, and Alice's measurement results are crx =1 and crz=1.
Now, the goal is to verify if Bob's qr [2] successfully recreates Alice's initial state |1> of qr [0 ].
To verify this, it is necessary to view the measurement of qr 2. From the above results, it is clear that qr [2] is measured as 1 in all cases, which is consistent with the initial state |1> of qr [0] of Alice, i.e., statistics of 4 quantum states are uniform. Thus, it was demonstrated that Bob's qr [2] successfully recreated Alice's qr [0] quantum state.
Fig. 8 is a schematic diagram of a multiple quantum invisible transmission state quantum circuit according to an embodiment of the application. As shown in fig. 8, the multi-quantum invisible conduction circuit uses 5 qubits to construct a multi-state invisible quantum state. Using the states of two qubits as verification states increases the complexity and security of the verification. For example, a merchant may pre-agree on one of four for a user as a verification state:
∣00>
∣01>
∣10>
∣11>
This means that the probability in the authentication process increases from 2 kinds (|1 > or |0 >) in the above case to 4 kinds, thereby increasing the difficulty of forgery. In stealth pass-state protocols, alice and Bob require more entangled states and more complex circuitry to achieve this. In particular, two pairs of entangled states are required, each pair for transmitting one qubit. The advantage of this approach is that it provides greater security because the counterfeiter now needs to guess one of 4 possible authentication states instead of the original 2. However, this also makes the protocol more complex, potentially requiring more quantum resources and longer time to execute.
The scheme of the application can directly enable a merchant to provide a service for generating information containing multiple layers of multidimensional codes by using a specific tool, for example, the merchant can return one multidimensional code containing multiple layers of information only by uploading commodity trademark pictures and commodity information sequences, and the merchant can also download the multidimensional code in batches by uploading commodity information sequences and commodity trademarks in batches by using the provided API interface.
Correspondingly, the embodiment of the application also provides a commodity anti-counterfeiting verification device based on the quantum invisible transmission state, as shown in fig. 9, the commodity anti-counterfeiting verification device 100 based on the quantum invisible transmission state comprises:
The encryption module 110 is configured to encrypt a combination of an information sequence of a target object to be anti-counterfeit verified and a first quantum invisible state transmission code into a ciphertext;
An intermediate code generation module 120, configured to write the ciphertext into any multi-dimensional code to generate an intermediate code;
A verification code generating module 130, configured to generate a verification code according to the information sequence of the target object;
A final code generation module 140, configured to steganographically the verification code to the intermediate code to generate a final code containing multiple layers of information;
A transmitting module 150, configured to determine, after the final code is transmitted to the user terminal, authenticity of the target object according to the measured value and the decrypted object information sequence in response to receiving the measured value and the decrypted object information sequence from the user terminal;
The measured value is obtained by measuring a quantum circuit generated by the user terminal based on the first quantum invisible state transmission code and the second quantum invisible state transmission code, and the decrypted object information sequence and the first quantum invisible state transmission code are obtained by decrypting the final code by the user terminal.
The embodiment of the application also provides another commodity anti-counterfeiting verification device based on the quantum invisible transmission state, as shown in fig. 10, the commodity anti-counterfeiting verification device 200 based on the quantum invisible transmission state comprises:
An obtaining module 210, configured to obtain, in response to receiving a final code containing multiple layers of information from a server, a verification code based on the final code by using an anti-steganography algorithm, where the final code is generated by the server steganographically writing a verification code generated according to an information sequence of a target object to be anti-counterfeit verified to an intermediate code, and the intermediate code includes a ciphertext encrypted by the information sequence of the target object and a first quantum invisible state transmission code;
The private key matrix generation module 220 is configured to restore the intermediate code based on the obtained verification code and decode the ciphertext in the intermediate code, and generate a private key matrix based on the obtained verification code;
The decryption module 230 is configured to decrypt the information sequence of the target object and the first quantum invisible state code based on the private key matrix and the decoded ciphertext;
the quantum circuit generating module 240 is configured to combine the information sequence of the target object and the first quantum invisible state transmission code with a predetermined second quantum invisible state transmission code to generate a quantum circuit if the obtained verification code corresponds to the information sequence of the target object;
An execution module 250 for executing the quantum circuit to obtain a measured value;
And the sending module 260 is configured to send the information sequence of the target object and the measured value to the server, so that the server determines the authenticity of the target object.
The quantum invisible state-transfer-based anti-counterfeiting verification method is applied to electronic equipment, for example, the electronic equipment can be user terminal equipment, a server, other computing equipment and a cloud server. Fig. 11 is a schematic diagram of an electronic device implementing a quantum invisible state-based commodity anti-counterfeiting verification method according to an embodiment of the present application, where the electronic device may include a processor 601 and a memory 602 storing computer program instructions, where the processor 601 implements the flow or functions of any of the methods of the embodiments described above when executing the computer program instructions. The processor 601 may employ a quantum processor. The memory 602 may employ a quantum storage.
As an example, processor 601 may include a Central Processing Unit (CPU), or an Application SPECIFIC INTEGRATED Circuit (ASIC), or may be configured as one or more integrated circuits that implement embodiments of the present application. Memory 602 may include mass storage for data or instructions. For example, the memory 602 may be at least one of: a hard disk drive (HARD DISK DRIVE, HDD), read-only memory (ROM), random-access memory (RAM), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, universal serial bus (Universal Serial Bus, USB) drive, or other physical/tangible memory storage device. As another example, the memory 602 may include removable or non-removable (or fixed) media. For another example, memory 602 may be internal or external to the integrated gateway disaster recovery device. The memory 602 may be a non-volatile solid state memory. In other words, generally the memory 602 includes a tangible (non-transitory) computer-readable storage medium (e.g., a memory device) encoded with computer-executable instructions and when the software is executed (e.g., by one or more processors) may perform the operations described by the methods of embodiments of the application. The processor 601 implements the flow or functions of any of the methods of the above embodiments by reading and executing computer program instructions stored in the memory 602.
In one example, the electronic device shown in FIG. 11 may also include a communication interface 603 and a bus 610. The processor 601, the memory 602, and the communication interface 603 are connected to each other through a bus 610 and perform communication with each other. The communication interface 603 is mainly used to implement communications between modules, apparatuses, units, and/or devices in the embodiments of the present application. Bus 610 includes hardware, software, or both, and may couple components of the online data flow billing device to each other.
Embodiments of the present application also provide a computer storage medium having stored thereon computer program instructions which, when executed by a processor, implement the flow or functions of any of the methods of the embodiments described above.
In addition, the embodiment of the present application further provides a computer program product, where the computer program product stores computer program instructions, and the computer program instructions implement the flow or the function of any one of the methods in the above embodiments when the computer program instructions are executed by a processor.
The foregoing exemplarily describes a flow chart and/or a block diagram of a method, an apparatus, an electronic device and a computer readable storage medium for verifying merchandise anti-counterfeiting based on a quantum invisible state according to an embodiment of the present application, and describes related aspects. It will be understood that each block of the flowchart illustrations and/or block diagrams, or combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions, special purpose hardware which perform the specified functions or acts, and combinations of special purpose hardware and computer instructions. For example, these computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, quantum computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the present application, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be a general purpose processor, a special purpose processor, a quantum processor, an application specific processor, or a field programmable logic circuit.
Functional blocks shown in the block diagrams of the embodiments of the present application can be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, a plug-in, a function card, or the like; when implemented in software, are the programs or code segments used to perform the required tasks. The program or code segments can be stored in a memory or transmitted over transmission media or communication links through data signals carried in carrier waves. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
In summary, in the method for verifying authenticity according to the present application, the multidimensional code containing the multi-layer information generated by using the steganography technique, the quantum invisible state transmission technique and the lattice anti-quantum encryption technique has at least the following advantages: due to the use of lattice-based anti-quantum encryption, the technology is resistant to future quantum computer attacks; the quantum invisible state provides a safe information transmission mode, so that the information is extremely difficult to forge or intercept; by combining with the steganography technology, additional information can be hidden in the two-dimensional code, so that the forging difficulty is increased; the user can use the mobile phone or other user terminal equipment to rapidly scan the multi-dimensional code for verification; and the method can be integrated with a cloud platform, a database and the like, and can track and verify the authenticity of the commodity in real time.
It should be noted that the present application is not limited to the specific configurations and processes described above or shown in the drawings. The foregoing is merely specific embodiments of the present application, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working processes of the described system, apparatus, module or unit may refer to corresponding processes in the method embodiments, and need not be repeated. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art may conceive various equivalent modifications or substitutions within the technical scope of the present application, which are intended to be included in the scope of the present application.

Claims (16)

1. The anti-counterfeiting verification method based on quantum invisible state transmission is characterized by being applied to a server and comprising the following steps of:
encrypting the combination of the information sequence of the target object to be anti-counterfeiting verified and the first quantum invisible state transmission code into a ciphertext;
Writing the ciphertext into any multi-dimensional code to generate an intermediate code;
Generating a verification code according to the information sequence of the target object;
steganographically writing the verification code to the intermediate code to generate a final code comprising multiple layers of information;
Transmitting the final code to a user terminal;
receiving a measured value and a decrypted object information sequence sent by a user terminal aiming at the final code;
Responding to the received decrypted object information sequence consistent with the target object information sequence, wherein the number of times of occurrence of each quantum state in the measured value is uniformly distributed or consistent with the comparison result of the measured value of a server, and determining that the target object is true;
The measured value is obtained by measuring a quantum circuit generated by the user terminal based on the first quantum invisible state transmission code and the second quantum invisible state transmission code, and the decrypted object information sequence and the first quantum invisible state transmission code are obtained by decrypting the final code by the user terminal.
2. The quantum-invisible-state-based anti-counterfeiting verification method according to claim 1, wherein a combination of the information sequence of the target object and the first quantum-invisible-state code is encrypted into a ciphertext by using an anti-quantum encryption algorithm based on a lattice password; and/or, steganographically writing the verification code into the intermediate code in a least significant bit mode.
3. The quantum invisible state-based anti-counterfeiting verification method according to claim 1, wherein the generating a verification code according to the information sequence of the target object comprises:
Randomly selecting a code from a pre-created code set by using a random selection function as a verification code, and associating the randomly selected verification code with the information sequence of the target object; or (b)
Carrying out hash processing on the information sequence of the target object by utilizing a hash function, generating a verification code, and associating the generated verification code with the information sequence of the target object; or (b)
And carrying out transformation processing on the information sequence of the target object by utilizing a transformation function to obtain a verification code, and associating the verification code obtained by transformation with the information sequence of the target object.
4. The quantum invisible state based anti-counterfeit verification method according to claim 1, wherein the final code comprising the multi-layer information comprises at least: the anti-counterfeiting verification method comprises the steps of an information sequence of a target object to be anti-counterfeiting verified, a first quantum invisible state transmission code and a verification code.
5. The quantum-invisible-state-based anti-counterfeiting verification method according to claim 1, wherein the first quantum-invisible-state-transmitting code comprises a former part of a designated quantum-invisible-state-transmitting code, and the second quantum-invisible-state-transmitting code comprises a latter part of the designated quantum-invisible-state-transmitting code, wherein the former part of the code and the latter part of the code can be combined into a unified code, and a corresponding quantum circuit is generated when the unified code is executed.
6. The anti-counterfeiting verification method based on quantum invisible state according to claim 1, wherein the information sequence of the target object to be anti-counterfeiting verified is a commodity serial number, a commodity bar code or an IMEI code.
7. The quantum invisible state based anti-counterfeiting verification method according to claim 1 wherein any one of the multi-dimensional codes comprises a visual code in the form of any multi-dimensional code.
8. The anti-counterfeiting verification method based on quantum invisible state transmission is characterized by being applied to a user terminal and comprising the following steps of:
In response to receiving a final code containing multiple layers of information from a server, obtaining a verification code based on the final code by using an anti-steganography algorithm, wherein the final code is generated by the server by steganographically writing a verification code generated according to an information sequence of a target object to be anti-counterfeit verified into an intermediate code, and the intermediate code comprises a ciphertext encrypted by the information sequence of the target object and a first quantum invisible state transmission code;
restoring the intermediate code based on the obtained verification code, decoding ciphertext in the intermediate code, and generating a private key matrix based on the obtained verification code;
decrypting the information sequence of the target object and the first quantum invisible state transmission code based on the private key matrix and the decoded ciphertext;
If the obtained verification code corresponds to the information sequence of the target object, combining the information sequence of the target object, the first quantum invisible state transmission code and the preset second quantum invisible state transmission code to generate a quantum circuit;
Performing the quantum circuit to obtain a measurement value;
And sending the information sequence of the target object and the measured value to the server so that the server responds to the fact that the decrypted information sequence of the target object is consistent with the information sequence of the target object, and the number of times of occurrence of each quantum state in the measured value is distributed uniformly or consistent with the comparison result of the measured value of the server, so that the target object is determined to be true.
9. The quantum invisible state based anti-counterfeiting verification method according to claim 8, wherein the generating a private key matrix based on the obtained verification code comprises:
obtaining a seed value corresponding to the verification code by utilizing a hash function and an abs function;
generating an n multiplied by n random matrix corresponding to the seed value by utilizing a random number generator;
And filling the obtained verification code into a random matrix to obtain a private key matrix.
10. The quantum invisible transmission state based anti-counterfeiting verification method according to claim 8, wherein the quantum circuit is executed for a plurality of times to obtain a plurality of measured values, the plurality of measured values are used for counting the distribution situation of quantum states corresponding to different measured values, and if the number of times of occurrence of each quantum state in the plurality of measured values is distributed uniformly, the information sequence of the target object is not tampered in the transmission process.
11. The quantum-invisible-state-based anti-counterfeiting verification method according to claim 8, wherein the quantum circuit comprises: a quantum circuit comprising x qubits; and executing the quantum circuit containing x quantum bits to obtain a measured value, wherein the measured value is used for comparing with a measured value of a server, and if the comparison result is consistent, the information sequence of the target object is not tampered in the transmission process, wherein x is an integer greater than or equal to 3.
12. The method of any one of claims 8-11, wherein the final code comprises brand information of the target object.
13. An anti-counterfeiting verification device based on quantum invisible transmission state is characterized by comprising:
The encryption module is used for encrypting the combination of the information sequence of the target object to be anti-counterfeit verified and the first quantum invisible state transmission code into a ciphertext;
the intermediate code generation module is used for writing the ciphertext into any multi-dimensional code to generate an intermediate code;
the verification code generation module is used for generating a verification code according to the information sequence of the target object;
A final code generation module for steganographically writing the verification code to the intermediate code to generate a final code containing multiple layers of information;
a transmitting module, configured to transmit the final code to a user terminal;
The receiving module is used for receiving the measured value and the decrypted object information sequence sent by the user terminal aiming at the final code;
Responding to the received decrypted object information sequence consistent with the target object information sequence, wherein the number of times of occurrence of each quantum state in the measured value is uniformly distributed or consistent with the comparison result of the measured value of a server, and determining that the target object is true;
The measured value is obtained by measuring a quantum circuit generated by the user terminal based on the first quantum invisible state transmission code and the second quantum invisible state transmission code, and the decrypted object information sequence and the first quantum invisible state transmission code are obtained by decrypting the final code by the user terminal.
14. Commodity anti-counterfeiting verification device based on quantum invisible transmission state is characterized by comprising:
the system comprises an acquisition module, a verification module and a verification module, wherein the acquisition module is used for acquiring a verification code based on a final code containing multi-layer information by utilizing an anti-steganography algorithm in response to receiving the final code from a server, wherein the final code is generated by steganographically the verification code generated according to an information sequence of a target object to be anti-counterfeit verified to an intermediate code by the server, and the intermediate code comprises a ciphertext encrypted by the information sequence of the target object and a first quantum invisible state transmission code;
The private key matrix generation module is used for restoring the intermediate code based on the obtained verification code, decoding the ciphertext in the intermediate code and generating a private key matrix based on the obtained verification code;
The decryption module is used for decrypting the information sequence of the target object and the first quantum invisible state transmission code based on the private key matrix and the decoded ciphertext;
The quantum circuit generation module is used for combining the information sequence of the target object, the first quantum invisible state transmission code and the preset second quantum invisible state transmission code to generate a quantum circuit if the obtained verification code corresponds to the information sequence of the target object;
the execution module is used for executing the quantum circuit to obtain a measured value;
And the sending module is used for sending the information sequence of the target object and the measured value to the server so that the server responds to the fact that the decrypted information sequence of the target object is consistent with the information sequence of the target object, the frequency distribution of each quantum state in the measured value is uniform or consistent with the measured value comparison result of the server, and the target object is determined to be true.
15. An electronic device, the electronic device comprising: a processor and a memory storing computer program instructions; the electronic device, when executing the computer program instructions, implements the method of any of claims 1-12.
16. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon computer program instructions which, when executed by a processor, implement the method of any of claims 1-12.
CN202410172800.5A 2024-02-07 2024-02-07 Anti-counterfeiting verification method, device and storage medium based on quantum invisible transmission state Active CN117729053B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410172800.5A CN117729053B (en) 2024-02-07 2024-02-07 Anti-counterfeiting verification method, device and storage medium based on quantum invisible transmission state

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410172800.5A CN117729053B (en) 2024-02-07 2024-02-07 Anti-counterfeiting verification method, device and storage medium based on quantum invisible transmission state

Publications (2)

Publication Number Publication Date
CN117729053A CN117729053A (en) 2024-03-19
CN117729053B true CN117729053B (en) 2024-05-03

Family

ID=90205626

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410172800.5A Active CN117729053B (en) 2024-02-07 2024-02-07 Anti-counterfeiting verification method, device and storage medium based on quantum invisible transmission state

Country Status (1)

Country Link
CN (1) CN117729053B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2758356C1 (en) * 2020-08-10 2021-10-28 Общество с ограниченной ответственностью "БЛОКЧЕЙН ТЕХНОЛОГИИ" Method for determining the authenticity of objects of art
CN114169476A (en) * 2021-12-08 2022-03-11 魏华明 Quantum anti-counterfeiting tracing method and system based on security chip
CN114683688A (en) * 2020-12-28 2022-07-01 佛山希望数码印刷设备有限公司 Quantum cloud code jet printing method and system
CN116091087A (en) * 2023-02-01 2023-05-09 福州云尚信息技术有限公司 Quantum encryption anti-counterfeiting tracing method and terminal based on blockchain and NFC

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11496225B2 (en) * 2019-12-06 2022-11-08 At&T Intellectual Property I, L.P. System and method for network distribution of quantum entanglement
WO2023097026A2 (en) * 2021-11-23 2023-06-01 Strong Force TX Portfolio 2018, LLC Transaction platforms where systems include sets of other systems
US11818257B1 (en) * 2022-04-27 2023-11-14 Cisco Technology, Inc. Systems and methods for providing user authentication for quantum-entangled communications in a cloud environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2758356C1 (en) * 2020-08-10 2021-10-28 Общество с ограниченной ответственностью "БЛОКЧЕЙН ТЕХНОЛОГИИ" Method for determining the authenticity of objects of art
CN114683688A (en) * 2020-12-28 2022-07-01 佛山希望数码印刷设备有限公司 Quantum cloud code jet printing method and system
CN114169476A (en) * 2021-12-08 2022-03-11 魏华明 Quantum anti-counterfeiting tracing method and system based on security chip
CN116091087A (en) * 2023-02-01 2023-05-09 福州云尚信息技术有限公司 Quantum encryption anti-counterfeiting tracing method and terminal based on blockchain and NFC

Also Published As

Publication number Publication date
CN117729053A (en) 2024-03-19

Similar Documents

Publication Publication Date Title
CN101529791B (en) The method and apparatus for providing certification and secrecy using the low device of complexity
CN109478280A (en) Method and system for realizing block chain
US20200106600A1 (en) Progressive key encryption algorithm
CN108780548A (en) Using Elliptic Curve Cryptography for Personal Device Security to Share Secrets
US11962688B2 (en) Quantum tokens
CN111162913B (en) Arbitration quantum signature method based on glass color sampling random unitary operation
CN109074576A (en) Implementing logic gate functions using blockchains
JP2018513597A (en) Method and apparatus for providing a universal, deterministic reproducible representation of cryptographic key pairs for all SKUs, shipping cartons and items
CN108833117B (en) Private key storage and reading method and device and hardware equipment
CN109583215A (en) It is a kind of to handle the method and device of collage-credit data, block chain data-sharing systems
Khalil et al. A novel RFID-based anti-counterfeiting scheme for retail environments
CN106452768A (en) Quantum blind signature message authenticity protection method
Aaronson et al. Quantum money
CN110620764B (en) Anti-quantum computation RFID authentication method and system based on asymmetric key pool and secondary surplus
CN117729053B (en) Anti-counterfeiting verification method, device and storage medium based on quantum invisible transmission state
CN113779594B (en) Block chain-based data distribution sharing method and system
Feng et al. Quantum blind signature scheme for supply chain financial
CN104091191A (en) Fast and effective anti-fake identifying method
US11134112B2 (en) Secure multi-party random bit generation
Meng et al. An Efficient Authentication Protocol for Brand Cosmetics Anti-Counterfeiting System
JP3583987B2 (en) Electronic authentication method and electronic authentication device
CN110620659B (en) Anti-quantum computation RFID authentication method and system based on symmetric key pool and secondary surplus
CN117371051A (en) Data matching method, device, computer equipment and storage medium
CN116722974A (en) Bank data transmission method and system
Caponetto et al. A new chaotic system for the authentication and electronic certification procedures

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant