Communication method and device of RFID system, equipment, storage medium and program product

Through custom rotation operations and logical operations, the identifier and private key of the RFID tag are encrypted, combined with the pseudo-random number generator, the problem of low security in communication between the RFID tag and the RFID reader and writer is solved, improving security and reducing the risk of information leakage.

CN120409518APending Publication Date: 2025-08-01FOSHAN POWER SUPPLY BUREAU GUANGDONG POWER GRID
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510527717.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The communication between RFID tags and RFID readers and writers is relatively safe and there is a risk of information leakage.

Method used

Using custom rotation operations, logical operations and semi-flip operations, combined with pseudo-random number generator, the identifier and private key of the RFID tag are encrypted through the random numbers generated by the RFID reader and writer, and the encrypted data is generated and transmitted to the cloud server.

Benefits of technology

Improves communication security between RFID tags and RFID readers and writers, reduces the risk of information leakage, applies to resource-constrained RFID tags and reduces communication overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120409518A_ABST
    Figure CN120409518A_ABST
Patent Text Reader

Abstract

The invention relates to a communication method and device of an RFID system, equipment, a storage medium and a program product. The method comprises the following steps: the RFID tag encrypts a first identifier and a first private key of the RFID tag based on a first rotation operation, a second rotation operation, a logical operation operation and a half-flip operation which are self-defined, and a first random number and a second random number which are generated by an RFID reader-writer to obtain first encrypted data and second encrypted data, and then the first encrypted data and the second encrypted data are transmitted to the cloud server through the RFID reader-writer, so that the security of communication between the RFID tag and the RFID reader-writer is improved, and the risk of communication content leakage between the RFID tag and the RFID reader-writer is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of radio frequency communication technologies, and particularly to a communication method, device, equipment, storage medium and program product for an RFID system. Background Art

[0002] With the rapid development of Internet of Things technologies, Radio Frequency Identification (RFID) technology has become one of the core technologies for automatic identification and data capture. An RFID system usually consists of RFID tags, RFID readers and a backend database. Sensitive information (such as identification information for identifying the identity of an RFID tag) is stored in the RFID tag, and communication is carried out between the RFID tag and the backend database through the RFID reader.

[0003] Currently, the communication between an RFID tag and an RFID reader is usually achieved through a wireless channel. However, the security of this wireless channel is relatively low, so there is a risk of information leakage in the communication content between the RFID tag and the RFID reader. Summary of the Invention

[0004] Based on this, it is necessary to provide a communication method, device, equipment, storage medium and program product for an RFID system that can improve the security of communication between an RFID tag and an RFID reader for the above technical problems.

[0005] In a first aspect, the present application provides a communication method for an RFID system. The RFID system includes an RFID tag, an RFID reader and a cloud server. The method is applied to the RFID tag and includes:

[0006] Obtain a first random number and a second random number sent by the RFID reader;

[0007] Perform a first rotation operation on a first identifier of the RFID tag based on the rank of a first private key of the RFID tag to adjust the positions of characters in the first identifier to obtain a first result;

[0008] Determine the first logical operation result of the first random number and the second random number, perform a half-flipping operation on the first data to obtain a first half-flipping result, and perform a second rotation operation on the first half-flipping result based on the second random number to obtain a first encrypted data; the performing the half-flipping operation on the first data includes performing a second rotation operation on the first half of the characters of the first identifier based on the rank of the first identifier to obtain a second result, and performing a first rotation operation on the second half of the characters of the first logical operation result based on the zero-degree of the first logical operation result to obtain a third result, performing an exclusive OR operation on the second result and the third result to obtain the first half-flipping result; the first data includes the first identifier and the first logical operation result;

[0009] Determine the second logical operation result of the first random number and the first private key of the tag, perform a half-flipping operation on the second data to obtain a second half-flipping result, and perform a half-flipping operation on the third data to obtain a second encrypted data; the second data includes the second logical operation result and the current index of the RFID tag, and the third data includes the second half-flipping result and the second random number;

[0010] Send the current index, the first encrypted data, the second encrypted data, the first random number, and the second random number to the cloud server through the RFID reader / writer.

[0011] In one embodiment, the method further includes:

[0012] Obtain the third encrypted data and the fourth encrypted data sent by the cloud server through the RFID reader / writer;

[0013] Determine a third random number according to the third encrypted data, the first random number, and the second random number;

[0014] Determine a reconstructed index and a fifth encrypted data according to the third random number, the first identifier, the first private key, the first random number, and the second random number;

[0015] When it is determined that the fourth encrypted data is the same as the fifth encrypted data, determine that the cloud server is a secure server, and update the current index based on the reconstructed index.

[0016] In one embodiment, the determining the reconstructed index and the fifth encrypted data according to the third random number, the first identifier, the first private key, the first random number, and the second random number includes:

[0017] Perform a half-flipping operation on the first random number and the first identifier to obtain a third half-flipping result, perform a half-flipping operation on the third half-flipping result and the first private key to obtain a fourth half-flipping result, and perform a first rotation operation on the fourth half-flipping result based on the rank of the second random number to obtain the reconstructed index;

[0018] Perform a half-flipping operation on the reconstructed index and the first random number to obtain a fifth half-flipping result, perform a second rotation operation on the fifth half-flipping result based on the rank of the first private key to obtain a fourth result, perform a first rotation operation on the fourth result based on the rank of the second random number to obtain a fifth result, and perform a half-flipping operation on the fifth result and the third random number to obtain the fifth encrypted data.

[0019] In a second aspect, the present application further provides a communication method for an RFID system. The RFID system includes an RFID tag, an RFID reader, and a cloud server. The method is applied to the cloud server and includes:

[0020] Receive the current index, the first encrypted data, the second encrypted data, the first random number, and the second random number sent by the RFID tag through the RFID reader, and match the current index with the indexes stored in the database of the cloud server;

[0021] If there is an index matching the current index stored in the database, obtain the second identifier and the second private key of the RFID tag corresponding to the current index stored in the database;

[0022] Perform a first rotation operation on the second identifier based on the rank of the second private key to adjust the positions of the characters in the second identifier to obtain a sixth result;

[0023] Determine the first logical operation result of the first random number and the second random number, perform a half-flipping operation on the fourth data to obtain a sixth half-flipping result, and perform a second rotation operation on the sixth half-flipping result based on the second random number to obtain a sixth encrypted data; the performing a half-flipping operation on the fourth data includes performing a second rotation operation on the first half of the characters of the second identifier based on the rank of the second identifier to obtain a seventh result, and performing a first rotation operation on the second half of the characters of the first logical operation result based on the zero-degree of the first logical operation result to obtain a third result, and performing an exclusive OR operation on the seventh result and the third result to obtain the sixth half-flipping result; the fourth data includes the second identifier and the first logical operation result;

[0024] Determine the third logical operation result of the first random number and the second private key, perform a half-flipping operation on the fifth data to obtain a seventh half-flipping result, and perform a half-flipping operation on the sixth data to obtain a seventh encrypted data; the fifth data includes the third logical operation result and the current index of the RFID tag, and the sixth data includes the seventh half-flipping result and the second random number;

[0025] When the sixth encrypted data is the same as the first encrypted data and the seventh encrypted data is the same as the second encrypted data, determine that the RFID tag is a secure tag.

[0026] In one embodiment, when the RFID tag is a secure tag, the method further includes:

[0027] Determine third encrypted data according to the generated third random number, the first random number, the second random number, and the second identifier;

[0028] Determine a reconstruction index and fourth encrypted data according to the first random number, the second random number, the third random number, the second identifier, and the second private key;

[0029] Send the third encrypted data and the fourth encrypted data to the RFID tag through the RFID reader / writer.

[0030] In one embodiment, the determining the reconstruction index and the fourth encrypted data according to the first random number, the second random number, the third random number, the second identifier, and the second private key includes:

[0031] Perform a semi-flipping operation on the first random number and the second identifier to obtain an eighth semi-flipping result, perform a semi-flipping operation on the eighth semi-flipping result and the second private key to obtain a ninth semi-flipping result, and perform a first rotation operation on the ninth semi-flipping result based on the rank of the second random number to obtain the reconstruction index;

