RFID tag key updating method, device, system, RFID tag reader / writer, electronic device and storage medium
Through the RFID tag key update method, the key dispersion factor is used to generate and encrypt the key, ensuring the safe writing of the key data in the RFID tag, solving the problem of illegal access to data in the RFID system, and enhancing the security of the system. .
Patent Information
- Application Number
- CN202410947664.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-16
AI Technical Summary
Existing RFID systems are difficult to effectively protect the data in RFID tags when faced with signal interference attacks, vulnerability exploits, and forged tag or reader attacks, resulting in the possibility of illegal access to the data.
Using the RFID tag key update method, through the collaborative work of the encryption machine, the host computer and the RFID tag reader, the key dispersion factor is used to generate a distributed key, and it is sent from the host computer to the RFID tag reader in the form of ciphertext The device decrypts and writes the tag to ensure the security of the key data.
It effectively protects the key data in the RFID tag, prevents illegal tampering, enhances the security of the RFID system, and ensures that application data is not illegally accessed.
Smart Images

Figure CN118487762B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of wireless radio frequency identification technology, and in particular to an RFID tag key updating method, device, system, RFID tag reader / writer, electronic equipment and storage medium. Background Art
[0002] RFID, or Radio Frequency Identification, is a technology that uses radio signals to identify specific targets and read related data. RFID technology uses radio frequency to conduct non-contact two-way communication to achieve the purpose of identifying targets and exchanging data.
[0003] RFID tags, also known as radio frequency tags, transponders or smart tags, are an important part of RFID systems. RFID tags are generally composed of tag chips and tag antennas, and are attached to objects to identify target objects. The tag chip contains a unique electronic code that stores relevant information about the identified object. When the RFID tag reader sends out a radio frequency signal, the tag antenna receives the signal and uses the energy obtained from the induced current to send out the product information stored in the chip (Passive Tag, passive tag or passive tag), or actively sends a signal of a certain frequency (Active Tag, active tag or active tag). The reader reads the information and decodes it, and then sends it to the central information system for relevant data processing. At present, RFID tags have been used in shopping, logistics and other fields, providing great convenience for our lives and work.
[0004] Some application areas of RFID tags have high requirements for the security of tags. Currently, there are two methods to achieve security protection of tag data. Method one is to write ciphertext data encrypted from plaintext data into the data storage area of the tag, and method two is to use a high-security RFID tag with a national secret algorithm. With method one, even if the data is read from the tag through the reader, the plaintext data cannot be cracked without decryption means, which can effectively protect the security of the plaintext data. With method two, the reader will only obtain the permission to change the data stored in the electronic tag after mutual authentication with the tag through the key and the corresponding national secret algorithm, which can prevent the data stored in the tag from being illegally tampered with.
[0005] Although the application methods 1 and 2 can protect the application data in the RFID tag from being illegally tampered or leaked to a certain extent, there are many ways to attack the RFID system, such as signal interference attack, exploitation of RFID system vulnerabilities and defects, counterfeiting of tags or readers, etc. Once a vulnerability occurs in the implementation of the RFID system, it will give attackers an opportunity to exploit and cause the data in the RFID tag to be illegally accessed.
[0006] How to effectively protect the data in the RFID tag and prevent the data in the RFID tag from being illegally accessed is an issue that needs to be paid attention to and solved in a timely manner at all times. Summary of the invention
[0007] In order to solve the problems in the related art, the embodiments of the present disclosure provide an RFID tag key updating method, device, system, RFID tag reader / writer, electronic device and storage medium.
[0008] In a first aspect, an RFID tag key update system is provided in an embodiment of the present disclosure, the update system comprising: a cryptographic machine, a host computer and an RFID tag reader / writer; the cryptographic machine is connected to the host computer, and the host computer is connected to the RFID tag reader / writer;
[0009] The host computer is configured to obtain the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated; and send the key dispersion factor to the cryptographic machine; wherein the types of the key dispersion factor include: a key dispersion factor from within the RFID tag and a key dispersion factor from outside the RFID tag; the obtaining the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated includes: when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from within the RFID tag, the host computer sends a read instruction for obtaining the key dispersion factor to the RFID tag reader-writer, and after receiving the read instruction for obtaining the key dispersion factor, the RFID tag reader-writer reads the key dispersion factor from the RFID tag to be updated and returns the key dispersion factor to the host computer; when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from outside the RFID tag, the host computer reads the key dispersion factor from a preset storage area;
[0010] The cryptographic machine is configured to generate a distributed key according to the key dispersion factor and a pre-stored root key, encrypt the distributed key using a pre-stored protection key to generate a ciphertext of the distributed key, and send the ciphertext of the distributed key to the host computer;
[0011] The host computer is also configured to send the ciphertext of the distributed key to the RFID tag reader;
[0012] The RFID tag reader is configured to decrypt the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key, and write the distributed key into the RFID tag to be updated.
[0013] According to an embodiment of the present disclosure, the key dispersion factor from within the RFID tag includes one or more of the following items: a unique identifier UID / TID of the RFID tag, an electronic product code EPC of the RFID tag, and a preset key dispersion factor stored in the RFID tag; the key dispersion factor from outside the RFID tag includes: a key dispersion factor specified by the customer to which the RFID tag belongs.
[0014] According to an embodiment of the present disclosure, the key dispersion factor includes a first key dispersion factor and a second key dispersion factor.
[0015] The generating of the distributed key according to the key distribution factor and the pre-stored root key comprises: the cryptographic machine generating a first distributed key according to the first key distribution factor and the root key; generating a second distributed key according to the second key distribution factor and the root key;
[0016] The method of using the pre-stored protection key to encrypt the distributed key to generate the ciphertext of the distributed key includes: the cryptographic machine uses the protection key to encrypt the first distributed key to generate the ciphertext of the first distributed key; and uses the protection key to encrypt the second distributed key to generate the ciphertext of the second distributed key;
[0017] The sending of the ciphertext of the distributed key to the upper computer comprises: the cryptographic machine sending the ciphertext of the first distributed key and the ciphertext of the second distributed key to the upper computer respectively.
[0018] According to an embodiment of the present disclosure, sending the ciphertext of the distributed key to the RFID tag reader includes:
[0019] After obtaining the ciphertext of the first distributed key and the ciphertext of the second distributed key, the upper computer sends the ciphertext of the first distributed key and the ciphertext of the second distributed key to the RFID tag reader through a first write instruction and a second write instruction respectively, wherein the first write instruction and the second write instruction contain a mark indicating whether the instruction is valid.
[0020] According to an embodiment of the present disclosure, the flags included in the first write instruction and the second write instruction indicating whether the instructions are valid are determined by a preset rule.
[0021] According to an embodiment of the present disclosure, decrypting the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key, and writing the distributed key into the RFID tag to be updated includes:
[0022] After receiving the first write instruction and the second write instruction, the RFID tag reader / writer obtains the ciphertext of the first dispersed key and the ciphertext of the second dispersed key based on the first write instruction and the second write instruction, respectively, and the mark indicating whether the first write instruction and the second write instruction are valid, and uses the ciphertext of the dispersed key in the write instruction corresponding to the mark indicating that the instruction is valid as the ciphertext of the valid dispersed key; uses the protection key to decrypt the ciphertext of the valid dispersed key to obtain the valid dispersed key, and writes the valid dispersed key into the RFID tag to be updated.
[0023] According to an embodiment of the present disclosure, the protection key includes a first protection key and a second protection key, and the use of the pre-stored protection key to encrypt the distributed key to generate a ciphertext of the distributed key, and sending the ciphertext of the distributed key to the host computer includes:
[0024] The cryptographic machine uses the first protection key to encrypt the distributed key to generate a first ciphertext of the distributed key; and uses the second protection key to encrypt the first ciphertext of the distributed key to generate a second ciphertext of the distributed key;
[0025] The second ciphertext of the distributed key is sent to the host computer.
[0026] According to an embodiment of the present disclosure, sending the ciphertext of the distributed key to the RFID tag reader includes:
[0027] After obtaining the second ciphertext of the distributed key, the host computer sends the second ciphertext of the distributed key to the RFID tag reader / writer through a third write instruction.
[0028] According to an embodiment of the present disclosure, decrypting the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key, and writing the distributed key into the RFID tag to be updated includes:
[0029] After receiving the third write instruction, the RFID tag reader / writer obtains the second ciphertext of the distributed key based on the third write instruction;
[0030] Using the second protection key to decrypt the second ciphertext of the distributed key to obtain the first ciphertext of the distributed key; using the first protection key to decrypt the first ciphertext of the distributed key to obtain the distributed key;
[0031] The distributed key is written into the RFID tag to be updated.
[0032] According to an embodiment of the present disclosure, sending the ciphertext of the distributed key to the RFID tag reader includes:
[0033] The host computer processes the ciphertext of the distributed key using a preset method to generate a processed ciphertext of the distributed key;
[0034] The processed ciphertext of the distributed key is sent to the RFID tag reader / writer via a fourth write instruction.
[0035] According to an embodiment of the present disclosure, decrypting the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key, and writing the distributed key into the RFID tag to be updated includes:
[0036] After receiving the fourth write instruction, the RFID tag reader / writer obtains the processed ciphertext of the distributed key based on the fourth write instruction;
[0037] Using the preset method, inversely process the processed ciphertext of the distributed key to generate the ciphertext of the distributed key;
[0038] Decrypting the ciphertext of the distributed key using the protection key to obtain the distributed key;
[0039] The distributed key is written into the RFID tag to be updated.
[0040] According to an embodiment of the present disclosure, the RFID tag reader is connected to the host computer via a serial port or a USB.
[0041] In a second aspect, an RFID tag key update method is provided in an embodiment of the present disclosure, which is applied to a host computer, wherein the host computer is connected to a cryptographic machine and an RFID tag reader / writer respectively, and the update method comprises:
[0042] The method comprises: obtaining a key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated; sending the key dispersion factor to the cryptographic machine, so that the cryptographic machine generates a dispersion key according to the key dispersion factor and a pre-stored root key, and encrypts the dispersion key with a pre-stored protection key to generate a ciphertext of the dispersion key; wherein the types of the key dispersion factor include: a key dispersion factor from inside the RFID tag and a key dispersion factor from outside the RFID tag; obtaining a key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated The key dispersion factor comprises: when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from within the RFID tag, the host computer sends a read instruction for obtaining the key dispersion factor to the RFID tag reader / writer, and after the RFID tag reader / writer receives the read instruction for obtaining the key dispersion factor, the key dispersion factor is read from the RFID tag to be updated, and the key dispersion factor is returned to the host computer; when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from outside the RFID tag, the host computer reads the key dispersion factor from a preset storage area;
[0043] Obtaining the ciphertext of the distributed key;
[0044] The ciphertext of the distributed key is sent to the RFID tag reader / writer.
[0045] According to an embodiment of the present disclosure, the key dispersion factor from within the RFID tag includes one or more of the following items: a unique identifier UID / TID of the RFID tag, an electronic product code EPC of the RFID tag, and a preset key dispersion factor stored in the RFID tag; the key dispersion factor from outside the RFID tag includes: a key dispersion factor specified by the customer to which the RFID tag belongs.
[0046] According to an embodiment of the present disclosure, the key dispersion factor includes a first key dispersion factor and a second key dispersion factor, the cryptographic machine generates a dispersion key according to the key dispersion factor and a pre-stored root key, and uses a pre-stored protection key to encrypt the dispersion key to generate a ciphertext of the dispersion key, including:
[0047] Generate a first distributed key according to the first key distribution factor and the root key; encrypt the first distributed key using the protection key to generate a ciphertext of the first distributed key;
[0048] A second distributed key is generated according to the second key distribution factor and the root key; and the second distributed key is encrypted using the protection key to generate a ciphertext of the second distributed key.
[0049] According to an embodiment of the present disclosure, sending the ciphertext of the distributed key to the RFID tag reader includes:
[0050] After obtaining the ciphertext of the first distributed key and the ciphertext of the second distributed key, the ciphertext of the first distributed key and the ciphertext of the second distributed key are sent to the RFID tag reader through a first write instruction and a second write instruction respectively, wherein the first write instruction and the second write instruction contain a mark indicating whether the instruction is valid.
[0051] According to an embodiment of the present disclosure, the protection key includes a first protection key and a second protection key, and the cryptographic machine uses the pre-stored protection key to encrypt the distributed key to generate a ciphertext of the distributed key, including:
[0052] Using the first protection key to encrypt the distributed key to generate a first ciphertext of the distributed key;
[0053] The first ciphertext of the distributed key is encrypted using the second protection key to generate a second ciphertext of the distributed key.
[0054] According to an embodiment of the present disclosure, sending the ciphertext of the distributed key to the RFID tag reader includes:
[0055] After obtaining the second ciphertext of the distributed key, the second ciphertext of the distributed key is sent to the RFID tag reader / writer through a third write instruction.
[0056] According to an embodiment of the present disclosure, sending the ciphertext of the distributed key to the RFID tag reader specifically includes:
[0057] Processing the ciphertext of the distributed key using a preset method to generate a processed ciphertext of the distributed key;
[0058] The processed ciphertext of the distributed key is sent to the RFID tag reader / writer via a fourth write instruction.
[0059] In a third aspect, an RFID tag key update method is provided in an embodiment of the present disclosure, which is applied to an RFID tag reader / writer, wherein the RFID tag reader / writer is connected to a host computer, and the host computer is connected to a cryptographic machine, and the update method includes:
[0060] Receiving the ciphertext of the distributed key sent by the host computer, wherein the ciphertext of the distributed key is generated by the cryptographic machine by first generating the distributed key according to the key dispersion factor input by the host computer and the pre-stored root key, and then encrypting the distributed key using the pre-stored protection key;
[0061] Decrypting the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key;
[0062] The distributed key is written into the RFID tag to be updated.
[0063] According to an embodiment of the present disclosure, the receiving of the ciphertext of the distributed key sent by the host computer includes:
[0064] Receive a first write instruction and a second write instruction sent by the host computer, wherein the first write instruction includes a ciphertext of a first distributed key and a mark indicating whether the instruction is valid; and the second write instruction includes a ciphertext of a second distributed key and a mark indicating whether the instruction is valid.
[0065] According to an embodiment of the present disclosure, decrypting the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key includes:
[0066] After receiving the first write instruction and the second write instruction, respectively obtain the ciphertext of the first distributed key and the ciphertext of the second distributed key and the marks indicating whether the first write instruction and the second write instruction are valid, based on the first write instruction and the second write instruction, and use the ciphertext of the distributed key in the write instruction corresponding to the mark indicating that the instruction is valid as the ciphertext of the valid distributed key;
[0067] The protection key is used to decrypt the ciphertext of the effective distributed key to obtain the effective distributed key, and the effective distributed key is written into the RFID tag to be updated.
[0068] According to an embodiment of the present disclosure, the receiving of the ciphertext of the distributed key sent by the host computer includes:
[0069] A third write instruction sent by the host computer is received, wherein the third write instruction includes a second ciphertext of the distributed key.
[0070] According to an embodiment of the present disclosure, the protection key includes a first protection key and a second protection key, and the decrypting of the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key includes:
[0071] After receiving the third write instruction, obtaining a second ciphertext of the distributed key based on the third write instruction;
[0072] Decrypting the second ciphertext of the distributed key using the second protection key to obtain the first ciphertext of the distributed key;
[0073] Using the first protection key to decrypt the first ciphertext of the distributed key to obtain the distributed key;
[0074] The distributed key is written into the RFID tag to be updated.
[0075] According to an embodiment of the present disclosure, the receiving of the ciphertext of the distributed key sent by the host computer includes:
[0076] A fourth write instruction sent by the host computer is received, wherein the fourth write instruction includes a processed ciphertext of the distributed key generated after the host computer processes the ciphertext of the distributed key in a preset manner.
[0077] According to an embodiment of the present disclosure, decrypting the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key includes:
[0078] After receiving the fourth write instruction, obtaining the processed ciphertext of the distributed key based on the fourth write instruction;
[0079] Using the preset method, inversely process the processed ciphertext of the distributed key to generate the ciphertext of the distributed key;
[0080] Decrypting the ciphertext of the distributed key using the protection key to obtain the distributed key;
[0081] The distributed key is written into the RFID tag to be updated.
[0082] In a fourth aspect, an RFID tag key update method is provided in an embodiment of the present disclosure, which is applied to a cryptographic machine connected to a host computer, and the update method includes:
[0083] Generate a distributed key according to a pre-stored root key and a key distribution factor input by the host computer;
[0084] The distributed key is encrypted using a pre-stored protection key to generate a ciphertext of the distributed key, and the ciphertext of the distributed key is sent to the host computer.
[0085] According to an embodiment of the present disclosure, the key dispersion factor includes a first key dispersion factor and a second key dispersion factor.
[0086] The generating of the distributed key according to the pre-stored root key and the key dispersing factor input by the host computer includes:
[0087] Generate a first distributed key according to the first key distribution factor and the root key; generate a second distributed key according to the second key distribution factor and the root key;
[0088] The method of using the pre-stored protection key to encrypt the distributed key to generate the ciphertext of the distributed key includes: using the protection key to encrypt the first distributed key to generate the ciphertext of the first distributed key; using the protection key to encrypt the second distributed key to generate the ciphertext of the second distributed key;
[0089] The sending the ciphertext of the distributed key to the host computer includes: sending the ciphertext of the first distributed key and the ciphertext of the second distributed key to the host computer respectively.
[0090] According to an embodiment of the present disclosure, the protection key includes a first protection key and a second protection key.
[0091] The method of using the pre-stored protection key to encrypt the distributed key to generate the ciphertext of the distributed key, and sending the ciphertext of the distributed key to the host computer includes:
[0092] Using the first protection key to encrypt the distributed key to generate a first ciphertext of the distributed key; using the second protection key to encrypt the first ciphertext of the distributed key to generate a second ciphertext of the distributed key;
[0093] The second ciphertext of the distributed key is sent to the host computer.
[0094] In a fifth aspect, an RFID tag key update device is provided in an embodiment of the present disclosure, which is arranged in a host computer, and the host computer is respectively connected to a cryptographic machine and an RFID tag reader / writer, and the update device includes:
[0095] The key dispersion factor acquisition module is configured to acquire the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated; send the key dispersion factor to the cryptographic machine, so that the cryptographic machine generates a dispersion key according to the key dispersion factor and a pre-stored root key, and encrypts the dispersion key with a pre-stored protection key to generate a ciphertext of the dispersion key; wherein the types of the key dispersion factor include: a key dispersion factor from within the RFID tag and a key dispersion factor from outside the RFID tag; the acquiring of the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor The key dispersion factor corresponding to the ID tag includes: when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from the RFID tag, the host computer sends a read instruction for obtaining the key dispersion factor to the RFID tag reader, and after the RFID tag reader receives the read instruction for obtaining the key dispersion factor, the key dispersion factor is read from the RFID tag to be updated, and the key dispersion factor is returned to the host computer; when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from outside the RFID tag, the host computer reads the key dispersion factor from a preset storage area;
[0096] A distributed key ciphertext acquisition module, configured to acquire the ciphertext of the distributed key;
[0097] The distributed key ciphertext sending module is configured to send the distributed key ciphertext to the RFID tag reader.
[0098] In a sixth aspect, an RFID tag key update device is provided in an embodiment of the present disclosure, which is arranged in an RFID tag reader / writer, the RFID tag reader / writer is connected to a host computer, the host computer is connected to a cryptographic machine, and the update device includes:
[0099] A distributed key ciphertext receiving module is configured to receive the ciphertext of the distributed key sent by the host computer, wherein the ciphertext of the distributed key is generated by the cipher machine first generating the distributed key according to the key dispersion factor input by the host computer and the pre-stored root key, and then encrypting the distributed key using the pre-stored protection key;
[0100] A distributed key plaintext acquisition module is configured to decrypt the ciphertext of the distributed key according to a pre-stored protection key to obtain the distributed key;
[0101] The distributed key writing module is configured to write the distributed key into the RFID tag to be updated.
[0102] In a seventh aspect, an RFID tag key update device is provided in an embodiment of the present disclosure, which is arranged in a cryptographic machine, the cryptographic machine is connected to a host computer, and the update device includes:
[0103] A distributed key generation module is configured to generate a distributed key based on a pre-stored root key and a key dispersion factor input by the host computer;
[0104] The distributed key encryption module is configured to use a pre-stored protection key to encrypt the distributed key to generate a ciphertext of the distributed key, and send the ciphertext of the distributed key to the host computer.
[0105] In an eighth aspect, an RFID tag reader / writer is provided in an embodiment of the present disclosure, wherein the RFID tag reader / writer is connected to a host computer, the host computer is connected to a cryptographic machine, and the RFID tag reader / writer comprises: an MCU control unit, a security chip, and a radio frequency module; the MCU control unit is respectively connected to the security chip and the radio frequency module;
[0106] The MCU control unit is configured to receive the ciphertext of the distributed key sent by the host computer, wherein the ciphertext of the distributed key is generated by the cryptographic machine by first generating the distributed key according to the key dispersion factor input by the host computer and the pre-stored root key, and then encrypting the distributed key using the pre-stored protection key;
[0107] The security chip is configured to decrypt the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key;
[0108] The radio frequency module is configured to write the distributed key into the RFID tag to be updated.
[0109] In the ninth aspect, an electronic device is provided in an embodiment of the present disclosure, comprising a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the update method described in any one of the second aspect, the third aspect, or the fourth aspect of claim 1.
[0110] In the tenth aspect, a computer-readable storage medium is provided in an embodiment of the present disclosure, on which computer instructions are stored. When the computer instructions are executed by a processor, the updating method described in any one of the second aspect, the third aspect, or the fourth aspect is implemented.
[0111] In the eleventh aspect, a computer program product is provided in an embodiment of the present disclosure, including a computer program, and when the computer program is executed by a processor, the updating method described in any one of the second aspect, the third aspect, or the fourth aspect is implemented.
[0112] According to the technical solution provided by the embodiment of the present disclosure, in the key filling link of the RFID tag, the key data of the RFID tag is sent from the host computer to the RFID tag reader in ciphertext, and the ciphertext of the key data is decrypted inside the RFID tag reader, and then the plaintext of the decrypted key data is written into the RFID tag. In the process of writing the RFID tag key, since the key data is sent from the host computer to the RFID tag reader in ciphertext, it cannot be easily cracked even if it is intercepted by the port monitoring tool. Therefore, by encrypting and sending the key data of the RFID tag, the safe writing of the key data of the RFID tag is guaranteed, the protection of the key data of the RFID tag is realized, and the application data in the RFID tag is guaranteed not to be illegally tampered with.
[0113] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0114] Other features, objectives and advantages of the present disclosure will become more apparent through the following detailed description of non-limiting embodiments in conjunction with the accompanying drawings. In the accompanying drawings:
[0115] Figure 1 A structural block diagram of an RFID tag key update system according to an embodiment of the present disclosure is shown;
[0116] Figure 2 A flow chart of a RFID tag key update method according to a specific embodiment 1 of the present disclosure is shown;
[0117] Figure 3 A flow chart of another RFID tag key update method according to specific embodiment 2 of the present disclosure is shown;
[0118] Figure 4 A flow chart of another RFID tag key update method according to specific embodiment 3 of the present disclosure is shown;
[0119] Figure 5 A flow chart of a method for updating a key of an RFID tag according to an embodiment of the present disclosure is shown;
[0120] Figure 6 A flow chart of another RFID tag key update method according to an embodiment of the present disclosure is shown;
[0121] Figure 7 A flow chart of another RFID tag key update method according to an embodiment of the present disclosure is shown;
[0122] Figure 8A structural block diagram of an RFID tag key updating device according to an embodiment of the present disclosure is shown;
[0123] Fig. 9 A structural block diagram of another RFID tag key updating device according to an embodiment of the present disclosure is shown;
[0124] Fig.10 A structural block diagram of another RFID tag key updating device according to an embodiment of the present disclosure is shown;
[0125] Fig.11 A structural block diagram of an RFID tag reader / writer according to an embodiment of the present disclosure is shown;
[0126] Fig.12 A structural block diagram of another RFID tag key update system according to an embodiment of the present disclosure is shown;
[0127] Fig.13 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0128] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts not related to the description of the exemplary embodiments are omitted in the accompanying drawings.
[0129] In the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate the presence of features, numbers, steps, behaviors, components, parts, or a combination thereof disclosed in the present specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or a combination thereof exist or are added.
[0130] It should also be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0131] As mentioned above, once there is a loophole in the implementation of the RFID system, it will give attackers an opportunity to illegally access the data in the RFID tag. Therefore, only by comprehensively examining, discovering and promptly eliminating the security risks existing in each link of the RFID system can the data in the RFID tag be protected in a timely and effective manner.
[0132] In order to improve the security of RFID systems, existing technologies have been developed to prevent RFID systems from being attacked by strengthening the identity authentication of RFID systems, implementing strict access control policies, and using anti-interference technology and physical shielding technology to ensure their normal operation and security. However, in general, the main focus is on the protection of the RFID tag hardware itself or the stored application data and the control of access rights.
[0133] As described above, method 2 is to use a high-security RFID tag with a national secret algorithm (referred to as: national secret RFID tag), wherein key data is stored in the RFID tag. In specific applications, the reader will only obtain the permission to change the application data stored in the RFID tag after the key and the corresponding national secret algorithm are mutually authenticated with the tag. Through this access control strategy, the application data stored in the tag can be prevented from being illegally tampered with to a certain extent. However, the inventors of the present disclosure found in the project practice that although the key data cannot be read out after being written into the tag, in the traditional key data writing method, the upper computer software in the production system sends the plain text of the key data to the tag reader, and then the tag reader writes it into the RFID tag. In the process of sending the plain text of the key data to the tag reader, if the attacker uses the computer port monitoring tool, it is very likely to intercept the key data in the production link, and then use the intercepted key to authenticate with the RFID tag to tamper with the application data, etc., resulting in unauthorized access and deception. Therefore, the inventors of the present disclosure believe that: preventing the key data stored in the RFID tag from being leaked is the key to ensuring the security of the tag data.
[0134] After careful research and consideration, the inventor of the present invention has designed a method for updating the RFID tag key from the perspective of focusing on ensuring the security of the RFID tag key data writing process. Specifically, in the key filling process of the RFID tag, the key data of the RFID tag is sent from the host computer to the RFID tag reader in ciphertext, and the ciphertext of the key data is decrypted inside the RFID tag reader, and then the decrypted key data is written in plaintext to the RFID tag. In the process of writing the RFID tag key, since the key data is sent from the host computer to the RFID tag reader in ciphertext, it cannot be easily cracked even if it is intercepted by the port monitoring tool. Therefore, by encrypting and sending the key data of the RFID tag, the secure writing of the RFID tag key data is guaranteed, the protection of the key data of the RFID tag is achieved, and the application data in the RFID tag is protected from illegal tampering.
[0135] It should be noted that: in addition to the national secret RFID tags, the RFID tags involved in the present disclosure also include other types of RFID tags that store key data.
[0136] Figure 1 FIG. 2 shows a structural block diagram of an RFID tag key update system according to an embodiment of the present disclosure. Figure 1 As shown, the update system includes: a cryptographic machine, a host computer and an RFID tag reader / writer; the cryptographic machine is connected to the host computer, and the host computer is connected to the RFID tag reader / writer.
[0137] According to the embodiments of the present disclosure, each of the cryptographic machine, the host computer, and the RFID tag reader / writer may be implemented by software, hardware, or a combination of software and hardware.
[0138] According to an embodiment of the present disclosure, the host computer is configured to: obtain the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated; and send the key dispersion factor to the cryptographic machine.
[0139] According to an embodiment of the present disclosure, the cryptographic machine is configured to generate a distributed key based on the key dispersion factor and a pre-stored root key, encrypt the distributed key using a pre-stored protection key to generate a ciphertext of the distributed key, and send the ciphertext of the distributed key to the host computer.
[0140] Among them, in this disclosure, the root key refers to the key with the highest authority and highest security in the key system, which is used to generate other keys; the protection key is the key used to protect the security of other keys; the dispersion key is the key used to protect the security of RFID tags.
[0141] According to an embodiment of the present disclosure, the host computer is also configured to send the ciphertext of the distributed key to the RFID tag reader / writer.
[0142] According to an embodiment of the present disclosure, the RFID tag reader is configured to decrypt the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key, and write the distributed key into the RFID tag to be updated ( Figure 1 not shown).
[0143] According to an embodiment of the present disclosure, the types of the key dispersion factor include but are not limited to: a key dispersion factor from within the RFID tag and a key dispersion factor from outside the RFID tag.
[0144] According to an embodiment of the present disclosure, the key dispersion factor from the RFID tag is stored inside the RFID tag and needs to be obtained by the host computer from the RFID tag through a read instruction. It can be a parameter that can uniquely identify the RFID tag, such as: the unique identifier UID / TID of the RFID tag, or the electronic product code EPC of the RFID tag, or it can be a preset key dispersion factor stored in the RFID tag in advance through a write instruction.
[0145] Among them, UID (Unique Identifier) or TID (Tag Identifier) are both 64-bit unique identifiers of RFID tags, which are stored in a specific area of the RFID tag (such as sector 0, block 0), are unique and cannot be modified. It is a key attribute of the RFID tag, used to uniquely identify each tag in the RFID system to ensure that the identity number of each tag is unique. It is usually written by the tag manufacturer at the factory and is in a read-only and non-writable state. UID / TID plays a key role in the anti-collision cycle and the interaction between the reader and the tag, allowing the system to accurately identify and track the items to which the tag is attached.
[0146] EPC (Electronic Product Code) is the electronic product code of the RFID tag, which corresponds to the global standard code barcode and is used to identify the radio frequency technology code of the tagged object. EPC consists of a series of numbers that can identify the producer, product definition, serial number and other information of the specific object. Unlike UID and TID, EPC can be manually written and modified by the user. In addition to the function of global standard code to identify objects, EPC can also provide additional information about the product through the electronic product code network, such as origin, product history, etc. These data play a key role in the historical tracking of specific products in the supply chain.
[0147] The preset key dispersion factor stored in the RFID tag refers to the key dispersion factor generated by the RFID system based on specific security requirements and design by selecting an appropriate method (such as random generation, algorithm-based generation or centralized generation, etc.), and stored in the USER area of the RFID tag in advance. When the dispersion key is generated, it is read out through the read instruction.
[0148] According to an embodiment of the present disclosure, the key dispersion factor from outside the RFID tag includes but is not limited to: a key dispersion factor specified by the customer to which the RFID tag belongs, and the key dispersion factor specified by the customer to which the RFID tag belongs can be a random number that meets a certain byte quantity requirement. When the key dispersion factor is a random number, it should be ensured that the random number has sufficient entropy to resist potential attacks and cracking. When the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from outside the RFID tag, in order to obtain the key dispersion factor in the tag application link in the future, the key dispersion factor should be written into the storage area of the tag in the tag issuance link.
[0149] According to an embodiment of the present disclosure, the step of acquiring the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated includes:
[0150] When the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from the RFID tag, the host computer sends a read instruction for obtaining the key dispersion factor to the RFID tag reader / writer. After receiving the read instruction for obtaining the key dispersion factor, the RFID tag reader / writer reads the key dispersion factor from the RFID tag to be updated and returns the key dispersion factor to the host computer.
[0151] When the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from outside the RFID tag, the host computer reads the key dispersion factor from a preset storage area.
[0152] After determining the type of specific key dispersion factor according to the actual needs of the project and the customer, when the key dispersion factor corresponding to the RFID tag to be updated is obtained according to the type of the key dispersion factor corresponding to the RFID tag to be updated, the RFID tag to be updated can be bound to the corresponding type identifier, and the key dispersion factor corresponding to the RFID tag to be updated can be obtained by using the corresponding acquisition method based on the judgment of the bound type identifier when obtaining the key dispersion factor. It can also be determined in advance based on the type of the key dispersion factor corresponding to the RFID tag to be updated, and the key dispersion factor corresponding to the RFID tag to be updated can be obtained by using the corresponding acquisition method based on the identifier referring to the acquisition method when obtaining the key dispersion factor. Which specific solution to adopt can be set according to the actual development needs of the project.
[0153] The present disclosure introduces the concept of key dispersion factor types, and obtains the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated, so that in the process of generating a dispersed key, a set of production software can be used to obtain the corresponding key dispersion factor by judging the type of the key dispersion factor and then performing different operations according to different types of key dispersion factors, thereby avoiding the use of multiple sets of production software corresponding to different types of key dispersion factors, thereby increasing the flexibility and adaptability of the operation and improving the reusability of the production software.
[0154] In addition, since UID / TID are both native data inherent in RFID tags, readers and writers can read them directly from tags and use them in both production and application stages without the need for additional writing or management. This makes the key generation and management process simpler and more efficient, reducing system complexity and maintenance costs.
[0155] According to an embodiment of the present disclosure, the RFID tag reader and the host computer may be connected via a serial port or a USB. In some other application scenarios, they may also be connected via an Ethernet cable or wirelessly.
[0156] Based on the above-described RFID tag key update system structure and the functions and interactions of each module, three specific embodiments are described in detail below. Specific embodiments
[0157] In specific embodiment 1, based on the design idea of sending the ciphertext of multiple distributed keys to the RFID tag reader through different write instructions to increase the difficulty of cracking after being intercepted, the RFID tag reader is informed of the valid write instruction through a preset mark in the write instruction, so that the RFID tag reader obtains the plaintext of the valid distributed key based on the valid write instruction and writes it into the RFID tag to be updated.
[0158] Specifically, the host computer is configured to obtain a key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated, wherein the key dispersion factor includes multiple key dispersion factors, and the multiple key dispersion factors are sent to the cryptographic machine; the cryptographic machine is configured to generate multiple corresponding dispersion keys according to the multiple key dispersion factors and a pre-stored root key, and use a pre-stored protection key to encrypt the multiple dispersion keys respectively to generate multiple corresponding dispersion key ciphertexts and send them to the host computer. After receiving the ciphertexts, the host computer sends the ciphertexts of the multiple dispersion keys to the RFID tag reader / writer through multiple write instructions respectively, wherein each write instruction has a field indicating whether the dispersion key in the write instruction is valid. After receiving the RFID tag reader / writer, the ciphertext marked with a valid dispersion key is decrypted and the plaintext of the valid dispersion key is written into the RFID tag to be updated. In this way, even if multiple distributed keys are intercepted or even the protection key is known, it is difficult to know the key data actually written into the tag if it is not known which distributed key is the valid distributed key, thereby achieving protection of the key data of the RFID tag and ensuring that the application data in the RFID tag is not illegally tampered with.
[0159] Figure 2 A flowchart of a RFID tag key update method according to a specific embodiment 1 of the present disclosure is shown, which is applied to Figure 1 The RFID tag key update system shown in the figure takes the generation of two distributed keys as an example. Figure 2 As shown, the RFID tag key update method includes the following steps S210~S270:
[0160] In step S210, the key dispersion factor includes a first key dispersion factor and a second key dispersion factor.
[0161] The host computer obtains a first key dispersion factor and a second key dispersion factor.
[0162] In a specific implementation, the host computer may first obtain a first key dispersion factor corresponding to the RFID tag to be updated, i.e., a real key dispersion factor, according to the type of the key dispersion factor corresponding to the RFID tag to be updated, and then generate a second key dispersion factor, i.e., a virtual key dispersion factor, according to the first key dispersion factor based on a predetermined rule. For example, the result of reversing the first key dispersion factor may be used as the second key dispersion factor, or the result of performing an XOR operation on the first key dispersion factor and a fixed string of a specific length and content may be used as the second key dispersion factor.
[0163] In another specific implementation, the first key dispersion factor and the second key dispersion factor may both be key dispersion factors related to the RFID tag, and may be specifically set according to actual needs of the system.
[0164] In step S220, the host computer sends the first key dispersion factor and the second key dispersion factor to the cryptographic machine.
[0165] In step S230, the cryptographic machine generates a first distributed key based on the first key dispersion factor and the root key; generates a second distributed key based on the second key dispersion factor and the root key; uses the protection key to encrypt the first distributed key to generate a ciphertext of the first distributed key; and uses the protection key to encrypt the second distributed key to generate a ciphertext of the second distributed key.
[0166] In step S240, the cryptographic machine sends the ciphertext of the first distributed key and the ciphertext of the second distributed key to the host computer respectively.
[0167] In a specific embodiment, the cryptographic machine can be a hardware device placed in a computer room, connected to the host computer through a network cable, and has the ability to store keys and perform encryption calculations. The root key and protection key generated by the cryptographic machine issuing software are stored inside the cryptographic machine. When generating keys, the cryptographic machine uses a certain encryption algorithm (which may be a symmetric encryption algorithm or an asymmetric encryption algorithm) to perform key generation operations according to specific protocols and standards. The host computer software runs on the host computer, and is specifically responsible for obtaining the dispersed key from the cryptographic machine when the RFID tag is produced, and sending the dispersed key to the RFID tag reader through a write instruction, that is, the host computer software can realize the above-mentioned specific functions of the key processing set by the host computer.
[0168] In the specific implementation, the host computer can call the key derivation interface provided by the cipher machine and pass the obtained key dispersion factor as an input parameter to the cipher machine. The cipher machine generates the corresponding decentralized key ciphertext according to the built-in algorithm and key management strategy, and returns the generated decentralized key ciphertext to the host computer as the output result of the key derivation interface.
[0169] The ciphertext of the distributed key involved in the present disclosure is implemented in hardware in a cryptographic machine, which is safer and more reliable than other methods of generating distributed key ciphertext by software. The reason is that in the process of transmitting the distributed key plaintext to the host computer through the network cable, the network port data can be monitored by the WireShark software to directly obtain the distributed key plaintext, causing leakage. In addition, the encryption process implemented by software may be reverse cracked, while hardware can implement encryption algorithms that are more difficult to crack than software. Therefore, the method of directly obtaining the distributed key ciphertext through a cryptographic machine is safer and more reliable.
[0170] In step S250, after obtaining the ciphertext of the first distributed key and the ciphertext of the second distributed key, the host computer sends the ciphertext of the first distributed key and the ciphertext of the second distributed key to the RFID tag reader / writer through a first write instruction and a second write instruction respectively.
[0171] The first write instruction and the second write instruction include a mark indicating whether the instruction is valid.
[0172] Generally, the format of the write instructions when the host computer software interacts with the RFID tag reader depends on the specific RFID tag reader model and the communication protocol provided by the manufacturer. Different RFID tag readers may use different instruction sets and data formats.
[0173] Generally speaking, the write instruction format includes but is not limited to: RFID tag reader device address, write instruction code, RFID tag address, write area, offset address, data length and data content. Among them, the RFID tag reader device address is the address of the RFID reader to be communicated with the host computer. In some cases, if only one RFID reader is connected to the host computer, this field may be optional; the write instruction code is used to indicate that the type of operation to be performed is a write operation, specifically a communication identifier pre-agreed between the host computer software and the RFID tag reader, such as: 3A; the RFID tag address is the address or identifier of the RFID tag to which data is to be written; the write area is used to indicate that the data content to be written is written into the security area of the tag; the offset address is used to indicate that the data content to be written is written from the starting address of the key data storage; the data length is used to indicate the length of the data content to be written; the data content is used to define the data to be written. In the present disclosure, the data content is the ciphertext of the decentralized key. The host computer sends the ciphertext of the decentralized key to the RFID tag reader through a write instruction, informing the RFID tag reader that the data content in the write instruction needs to be written into the corresponding RFID tag.
[0174] In this specific embodiment 1, the first write instruction refers to a write instruction that carries the ciphertext of the first decentralized key, and the second write instruction refers to a write instruction that carries the ciphertext of the second decentralized key. In addition, the first write instruction and the second write instruction also include a mark indicating whether the instruction is valid. The mark indicating whether the instruction is valid can be carried by adding a preset field in the write instruction, for example: if the content of the preset field in this write instruction is 1, it indicates that the instruction is valid; on the contrary, if it is 0, it indicates that the instruction is invalid; the mark indicating whether the instruction is valid can also be set at the beginning or end of other fields, and the rules of validity are agreed upon with a character string of specific content, for example: if the beginning part of the data content field in this write instruction contains 0xFFF, it indicates that the instruction is valid; if it is 0x000, it indicates that the instruction is invalid. The specific method to be adopted can be determined according to the actual needs of the specific project.
[0175] According to an embodiment of the present disclosure, the flags indicating whether the first write instruction and the second write instruction are valid are determined by a preset rule, wherein the preset rule can be set according to system implementation requirements.
[0176] In a specific embodiment, if the first key dispersion factor is a real key dispersion factor corresponding to the RFID tag, and the second key dispersion factor is a virtual key dispersion factor obtained based on a predetermined rule according to the first key dispersion factor, then the write instruction carrying the ciphertext of the first dispersion key generated according to the first key dispersion factor includes a mark indicating that the instruction is valid, and the corresponding write instruction carrying the ciphertext of the second dispersion key generated according to the second key dispersion factor includes a mark indicating that the instruction is invalid.
[0177] In another specific embodiment, the priority of the key dispersion factor can be set, and the mark indicating whether the instruction is valid can be determined according to the priority of the key dispersion factor obtained. For example: in order of priority, the priority of UID / TID is higher than that of EPC. If the first key dispersion factor is UID and the second key dispersion factor is EPC, then the write instruction carrying the ciphertext of the first dispersion key generated according to the first key dispersion factor includes a mark indicating that the instruction is valid, and the corresponding write instruction carrying the ciphertext of the second dispersion key generated according to the second key dispersion factor includes a mark indicating that the instruction is invalid.
[0178] In step S260, after receiving the first write instruction and the second write instruction, the RFID tag reader / writer obtains the ciphertext of the first distributed key and the ciphertext of the second distributed key based on the first write instruction and the second write instruction, respectively, and the mark indicating whether the first write instruction and the second write instruction are valid, and uses the ciphertext of the distributed key in the write instruction corresponding to the mark indicating that the instruction is valid as the ciphertext of the valid distributed key; uses the protection key to decrypt the ciphertext of the valid distributed key to obtain the valid distributed key.
[0179] The RFID tag reader / writer includes an MCU control unit, a security chip, and a radio frequency module. The MCU control unit is responsible for parsing the instructions (including write instructions and read instructions) sent by the host computer, controlling the security chip for encryption and decryption, and operating the radio frequency module to read and write RFID tags. The security chip is pre-embedded with a decryption key that is consistent with the protection key in the cipher machine, which is used to decrypt the ciphertext of the distributed key. The radio frequency module is responsible for communicating with the RFID tag.
[0180] In step S270, the RFID tag reader / writer writes the valid distributed key into the RFID tag to be updated.
[0181] When writing a valid distributed key to the RFID tag to be updated, the writing operation can be performed according to the relevant commands defined in the communication protocol followed by the specific RFID system (such as the ISO18000-6C protocol) and in combination with the specific parameters in the write instruction sent by the host computer to the RFID tag reader. Specific embodiments
[0182] In specific embodiment 2, based on the design idea of encrypting the distributed key in sequence with multiple different protection keys to obtain the ciphertext of the distributed key protected by multiple encryptions and sending it to the RFID tag reader through a write instruction to increase the difficulty of cracking after being intercepted, the same multiple different protection keys are pre-embedded in the RFID tag reader to decrypt them in reverse order to obtain the plaintext of the distributed key and write it into the RFID tag to be updated.
[0183] Specifically, the host computer is configured to obtain the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated, and send the key dispersion factor to the cryptographic machine; the cryptographic machine is configured to generate a corresponding dispersion key according to the key dispersion factor and a pre-stored root key, and use a plurality of pre-stored protection keys to sequentially encrypt the dispersion key to generate a ciphertext of the dispersion key and send it to the host computer. After receiving the ciphertext of the dispersion key, the host computer sends the ciphertext of the dispersion key to the RFID tag reader-writer through a write instruction. After receiving the RFID tag reader-writer, the ciphertext of the dispersion key is decrypted and the plaintext of the dispersion key is written into the RFID tag to be updated. In this way, even if the dispersion key is intercepted or even the protection key is known, it is difficult to crack if the encryption order of using a plurality of different protection keys is not understood, thereby realizing the protection of the key data of the RFID tag, and further ensuring that the application data in the RFID tag is not illegally tampered with.
[0184] Figure 3 A flowchart of another RFID tag key update method according to a specific embodiment 2 of the present disclosure is shown, which is applied to Figure 1 The RFID tag key update system shown in the figure takes the use of two protection keys as an example. Figure 3 As shown, the RFID tag key update method includes the following steps S310~S370:
[0185] In step S310, the host computer obtains the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated.
[0186] In step S320, the host computer sends the key dispersion factor to the cryptographic machine.
[0187] In step S330, the protection key includes a first protection key and a second protection key. The cryptographic machine generates a dispersion key according to the key dispersion factor and a pre-stored root key, and uses the first protection key to encrypt the dispersion key to generate a first ciphertext of the dispersion key; and uses the second protection key to encrypt the first ciphertext of the dispersion key to generate a second ciphertext of the dispersion key.
[0188] In step S340, the cryptographic machine sends the second ciphertext of the distributed key to the host computer.
[0189] In step S350, after obtaining the second ciphertext of the distributed key, the host computer sends the second ciphertext of the distributed key to the RFID tag reader / writer through a third write instruction.
[0190] In step S360, after receiving the third write instruction, the RFID tag reader obtains the second ciphertext of the distributed key based on the third write instruction; uses the second protection key to decrypt the second ciphertext of the distributed key to obtain the first ciphertext of the distributed key; and uses the first protection key to decrypt the first ciphertext of the distributed key to obtain the distributed key.
[0191] In this step S360, the second ciphertext of the distributed key is decrypted through a process opposite to that of step S330, thereby obtaining a plaintext of the distributed key.
[0192] In step S370, the RFID tag reader / writer writes the distributed key into the RFID tag to be updated. Specific embodiments
[0193] In specific embodiment 3, based on the design idea of first processing the ciphertext of the distributed key in a preset manner and then sending the processed ciphertext of the distributed key to the RFID tag reader, the difficulty of cracking after being intercepted is increased.
[0194] Specifically, after the host computer receives the ciphertext of the distributed key sent by the cipher machine, it first processes the ciphertext of the distributed key using a preset method, and then sends the processed ciphertext of the distributed key to the RFID tag reader. After receiving the ciphertext of the distributed key, the RFID tag reader uses the same preset method to reversely process the processed ciphertext of the distributed key to generate the ciphertext of the distributed key, and then uses the protection key to decrypt the ciphertext of the distributed key to obtain the distributed key, and finally writes the distributed key to the RFID tag to be updated. In this way, even if the processed distributed key is intercepted, or even the protection key is known, if it is not known which preset method is used to process the distributed key, the real distributed key cannot be restored, thereby realizing the protection of the key data of the RFID tag, and further ensuring that the application data in the RFID tag is not illegally tampered with.
[0195] Figure 4 A flowchart of another RFID tag key update method according to a specific embodiment 3 of the present disclosure is shown, which is applied to Figure 1 The RFID tag key update system shown is as follows Figure 4 As shown, the RFID tag key update method includes the following steps S410~S480:
[0196] In step S410, the host computer obtains the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated.
[0197] In step S420, the host computer sends the key dispersion factor to the cryptographic machine.
[0198] In step S430, the cryptographic machine generates a distributed key according to the key dispersion factor and a pre-stored root key, and uses a pre-stored protection key to encrypt the distributed key to generate a ciphertext of the distributed key.
[0199] In step S440, the cryptographic machine sends the ciphertext of the distributed key to the host computer.
[0200] In step S450, after receiving the ciphertext of the distributed key, the host computer processes the ciphertext of the distributed key in a preset manner to generate a processed ciphertext of the distributed key.
[0201] The preset method may be set according to specific system requirements. For example, the ciphertext of the distributed key may be processed in reverse order, or the ciphertext of the distributed key may be XORed with a fixed character string of specific length and content.
[0202] In step S460, the host computer sends the processed ciphertext of the distributed key to the RFID tag reader / writer via a fourth write instruction.
[0203] In step S470, the RFID tag reader obtains the processed ciphertext of the distributed key based on the fourth write instruction; uses the preset method to inversely process the processed ciphertext of the distributed key to generate the ciphertext of the distributed key; and uses the protection key to decrypt the ciphertext of the distributed key to obtain the distributed key.
[0204] When the processed ciphertext of the distributed key is reversely processed using the preset method, the processed ciphertext of the distributed key is reversely processed using the preset method used in step S450. For example, if the preset method is to reverse the ciphertext of the distributed key, then in this step S470, the processed ciphertext of the distributed key also needs to be reversed.
[0205] In step S480, the distributed key is written into the RFID tag to be updated.
[0206] As described above, the implementation methods in Specific Embodiment 1, Specific Embodiment 2 and Specific Embodiment 3 can be used alone or in combination in specific applications. For example, Specific Embodiment 2 and Specific Embodiment 3 can be combined for implementation, that is, the host computer processes the second ciphertext of the distributed key generated based on the first protection key and the second protection key in a preset manner and then sends it to the RFID tag reader. After receiving the RFID tag reader, the RFID tag reader first uses the same preset manner to reversely process the processed second ciphertext of the distributed key to obtain the second ciphertext of the distributed key, and then uses the first protection key and the second protection key to decrypt the second ciphertext of the distributed key to obtain the distributed key. By combining multiple implementation methods, the security of the RFID system is further improved.
[0207] Figure 5 A flow chart of a RFID tag key update method according to an embodiment of the present disclosure is shown, which is applied to a host computer, and the host computer is connected to a cryptographic machine and an RFID tag reader / writer, respectively. Figure 5 As shown, the RFID tag key update method includes the following steps S510-S520:
[0208] In step S510, a key dispersion factor corresponding to the RFID tag to be updated is obtained according to the type of the key dispersion factor corresponding to the RFID tag to be updated; the key dispersion factor is sent to the cryptographic machine, so that the cryptographic machine generates a dispersion key according to the key dispersion factor and a pre-stored root key, and uses a pre-stored protection key to encrypt the dispersion key to generate a ciphertext of the dispersion key.
[0209] According to an embodiment of the present disclosure, the types of key dispersion factors include: a key dispersion factor from within an RFID tag and a key dispersion factor from outside the RFID tag; the key dispersion factor from within the RFID tag includes one or more of the following items: a unique identifier UID / TID of the RFID tag, an electronic product code EPC of the RFID tag, and a preset key dispersion factor stored in the RFID tag; the key dispersion factor from outside the RFID tag includes: a key dispersion factor specified by the customer to which the RFID tag belongs.
[0210] The obtaining of the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated includes: when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from within the RFID tag, the host computer sends a read instruction for obtaining the key dispersion factor to the RFID tag reader / writer, and after the RFID tag reader / writer receives the read instruction for obtaining the key dispersion factor, it reads the key dispersion factor from the RFID tag to be updated and returns the key dispersion factor to the host computer; when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from outside the RFID tag, the host computer reads the key dispersion factor from a preset storage area.
[0211] In step S520, the ciphertext of the distributed key is obtained, and the ciphertext of the distributed key is sent to the RFID tag reader.
[0212] According to an embodiment of the present disclosure, the key dispersion factor includes a first key dispersion factor and a second key dispersion factor, the cryptographic machine generates a dispersion key according to the key dispersion factor and a pre-stored root key, and uses a pre-stored protection key to encrypt the dispersion key to generate a ciphertext of the dispersion key, including: generating a first dispersion key according to the first key dispersion factor and the root key; encrypting the first dispersion key using the protection key to generate the ciphertext of the first dispersion key; generating a second dispersion key according to the second key dispersion factor and the root key; and encrypting the second dispersion key using the protection key to generate the ciphertext of the second dispersion key.
[0213] According to an embodiment of the present disclosure, sending the ciphertext of the distributed key to the RFID tag reader / writer includes: after obtaining the ciphertext of the first distributed key and the ciphertext of the second distributed key, sending the ciphertext of the first distributed key and the ciphertext of the second distributed key to the RFID tag reader / writer through a first write instruction and a second write instruction respectively, wherein the first write instruction and the second write instruction contain a mark indicating whether the instruction is valid.
[0214] According to an embodiment of the present disclosure, the protection key includes a first protection key and a second protection key, and the cryptographic machine uses a pre-stored protection key to encrypt the distributed key to generate a ciphertext of the distributed key, including: using the first protection key to encrypt the distributed key to generate a first ciphertext of the distributed key; using the second protection key to encrypt the first ciphertext of the distributed key to generate a second ciphertext of the distributed key.
[0215] According to an embodiment of the present disclosure, sending the ciphertext of the distributed key to the RFID tag reader includes: after obtaining the second ciphertext of the distributed key, sending the second ciphertext of the distributed key to the RFID tag reader through a third write instruction.
[0216] According to an embodiment of the present disclosure, sending the ciphertext of the distributed key to the RFID tag reader specifically includes: processing the ciphertext of the distributed key using a preset method to generate the processed ciphertext of the distributed key; and sending the processed ciphertext of the distributed key to the RFID tag reader via a fourth write instruction.
[0217] Figure 6 Another RFID tag key update method flow chart according to an embodiment of the present disclosure is shown, which is applied to an RFID tag reader / writer, wherein the RFID tag reader / writer is connected to a host computer, and the host computer is connected to a cryptographic machine, such as Figure 6 As shown, the RFID tag key update method includes the following steps S610~S630:
[0218] In step S610, the ciphertext of the distributed key sent by the host computer is received, wherein the ciphertext of the distributed key is generated by the cryptographic machine by first generating the distributed key according to the key dispersion factor input by the host computer and the pre-stored root key, and then encrypting the distributed key using the pre-stored protection key.
[0219] In step S620, the ciphertext of the distributed key is decrypted according to the pre-stored protection key to obtain the distributed key.
[0220] In step S630, the distributed key is written into the RFID tag to be updated.
[0221] According to an embodiment of the present disclosure, the receiving of the ciphertext of the distributed key sent by the host computer includes: receiving a first write instruction and a second write instruction sent by the host computer, wherein the first write instruction contains the ciphertext of the first distributed key and a mark indicating whether the instruction is valid; the second write instruction contains the ciphertext of the second distributed key and a mark indicating whether the instruction is valid.
[0222] According to an embodiment of the present disclosure, the decryption processing of the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key includes: after receiving the first write instruction and the second write instruction, respectively obtaining the ciphertext of the first distributed key and the ciphertext of the second distributed key based on the first write instruction and the second write instruction, and the mark indicating whether the first write instruction and the second write instruction are valid, and using the ciphertext of the distributed key in the write instruction corresponding to the mark indicating that the instruction is valid as the ciphertext of the valid distributed key; using the protection key to decrypt the ciphertext of the valid distributed key to obtain the valid distributed key, and writing the valid distributed key into the RFID tag to be updated.
[0223] According to an embodiment of the present disclosure, the receiving the ciphertext of the distributed key sent by the host computer includes: receiving a third write instruction sent by the host computer, wherein the third write instruction includes the second ciphertext of the distributed key.
[0224] According to an embodiment of the present disclosure, the protection key includes a first protection key and a second protection key, and the decryption processing of the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key includes: after receiving the third write instruction, obtaining the second ciphertext of the distributed key based on the third write instruction; using the second protection key to decrypt the second ciphertext of the distributed key to obtain the first ciphertext of the distributed key; using the first protection key to decrypt the first ciphertext of the distributed key to obtain the distributed key; and writing the distributed key into the RFID tag to be updated.
[0225] According to an embodiment of the present disclosure, the receiving of the ciphertext of the distributed key sent by the host computer includes: receiving a fourth write instruction sent by the host computer, wherein the fourth write instruction includes the processed ciphertext of the distributed key generated after processing the ciphertext of the distributed key using a preset method.
[0226] According to an embodiment of the present disclosure, the decryption processing of the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key includes: after receiving the fourth write instruction, obtaining the ciphertext of the processed distributed key based on the fourth write instruction; using the preset method to reversely process the ciphertext of the processed distributed key to generate the ciphertext of the distributed key; using the protection key to decrypt the ciphertext of the distributed key to obtain the distributed key; and writing the distributed key to the RFID tag to be updated.
[0227] Figure 7 Another RFID tag key update method according to an embodiment of the present disclosure is shown, which is applied to a cryptographic machine connected to a host computer, such as Figure 7As shown, the RFID tag key update method includes the following steps S710-S720:
[0228] In step S710, a distributed key is generated according to a pre-stored root key and a key distribution factor input by the host computer.
[0229] In step S720, the distributed key is encrypted using the pre-stored protection key to generate a ciphertext of the distributed key, and the ciphertext of the distributed key is sent to the host computer.
[0230] According to an embodiment of the present disclosure, the key dispersion factor includes a first key dispersion factor and a second key dispersion factor, and the generating of a dispersion key according to a pre-stored root key and a key dispersion factor input by the host computer includes: generating a first dispersion key according to the first key dispersion factor and the root key; generating a second dispersion key according to the second key dispersion factor and the root key; encrypting the dispersion key with a pre-stored protection key to generate a ciphertext of the dispersion key includes: encrypting the first dispersion key with the protection key to generate a ciphertext of the first dispersion key; encrypting the second dispersion key with the protection key to generate a ciphertext of the second dispersion key; sending the ciphertext of the dispersion key to the host computer includes: sending the ciphertext of the first dispersion key and the ciphertext of the second dispersion key to the host computer respectively.
[0231] According to an embodiment of the present disclosure, the protection key includes a first protection key and a second protection key, and the use of a pre-stored protection key to encrypt the distributed key to generate a ciphertext of the distributed key, and sending the ciphertext of the distributed key to the host computer includes: using the first protection key to encrypt the distributed key to generate a first ciphertext of the distributed key; using the second protection key to encrypt the first ciphertext of the distributed key to generate a second ciphertext of the distributed key; and sending the second ciphertext of the distributed key to the host computer.
[0232] Figure 8 The structural block diagram of an RFID tag key update device according to an embodiment of the present disclosure is shown. The RFID tag key update device is set in a host computer, and the host computer is connected to a cryptographic machine and an RFID tag reader / writer respectively. Figure 8As shown, the RFID tag key updating device 800 includes: a key dispersion factor acquisition module, which is configured to obtain a key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated; sending the key dispersion factor to the cryptographic machine, so that the cryptographic machine generates a dispersion key according to the key dispersion factor and a pre-stored root key, and uses a pre-stored protection key to encrypt the dispersion key to generate a ciphertext of the dispersion key; a dispersion key ciphertext acquisition module, which is configured to obtain the ciphertext of the dispersion key; and a dispersion key ciphertext sending module, which is configured to send the ciphertext of the dispersion key to the RFID tag reader.
[0233] Fig. 9 The structural block diagram of another RFID tag key update device according to an embodiment of the present disclosure is shown. The RFID tag key update device is set in an RFID tag reader, the RFID tag reader is connected to a host computer, and the host computer is connected to a cryptographic machine. Fig. 9 As shown, the RFID tag key update device 900 includes: a distributed key ciphertext receiving module, which is configured to receive the ciphertext of the distributed key sent by the host computer, wherein the ciphertext of the distributed key is generated by the cryptographic machine first generating a distributed key according to the key dispersion factor input by the host computer and the pre-stored root key, and then encrypting the distributed key using the pre-stored protection key; a distributed key plaintext acquisition module, which is configured to decrypt the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key; and a distributed key writing module, which is configured to write the distributed key into the RFID tag to be updated.
[0234] Fig.10 A structural block diagram of another RFID tag key update device according to an embodiment of the present disclosure is shown. The RFID tag key update device is set in a cryptographic machine, and the cryptographic machine is connected to a host computer. Fig.10 As shown, the RFID tag key updating device 1000 includes: a distributed key generation module, which is configured to generate a distributed key based on a pre-stored root key and a key dispersion factor input by the host computer; a distributed key encryption module, which is configured to use a pre-stored protection key to encrypt the distributed key to generate a ciphertext of the distributed key, and send the ciphertext of the distributed key to the host computer.
[0235] Fig.11 The structural block diagram of an RFID tag reader according to an embodiment of the present disclosure is shown. The RFID tag reader is connected to a host computer, and the host computer is connected to a cryptographic machine. Fig.11As shown, the RFID tag reader includes: an MCU control unit, a security chip and a radio frequency module; the MCU control unit is connected to the security chip and the radio frequency module respectively; the MCU control unit is configured to receive the ciphertext of the distributed key sent by the host computer, wherein the ciphertext of the distributed key is generated by the cryptographic machine firstly generating the distributed key according to the key dispersion factor input by the host computer and the pre-stored root key, and then encrypting the distributed key using the pre-stored protection key; the security chip is configured to decrypt the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key; the radio frequency module is configured to write the distributed key into the RFID tag to be updated.
[0236] Fig.12 A structural block diagram of another RFID tag key update system according to an embodiment of the present disclosure is shown. Figure 8 , Fig.10 and Fig.11 ,exist Fig.12 1 shows the specific structure of each part of an RFID tag key update system according to an embodiment of the present disclosure, and shows an RFID tag to be updated connected to the RFID tag key update system 1200. Fig.12 As shown, the RFID tag key update system 1200 includes: a cryptographic machine, a host computer and Fig.11 The RFID tag reader shown in the figure; the cipher machine is connected to the host computer, and the host computer is connected to the RFID tag reader; wherein the cipher machine is provided with Fig.10 The RFID tag key update device 1000 shown in the figure has the following configuration on the host computer: Figure 8 An RFID tag key updating device 800 is shown.
[0237] According to the technical solution provided by the embodiment of the present disclosure, in the key filling link of the RFID tag, the key data of the RFID tag is sent from the host computer to the RFID tag reader in ciphertext, and the ciphertext of the key data is decrypted inside the RFID tag reader, and then the plaintext of the decrypted key data is written into the RFID tag. In the process of writing the RFID tag key, since the key data is sent from the host computer to the RFID tag reader in ciphertext, it cannot be easily cracked even if it is intercepted by the port monitoring tool. Therefore, by encrypting and sending the key data of the RFID tag, the safe writing of the key data of the RFID tag is guaranteed, the protection of the key data of the RFID tag is realized, and the application data in the RFID tag is guaranteed not to be illegally tampered with.
[0238] Fig.13 1 shows a structural block diagram of an electronic device according to an embodiment of the present disclosure. Fig.13 As shown, the electronic device includes a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the updating method as described in any one of the above method embodiments.
[0239] The present disclosure also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the electronic device or computer system in the above embodiment; or a computer-readable storage medium that exists independently and is not assembled into a device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the update method described in the present disclosure.
[0240] The present disclosure also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the updating method described in any one of the present disclosure is implemented.
[0241] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.
Claims
1. An RFID tag key update system, characterized in that: The update system includes: a cryptographic machine, a host computer and an RFID tag reader / writer; the cryptographic machine is connected to the host computer, and the host computer is connected to the RFID tag reader / writer; The host computer is configured to obtain the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated; and send the key dispersion factor to the cryptographic machine; wherein the types of the key dispersion factor include: a key dispersion factor from within the RFID tag and a key dispersion factor from outside the RFID tag; the obtaining the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated includes: when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from within the RFID tag, the host computer sends a read instruction for obtaining the key dispersion factor to the RFID tag reader-writer, and after receiving the read instruction for obtaining the key dispersion factor, the RFID tag reader-writer reads the key dispersion factor from the RFID tag to be updated and returns the key dispersion factor to the host computer; when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from outside the RFID tag, the host computer reads the key dispersion factor from a preset storage area; The cryptographic machine is configured to generate a distributed key according to the key dispersion factor and a pre-stored root key, encrypt the distributed key using a pre-stored protection key to generate a ciphertext of the distributed key, and send the ciphertext of the distributed key to the host computer; The host computer is also configured to send the ciphertext of the distributed key to the RFID tag reader; The RFID tag reader is configured to decrypt the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key, and write the distributed key into the RFID tag to be updated.
2. The updating system according to claim 1, characterized in that: in, The key dispersion factor from the RFID tag includes one or more of the following items: a unique identifier UID / TID of the RFID tag, an electronic product code EPC of the RFID tag, and a preset key dispersion factor stored in the RFID tag; The key dispersion factor from outside the RFID tag includes: a key dispersion factor specified by the customer to which the RFID tag belongs.
3. The updating system according to claim 1, characterized in that: The key dispersion factor includes a first key dispersion factor and a second key dispersion factor, The generating of the distributed key according to the key distribution factor and the pre-stored root key comprises: the cryptographic machine generating a first distributed key according to the first key distribution factor and the root key; generating a second distributed key according to the second key distribution factor and the root key; The method of using the pre-stored protection key to encrypt the distributed key to generate the ciphertext of the distributed key includes: the cryptographic machine uses the protection key to encrypt the first distributed key to generate the ciphertext of the first distributed key; and uses the protection key to encrypt the second distributed key to generate the ciphertext of the second distributed key; The sending of the ciphertext of the distributed key to the upper computer comprises: the cryptographic machine sending the ciphertext of the first distributed key and the ciphertext of the second distributed key to the upper computer respectively.
4. The updating system according to claim 3, characterized in that: The step of sending the ciphertext of the distributed key to the RFID tag reader / writer comprises: After obtaining the ciphertext of the first distributed key and the ciphertext of the second distributed key, the upper computer sends the ciphertext of the first distributed key and the ciphertext of the second distributed key to the RFID tag reader through a first write instruction and a second write instruction respectively, wherein the first write instruction and the second write instruction contain a mark indicating whether the instruction is valid.
5. The updating system according to claim 4, characterized in that: The flags indicating whether the first write instruction and the second write instruction are valid are determined by a preset rule.
6. The updating system according to claim 4, characterized in that: The decrypting of the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key, and writing the distributed key into the RFID tag to be updated includes: After receiving the first write instruction and the second write instruction, the RFID tag reader / writer obtains the ciphertext of the first dispersed key and the ciphertext of the second dispersed key based on the first write instruction and the second write instruction, respectively, and the mark indicating whether the first write instruction and the second write instruction are valid, and uses the ciphertext of the dispersed key in the write instruction corresponding to the mark indicating that the instruction is valid as the ciphertext of the valid dispersed key; uses the protection key to decrypt the ciphertext of the valid dispersed key to obtain the valid dispersed key, and writes the valid dispersed key into the RFID tag to be updated.
7. The updating system according to claim 1, characterized in that: The protection key includes a first protection key and a second protection key, and the use of the pre-stored protection key to encrypt the distributed key to generate the ciphertext of the distributed key, and sending the ciphertext of the distributed key to the host computer includes: The cryptographic machine uses the first protection key to encrypt the distributed key to generate a first ciphertext of the distributed key; and uses the second protection key to encrypt the first ciphertext of the distributed key to generate a second ciphertext of the distributed key; The second ciphertext of the distributed key is sent to the host computer.
8. The updating system according to claim 7, characterized in that: The step of sending the ciphertext of the distributed key to the RFID tag reader / writer comprises: After obtaining the second ciphertext of the distributed key, the host computer sends the second ciphertext of the distributed key to the RFID tag reader / writer through a third write instruction.
9. The updating system according to claim 8, characterized in that: The decrypting of the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key, and writing the distributed key into the RFID tag to be updated includes: After receiving the third write instruction, the RFID tag reader / writer obtains the second ciphertext of the distributed key based on the third write instruction; Using the second protection key to decrypt the second ciphertext of the distributed key to obtain the first ciphertext of the distributed key; using the first protection key to decrypt the first ciphertext of the distributed key to obtain the distributed key; The distributed key is written into the RFID tag to be updated.
10. The updating system according to claim 1, characterized in that: The step of sending the ciphertext of the distributed key to the RFID tag reader / writer comprises: The host computer processes the ciphertext of the distributed key using a preset method to generate a processed ciphertext of the distributed key; The processed ciphertext of the distributed key is sent to the RFID tag reader / writer via a fourth write instruction.
11. The updating system according to claim 10, characterized in that: The decrypting of the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key, and writing the distributed key into the RFID tag to be updated includes: After receiving the fourth write instruction, the RFID tag reader / writer obtains the processed ciphertext of the distributed key based on the fourth write instruction; Using the preset method, inversely process the processed ciphertext of the distributed key to generate the ciphertext of the distributed key; Decrypting the ciphertext of the distributed key using the protection key to obtain the distributed key; The distributed key is written into the RFID tag to be updated.
12. The updating system according to claim 1, characterized in that: The RFID tag reader is connected to the host computer via a serial port or a USB.
13. A method for updating an RFID tag key, applied to a host computer, the host computer being connected to a cryptographic machine and an RFID tag reader / writer, characterized in that: The updating method comprises: The method comprises: obtaining a key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated; sending the key dispersion factor to the cryptographic machine, so that the cryptographic machine generates a dispersion key according to the key dispersion factor and a pre-stored root key, and encrypts the dispersion key with a pre-stored protection key to generate a ciphertext of the dispersion key; wherein the types of the key dispersion factor include: a key dispersion factor from inside the RFID tag and a key dispersion factor from outside the RFID tag; obtaining a key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated The key dispersion factor comprises: when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from within the RFID tag, the host computer sends a read instruction for obtaining the key dispersion factor to the RFID tag reader / writer, and after the RFID tag reader / writer receives the read instruction for obtaining the key dispersion factor, the key dispersion factor is read from the RFID tag to be updated, and the key dispersion factor is returned to the host computer; when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from outside the RFID tag, the host computer reads the key dispersion factor from a preset storage area; Obtaining the ciphertext of the distributed key; The ciphertext of the distributed key is sent to the RFID tag reader / writer.
14. The updating method according to claim 13, characterized in that: The key dispersion factor from the RFID tag includes one or more of the following items: a unique identifier UID / TID of the RFID tag, an electronic product code EPC of the RFID tag, and a preset key dispersion factor stored in the RFID tag; The key dispersion factor from outside the RFID tag includes: a key dispersion factor specified by the customer to which the RFID tag belongs.
15. The updating method according to claim 13, characterized in that: The key dispersion factor includes a first key dispersion factor and a second key dispersion factor, the cryptographic machine generates a dispersion key according to the key dispersion factor and a pre-stored root key, and uses a pre-stored protection key to encrypt the dispersion key to generate a ciphertext of the dispersion key, including: Generate a first distributed key according to the first key distribution factor and the root key; encrypt the first distributed key using the protection key to generate a ciphertext of the first distributed key; A second distributed key is generated according to the second key distribution factor and the root key; and the second distributed key is encrypted using the protection key to generate a ciphertext of the second distributed key.
16. The updating method according to claim 15, characterized in that: The step of sending the ciphertext of the distributed key to the RFID tag reader / writer comprises: After obtaining the ciphertext of the first distributed key and the ciphertext of the second distributed key, the ciphertext of the first distributed key and the ciphertext of the second distributed key are sent to the RFID tag reader through a first write instruction and a second write instruction respectively, wherein the first write instruction and the second write instruction contain a mark indicating whether the instruction is valid.
17. The updating method according to claim 13, characterized in that: The protection key includes a first protection key and a second protection key, and the cryptographic machine uses the pre-stored protection key to encrypt the distributed key to generate a ciphertext of the distributed key, including: Using the first protection key to encrypt the distributed key to generate a first ciphertext of the distributed key; The first ciphertext of the distributed key is encrypted using the second protection key to generate a second ciphertext of the distributed key.
18. The updating method according to claim 17, characterized in that: The step of sending the ciphertext of the distributed key to the RFID tag reader / writer comprises: After obtaining the second ciphertext of the distributed key, the second ciphertext of the distributed key is sent to the RFID tag reader / writer through a third write instruction.
19. The updating method according to claim 13, characterized in that: The step of sending the ciphertext of the distributed key to the RFID tag reader / writer specifically includes: Processing the ciphertext of the distributed key using a preset method to generate a processed ciphertext of the distributed key; The processed ciphertext of the distributed key is sent to the RFID tag reader / writer via a fourth write instruction.
20. A method for updating an RFID tag key, applied to an RFID tag reader / writer, wherein the RFID tag reader / writer is connected to a host computer, and the host computer is connected to a cryptographic machine, characterized in that: The updating method comprises: Receive the ciphertext of the decentralized key sent by the host computer, wherein the ciphertext of the decentralized key is generated by the cryptographic machine firstly generating a decentralized key according to the key decentralized factor input by the host computer and the pre-stored root key, and then encrypting the decentralized key using the pre-stored protection key; wherein the key decentralized factor corresponds to the RFID tag to be updated, and is obtained by the host computer according to the type of the key decentralized factor corresponding to the RFID tag to be updated, and the type of the key decentralized factor includes: a key decentralized factor from inside the RFID tag and a key decentralized factor from outside the RFID tag; the host computer obtains the key decentralized factor corresponding to the RFID tag to be updated according to the type of the key decentralized factor corresponding to the RFID tag to be updated The key dispersion factor corresponding to the updated RFID tag includes: when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from within the RFID tag, the host computer sends a read instruction for obtaining the key dispersion factor to the RFID tag reader, and after the RFID tag reader receives the read instruction for obtaining the key dispersion factor, the key dispersion factor is read from the RFID tag to be updated, and the key dispersion factor is returned to the host computer; when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from outside the RFID tag, the host computer reads the key dispersion factor from a preset storage area; Decrypting the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key; The distributed key is written into the RFID tag to be updated.
21. The updating method according to claim 20, characterized in that: The receiving of the ciphertext of the distributed key sent by the host computer includes: Receive a first write instruction and a second write instruction sent by the host computer, wherein the first write instruction includes a ciphertext of a first distributed key and a mark indicating whether the instruction is valid; and the second write instruction includes a ciphertext of a second distributed key and a mark indicating whether the instruction is valid.
22. The updating method according to claim 21, characterized in that: The decrypting of the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key includes: After receiving the first write instruction and the second write instruction, respectively obtain the ciphertext of the first distributed key and the ciphertext of the second distributed key and the marks indicating whether the first write instruction and the second write instruction are valid, based on the first write instruction and the second write instruction, and use the ciphertext of the distributed key in the write instruction corresponding to the mark indicating that the instruction is valid as the ciphertext of the valid distributed key; The protection key is used to decrypt the ciphertext of the effective distributed key to obtain the effective distributed key, and the effective distributed key is written into the RFID tag to be updated.
23. The updating method according to claim 20, characterized in that: The receiving of the ciphertext of the distributed key sent by the host computer includes: A third write instruction sent by the host computer is received, wherein the third write instruction includes a second ciphertext of the distributed key.
24. The updating method according to claim 23, characterized in that: The protection key includes a first protection key and a second protection key, and the decrypting the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key includes: After receiving the third write instruction, obtaining a second ciphertext of the distributed key based on the third write instruction; Decrypting the second ciphertext of the distributed key using the second protection key to obtain the first ciphertext of the distributed key; Decrypting the first ciphertext of the distributed key using the first protection key to obtain the distributed key; The distributed key is written into the RFID tag to be updated.
25. The updating method according to claim 20, characterized in that: The receiving of the ciphertext of the distributed key sent by the host computer includes: A fourth write instruction sent by the host computer is received, wherein the fourth write instruction includes a processed ciphertext of the distributed key generated after the host computer processes the ciphertext of the distributed key in a preset manner.
26. The updating method according to claim 25, characterized in that: The decrypting of the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key includes: After receiving the fourth write instruction, obtaining the processed ciphertext of the distributed key based on the fourth write instruction; Using the preset method, inversely process the processed ciphertext of the distributed key to generate the ciphertext of the distributed key; Decrypting the ciphertext of the distributed key using the protection key to obtain the distributed key; The distributed key is written into the RFID tag to be updated.
27. A method for updating a RFID tag key, applied to a cryptographic machine, the cryptographic machine being connected to a host computer, characterized in that: The updating method comprises: Generate a distributed key according to a pre-stored root key and a key dispersion factor input by the host computer; wherein the key dispersion factor corresponds to the RFID tag to be updated, and is obtained by the host computer according to the type of the key dispersion factor corresponding to the RFID tag to be updated, and the type of the key dispersion factor includes: a key dispersion factor from within the RFID tag and a key dispersion factor from outside the RFID tag; the host computer obtains the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated, including: when the type of the key dispersion factor corresponding to the RFID tag to be updated is the key dispersion factor from within the RFID tag, the host computer sends a read instruction for obtaining the key dispersion factor to the RFID tag reader-writer, and after receiving the read instruction for obtaining the key dispersion factor, the RFID tag reader-writer reads the key dispersion factor from the RFID tag to be updated, and returns the key dispersion factor to the host computer; when the type of the key dispersion factor corresponding to the RFID tag to be updated is the key dispersion factor from outside the RFID tag, the host computer reads the key dispersion factor from a preset storage area; The distributed key is encrypted using a pre-stored protection key to generate a ciphertext of the distributed key, and the ciphertext of the distributed key is sent to the host computer.
28. The updating method according to claim 27, characterized in that: The key dispersion factor includes a first key dispersion factor and a second key dispersion factor, The generating of the distributed key according to the pre-stored root key and the key dispersing factor input by the host computer includes: Generate a first distributed key according to the first key distribution factor and the root key; generate a second distributed key according to the second key distribution factor and the root key; The method of using the pre-stored protection key to encrypt the distributed key to generate the ciphertext of the distributed key includes: using the protection key to encrypt the first distributed key to generate the ciphertext of the first distributed key; using the protection key to encrypt the second distributed key to generate the ciphertext of the second distributed key; The sending the ciphertext of the distributed key to the host computer includes: sending the ciphertext of the first distributed key and the ciphertext of the second distributed key to the host computer respectively.
29. The updating method according to claim 27, characterized in that: The protection key includes a first protection key and a second protection key, The method of using the pre-stored protection key to encrypt the distributed key to generate the ciphertext of the distributed key, and sending the ciphertext of the distributed key to the host computer includes: Using the first protection key to encrypt the distributed key to generate a first ciphertext of the distributed key; using the second protection key to encrypt the first ciphertext of the distributed key to generate a second ciphertext of the distributed key; The second ciphertext of the distributed key is sent to the host computer.
30. An RFID tag key update device, arranged in a host computer, the host computer is connected to a cryptographic machine and an RFID tag reader / writer respectively, characterized in that: The updating device comprises: The key dispersion factor acquisition module is configured to acquire the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated; send the key dispersion factor to the cryptographic machine, so that the cryptographic machine generates a dispersion key according to the key dispersion factor and a pre-stored root key, and encrypts the dispersion key with a pre-stored protection key to generate a ciphertext of the dispersion key; wherein the types of the key dispersion factor include: a key dispersion factor from within the RFID tag and a key dispersion factor from outside the RFID tag; the acquiring of the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor The key dispersion factor corresponding to the ID tag includes: when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from the RFID tag, the host computer sends a read instruction for obtaining the key dispersion factor to the RFID tag reader, and after the RFID tag reader receives the read instruction for obtaining the key dispersion factor, the key dispersion factor is read from the RFID tag to be updated, and the key dispersion factor is returned to the host computer; when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from outside the RFID tag, the host computer reads the key dispersion factor from a preset storage area; A distributed key ciphertext acquisition module, configured to acquire the ciphertext of the distributed key; The distributed key ciphertext sending module is configured to send the distributed key ciphertext to the RFID tag reader.
31. An RFID tag key updating device, arranged in an RFID tag reader / writer, the RFID tag reader / writer is connected to a host computer, the host computer is connected to a cryptographic machine, characterized in that: The updating device comprises: The distributed key ciphertext receiving module is configured to receive the ciphertext of the distributed key sent by the host computer, wherein the ciphertext of the distributed key is generated by the cipher machine first generating a distributed key according to the key dispersion factor input by the host computer and the pre-stored root key, and then encrypting the distributed key using the pre-stored protection key; wherein the key dispersion factor corresponds to the RFID tag to be updated, and is obtained by the host computer according to the type of the key dispersion factor corresponding to the RFID tag to be updated, and the type of the key dispersion factor includes: a key dispersion factor from inside the RFID tag and a key dispersion factor from outside the RFID tag; the host computer obtains the key dispersion factor according to the key dispersion factor corresponding to the RFID tag to be updated The method comprises: when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from within the RFID tag, the host computer sends a read instruction for obtaining the key dispersion factor to the RFID tag reader / writer, and after the RFID tag reader / writer receives the read instruction for obtaining the key dispersion factor, the RFID tag reader / writer reads the key dispersion factor from the RFID tag to be updated and returns the key dispersion factor to the host computer; when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from outside the RFID tag, the host computer reads the key dispersion factor from a preset storage area; A distributed key plaintext acquisition module is configured to decrypt the ciphertext of the distributed key according to a pre-stored protection key to obtain the distributed key; The distributed key writing module is configured to write the distributed key into the RFID tag to be updated.
32. An RFID tag key update device, arranged in a cryptographic machine, the cryptographic machine being connected to a host computer, characterized in that: The updating device comprises: A distributed key generation module is configured to generate a distributed key according to a pre-stored root key and a key dispersion factor input by the host computer; wherein the key dispersion factor corresponds to the RFID tag to be updated, and is obtained by the host computer according to the type of the key dispersion factor corresponding to the RFID tag to be updated, and the type of the key dispersion factor includes: a key dispersion factor from within the RFID tag and a key dispersion factor from outside the RFID tag; the host computer obtains the key dispersion factor corresponding to the RFID tag to be updated according to the type of the key dispersion factor corresponding to the RFID tag to be updated, including: when the type of the key dispersion factor corresponding to the RFID tag to be updated is the key dispersion factor from within the RFID tag, the host computer sends a read instruction for obtaining the key dispersion factor to the RFID tag reader, and after receiving the read instruction for obtaining the key dispersion factor, the RFID tag reader reads the key dispersion factor from the RFID tag to be updated and returns the key dispersion factor to the host computer; when the type of the key dispersion factor corresponding to the RFID tag to be updated is the key dispersion factor from outside the RFID tag, the host computer reads the key dispersion factor from a preset storage area; The distributed key encryption module is configured to use a pre-stored protection key to encrypt the distributed key to generate a ciphertext of the distributed key, and send the ciphertext of the distributed key to the host computer.
33. An RFID tag reader / writer, the RFID tag reader / writer is connected to a host computer, the host computer is connected to a cryptographic machine, characterized in that: The RFID tag reader / writer comprises: an MCU control unit, a security chip and a radio frequency module; the MCU control unit is connected to the security chip and the radio frequency module respectively; The MCU control unit is configured to receive the ciphertext of the distributed key sent by the host computer, wherein the ciphertext of the distributed key is generated by the cryptographic machine by first generating a distributed key according to the key dispersion factor input by the host computer and the pre-stored root key, and then encrypting the distributed key using the pre-stored protection key; wherein the key dispersion factor corresponds to the RFID tag to be updated, and is obtained by the host computer according to the type of the key dispersion factor corresponding to the RFID tag to be updated, and the type of the key dispersion factor includes: a key dispersion factor from inside the RFID tag and a key dispersion factor from outside the RFID tag; the host computer obtains the key dispersion factor according to the type of the key dispersion factor corresponding to the RFID tag to be updated Acquiring a key dispersion factor corresponding to the RFID tag to be updated, comprising: when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from within the RFID tag, the host computer sends a read instruction for acquiring the key dispersion factor to the RFID tag reader-writer, and after the RFID tag reader-writer receives the read instruction for acquiring the key dispersion factor, the key dispersion factor is read from the RFID tag to be updated, and the key dispersion factor is returned to the host computer; when the type of the key dispersion factor corresponding to the RFID tag to be updated is a key dispersion factor from outside the RFID tag, the host computer reads the key dispersion factor from a preset storage area; The security chip is configured to decrypt the ciphertext of the distributed key according to the pre-stored protection key to obtain the distributed key; The radio frequency module is configured to write the distributed key into the RFID tag to be updated.
34. An electronic device, characterized in that: Comprises a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the updating method described in any one of claims 13 to 29.
35. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed by a processor, the updating method described in any one of claims 13 to 29 is implemented.
36. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the updating method according to any one of claims 13 to 29 is implemented.
