Electronic tag issuing method, host server, host computer, card dispenser and system
By using a handshake to generate a session key in the RFID tag issuance system and encrypting the key and data during transmission, the problem of insufficient tag key data security is solved. This enables secure writing of tag keys and plaintext storage of application data, ensuring data transmission security and facilitating data display.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING SMARTCHIP MICROELECTRONICS TECHNOLOGY CO LTD
- Filing Date
- 2026-04-10
- Publication Date
- 2026-07-24
AI Technical Summary
In existing technologies, the key data of RFID tags suffers from insufficient security during transmission and storage, and the application data is stored in encrypted form, making it difficult to display intuitively.
The transmission method employs encrypted data streams along the communication link. A session key is generated through a handshake operation between the main station server, the host computer, and the card issuer. The session key is used to encrypt the plaintext key and application data, ensuring that the data is transmitted in encrypted form throughout the entire communication link. The plaintext key and application data are then decrypted and stored in the card issuer's security chip.
It effectively ensures the secure transmission of tag keys and application data during the issuance process, resolves the risk of key data interception, and allows application data to be stored in plaintext for convenient and intuitive data display.
Smart Images

Figure CN122458029A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication technology, specifically to an electronic tag issuance method, a master station server, a host computer, a card issuer, and an electronic tag issuance system. Background Technology
[0002] RFID (Radio Frequency Identification) tags are electronic tags attached to assets or items. They communicate with a card issuer via radio waves to enable automatic identification and tracking of assets, and have been widely used in many fields such as industrial automation and commercial automation.
[0003] In practical applications, some tag usage areas have high security requirements, needing to both intuitively display the data within the tag and ensure the overall security of user data throughout the tag's lifecycle. Currently, there are two common methods to protect the data within the tag: one is to set a non-all-zero access password in the RFID tag, and the other is to use a high-security RFID electronic tag with a national cryptographic algorithm. Method one, using a non-all-zero access password through a card issuer to put the RFID tag into a secure state, can guarantee the security of the data within the tag to a certain extent, but there is a risk of forgetting the access password, and the security level is relatively low. In method two, the reader only gains permission to modify the data stored in the electronic tag after mutual authentication with the tag using the key and the corresponding national cryptographic algorithm, preventing unauthorized tampering of the data stored in the tag. Therefore, the key data stored in the tag becomes crucial to ensuring the security of the electronic tag data. Although key data cannot be read after it is written to the tag, the traditional method of writing key data involves the host computer software in production sending the key data and user data in plaintext to the tag reader, which then writes them into the electronic tag. Therefore, key data and user data can be easily intercepted during the production process by computer port monitoring tools, causing leakage and failing to guarantee the security of communication data.
[0004] Existing methods, such as the invention patent application number 201811512829.4, disclose a method in the production system where the production software directly writes the application data encrypted by the first cryptographic machine into the electronic tag via the first tag issuer. At this stage, the first tag issuer does not perform encryption / decryption operations. In the application system, the second tag issuer retrieves the application data, decrypts and verifies it using the security chip in the issuer, and then re-encrypts it before transmitting it to the main station system for decryption. This method only involves writing, reading, and encryption / decryption operations of the tag application data, i.e., the first method of tag data protection mentioned above: directly writing the encrypted application data into the electronic tag during the tag production stage and uploading it to the host computer in encrypted form during the application stage, ensuring that the data is not easily cracked. This system does not involve secure processing of the tag key data, making it vulnerable to interception by port monitoring tools. Furthermore, in the field usage stage, there is often a need to intuitively read plaintext data, but since the data stored inside the tag is encrypted, it makes intuitive data display inconvenient.
[0005] The invention patent with application number CN201811049953.1 discloses a process where workpieces are filled at the initial station, and a transmission system transfers the workpieces to the information input station. After entering the input station, the workpieces are labeled, and an RFID card issuer writes system encoding, quality standards, inventory location, and other special application data into the RFID electronic tags. The issued electronic tags are then sorted into processing equipment for screening. Tags that are successfully read enter an inspection station to verify the written data, while tags that fail to read enter the sorting equipment for re-sorting. This method mainly involves the tag production process; it does not disclose whether the application data written into the tags is processed during the process. Similarly, the system does not involve the secure processing of the tag key data. Summary of the Invention
[0006] The purpose of this application is to provide an electronic tag issuance method, a main station server, a host computer, a card issuer, and an electronic tag issuance system to solve the above-mentioned problems.
[0007] To achieve the above objectives, the first aspect of this application provides a method for issuing electronic tags, comprising: In response to the production command of the electronic tag, the host computer and the main station server perform at least one handshake operation to generate a session key; The main station server generates the plaintext key of the electronic tag through a cryptographic machine, and encrypts the plaintext key through the session key to obtain the plaintext key ciphertext; The main station server obtains the application data of the electronic tag and encrypts the application data using the plaintext key ciphertext to obtain application data ciphertext; The host computer encrypts the session key using a preset protection key to obtain the session key ciphertext, and then sends the session key ciphertext, the plaintext key ciphertext, and the application data ciphertext to the card issuer. The card issuer decrypts the session key ciphertext using the protection key to obtain the session key, and decrypts the plaintext key ciphertext and the application data ciphertext using the session key to obtain the plaintext key and the application data, and writes the plaintext key and the application data into the electronic tag.
[0008] Optionally, the master server generates the plaintext key for the electronic tag via a cryptographic machine, including: The main station server obtains the unique identifier of the electronic tag as a dispersion factor and sends a key derivation request to the cryptographic machine, the key derivation request including the dispersion factor; The cryptographic machine uses a root key pre-stored in the cryptographic machine to perform a preset key derivation algorithm on the dispersion factor to generate the plaintext key, and then returns the plaintext key to the main station server.
[0009] Optionally, the host computer and the main server perform at least one handshake operation to generate a session key, including: The host computer generates a first random number and encrypts the first random number using a preset random number protection key to obtain the first random number ciphertext. The host computer then performs the first handshake operation with the main station server using the first random number ciphertext. In the case of the first handshake operation, the master station server generates a second random number, decrypts the first random number ciphertext using the random number protection key to obtain the first random number, and encrypts the first random number and the second random number using the random number protection key to obtain a random number combination ciphertext. The second handshake operation is then performed with the host computer using the random number combination ciphertext. In the event of the second handshake operation, the master server generates a session key.
[0010] Optionally, the first handshake operation with the master server using the first random number ciphertext includes: The host computer calculates the first random number ciphertext using a preset host computer private key and a preset signature algorithm, generates the first signature information of the first random number ciphertext, and sends the first random number ciphertext, the preset host computer public key, and the first signature information to the main station server. The master server verifies the first signature information using the host computer public key and the signature algorithm. If it is determined that the host computer public key and the first signature information satisfy the signature algorithm, the first handshake operation is passed.
[0011] Optionally, a second handshake operation is performed with the host computer using the random number combination ciphertext, including: The main station server calculates the random number combination ciphertext using a preset main station private key and the signature algorithm, generates a second signature information for the random number combination ciphertext, and sends the random number combination ciphertext and the second signature information to the host computer. The host computer verifies the second signature information using the master station public key pre-stored on the host computer and the signature algorithm. If it is determined that the master station public key and the second signature information satisfy the signature algorithm, the random number combination ciphertext is decrypted using the random number protection key. If the first random number obtained by decryption is consistent with the first random number generated by the host computer, the second handshake operation is confirmed to be successful.
[0012] Optionally, a session key is generated, including: The main station server encrypts the first random number and the second random number using a preset session generation protection key to generate a main station session key; The host computer uses the session to generate a protection key to encrypt the first random number and the second random number, thereby generating a host computer session key.
[0013] Optionally, after determining that the second handshake operation has been completed, the method further includes: The host computer sends the handshake result of the second handshake operation to the master station server. If the master station server determines that the second handshake operation is successful based on the handshake result, the master station session key becomes effective. If the master server determines through the handshake result that the second handshake operation has failed, the master session key becomes invalid.
[0014] A second aspect of this application provides a main station server, comprising: The first interface module is used to perform at least one handshake operation with the host computer and generate a session key; An encryption module is used to generate a plaintext key for an electronic tag using a cryptographic machine, and to encrypt the plaintext key using the session key to obtain plaintext key ciphertext; and to retrieve application data from the electronic tag and encrypt the application data using the plaintext key ciphertext to obtain application data ciphertext. The second interface module is used to send the plaintext key ciphertext and the application data ciphertext to the host computer.
[0015] A third aspect of this application provides a host computer, comprising: The handshake module is used to perform at least one handshake operation with the main server and generate a session key; The first encryption module is used to encrypt the session key with a preset protection key to obtain the session key ciphertext; The communication module is used to send the ciphertext of the session key to the card issuer, receive the ciphertext of the plaintext key and the ciphertext of the application data from the master station server, and forward the ciphertext of the plaintext key and the ciphertext of the application data to the card issuer.
[0016] A fourth aspect of this application provides a card issuer, comprising: The communication interface is used to receive session key ciphertext, plaintext key ciphertext, and application data ciphertext from the host computer. A security chip is used to store a preset protection key, and to decrypt the ciphertext of the session key using the protection key to obtain the session key, and to decrypt the ciphertext of the plaintext key and the ciphertext of the application data using the session key to obtain the plaintext key and the application data; The radio frequency module is used to communicate with the electronic tag and write the plaintext key and the application data into the electronic tag.
[0017] A fifth aspect of this application provides an electronic tag issuance system, comprising: Host computer, main station server, cryptographic machine and card issuer; The host computer is configured to perform at least one handshake operation with the main station server in response to the production command of the electronic tag, and generate a session key; The master server is configured to generate a plaintext key for the electronic tag using the cryptographic machine, and encrypt the plaintext key using the session key to obtain plaintext key ciphertext; and to acquire application data of the electronic tag, and encrypt the application data using the plaintext key ciphertext to obtain application data ciphertext. The host computer is also configured to encrypt the session key using a preset protection key to obtain session key ciphertext, and send the session key ciphertext, the plaintext key ciphertext, and the application data ciphertext to the card issuer. The card issuer is configured to decrypt the session key ciphertext using the protection key to obtain the session key, and to decrypt the plaintext key ciphertext and the application data ciphertext using the session key to obtain the plaintext key and the application data, and to write the plaintext key and the application data into the electronic tag.
[0018] This application employs a data stream encryption method for communication links, which effectively ensures the security of tag keys and application data transmission during the issuance process. It solves the problem that the storage of tag key data in encrypted form in the prior art may lead to limitations in subsequent applications. At the same time, the application data in this application is stored in plaintext, which facilitates the intuitive display of the data.
[0019] Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description
[0020] The accompanying drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the following detailed description to explain the embodiments of this application, but do not constitute a limitation on the embodiments of this application. In the drawings: Figure 1 A flowchart of an electronic tag issuance method provided in a preferred embodiment of this application; Figure 2 A schematic diagram of the electronic tag production chain system provided in the preferred embodiment of this application; Figure 3 A schematic diagram illustrating the two-way handshake process between the main station server and the host computer, provided in a preferred embodiment of this application; Figure 4 This is a schematic diagram of the electronic tag issuance process provided in a preferred embodiment of this application. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for illustration and explanation of the embodiments of this application and are not intended to limit the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0022] It should be noted that the technical solutions of the various embodiments of this application can be combined with each other, but only if they are based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by this application.
[0023] To solve the above problems, such as Figure 1 As shown, the first aspect of this application provides a method for issuing electronic tags, including: S100: In response to the production instruction of the electronic tag, the host computer and the main station server perform at least one handshake operation to generate a session key; S200: The main station server generates the plaintext key of the electronic tag through the cryptographic machine, and encrypts the plaintext key through the session key to obtain the plaintext key ciphertext. S300: The main station server obtains the application data of the electronic tag and encrypts the application data using a plaintext key-ciphertext combination to obtain the application data ciphertext. The S400 and host computer encrypt the session key using a preset protection key to obtain the session key ciphertext, and then send the session key ciphertext, plaintext key ciphertext, and application data ciphertext to the card issuer. The S500 card issuer decrypts the session key ciphertext using the protection key to obtain the session key, and then decrypts the plaintext key ciphertext and application data ciphertext using the session key to obtain the plaintext key and application data. Finally, it writes the plaintext key and application data into the electronic tag.
[0024] Thus, this application adopts a data stream encryption method for communication links, which effectively ensures the transmission security of tag keys and application data during the issuance process. It solves the problem that the storage of tag key data in encrypted form in the prior art may lead to limitations in subsequent applications. At the same time, the application data in this application is stored in plaintext, which facilitates the intuitive display of the data.
[0025] like Figure 2 As shown, the electronic tag production chain system of this application mainly includes a printer, a host computer, a master station server, a cryptographic machine, a database, a tag issuer, and RFID electronic tags. The master station server deploys a master station WebService based on the SOAP protocol. This service directly connects to the database, allowing application data to be retrieved via SQL statements, and also directly connects to the cryptographic machine for generating tag keys. In this application, the cryptographic machine pre-stores a key KeyRt, which is the root key for tag issuance. When a tag key needs to be generated, the master station can transmit a dispersion factor by calling the cryptographic machine's interface to generate the plaintext key Ky for the tag.
[0026] The host computer pre-deploys host computer software, and the main station service provides the host computer software with three interfaces: GetSourceData, HandShake, and GetTagKey. The GetSourceData interface is used to retrieve the encrypted application data of the tag, the HandShake interface is used for the handshake between the host computer and the main station, and the GetTagKey interface is used to retrieve the encrypted tag key. Before each tag production begins, the host computer software first calls the HandShake interface to perform a three-way handshake with the main station service. After a successful handshake, the host computer and the main station generate the same session key SK.
[0027] like Figure 3As shown in this application, the host computer and the main server perform at least one handshake operation to generate a session key, including: S110. The host computer generates a first random number and encrypts the first random number using a preset random number protection key to obtain the first random number ciphertext. The host computer then performs the first handshake operation with the main station server using the first random number ciphertext.
[0028] The first handshake operation with the master server using the first random number ciphertext includes: the host computer calculates the first random number ciphertext using a preset host computer private key and a preset signature algorithm to generate the first signature information of the first random number ciphertext, and sends the first random number ciphertext, the preset host computer public key, and the first signature information to the master server; the master server verifies the first signature information using the host computer public key and the signature algorithm, and if it is determined that the host computer public key and the first signature information satisfy the signature algorithm, the first handshake operation is successful.
[0029] Specifically, the host computer's public key Pu1, private key PRIVK1, master station public key Pu2, random number protection key PranKey1, and session generation protection key PHKey are pre-stored in the host computer software algorithm library. The master station's private key PRIVK2, random number protection key PranKey1, and session generation protection key PHKey are stored in the master station service algorithm library. First, the host computer software uses a random number function to generate an 8-byte plaintext random number R1 (the first random number), and then calls a function in the algorithm library to use the random number protection key PranKey1 to perform SM4 encryption on the plaintext random number R1 to generate a 16-byte ciphertext random number R1Enc (the first ciphertext random number). After successful encryption, the host computer concatenates the 16-byte random number ciphertext R1Enc, the 4-byte software version number, and the 6-byte current PC time to generate a data packet DHT. Using the host computer's private key PRIVK1, the SM2 algorithm is used to generate a signature information SignA1, i.e., the first signature information, on the merged data packet DHT. The data packet DHT, the host computer's public key Pu1, and the signature information SignA1 are then concatenated into a complete data packet WDT and transmitted to the main station through the Webservice interface.
[0030] After receiving the overall data packet WDT, the master station uses the host computer's public key Pu1 from the data packet to perform SM2 signature verification on the signature information SingleA1. Upon successful verification, the first handshake is complete. The SM2 algorithm signature verification process is existing technology and is not limited here.
[0031] S120. After the first handshake operation is completed, the master station server generates a second random number, decrypts the first random number ciphertext using the random number protection key to obtain the first random number, and encrypts the first random number and the second random number using the random number protection key to obtain the random number combination ciphertext. The second handshake operation is then performed with the host computer using the random number combination ciphertext.
[0032] The second handshake operation, which involves combining ciphertext with random numbers and communicating with the host computer, includes: the master server calculating the ciphertext with random numbers using a preset master private key and signature algorithm to generate a second signature of the ciphertext, and sending the ciphertext and the second signature to the host computer; the host computer verifying the second signature using the master public key and signature algorithm pre-stored on the host computer; if the master public key and the second signature satisfy the signature algorithm, the ciphertext with random numbers is decrypted using a random number protection key; if the first random number obtained after decryption matches the first random number generated by the host computer, the second handshake operation is considered successful.
[0033] Specifically, after the initial handshake is successful, the master station server uses the reserved random number protection key PranKey1 in the master station algorithm library to decrypt the 16-byte random number ciphertext R1Enc in the DHT data packet, thereby calculating the 8-byte random number plaintext R1` and 8 bytes of zero-padded data. At the same time, the master station calls a function in the algorithm library to generate an 8-byte master station random number plaintext R2, i.e., the second random number, and uses the random number protection key PranKey1 to perform ECB encryption of the 8-byte random number plaintext R1` and the 8-byte master station random number plaintext R2 using the SM4 algorithm to generate a 16-byte random number ciphertext EncR12, i.e., the random number combination ciphertext. After successful generation, the master station uses the master station private key PRIVK2 to use the SM2 algorithm to generate a 64-byte signature value SignA2, i.e., the second signature information, and concatenates the 16-byte random number ciphertext EncR12 and the signature value SignA2 into a data packet ZDT and sends it to the host computer.
[0034] After receiving the data packet ZDT sent by the master station, the host computer software first uses the master station's public key Pu2, which is reserved in the host computer's algorithm library, to perform SM2 signature verification on the signature value SignA2 in the data packet. After the signature verification is successful, the host computer software uses the random number protection key PranKey1 to decrypt the random number ciphertext EncR12 using the SM4 algorithm ECB mode to obtain the plaintext random number R1' and plaintext random number R2'. The host computer software then compares whether the calculated random number R1' is consistent with the random number R1. If they are consistent, the second handshake is completed.
[0035] S130. Upon successful completion of the second handshake operation, the master server generates a session key. Specifically, the master server uses the session generation protection key PHKey to encrypt the 8-byte plaintext random number R1` and the 8-byte plaintext master random number R2 using the SM4 algorithm ECB method to generate the master session key HKey1.
[0036] Meanwhile, in this application, after the second handshake operation, the host computer uses the session generation protection key PHKey to encrypt the 8-byte random number plaintext R1` and the 8-byte master station random number plaintext R2 using the SM4 algorithm ECB method to generate the host computer session key HKey1`, wherein the session key HKey1` is consistent with the master station session key HKey.
[0037] After the second handshake operation, the host computer sends the handshake result to the master server. If the master server determines that the second handshake operation has been successful based on the handshake result, the master session key becomes effective. For example, if the master server receives a successful handshake result, the session key generated by the master becomes effective. If the master server determines that the second handshake operation has failed based on the handshake result, the master session key becomes invalid. For example, if the master server receives a failed handshake result, the session key generated by the master becomes invalid.
[0038] In step S200 of this application, the master station server generates the plaintext key of the electronic tag through the cryptographic machine. This includes: the master station server obtaining the unique identifier of the electronic tag as a dispersion factor and sending a key derivation request to the cryptographic machine. The key derivation request includes the dispersion factor. For example, the master station server obtains the electronic tag ID of the electronic tag to be produced, uses the unique ID number of the electronic tag as the dispersion factor, transmits the dispersion factor to the cryptographic machine, and sends a key derivation request to the cryptographic machine. The cryptographic machine executes a preset key derivation algorithm on the dispersion factor using the root key pre-stored in the cryptographic machine to generate the plaintext key and returns the plaintext key to the master station server. For example, the cryptographic machine uses KeyRt as the key to encrypt the dispersion factor using SM4 and outputs 16 bytes as the plaintext key Ky of the electronic tag. If the dispersion factor is less than 16 bytes, it can be padded according to a preset rule, which is not limited here.
[0039] like Figure 4As shown, the card issuer connects to the PC via a serial port or USB port. Internally, the card issuer includes an MCU control unit, a security chip, and an RF module. The MCU control unit is responsible for parsing instructions and data sent from the host computer software, controlling the security chip for encryption and decryption, and operating the RF module to read and write electronic tags. In step S300, after the master station server generates a session key SK and the session key SK becomes effective, it uses the session key SK to stream encrypt the plaintext key Ky of the electronic tag using the SM4 algorithm ECB method, generating the plaintext key ciphertext KyEnc. The master station server then calls the GetTagKey service to transmit the plaintext key ciphertext KyEnc to the host computer. The master station server also uses the SM4 algorithm to stream encrypt the application data TD, generating the application data ciphertext TDEnc, and calls the GetSourceData service to send the application data ciphertext TDEnc to the host computer software.
[0040] In step S400, after successfully generating the session key SK, the host computer software uses the session key's protection key SPKey to encrypt the session key SK using the SM4 algorithm ECB to generate the session key ciphertext SKEnc. After the host computer successfully connects with the card issuer, it sends the session key ciphertext SKEnc to the card issuer. Upon receiving the session key ciphertext SKEnc, the card issuer's MCU unit controls its internal security chip to decrypt the ciphertext SKEnc using the reserved protection key SPKey using the SM4 algorithm ECB, obtaining the session key plaintext SK, which is stored inside the card issuer's security chip. Subsequently, using the internally stored session key plaintext SK, the card issuer decrypts the key ciphertext KyEnc sent by the host computer to obtain the tag plaintext key Ky, and decrypts the application data ciphertext TDEnc to obtain the plaintext data TD. After the security chip successfully decrypts, the MCU unit controls the RF module to send a tag write command to write the tag plaintext key Ky and plaintext data TD into the tag.
[0041] In summary, this application uses a WebService interface to interact with the main station and host computer software. It generates a session key using a hybrid SM2 / SM4 algorithm and uses this session key to stream-encrypt the tag's plaintext key and application data, ensuring that all data in the communication link is in ciphertext form. This guarantees the secure writing of the high-security electronic tag's key and the security of the application data throughout production. Furthermore, by protecting the electronic tag's key data, this application ensures that the application data stored in the electronic tag cannot be illegally tampered with during subsequent use. Simultaneously, this application incorporates a session key protection key PHKey within the security chip inside the card issuer. This PHKey is used to decrypt the ciphertext SKEnc of the session key transmitted from the host computer and store the plaintext SK of the session key in the security chip. When the key data and user data are transmitted to the card issuer in ciphertext form, the card issuer uses the session key SK to perform decryption, ensuring that even if the electronic tag's key data and special application data are intercepted by port monitoring tools, they cannot be easily cracked. Moreover, the key and application data written to the tag are stored in plaintext form within the tag, facilitating subsequent field applications. Existing technology requires electronic tags to store encrypted application data, which is then read and verified by a reader during the application process before being sent to the main station system with decryption capabilities for decryption. This makes the data susceptible to external network conditions during field applications, increases the operating costs of the main station, and makes it difficult to display the tag data intuitively.
[0042] A second aspect of this application provides a main station server, comprising: The first interface module is used to perform at least one handshake operation with the host computer and generate a session key; The encryption module is used to generate a plaintext key for the electronic tag using a cryptographic machine, and to encrypt the plaintext key using a session key to obtain the plaintext key ciphertext; and to retrieve the application data of the electronic tag, and to encrypt the application data using the plaintext key ciphertext to obtain the application data ciphertext. The second interface module is used to send the plaintext key ciphertext and application data ciphertext to the host computer.
[0043] A third aspect of this application provides a host computer, comprising: The handshake module is used to perform at least one handshake operation with the main server and generate a session key; The first encryption module is used to encrypt the session key with a preset protection key to obtain the session key ciphertext; The communication module is used to send the session key ciphertext to the card issuer, receive the plaintext key ciphertext and application data ciphertext from the master server, and forward the plaintext key ciphertext and application data ciphertext to the card issuer.
[0044] A fourth aspect of this application provides a card issuer, comprising: The communication interface is used to receive session key ciphertext, plaintext key ciphertext, and application data ciphertext from the host computer. The security chip is used to store a preset protection key, and to decrypt the session key ciphertext using the protection key to obtain the session key, and to decrypt the plaintext key ciphertext and application data ciphertext using the session key to obtain the plaintext key and application data. The radio frequency module is used to communicate with the electronic tag and write plaintext keys and application data into the electronic tag.
[0045] It is understood that those skilled in the art will clearly recognize that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0046] A fifth aspect of this application provides an electronic tag issuance system, comprising: Host computer, main station server, cryptographic machine and card issuer; The host computer is configured to respond to the production instructions of the electronic tag by performing at least one handshake operation with the main station server to generate a session key; The main server is configured to generate plaintext keys for electronic tags using a cryptographic machine, and encrypt the plaintext keys using a session key to obtain plaintext key ciphertext; and to acquire application data from electronic tags, and encrypt the application data using plaintext key ciphertext to obtain application data ciphertext. The host computer is also configured to encrypt the session key using a preset protection key to obtain the session key ciphertext, and then send the session key ciphertext, plaintext key ciphertext, and application data ciphertext to the card issuer. The card issuer is configured to decrypt the session key ciphertext using the protection key to obtain the session key, and then decrypt the plaintext key ciphertext and application data ciphertext using the session key to obtain the plaintext key and application data, and write the plaintext key and application data into the electronic tag.
[0047] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0048] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0049] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for issuing electronic tags, characterized in that, include: In response to the production command of the electronic tag, the host computer and the main station server perform at least one handshake operation to generate a session key; The main station server generates the plaintext key of the electronic tag through a cryptographic machine, and encrypts the plaintext key through the session key to obtain the plaintext key ciphertext; The main station server obtains the application data of the electronic tag and encrypts the application data using the plaintext key ciphertext to obtain application data ciphertext; The host computer encrypts the session key using a preset protection key to obtain the session key ciphertext, and then sends the session key ciphertext, the plaintext key ciphertext, and the application data ciphertext to the card issuer. The card issuer decrypts the session key ciphertext using the protection key to obtain the session key, and decrypts the plaintext key ciphertext and the application data ciphertext using the session key to obtain the plaintext key and the application data, and writes the plaintext key and the application data into the electronic tag.
2. The electronic tag issuance method according to claim 1, characterized in that, The master server generates the plaintext key for the electronic tag using a cryptographic machine, including: The main station server obtains the unique identifier of the electronic tag as a dispersion factor and sends a key derivation request to the cryptographic machine, the key derivation request including the dispersion factor; The cryptographic machine uses a root key pre-stored in the cryptographic machine to perform a preset key derivation algorithm on the dispersion factor to generate the plaintext key, and then returns the plaintext key to the main station server.
3. The electronic tag issuance method according to claim 1, characterized in that, The host computer and the main server perform at least one handshake operation to generate a session key, including: The host computer generates a first random number and encrypts the first random number using a preset random number protection key to obtain the first random number ciphertext. The host computer then performs the first handshake operation with the main station server using the first random number ciphertext. In the case of the first handshake operation, the master station server generates a second random number, decrypts the first random number ciphertext using the random number protection key to obtain the first random number, and encrypts the first random number and the second random number using the random number protection key to obtain a random number combination ciphertext. The second handshake operation is then performed with the host computer using the random number combination ciphertext. In the event of the second handshake operation, the master server generates a session key.
4. The electronic tag issuance method according to claim 3, characterized in that, The first handshake operation is performed with the main station server using the first random number ciphertext, including: The host computer calculates the first random number ciphertext using a preset host computer private key and a preset signature algorithm, generates the first signature information of the first random number ciphertext, and sends the first random number ciphertext, the preset host computer public key, and the first signature information to the main station server. The master server verifies the first signature information using the host computer public key and the signature algorithm. If it is determined that the host computer public key and the first signature information satisfy the signature algorithm, the first handshake operation is passed.
5. The electronic tag issuance method according to claim 4, characterized in that, The second handshake operation is performed with the host computer using the ciphertext obtained by combining the random numbers, including: The main station server calculates the random number combination ciphertext using a preset main station private key and the signature algorithm, generates a second signature information for the random number combination ciphertext, and sends the random number combination ciphertext and the second signature information to the host computer. The host computer verifies the second signature information using the master station public key pre-stored on the host computer and the signature algorithm. If it is determined that the master station public key and the second signature information satisfy the signature algorithm, the random number combination ciphertext is decrypted using the random number protection key. If the first random number obtained by decryption is consistent with the first random number generated by the host computer, the second handshake operation is confirmed to be successful.
6. The electronic tag issuance method according to claim 5, characterized in that, Generate session keys, including: The main station server encrypts the first random number and the second random number using a preset session generation protection key to generate a main station session key; The host computer uses the session to generate a protection key to encrypt the first random number and the second random number, thereby generating a host computer session key.
7. The electronic tag issuance method according to claim 6, characterized in that, After confirming that the second handshake operation has been successful, the method further includes: The host computer sends the handshake result of the second handshake operation to the master station server. If the master station server determines that the second handshake operation is successful based on the handshake result, the master station session key becomes effective. If the master server determines through the handshake result that the second handshake operation has failed, the master session key becomes invalid.
8. A master server, characterized in that, include: The first interface module is used to perform at least one handshake operation with the host computer and generate a session key; An encryption module is used to generate a plaintext key for an electronic tag using a cryptographic machine, and to encrypt the plaintext key using the session key to obtain the plaintext key ciphertext. And retrieve the application data of the electronic tag, and encrypt the application data using the plaintext key ciphertext to obtain application data ciphertext; The second interface module is used to send the plaintext key ciphertext and the application data ciphertext to the host computer.
9. A host computer, characterized in that, include: The handshake module is used to perform at least one handshake operation with the main server and generate a session key; The first encryption module is used to encrypt the session key with a preset protection key to obtain the session key ciphertext; The communication module is used to send the ciphertext of the session key to the card issuer, receive the ciphertext of the plaintext key and the ciphertext of the application data from the master station server, and forward the ciphertext of the plaintext key and the ciphertext of the application data to the card issuer.
10. A card issuer, characterized in that, include: The communication interface is used to receive session key ciphertext, plaintext key ciphertext, and application data ciphertext from the host computer. A security chip is used to store a preset protection key, and to decrypt the ciphertext of the session key using the protection key to obtain the session key, and to decrypt the ciphertext of the plaintext key and the ciphertext of the application data using the session key to obtain the plaintext key and the application data; The radio frequency module is used to communicate with the electronic tag and write the plaintext key and the application data into the electronic tag.
11. An electronic tag issuance system, characterized in that, include: Host computer, main station server, cryptographic machine and card issuer; The host computer is configured to perform at least one handshake operation with the main station server in response to the production command of the electronic tag, and generate a session key; The master station server is configured to generate the plaintext key of the electronic tag through the cryptographic machine, and encrypt the plaintext key through the session key to obtain the plaintext key ciphertext; And obtain the application data of the electronic tag, and encrypt the application data using the plaintext key ciphertext to obtain application data ciphertext; The host computer is also configured to encrypt the session key using a preset protection key to obtain session key ciphertext, and send the session key ciphertext, the plaintext key ciphertext, and the application data ciphertext to the card issuer. The card issuer is configured to decrypt the session key ciphertext using the protection key to obtain the session key, and to decrypt the plaintext key ciphertext and the application data ciphertext using the session key to obtain the plaintext key and the application data, and to write the plaintext key and the application data into the electronic tag.