[0032] Perform a semi-flipping operation on the reconstruction index and the first random number to obtain a tenth semi-flipping result, perform a second rotation operation on the tenth semi-flipping result based on the rank of the second private key to obtain an eighth result, perform a first rotation operation on the eighth result based on the rank of the second random number to obtain a ninth result, and perform a semi-flipping operation on the ninth result and the third random number to obtain the fourth encrypted data.

[0033] In a third aspect, the present application further provides a communication device for an RFID system. The device includes:

[0034] A first acquisition module, configured to acquire the first random number and the second random number sent by the RFID reader / writer;

[0035] A first rotation module, configured to perform a first rotation operation on the first identifier of the RFID tag based on the rank of the first private key of the RFID tag to adjust the positions of the characters in the first identifier to obtain a first result;

[0036] A first determination module, configured to determine a first logical operation result of the first random number and the second random number, perform a half-flipping operation on the first data to obtain a first half-flipping result, and perform a second rotation operation on the first half-flipping result based on the second random number to obtain first encrypted data; the performing a half-flipping operation on the first data includes performing a second rotation operation on the first half of the characters of the first identifier based on the rank of the first identifier to obtain a second result, and performing a first rotation operation on the second half of the characters of the first logical operation result based on the zero-degree of the first logical operation result to obtain a third result, and performing an exclusive OR operation on the second result and the third result to obtain the first half-flipping result; the first data includes the first identifier and the first logical operation result;

[0037] A second determination module, configured to determine a second logical operation result of the first random number and the first private key of the tag, perform a half-flipping operation on the second data to obtain a second half-flipping result, and perform a half-flipping operation on the third data to obtain second encrypted data; the second data includes the second logical operation result and the current index of the RFID tag, and the third data includes the second half-flipping result and the second random number;

[0038] A first sending module, configured to send the current index, the first encrypted data, the second encrypted data, the first random number, and the second random number to the cloud server through the RFID reader / writer.

[0039] In a fourth aspect, the present application further provides a communication device of an RFID system. The device includes:

[0040] A receiving module, configured to receive the current index, the first encrypted data, the second encrypted data, the first random number, and the second random number sent by the RFID tag through the RFID reader / writer, and match the current index with the indexes stored in the database of the cloud server;

[0041] A second obtaining module, configured to, if there is an index matching the current index stored in the database, obtain a second identifier and a second private key of the RFID tag stored corresponding to the current index from the database;

[0042] A second rotation module, configured to perform a first rotation operation on the second identifier based on the rank of the second private key to adjust the positions of the characters in the second identifier to obtain a sixth result;

[0043] A third determination module, configured to determine a first logical operation result of the first random number and the second random number, perform a semi-flipping operation on a fourth data to obtain a sixth semi-flipping result, and perform a second rotation operation on the sixth semi-flipping result based on the second random number to obtain a sixth encrypted data; the performing a semi-flipping operation on the fourth data includes performing a second rotation operation on the first half of the second identifier characters based on the rank of the second identifier to obtain a seventh result, and performing a first rotation operation on the second half of the first logical operation result characters based on the zero-degree of the first logical operation result to obtain a third result, performing an exclusive OR operation on the seventh result and the third result to obtain the sixth semi-flipping result; the fourth data includes the second identifier and the first logical operation result;

[0044] A fourth determination module, configured to determine a third logical operation result of the first random number and the second private key, perform a semi-flipping operation on a fifth data to obtain a seventh semi-flipping result, and perform a semi-flipping operation on a sixth data to obtain a seventh encrypted data; the fifth data includes the third logical operation result and the current index of the RFID tag, and the sixth data includes the seventh semi-flipping result and the second random number;

[0045] A fifth determination module, configured to determine that the RFID tag is a secure tag when the sixth encrypted data is the same as the first encrypted data and the seventh encrypted data is the same as the second encrypted data.

[0046] In a fifth aspect, the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the steps of any of the above methods are implemented.

[0047] In a sixth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0048] The communication method, device, equipment, storage medium, and program product of the above RFID system obtain a first random number and a second random number sent by an RFID reader, perform a first rotation operation on a first identifier of an RFID tag based on the rank of a first private key of the RFID tag to adjust the positions of characters in the first identifier to obtain a first result, determine a first logical operation result of the first random number and the second random number, perform a semi-flipping operation on first data to obtain a first semi-flipped result, and perform a second rotation operation on the first semi-flipped result based on the second random number to obtain first encrypted data, determine a second logical operation result of the first random number and the first private key of the tag, perform a semi-flipping operation on second data to obtain a second semi-flipped result, and perform a semi-flipping operation on third data to obtain second encrypted data, and send a current index, the first encrypted data, the second encrypted data, the first random number, and the second random number to a cloud server through the RFID reader. Since in the embodiments of the present application, the RFID tag encrypts a first identifier and a first private key of the RFID tag based on custom first rotation operation, second rotation operation, logical operation, and semi-flipping operation, and first random number and second random number generated by the RFID reader to obtain first encrypted data and second encrypted data, and then transmits the first encrypted data and the second encrypted data to the cloud server through the RFID reader, the security of communication between the RFID tag and the RFID reader is improved, and the risk of leakage of communication content between the RFID tag and the RFID reader is reduced. Description of the Drawings

[0049] Figure 1 is an application environment diagram of a communication method of an RFID system provided by an embodiment of the present application;

[0050] Figure 2 is a flowchart of a communication method of an RFID system provided by an embodiment of the present application;

[0051] Figure 3 is a flowchart of a cloud server authentication method provided by an embodiment of the present application;

[0052] Figure 4 is a flowchart of a method for determining a reconstructed index and fifth encrypted data provided by an embodiment of the present application;

[0053] Figure 5 is a flowchart of an RFID system authentication method provided by an embodiment of the present application;

[0054] Figure 6 is a flowchart of another RFID system authentication method provided by an embodiment of the present application;

[0055] Figure 7It is a schematic flowchart of another communication method of the RFID system provided by an embodiment of the present application;

[0056] Figure 8 It is a schematic flowchart of an RFID tag authentication method provided by an embodiment of the present application;

[0057] Figure 9 It is a schematic flowchart of a method for determining a reconstructed index and fourth encrypted data provided by an embodiment of the present application;

[0058] Figure 10 It is a structural block diagram of a communication device of an RFID system provided by an embodiment of the present application;

[0059] Figure 11 It is a structural block diagram of another communication device of the RFID system provided by an embodiment of the present application. Detailed implementation manners

[0060] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0061] With the rapid development of the Internet of Things technology, radio frequency identification (RFID) technology has become one of the core technologies for automatic identification and data capture. An RFID system usually consists of an RFID tag, an RFID reader / writer, and a backend database. Sensitive information (such as identification information for identifying the identity of the RFID tag) is stored in the RFID tag, and communication is carried out with the backend database through the RFID reader / writer.

[0062] Currently, the communication between the RFID tag and the RFID reader / writer is usually realized through a wireless channel, but the security of this wireless channel is relatively low. Therefore, there is a risk of information leakage in the communication content between the RFID tag and the RFID reader / writer.

[0063] The gas pressure control method of the ventilator provided by the embodiment of the present application can be applied to, for example, Figure 1 the application environment shown. Figure 1 It is an application environment diagram of a communication method of an RFID system provided by an embodiment of the present application. The communication method of the RFID system provided by the embodiment of the present application can be applied to, for example, Figure 1 the application environment shown. Among them, the RFID tag communicates with the RFID reader / writer through a wireless channel, the RFID tag communicates with the cloud server through the RFID reader / writer, and the RFID reader / writer and the cloud server communicate through a wireless channel with higher security.

[0064] For a clearer introduction to the solutions in the embodiments of this application, the rank, nullity, cyclic left rotation operation, cyclic right rotation operation, and semi-flipping operation involved in the embodiments of this application are described herein:

[0065] 1. Rank and nullity

[0066] The number of 1s in a string is defined as the rank of the string, and the number of 0s in the string is defined as the nullity of the string.

[0067] 2. Cyclic left rotation operation and cyclic right rotation operation

[0068] The cyclic left rotation operation includes a left rotation operation based on rank and a left rotation operation based on nullity. The cyclic right rotation operation includes a right rotation operation based on rank and a right rotation operation based on nullity.

[0069] Suppose and are two 8-bit strings: , . Then, performing a left rotation operation on based on the rank of means rotating left by bits. This left rotation operation can be represented as:

[0070]

[0071] Similarly, performing a right rotation operation on based on the rank of can be represented as:

[0072]

[0073] It should be noted that is the above-mentioned , that is, performing a left rotation operation on based on the nullity of .

[0074] 3. Semi-flipping operation

[0075] Performing a semi-flipping operation on and can be represented as . The specific calculation process of the semi-flipping operation is defined as follows:

[0076]

[0077] Among them, is obtained by simply performing a NOT operation on the first half of the characters of , is obtained by simply performing a NOT operation on the second half of the characters of , represents an exclusive OR operation.

[0078] In one embodiment, as shown in Figure 2 , Figure 2 is a schematic flow chart of a communication method for an RFID system provided by an embodiment of the present application. This method can be applied to the RFID tag in Figure 1 , and this method includes the following steps:

[0079] S201, obtain the first random number and the second random number sent by the RFID reader.

[0080] In one embodiment, the RFID reader can generate two pseudo-random numbers with a preset number of digits, namely the first random number and the second random number, through a pseudo-random number generator (PRNG(·)), and then send the first random number and the second random number to the RFID tag. Then, the RFID tag can receive the first random number and the second random number sent by the RFID reader.

[0081] Exemplarily, the RFID reader can generate two pseudo-random numbers with L digits, namely the first random number and the second random number .

[0082] S202, perform a first rotation operation on the first identifier of the RFID tag based on the rank of the first private key of the RFID tag to adjust the positions of the characters in the first identifier to obtain a first result.

[0083] Optionally, the RFID tag internally stores the first private key of the RFID tag , the first identifier TID of the RFID tag, and the current index IDS of the RFID tag. Among them, the first identifier TID of the RFID tag is the unique static tag identifier of the RFID tag, and the current index IDS is an index pseudonym used to retrieve the first private key of the RFID tag , the first identifier TID of the RFID tag, from the database.

[0084] Similarly, the database of the cloud server communicating with the RFID tag also stores the second private key of the RFID tag , the second identifier of the RFID tag and the current index of the RFID tag .

[0085] In the embodiment of the present application, the first rotation operation is the above-mentioned left rotation operation, and the second rotation operation is the above-mentioned right rotation operation. Then, based on the rank of the first private key of the RFID tag perform a first rotation operation on the first identifier TID of the RFID tag, and the first result can be expressed as: .

[0086] S203. Determine the first logical operation result of the first random number and the second random number, perform a half-flipping operation on the first data to obtain a first half-flipping result, and perform a second rotation operation on the first half-flipping result based on the second random number to obtain a first encrypted data.

[0087] Among them, performing a half-flipping operation on the first data includes performing a second rotation operation on the first half of the characters of the first identifier based on the rank of the first identifier to obtain a second result, and performing a first rotation operation on the second half of the characters of the first logical operation result based on the zero-degree of the first logical operation result to obtain a third result, performing an exclusive OR operation on the second result and the third result to obtain a first half-flipping result. The first data includes the first identifier and the first logical operation result.

[0088] In the embodiment of the present application, an exclusive OR operation can be performed on the first random number and the second random number to obtain a first logical operation result , and then perform a half-flipping operation on the first identifier TID and the first logical operation result to obtain a first half-flipping result , and finally perform a right rotation operation on the first half-flipping result based on the rank of the second random number to obtain a first encrypted data :

[0089]

[0090] S204. Determine the second logical operation result of the first random number and the first private key of the tag, perform a half-flipping operation on the second data to obtain a second half-flipping result, and perform a half-flipping operation on the third data to obtain a second encrypted data.

[0091] Among them, the second data includes the second logical operation result and the current index of the RFID tag, and the third data includes the second half-flipping result and the second random number.

[0092] In the embodiment of the present application, the first random number and the first private key of the tag can be subjected to an exclusive OR operation to obtain a second logical operation result , and then perform a half-flipping operation on the second logical operation result and the current index IDS of the RFID tag to obtain a second half-flipping result , finally, perform a semi-flipping operation on the second semi-flipping result and the second random number to obtain the second encrypted data :

[0093]

[0094] S205, send the current index, the first encrypted data, the second encrypted data, the first random number, and the second random number to the cloud server through the RFID reader / writer.

[0095] In one embodiment, after generating the first encrypted data and the second encrypted data , the RFID tag can send the first encrypted data , the second encrypted data , the current index IDS of the RFID tag, the first random number and the second random number to the RFID reader / writer. After receiving the first encrypted data , the second encrypted data , the current index IDS of the RFID tag, the first random number and the second random number , the RFID reader / writer sends the first encrypted data , the second encrypted data , the current index IDS of the RFID tag, the first random number and the second random number to the cloud server through a secure communication channel.

[0096] Optionally, after receiving the first encrypted data , the second encrypted data , the current index IDS of the RFID tag, the first random number and the second random number , the cloud server can first match the current index IDS of the RFID tag with the current index of the RFID tag stored in the database of the cloud server . If there is a match with IDS stored in the database of the cloud server , then use IDS as the index to obtain the second private key of the RFID tag stored corresponding to IDS in the database of the cloud server and the second identifier , and then calculate the sixth encrypted data and the seventh encrypted data using the same method as the method for calculating A and B above:

[0097]

[0098]

[0099] In one embodiment, the cloud server calculates the sixth encrypted data and the seventh encrypted data After that, it can verify whether the first encrypted data is equal to the sixth encrypted data and whether the second encrypted data is equal to the seventh encrypted data If and , the cloud server can authenticate the RFID tag, that is, the cloud server can determine that the RFID tag is a secure tag.

[0100] In the embodiment of the present application, the first random number and the second random number sent by the RFID reader are obtained, the first identifier of the RFID tag is subjected to a first rotation operation based on the rank of the first private key of the RFID tag to adjust the positions of the characters in the first identifier to obtain a first result, the first logical operation result of the first random number and the second random number is determined, the first data is subjected to a half-flipping operation to obtain a first half-flipping result, and the first half-flipping result is subjected to a second rotation operation based on the second random number to obtain the first encrypted data, the second logical operation result of the first random number and the first private key of the tag is determined, the second data is subjected to a half-flipping operation to obtain a second half-flipping result, and the third data is subjected to a half-flipping operation to obtain the second encrypted data. The current index, the first encrypted data, the second encrypted data, the first random number, and the second random number are sent to the cloud server through the RFID reader. Since in the embodiment of the present application, the RFID tag encrypts the first identifier and the first private key of the RFID tag based on the custom first rotation operation, second rotation operation, logical operation operation, and half-flipping operation, and the first random number and the second random number generated by the RFID reader to obtain the first encrypted data and the second encrypted data, and then transmits the first encrypted data and the second encrypted data to the cloud server through the RFID reader, the security of the communication between the RFID tag and the RFID reader is improved, and the risk of leakage of the communication content between the RFID tag and the RFID reader is reduced.

[0101] In addition, in the embodiment of the present application, lightweight bit operations (circular left rotation operation, circular right rotation operation, half-flipping operation, and exclusive OR operation) and a pseudo-random number generator (PRNG) are adopted, avoiding complex encryption algorithms, significantly reducing the computational burden of the RFID tag, and being better applicable to resource-constrained RFID tags.

[0102] Moreover, the communication method of the RFID system in the embodiments of the present application only requires 4 rounds of communication to complete the authentication process, with short message lengths and few communication rounds, significantly reducing the communication overhead and being applicable to low-cost RFID systems. At the same time, each RFID tag only needs to store 3L bits of data (TID, and IDS), and the cloud server stores 5NL bits of data (N is the number of tags), having low storage requirements and being applicable to large-scale Internet of Things application scenarios.

[0103] It should be noted that the embodiments of the present application are implemented in a scenario where the communication channel between the RFID tag and the RFID reader is insecure, the communication channel between the RFID reader and the cloud server is secure, and the cloud server is an untrusted entity. Among them, an insecure communication channel means that this communication channel is easily attacked by an attacker, and an untrusted entity means an entity whose information is easily accessed by an attacker.

[0104] Refer to Figure 3 , Figure 3 which is a schematic flowchart of a cloud server authentication method provided by the embodiments of the present application. On the basis of the above embodiments, the method further includes the following steps:

[0105] S301, obtain the third encrypted data and the fourth encrypted data sent by the cloud server through the RFID reader.

[0106] In one embodiment, when the RFID tag of the cloud server is a security tag, the cloud server can generate an L-bit pseudo-random number, that is, the third random number, through a pseudo-random number generator (PRNG(·)) , and then determine the third encrypted data according to the generated third random number , the first random number , the second random number and the second identifier :

[0107]

[0108] Then, the cloud server can determine the reconstruction index based on the first random number , the second random number , the second private key and the second identifier , and store the reconstruction index as the new current index in the database of the cloud server:

[0109]

[0110] After the cloud server calculates the reconstruction index After that, based on the first random number , the second random number , the third random number , the second private key and the reconstruction index determine the fourth encrypted data , and send the third encrypted data and the fourth encrypted data to the RFID tag through the RFID reader:

[0111]

[0112] In the embodiments of the present application, the RFID tag can receive the third encrypted data sent by the cloud server through the RFID reader and the fourth encrypted data .

[0113] S302. Determine the third random number according to the third encrypted data, the first random number and the second random number.

[0114] Exemplarily, after the RFID tag receives the third encrypted data and the fourth encrypted data , it can determine the third random number according to the third encrypted data , the first random number and the second random number :

[0115]

[0116] S303. Determine the reconstruction index and the fifth encrypted data according to the third random number, the first identifier, the first private key, the first random number and the second random number.

[0117] Exemplarily, the RFID tag can determine the reconstruction index based on the first random number , the second random number , the first private key and the first identifier :

[0118]

[0119] It should be noted that since the cloud server has authenticated the RFID tag as a secure tag, the reconstruction index calculated by the cloud server should be the same as the reconstruction index

[0120] calculated by the RFID tag. Optionally, after calculating the reconstruction index After that, the RFID tag can be based on the first random number , the second random number , the third random number , the first private key and the reconstruction index to determine the fifth encrypted data :

[0121]

[0122] S304. When it is determined that the fourth encrypted data is the same as the fifth encrypted data, determine that the cloud server is a secure server, and update the current index based on the reconstruction index.

[0123] Optionally, after calculating the fifth encrypted data , the RFID tag can verify the fifth encrypted data and the fourth encrypted data . When it is determined that the fifth encrypted data is the same as the fourth encrypted data , that is, in the case of , determine that the cloud server is a secure server, and store the reconstruction index as the new current index in the RFID tag.

[0124] In one embodiment, in addition to storing the current index IDS, the RFID tag can also store the historical index of the RFID tag. For example, after the RFID tag determines that the cloud server is a secure server, it can first store the current index IDS as the historical index , and then store the reconstruction index as the new current index in the RFID tag, so as to be able to retain the update record of the index pseudonym of the RFID tag, which is convenient for viewing and tracing back the historical update content.

[0125] Similarly, the historical index of the RFID tag can also be stored in the database of the cloud server . Then, after the cloud server authenticates the RFID tag as a secure tag, it can first store the current index as the historical index , and then store the reconstruction index as the new current index in the database of the cloud server, so as to be able to retain the update record of the index pseudonym of the RFID tag in the cloud server, which is convenient for viewing and tracing back the historical update content.

[0126] In an embodiment of the present application, third encrypted data and fourth encrypted data sent by a cloud server through an RFID reader are obtained. According to the third encrypted data, the first random number, and the second random number, a third random number is determined. According to the third random number, the first identifier, the first private key, the first random number, and the second random number, a reconstruction index and fifth encrypted data are determined. When it is determined that the fourth encrypted data is the same as the fifth encrypted data, it is determined that the cloud server is a secure server, and the current index is updated based on the reconstruction index. Thus, the cloud server can be authenticated based on the encrypted data, improving the security of cloud server authentication. Moreover, the index pseudonym of the RFID tag is dynamically updated, further enhancing the security and untraceability of the transmission of the identity information (TID) and location information of the RFID tag.

[0127] Refer to Figure 4 , Figure 4 FIG. is a schematic flowchart of a method for determining a reconstruction index and fifth encrypted data provided by an embodiment of the present application. This embodiment relates to a possible implementation manner of determining a reconstruction index and fifth encrypted data according to a third random number, a first identifier, a first private key, a first random number, and a second random number. On the basis of the above embodiment, S303 described above includes the following steps:

[0128] S401, perform a semi-flipping operation on the first random number and the first identifier to obtain a third semi-flipping result, perform a semi-flipping operation on the third semi-flipping result and the first private key to obtain a fourth semi-flipping result, and perform a first rotation operation on the fourth semi-flipping result based on the rank of the second random number to obtain a reconstruction index.

[0129] In one embodiment, the first random number and the first identifier TID can be subjected to a semi-flipping operation to obtain a third semi-flipping result , and then a semi-flipping operation is performed on the third semi-flipping result and the first private key to obtain a fourth semi-flipping result . Finally, a left rotation operation is performed on the fourth semi-flipping result based on the rank of the second random number to obtain a reconstruction index :

[0130]

[0131] S402, perform a semi-flipping operation on the reconstruction index and the first random number to obtain a fifth semi-flipping result, perform a second rotation operation on the fifth semi-flipping result based on the rank of the first private key to obtain a fourth result, perform a first rotation operation on the fourth result based on the rank of the second random number to obtain a fifth result, and perform a semi-flipping operation on the fifth result and the third random number to obtain fifth encrypted data.

[0132] Optionally, after calculating the reconstruction index After that, the reconstructed index and the first random number are subjected to a semi-flipping operation to obtain a fifth semi-flipping result . Then, based on the rank of the first private key , a right rotation operation is performed on the fifth semi-flipping result to obtain a fourth result . Then, based on the rank of the second random number , a left rotation operation is performed on the fourth result to obtain a fifth result . And a semi-flipping operation is performed on the fifth result and the third random number to obtain a fifth encrypted data :

[0133]

[0134] In the embodiment of the present application, a semi-flipping operation is performed on the first random number and the first identifier to obtain a third semi-flipping result, a semi-flipping operation is performed on the third semi-flipping result and the first private key to obtain a fourth semi-flipping result, and a first rotation operation is performed on the fourth semi-flipping result based on the rank of the second random number to obtain a reconstructed index; a semi-flipping operation is performed on the reconstructed index and the first random number to obtain a fifth semi-flipping result, a second rotation operation is performed on the fifth semi-flipping result based on the rank of the first private key to obtain a fourth result, a first rotation operation is performed on the fourth result based on the rank of the second random number to obtain a fifth result, and a semi-flipping operation is performed on the fifth result and the third random number to obtain a fifth encrypted data, so that the cloud server can be authenticated based on the encrypted data, the security of cloud server authentication is improved, and the index pseudonym of the RFID tag is dynamically updated, further improving the security and untraceability of transmitting the identity information (TID) and location information of the RFID tag.

[0135] Referring to Figures 5 - 6 , Figure 5 is a schematic flowchart of a method for authenticating an RFID system provided by an embodiment of the present application Figure 6 is a schematic flowchart of another method for authenticating an RFID system provided by an embodiment of the present application. The method includes the following steps:

[0136] S501, the RFID reader generates a first random number and a second random number, and sends the first random number and the second random number to the RFID tag.

[0137] S502, the RFID tag encrypts the first identifier and the first private key of the RFID tag based on the first random number, the second random number, and the current index of the RFID tag to obtain a first encrypted data and a second encrypted data, and sends the current index, the first encrypted data, the second encrypted data, the first random number, and the second random number to the cloud server through the RFID reader.

[0138] S503. If there is an index in the database of the cloud server that matches the current index, the cloud server determines the sixth encrypted data and the seventh encrypted data based on the first random number, the second random number, and the current index of the RFID tag.

[0139] S504. In the case where the sixth encrypted data is the same as the first encrypted data and the seventh encrypted data is the same as the second encrypted data, the cloud server determines that the RFID tag is a secure tag and calculates a reconstructed index to update the current index.

[0140] S505. The cloud server determines the third encrypted data and the fourth encrypted data according to the generated third random number, the first random number, the second random number, the second identifier, and the second private key, and sends the third encrypted data and the fourth encrypted data to the RFID tag through the RFID reader / writer.

[0141] S506. The RFID tag determines the third random number according to the third encrypted data, and determines the reconstructed index and the fifth encrypted data according to the third random number, the first identifier, the first private key, the first random number, and the second random number.

[0142] S507. When it is determined that the fourth encrypted data is the same as the fifth encrypted data, it is determined that the cloud server is a secure server, and the current index is updated based on the reconstructed index.

[0143] Based on the same inventive concept, the embodiment of the present application further provides a communication method for an RFID system applied to a cloud server. The implementation solution for solving the problem provided by this method is similar to the implementation solution described in the above method. Therefore, the specific limitations in one or more embodiments of the communication method for an RFID system applied to a cloud server provided below can refer to the limitations on the communication method for an RFID system applied to an RFID tag in the above text, and will not be repeated here.

[0144] In one embodiment, as Figure 7 shown, Figure 7 is a schematic flowchart of another communication method for an RFID system provided by an embodiment of the present application. This method can be applied to Figure 1 the cloud server in, and this method includes the following steps:

[0145] S701. Receive the current index, the first encrypted data, the second encrypted data, the first random number, and the second random number sent by the RFID tag through the RFID reader / writer, and match the current index with the indexes stored in the database of the cloud server;

[0146] S701. If there is an index in the database that matches the current index, obtain the second identifier and the second private key of the RFID tag stored corresponding to the current index from the database.

[0147] S702. Perform a first rotation operation on the second identifier based on the rank of the second private key to adjust the positions of the characters in the second identifier to obtain a sixth result.

[0148] S703. Determine the first logical operation result of the first random number and the second random number, perform a semi-flipping operation on the fourth data to obtain a sixth semi-flipping result, and perform a second rotation operation on the sixth semi-flipping result based on the second random number to obtain a sixth encrypted data.

[0149] Among them, performing a semi-flipping operation on the fourth data includes performing a second rotation operation on the first half of the characters of the second identifier based on the rank of the second identifier to obtain a seventh result, and performing a first rotation operation on the second half of the characters of the first logical operation result based on the zero-degree of the first logical operation result to obtain a third result, and performing an exclusive OR operation on the seventh result and the third result to obtain a sixth semi-flipping result; the fourth data includes the second identifier and the first logical operation result;

[0150] S704. Determine the third logical operation result of the first random number and the second private key, perform a semi-flipping operation on the fifth data to obtain a seventh semi-flipping result, and perform a semi-flipping operation on the sixth data to obtain a seventh encrypted data.

[0151] Among them, the fifth data includes the third logical operation result and the current index of the RFID tag, and the sixth data includes the seventh semi-flipping result and the second random number.

[0152] S705. In the case where the sixth encrypted data is the same as the first encrypted data and the seventh encrypted data is the same as the second encrypted data, determine that the RFID tag is a secure tag.

[0153] Refer to Figure 8 , Figure 8 is a schematic flowchart of a method for authenticating an RFID tag provided by an embodiment of the present application. On the basis of the above embodiment, the method includes the following steps:

[0154] S801. Determine the third encrypted data according to the generated third random number, the first random number, the second random number, and the second identifier.

[0155] S802. Determine the reconstructed index and the fourth encrypted data according to the first random number, the second random number, the third random number, the second identifier, and the second private key.

[0156] S803. Send the third encrypted data and the fourth encrypted data to the RFID tag through an RFID reader / writer.

[0157] Reference Figure 9 , Figure 9 is a schematic flowchart of a method for reconstructing an index and determining fourth encrypted data provided by an embodiment of the present application. Based on the above embodiment, S802 above includes the following steps:

[0158] S901. Perform a semi-flipping operation on the first random number and the second identifier to obtain an eighth semi-flipping result, perform a semi-flipping operation on the eighth semi-flipping result and the second private key to obtain a ninth semi-flipping result, and perform a first rotation operation on the ninth semi-flipping result based on the rank of the second random number to obtain a reconstructed index.

[0159] S902. Perform a semi-flipping operation on the reconstructed index and the first random number to obtain a tenth semi-flipping result, perform a second rotation operation on the tenth semi-flipping result based on the rank of the second private key to obtain an eighth result, perform a first rotation operation on the eighth result based on the rank of the second random number to obtain a ninth result, and perform a semi-flipping operation on the ninth result and the third random number to obtain fourth encrypted data.

[0160] It should be understood that although the steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above-mentioned embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least some of the steps or stages in other steps or other steps.

[0161] Based on the same inventive concept, an embodiment of the present application also provides a communication device for an RFID system for implementing the communication method of the RFID system involved above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the communication device of the RFID system provided below can refer to the limitations on the communication method of the RFID system in the above text, and will not be repeated here.

[0162] In one embodiment, as Figure 10 shown, Figure 10 is a structural block diagram of a communication device of an RFID system provided by an embodiment of the present application. The device 1000 includes:

[0163] A first acquisition module 1001, configured to acquire a first random number and a second random number sent by an RFID reader-writer.

[0164] The first rotation module 1002 is configured to perform a first rotation operation on the first identifier of the RFID tag based on the rank of the first private key of the RFID tag, so as to adjust the positions of the characters in the first identifier to obtain a first result.

[0165] The first determination module 1003 is configured to determine the first logical operation result of the first random number and the second random number, perform a half-flipping operation on the first data to obtain a first half-flipping result, and perform a second rotation operation on the first half-flipping result based on the second random number to obtain first encrypted data; performing a half-flipping operation on the first data includes performing a second rotation operation on the first half of the characters of the first identifier based on the rank of the first identifier to obtain a second result, and performing a first rotation operation on the second half of the characters of the first logical operation result based on the zero-degree of the first logical operation result to obtain a third result, and performing an exclusive OR operation on the second result and the third result to obtain a first half-flipping result; the first data includes the first identifier and the first logical operation result.

[0166] The second determination module 1004 is configured to determine the second logical operation result of the first random number and the first private key of the tag, perform a half-flipping operation on the second data to obtain a second half-flipping result, and perform a half-flipping operation on the third data to obtain second encrypted data; the second data includes the second logical operation result and the current index of the RFID tag, and the third data includes the second half-flipping result and the second random number.

[0167] The first sending module 1005 is configured to send the current index, the first encrypted data, the second encrypted data, the first random number, and the second random number to the cloud server through the RFID reader / writer.

[0168] In one embodiment, the apparatus 1000 further includes:

[0169] The first obtaining module is configured to obtain the third encrypted data and the fourth encrypted data sent by the cloud server through the RFID reader / writer.

[0170] The third random number determination module is configured to determine a third random number according to the third encrypted data, the first random number, and the second random number.

[0171] The reconstructed index and the fifth encrypted data determination module is configured to determine a reconstructed index and fifth encrypted data according to the third random number, the first identifier, the first private key, the first random number, and the second random number.

[0172] The server authentication module is configured to determine that the cloud server is a secure server when determining that the fourth encrypted data is the same as the fifth encrypted data, and update the current index based on the reconstructed index.

[0173] In one embodiment, reconstructing the index and the fifth encrypted data determination module includes:

[0174] The first determination unit is used to perform a half-flip operation on the first random number and the first identifier to obtain a third half-flip result, perform a half-flip operation on the third half-flip result and the first private key to obtain a fourth half-flip result, and perform a first rotation operation on the fourth half-flip result based on the rank of the second random number to obtain a reconstructed index.

[0175] The second determination unit is used to perform a half-flip operation on the reconstructed index and the first random number to obtain a fifth half-flip result, perform a second rotation operation on the fifth half-flip result based on the rank of the first private key to obtain a fourth result, perform a first rotation operation on the fourth result based on the rank of the second random number to obtain a fifth result, and perform a half-flip operation on the fifth result and the third random number to obtain fifth encrypted data.

[0176] In one embodiment, Figure 11 As shown, Figure 11 1100 is a block diagram of another communication device for an RFID system provided in an embodiment of the present application. The device 1100 includes:

[0177] The receiving module 1101 is used to receive the current index, the first encrypted data, the second encrypted data, the first random number and the second random number sent by the RFID tag through the RFID reader, and match the current index with the index stored in the database of the cloud server.

[0178] The second acquisition module 1102 is configured to acquire the second identifier and the second private key of the RFID tag stored corresponding to the current index from the database if an index matching the current index is stored in the database.

[0179] The second rotation module 1103 is configured to perform a first rotation operation on the second identifier based on the rank of the second private key, so as to adjust positions of characters in the second identifier to obtain a sixth result.

[0180] The third determination module 1104 is used to determine the first logical operation result of the first random number and the second random number, perform a half-flip operation on the fourth data to obtain a sixth half-flip result, and perform a second rotation operation on the sixth half-flip result based on the second random number to obtain sixth encrypted data; the half-flip operation on the fourth data includes performing a second rotation operation on the first half of the characters of the second identifier based on the rank of the second identifier to obtain a seventh result, and performing a first rotation operation on the second half of the characters of the first logical operation result based on the zero degree of the first logical operation result to obtain a third result, and performing an XOR operation on the seventh result and the third result to obtain the sixth half-flip result; the fourth data includes the second identifier and the first logical operation result.

[0181] A fourth determination module 1105, configured to determine a third logical operation result of the first random number and the second private key, perform a semi-flipping operation on the fifth data to obtain a seventh semi-flipping result, and perform a semi-flipping operation on the sixth data to obtain a seventh encrypted data; the fifth data includes the third logical operation result and the current index of the RFID tag, and the sixth data includes the seventh semi-flipping result and the second random number.

[0182] A fifth determination module 1106, configured to determine that the RFID tag is a secure tag when the sixth encrypted data is the same as the first encrypted data and the seventh encrypted data is the same as the second encrypted data.

[0183] In one embodiment, the apparatus 1100 further includes:

[0184] A third encrypted data determination module, configured to determine third encrypted data according to the generated third random number, the first random number, the second random number, and the second identifier.

[0185] A reconstructed index and fourth encrypted data determination module, configured to determine a reconstructed index and fourth encrypted data according to the first random number, the second random number, the third random number, the second identifier, and the second private key.

[0186] A sending module, configured to send the third encrypted data and the fourth encrypted data to the RFID tag through an RFID reader / writer.

[0187] In one embodiment, the reconstructed index and fourth encrypted data determination module includes:

[0188] A third determination unit, configured to perform a semi-flipping operation on the first random number and the second identifier to obtain an eighth semi-flipping result, perform a semi-flipping operation on the eighth semi-flipping result and the second private key to obtain a ninth semi-flipping result, and perform a first rotation operation on the ninth semi-flipping result based on the rank of the second random number to obtain a reconstructed index.

[0189] A fourth determination unit, configured to perform a semi-flipping operation on the reconstructed index and the first random number to obtain a tenth semi-flipping result, perform a second rotation operation on the tenth semi-flipping result based on the rank of the second private key to obtain an eighth result, perform a first rotation operation on the eighth result based on the rank of the second random number to obtain a ninth result, and perform a semi-flipping operation on the ninth result and the third random number to obtain fourth encrypted data.

[0190] Each module in the communication apparatus of the above RFID system can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in the form of hardware or independent of the processor, or stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0191] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:

[0192] Obtain a first random number and a second random number sent by an RFID reader-writer;

[0193] Perform a first rotation operation on a first identifier of an RFID tag based on the rank of a first private key of the RFID tag to adjust the positions of characters in the first identifier to obtain a first result;

[0194] Determine a first logical operation result of the first random number and the second random number, perform a semi-flipping operation on first data to obtain a first semi-flipping result, and perform a second rotation operation on the first semi-flipping result based on the second random number to obtain first encrypted data; performing a semi-flipping operation on the first data includes performing a second rotation operation on the first half of the characters of the first identifier based on the rank of the first identifier to obtain a second result, and performing a first rotation operation on the second half of the characters of the first logical operation result based on the zero-degree of the first logical operation result to obtain a third result, and performing an exclusive OR operation on the second result and the third result to obtain the first semi-flipping result; the first data includes the first identifier and the first logical operation result;

[0195] Determine a second logical operation result of the first random number and the first private key of the tag, perform a semi-flipping operation on second data to obtain a second semi-flipping result, and perform a semi-flipping operation on third data to obtain second encrypted data; the second data includes the second logical operation result and the current index of the RFID tag, and the third data includes the second semi-flipping result and the second random number;

[0196] Send the current index, the first encrypted data, the second encrypted data, the first random number, and the second random number to a cloud server through the RFID reader-writer.

[0197] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0198] Obtain third encrypted data and fourth encrypted data sent by the cloud server through the RFID reader-writer;

[0199] Determine a third random number according to the third encrypted data, the first random number, and the second random number;

[0200] Determine a reconstructed index and fifth encrypted data according to the third random number, the first identifier, the first private key, the first random number, and the second random number;

[0201] When it is determined that the fourth encrypted data is the same as the fifth encrypted data, determine that the cloud server is a secure server, and update the current index based on the reconstructed index.

[0202] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0203] Perform a semi-flipping operation on the first random number and the first identifier to obtain a third semi-flipping result, perform a semi-flipping operation on the third semi-flipping result and the first private key to obtain a fourth semi-flipping result, and perform a first rotation operation on the fourth semi-flipping result based on the rank of the second random number to obtain a reconstructed index;

[0204] Perform a semi-flipping operation on the reconstructed index and the first random number to obtain a fifth semi-flipping result, perform a second rotation operation on the fifth semi-flipping result based on the rank of the first private key to obtain a fourth result, perform a first rotation operation on the fourth result based on the rank of the second random number to obtain a fifth result, and perform a semi-flipping operation on the fifth result and the third random number to obtain a fifth encrypted data.

[0205] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0206] Receive the current index, the first encrypted data, the second encrypted data, the first random number, and the second random number sent by the RFID tag through the RFID reader, and match the current index with the index stored in the database of the cloud server;

[0207] If there is a matching index stored in the database with the current index, obtain the second identifier and the second private key of the RFID tag stored corresponding to the current index from the database;

[0208] Perform a first rotation operation on the second identifier based on the rank of the second private key to adjust the positions of the characters in the second identifier to obtain a sixth result;

[0209] Determine the first logical operation result of the first random number and the second random number, perform a semi-flipping operation on the fourth data to obtain a sixth semi-flipping result, and perform a second rotation operation on the sixth semi-flipping result based on the second random number to obtain a sixth encrypted data; Performing a semi-flipping operation on the fourth data includes performing a second rotation operation on the first half of the characters of the second identifier based on the rank of the second identifier to obtain a seventh result, and performing a first rotation operation on the second half of the characters of the first logical operation result based on the zero-degree of the first logical operation result to obtain a third result, and performing an exclusive OR operation on the seventh result and the third result to obtain a sixth semi-flipping result; The fourth data includes the second identifier and the first logical operation result;

[0210] Determine the third logical operation result of the first random number and the second private key, perform a semi-flipping operation on the fifth data to obtain a seventh semi-flipping result, and perform a semi-flipping operation on the sixth data to obtain a seventh encrypted data; The fifth data includes the third logical operation result and the current index of the RFID tag, and the sixth data includes the seventh semi-flipping result and the second random number;

[0211] When the sixth encrypted data is the same as the first encrypted data and the seventh encrypted data is the same as the second encrypted data, determine that the RFID tag is a secure tag.

[0212] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0213] Determine the third encrypted data according to the generated third random number, the first random number, the second random number, and the second identifier;

[0214] Determine the reconstruction index and the fourth encrypted data according to the first random number, the second random number, the third random number, the second identifier, and the second private key;

[0215] Send the third encrypted data and the fourth encrypted data to the RFID tag through the RFID reader / writer.

[0216] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0217] Perform a semi-flipping operation on the first random number and the second identifier to obtain an eighth semi-flipping result, perform a semi-flipping operation on the eighth semi-flipping result and the second private key to obtain a ninth semi-flipping result, and perform a first rotation operation on the ninth semi-flipping result based on the rank of the second random number to obtain the reconstruction index;

[0218] Perform a semi-flipping operation on the reconstruction index and the first random number to obtain a tenth semi-flipping result, perform a second rotation operation on the tenth semi-flipping result based on the rank of the second private key to obtain an eighth result, perform a first rotation operation on the eighth result based on the rank of the second random number to obtain a ninth result, and perform a semi-flipping operation on the ninth result and the third random number to obtain the fourth encrypted data.

[0219] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0220] Obtain the first random number and the second random number sent by the RFID reader / writer;

[0221] Perform a first rotation operation on the first identifier of the RFID tag based on the rank of the first private key of the RFID tag to adjust the positions of the characters in the first identifier to obtain a first result;

[0222] Determine a first logical operation result of a first random number and a second random number, perform a half-flip operation on the first data to obtain a first half-flip result, and perform a second rotation operation on the first half-flip result based on the second random number to obtain first encrypted data; performing the half-flip operation on the first data includes performing a second rotation operation on the first half of the characters of the first identifier based on the rank of the first identifier to obtain a second result, and performing a first rotation operation on the second half of the characters of the first logical operation result based on the zero degree of the first logical operation result to obtain a third result, and performing an exclusive-OR operation on the second result and the third result to obtain the first half-flip result; the first data includes the first identifier and the first logical operation result;

[0223] Determine a second logical operation result of the first random number and the first private key of the tag, perform a half-flip operation on the second data to obtain a second half-flip result, and perform a half-flip operation on the third data to obtain second encrypted data; the second data includes the second logical operation result and the current index of the RFID tag, and the third data includes the second half-flip result and the second random number;

[0224] The current index, the first encrypted data, the second encrypted data, the first random number and the second random number are sent to the cloud server through the RFID reader.

[0225] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0226] Obtaining the third encrypted data and the fourth encrypted data sent by the cloud server through the RFID reader;

[0227] determining a third random number based on the third encrypted data, the first random number, and the second random number;

[0228] determining a reconstruction index and fifth encrypted data based on the third random number, the first identifier, the first private key, the first random number, and the second random number;

[0229] When it is determined that the fourth encrypted data is the same as the fifth encrypted data, the cloud server is determined to be a secure server, and the current index is updated based on the reconstructed index.

[0230] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0231] Performing a half-flip operation on the first random number and the first identifier to obtain a third half-flip result, performing a half-flip operation on the third half-flip result and the first private key to obtain a fourth half-flip result, and performing a first rotation operation on the fourth half-flip result based on the rank of the second random number to obtain a reconstructed index;

[0232] Perform a semi-flipping operation on the reconstructed index and the first random number to obtain a fifth semi-flipping result, perform a second rotation operation on the fifth semi-flipping result based on the rank of the first private key to obtain a fourth result, perform a first rotation operation on the fourth result based on the rank of the second random number to obtain a fifth result, and perform a semi-flipping operation on the fifth result and the third random number to obtain a fifth encrypted data.

[0233] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0234] Receive the current index, the first encrypted data, the second encrypted data, the first random number, and the second random number sent by the RFID tag through the RFID reader, and match the current index with the indexes stored in the database of the cloud server;

[0235] If there is an index stored in the database that matches the current index, obtain the second identifier and the second private key of the RFID tag stored corresponding to the current index from the database;

[0236] Perform a first rotation operation on the second identifier based on the rank of the second private key to adjust the positions of the characters in the second identifier to obtain a sixth result;

[0237] Determine the first logical operation result of the first random number and the second random number, perform a semi-flipping operation on the fourth data to obtain a sixth semi-flipping result, and perform a second rotation operation on the sixth semi-flipping result based on the second random number to obtain a sixth encrypted data; performing a semi-flipping operation on the fourth data includes performing a second rotation operation on the first half of the characters of the second identifier based on the rank of the second identifier to obtain a seventh result, and performing a first rotation operation on the second half of the characters of the first logical operation result based on the zero-degree of the first logical operation result to obtain a third result, and performing an exclusive OR operation on the seventh result and the third result to obtain a sixth semi-flipping result; the fourth data includes the second identifier and the first logical operation result;

[0238] Determine the third logical operation result of the first random number and the second private key, perform a semi-flipping operation on the fifth data to obtain a seventh semi-flipping result, and perform a semi-flipping operation on the sixth data to obtain a seventh encrypted data; the fifth data includes the third logical operation result and the current index of the RFID tag, and the sixth data includes the seventh semi-flipping result and the second random number;

[0239] In the case where the sixth encrypted data is the same as the first encrypted data and the seventh encrypted data is the same as the second encrypted data, determine that the RFID tag is a secure tag.

[0240] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0241] Determine the third encrypted data according to the generated third random number, the first random number, the second random number, and the second identifier;

[0242] Determine the reconstruction index and the fourth encrypted data according to the first random number, the second random number, the third random number, the second identifier, and the second private key;

[0243] Send the third encrypted data and the fourth encrypted data to the RFID tag through the RFID reader.

[0244] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0245] Perform a semi-flipping operation on the first random number and the second identifier to obtain an eighth semi-flipping result, perform a semi-flipping operation on the eighth semi-flipping result and the second private key to obtain a ninth semi-flipping result, and perform a first rotation operation on the ninth semi-flipping result based on the rank of the second random number to obtain the reconstruction index;

[0246] Perform a semi-flipping operation on the reconstruction index and the first random number to obtain a tenth semi-flipping result, perform a second rotation operation on the tenth semi-flipping result based on the rank of the second private key to obtain an eighth result, perform a first rotation operation on the eighth result based on the rank of the second random number to obtain a ninth result, and perform a semi-flipping operation on the ninth result and the third random number to obtain the fourth encrypted data.

[0247] Those of ordinary skill in the art can understand that all or part of the processes in the above-described method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the method embodiments as described above. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0248] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0249] The above-described embodiments merely represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the patent of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A communication method for an RFID system, characterized in that, The RFID system includes an RFID tag, an RFID reader, and a cloud server. The method is applied to the RFID tag and includes: Obtain a first random number and a second random number sent by the RFID reader; Perform a first rotation operation on the first identifier of the RFID tag based on the rank of the first private key of the RFID tag to adjust the positions of the characters in the first identifier to obtain a first result; Determine a first logical operation result of the first random number and the second random number, perform a semi-flipping operation on the first data to obtain a first semi-flipped result, and perform a second rotation operation on the first semi-flipped result based on the second random number to obtain a first encrypted data; the performing a semi-flipping operation on the first data includes performing a second rotation operation on the first half of the characters of the first identifier based on the rank of the first identifier to obtain a second result, and performing a first rotation operation on the second half of the characters of the first logical operation result based on the zero-degree of the first logical operation result to obtain a third result, and performing an exclusive OR operation on the second result and the third result to obtain the first semi-flipped result; the first data includes the first identifier and the first logical operation result; Determine a second logical operation result of the first random number and the first private key of the tag, perform a semi-flipping operation on the second data to obtain a second semi-flipped result, and perform a semi-flipping operation on the third data to obtain a second encrypted data; the second data includes the second logical operation result and the current index of the RFID tag, and the third data includes the second semi-flipped result and the second random number; Send the current index, the first encrypted data, the second encrypted data, the first random number, and the second random number to the cloud server through the RFID reader.

2. The method according to claim 1, characterized in that, The method further includes: Obtain a third encrypted data and a fourth encrypted data sent by the cloud server through the RFID reader; Determine a third random number according to the third encrypted data, the first random number, and the second random number; Determine a reconstructed index and a fifth encrypted data according to the third random number, the first identifier, the first private key, the first random number, and the second random number; When it is determined that the fourth encrypted data is the same as the fifth encrypted data, determine that the cloud server is a secure server, and update the current index based on the reconstructed index.

3. The method according to claim 2, wherein, The determining the reconstructed index and the fifth encrypted data according to the third random number, the first identifier, the first private key, the first random number, and the second random number includes: Perform a semi-flipping operation on the first random number and the first identifier to obtain a third semi-flipped result, perform a semi-flipping operation on the third semi-flipped result and the first private key to obtain a fourth semi-flipped result, and perform a first rotation operation on the fourth semi-flipped result based on the rank of the second random number to obtain the reconstructed index; Perform a semi-flipping operation on the reconstructed index and the first random number to obtain a fifth semi-flipping result, perform a second rotation operation on the fifth semi-flipping result based on the rank of the first private key to obtain a fourth result, perform a first rotation operation on the fourth result based on the rank of the second random number to obtain a fifth result, and perform a semi-flipping operation on the fifth result and the third random number to obtain the fifth encrypted data.

4. A communication method for an RFID system, characterized in that, The RFID system includes an RFID tag, an RFID reader, and a cloud server. The method is applied to the cloud server and includes: Receive the current index, the first encrypted data, the second encrypted data, the first random number, and the second random number sent by the RFID tag through the RFID reader, and match the current index with the indexes stored in the database of the cloud server; If there is an index in the database that matches the current index, obtain the second identifier and the second private key of the RFID tag stored corresponding to the current index from the database; Perform a first rotation operation on the second identifier based on the rank of the second private key to adjust the positions of the characters in the second identifier to obtain a sixth result; Determine the first logical operation result of the first random number and the second random number, perform a semi-flipping operation on the fourth data to obtain a sixth semi-flipping result, and perform a second rotation operation on the sixth semi-flipping result based on the second random number to obtain a sixth encrypted data; the performing a semi-flipping operation on the fourth data includes performing a second rotation operation on the first half of the characters of the second identifier based on the rank of the second identifier to obtain a seventh result, and performing a first rotation operation on the second half of the characters of the first logical operation result based on the zero-degree of the first logical operation result to obtain a third result, and performing an exclusive OR operation on the seventh result and the third result to obtain the sixth semi-flipping result; the fourth data includes the second identifier and the first logical operation result; Determine the third logical operation result of the first random number and the second private key, perform a semi-flipping operation on the fifth data to obtain a seventh semi-flipping result, and perform a semi-flipping operation on the sixth data to obtain a seventh encrypted data; the fifth data includes the third logical operation result and the current index of the RFID tag, and the sixth data includes the seventh semi-flipping result and the second random number; When the sixth encrypted data is the same as the first encrypted data and the seventh encrypted data is the same as the second encrypted data, determine that the RFID tag is a secure tag.

5. The method according to claim 4, wherein When the RFID tag is a secure tag, the method further includes: Determine the third encrypted data according to the generated third random number, the first random number, the second random number, and the second identifier; Determine the reconstructed index and the fourth encrypted data according to the first random number, the second random number, the third random number, the second identifier, and the second private key; Send the third encrypted data and the fourth encrypted data to the RFID tag through the RFID reader.

6. The method according to claim 5, characterized in that, Determining a reconstruction index and a fourth encrypted data according to the first random number, the second random number, the third random number, the second identifier, and the second private key includes: Performing a semi-flipping operation on the first random number and the second identifier to obtain an eighth semi-flipping result, performing a semi-flipping operation on the eighth semi-flipping result and the second private key to obtain a ninth semi-flipping result, and performing a first rotation operation on the ninth semi-flipping result based on the rank of the second random number to obtain the reconstruction index; Performing a semi-flipping operation on the reconstruction index and the first random number to obtain a tenth semi-flipping result, performing a second rotation operation on the tenth semi-flipping result based on the rank of the second private key to obtain an eighth result, performing a first rotation operation on the eighth result based on the rank of the second random number to obtain a ninth result, and performing a semi-flipping operation on the ninth result and the third random number to obtain the fourth encrypted data.

7. A communication device of an RFID system, characterized in that, The RFID system includes an RFID tag, an RFID reader, and a cloud server. The device includes: A first acquisition module, configured to acquire a first random number and a second random number sent by the RFID reader; A first rotation module, configured to perform a first rotation operation on the first identifier of the RFID tag based on the rank of the first private key of the RFID tag to adjust the positions of the characters in the first identifier to obtain a first result; A first determination module, configured to determine a first logical operation result of the first random number and the second random number, perform a semi-flipping operation on first data to obtain a first semi-flipping result, and perform a second rotation operation on the first semi-flipping result based on the second random number to obtain a first encrypted data; the performing a semi-flipping operation on the first data includes performing a second rotation operation on the first half of the characters of the first identifier based on the rank of the first identifier to obtain a second result, and performing a first rotation operation on the second half of the characters of the first logical operation result based on the zero-degree of the first logical operation result to obtain a third result, and performing an exclusive OR operation on the second result and the third result to obtain the first semi-flipping result; the first data includes the first identifier and the first logical operation result; A second determination module, configured to determine a second logical operation result of the first random number and the first private key of the tag, perform a semi-flipping operation on second data to obtain a second semi-flipping result, and perform a semi-flipping operation on third data to obtain a second encrypted data; the second data includes the second logical operation result and the current index of the RFID tag, and the third data includes the second semi-flipping result and the second random number; A first sending module, configured to send the current index, the first encrypted data, the second encrypted data, the first random number, and the second random number to the cloud server through the RFID reader.

8. A communication device of an RFID system, characterized in that, The RFID system includes an RFID tag, an RFID reader, and a cloud server. The device includes: A receiving module, configured to receive the current index, the first encrypted data, the second encrypted data, the first random number, and the second random number sent by the RFID tag through the RFID reader, and match the current index with the index stored in the database of the cloud server; A second obtaining module, configured to, if an index matching the current index is stored in the database, obtain the second identifier and the second private key of the RFID tag corresponding to the current index stored in the database; A second rotation module, configured to perform a first rotation operation on the second identifier based on the rank of the second private key to adjust the positions of the characters in the second identifier to obtain a sixth result; A third determination module, configured to determine a first logical operation result of the first random number and the second random number, perform a semi-flipping operation on the fourth data to obtain a sixth semi-flipped result, and perform a second rotation operation on the sixth semi-flipped result based on the second random number to obtain a sixth encrypted data; the performing a semi-flipping operation on the fourth data includes performing a second rotation operation on the first half of the characters of the second identifier based on the rank of the second identifier to obtain a seventh result, and performing a first rotation operation on the second half of the characters of the first logical operation result based on the zero-degree of the first logical operation result to obtain a third result, and performing an exclusive OR operation on the seventh result and the third result to obtain the sixth semi-flipped result; the fourth data includes the second identifier and the first logical operation result; A fourth determination module, configured to determine a third logical operation result of the first random number and the second private key, perform a semi-flipping operation on the fifth data to obtain a seventh semi-flipped result, and perform a semi-flipping operation on the sixth data to obtain a seventh encrypted data; the fifth data includes the third logical operation result and the current index of the RFID tag, and the sixth data includes the seventh semi-flipped result and the second random number; A fifth determination module, configured to determine that the RFID tag is a secure tag when the sixth encrypted data is the same as the first encrypted data and the seventh encrypted data is the same as the second encrypted data.

9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.