A multi-serial transmission channel data adaptive injection and reading method, device and electronic equipment
By adaptively selecting USB or serial port channels for data injection and reading, and combining the decryption and encryption operations of the algorithm coprocessor, the problem of single storage device interface is solved, and the compatibility and secure storage of multiple devices in the integrated space-ground network are realized.
Patent Information
- Application Number
- CN202210570781.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-24
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-05-24
AI Technical Summary
Existing storage devices have a single interface, which cannot support data injection and reading from various types of security protection devices in the integrated space-ground network, and lack data security storage guarantees.
A method for adaptive data injection and reading across multiple serial transmission channels is provided. Device enumeration is initiated via USB transmission channel. If it fails, the method switches to serial channel. The channel is automatically selected based on the electrical characteristics of the device interface. Data decryption or encryption is performed through an algorithm coprocessor to achieve adaptive compatibility and secure storage.
It enables automatic selection of injection or reading channels based on the electrical characteristics of the device interface, is compatible with various types of security protection devices, ensures data security and fast read/write, and meets the offline deployment requirements of integrated space-ground networks.
Smart Images

Figure CN114969782B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data communication technology, and more specifically, relates to a method, apparatus, and electronic device for adaptive injection and reading of data in multiple serial transmission channels. Background Technology
[0002] The space-ground integrated network is an integrated network composed of a large number of high-orbit satellites, low-orbit satellites, and ground stations. It needs to meet the security requirements of general terrestrial information networks, namely confidentiality, integrity, and authentication—the three essential elements of information security and fundamental security requirements for information networks. Due to the complex topology, high heterogeneity, and diverse entity types of the space-ground integrated network, a large number of security protection devices are deployed within it to provide information security services for the various network entities and devices.
[0003] Given the diverse types of integrated space-ground network security protection devices, the abundance of security resources, and the high sensitivity of security resource data (such as security algorithms and parameters), offline deployment is generally adopted. This involves injecting security resources offline into the security protection devices after they are generated, using storage devices equipped with security measures and high read / write speeds. Furthermore, since the resource injection interfaces and electrical interface characteristics of various types of integrated space-ground network security protection devices differ, the storage devices must also meet the interface characteristics of multiple injection channels.
[0004] Currently, the most common storage devices on the market are USB interface portable hard drives. Although they have high read and write speeds, they have a single interface, cannot support serial injection, and lack data security storage protection measures, thus failing to meet the offline deployment needs of various security protection devices in the integrated terrestrial-space network. Summary of the Invention
[0005] To address at least one deficiency or improvement requirement in the prior art, this invention provides a method, apparatus, and electronic device for adaptive data injection and reading through multiple serial transmission channels. Its purpose is to solve the problem that existing integrated space-ground network data injection and reading storage devices have a single interface, failing to support data injection or reading from various types of security protection devices. The invention achieves automatic selection of the injection channel based on the electrical characteristics of the injection interface of the externally connected security protection device, adaptive compatibility with the security protection device interface level, fast data reading and writing, and secure storage, thus meeting the offline deployment requirements of various types of security protection devices in integrated space-ground networks.
[0006] To achieve the above objectives, according to one aspect of the present invention, a method for adaptive data injection across multiple serial transmission channels is provided, comprising:
[0007] S1: Respond to the data injection request sent by the device to be injected, and initiate device enumeration to the device to be injected via the USB transmission channel;
[0008] S2: If the device enumeration can be completed, a query command is sent to the device to be injected using the USB transmission channel, the response information of the device to be injected in response to the query command is received, and step S3 is executed.
[0009] If the device enumeration cannot be completed, the system switches to the first serial port channel to send a query command to the device to be injected. If a response from the device to be injected to the query command is received within a preset time, step S3 is executed using that serial port channel. If no response from the device to be injected to the query command is received within a preset time, the system switches to the second serial port channel to send a query command to the device to be injected. The response information carries the unique identifier of the device to be injected.
[0010] S3: Retrieve encrypted security data matching the unique identifier from the first memory, decrypt the encrypted security data, and inject it into the device to be injected.
[0011] Preferably, security parameter data related to the identity of the device to be injected is obtained from the second memory, the security parameter data and the encrypted security data are loaded into the algorithm coprocessor, and after decryption, the explicit security data is obtained and injected into the device to be injected.
[0012] According to another aspect of the present invention, a method for adaptive reading of data from multiple serial transmission channels is also provided, comprising the following steps:
[0013] S1: Respond to the data read request sent by the device to be read, and receive the device enumeration initiated by the device to be read through the USB transmission channel;
[0014] S2: If the device enumeration can be completed, the USB transmission channel is used to receive the query command sent by the device to be read, and a response information in response to the query command is sent to the device to be read and step S3 is executed.
[0015] If the device enumeration cannot be completed, the system switches to the first serial port channel to receive the query command sent by the device to be read. If the first serial port channel receives the query command within a preset time, it sends a response message to the device to be read in response to the query command and executes step S3. If the query command is not received through the first serial port channel within a preset time, the system switches to the second serial port channel to receive the query command. The query command carries the unique identifier of the device to be read.
[0016] S3: Read the plaintext security data that matches the unique identifier from the device to be read, encrypt the plaintext security data and store it in the first memory.
[0017] Preferably, security parameter data related to the identity of the device to be read is obtained from the second memory, the security parameter data and the plain state security data are loaded into the algorithm coprocessor, encrypted to obtain encrypted security data, and the encrypted security data is stored in the first memory.
[0018] Preferably, the first serial port channel and the second serial port channel are either a TTL level one-wire UART serial interface or an RS232 level two-wire UART serial interface.
[0019] According to another aspect of the present invention, a multi-serial transmission channel data adaptive injection device is also provided, the device comprising:
[0020] The enumeration module is used to respond to data injection requests sent by the device to be injected and initiate device enumeration to the device to be injected via the USB transmission channel.
[0021] The judgment module is used to determine whether the device enumeration can be completed. If so, it sends a query command to the device to be injected through the USB transmission channel, receives the response information of the device to be injected in response to the query command, and executes the injection module steps.
[0022] If the device enumeration cannot be completed, the system switches to the first serial port channel to send a query command to the device to be injected. If a response from the device to be injected to the query command is received within a preset time, the injection module steps are executed using that serial port channel. If no response from the device to be injected to the query command is received within a preset time, the system switches to the second serial port channel to send a query command to the device to be injected. The response information carries the unique identifier of the device to be injected.
[0023] The injection module is used to retrieve encrypted security data that matches the unique identifier from the first memory, decrypt the encrypted security data, and inject it into the device to be injected.
[0024] Preferably, the injection module specifically includes obtaining security parameter data related to the identity of the device to be injected from the second memory, loading the security parameter data and encrypted security data into the algorithm coprocessor, obtaining explicit security data after decryption, and injecting the explicit security data into the device to be injected.
[0025] According to another aspect of the present invention, a multi-serial transmission channel data adaptive reading device is also provided, comprising:
[0026] The enumeration module is used to respond to data read requests sent by the device to be read, and to receive device enumeration initiated by the device to be read through the USB transmission channel;
[0027] The judgment module is used to determine whether the device enumeration can be completed. If so, it uses the USB transmission channel to receive the query command sent by the device to be read, sends the response information of the query command to the device to be read, and executes the reading module steps.
[0028] If the device enumeration cannot be completed, the system switches to the first serial port channel to receive the query command sent by the device to be read. If the first serial port channel receives the query command within a preset time, it sends a response message to the device to be read in response to the query command and executes the reading module steps. If the query command is not received through the first serial port channel within a preset time, the system switches to the second serial port channel to receive the query command. The query command carries the unique identifier of the device to be read.
[0029] The reading module is used to read the plaintext security data that matches the unique identifier from the device to be read, encrypt the plaintext security data and store it in the first memory.
[0030] Preferably, security parameter data related to the identity of the device to be read is obtained from the second memory, the security parameter data and the plain state security data are loaded into the algorithm coprocessor, encrypted to obtain encrypted security data, and the encrypted security data is stored in the first memory.
[0031] According to another aspect of the present invention, an electronic device is also provided, including at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program that, when executed by the processing unit, causes the processing unit to perform the steps of any of the methods described above.
[0032] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects:
[0033] This invention provides a method, apparatus, and electronic device for adaptive data injection and reading via multiple serial transmission channels. During data injection, a default USB transmission channel is selected to initiate device enumeration to the device to be injected. During data reading, the default USB transmission channel is selected to receive device enumeration initiated by the device to be read. By determining whether the device enumeration is successful, the device decides whether to select the USB transmission channel for data transmission. If the device enumeration fails, during data injection, query commands are sent to different serial channels at fixed intervals; during data reading, query commands sent from different serial channels are received at fixed intervals, adaptively determining which serial channel to select for data transmission. This method enables automatic selection of the data injection or reading channel based on the interface electrical characteristics of the device to be injected or read, and adaptive compatibility with device interface levels. This meets the offline deployment requirements of various types of security protection devices in integrated terrestrial and satellite networks. Furthermore, during the data injection or reading process, the data to be injected is decrypted based on the device's identity, and the data to be read is encrypted, further ensuring the security of data storage. Attached Figure Description
[0034] Figure 1 This is a schematic flowchart of a method for adaptive data injection across multiple serial transmission channels provided in an embodiment of the present invention;
[0035] Figure 2 This is a schematic flowchart of a method for adaptive reading of data from multiple serial transmission channels provided in an embodiment of the present invention;
[0036] Figure 3 This is a schematic diagram of an electronic device structure provided in an embodiment of the present invention. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0038] It should be noted that "multiple or several" in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0039] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.
[0040] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or apparatus.
[0041] To address the current limitations of storage devices in simultaneously enabling data injection or retrieval from multiple electrical interface types of security devices, and the lack of data security guarantees, this invention provides a multi-serial transmission channel adaptive data injection and retrieval scheme. This allows the storage device to automatically select the data injection or retrieval channel based on the interface electrical characteristics of the device to be injected or read, adaptively compatible with the device interface level, and still achieve secure data storage, thereby improving the compatibility of device data storage schemes.
[0042] See Figure 1 , Figure 1 This is a schematic flowchart of a method for adaptive data injection across multiple serial transmission channels, provided in an embodiment of the present invention. In this embodiment, the method includes:
[0043] Step S1: Respond to the data injection request sent by the device to be injected, and initiate device enumeration to the device to be injected via the USB transmission channel;
[0044] In this step, the device to be injected refers to the device that has a data injection requirement. In this application, it specifically refers to a large number of security protection devices deployed in the integrated space-ground network. These security protection devices need to be injected with security resources in order to provide information security services.
[0045] In this embodiment, the main body for performing data injection for the security protection device is a data storage device. This data device has a USB interface and at least one serial interface to meet the data injection needs of security protection devices with different interfaces in the integrated space-ground network.
[0046] Since the USB interface is a common data transmission interface, this application first defaults to using the USB interface as the data injection transmission channel for data interaction. During data injection, the USB interface switches to master mode to initiate a device enumeration request to the device to be injected. During data reading, the USB interface acts as a slave device to receive the device enumeration request initiated by the device to be read.
[0047] Preferably, the USB interface is a USB Type-C interface. Since this interface has no right or wrong orientation and the paired USB Type-C cable plug only has data transmission and reception signals on one side, it can be plugged in and out in either direction without damaging the socket or plug.
[0048] Step S2: If the device enumeration can be completed, a query command is sent to the device to be injected using the USB transmission channel, the response information of the device to be injected in response to the query command is received, and step S3 is executed. The response information carries the unique identifier of the device to be injected.
[0049] If the device enumeration cannot be completed, the system switches to the first serial port channel to send a query command to the device to be injected. If a response from the device to be injected to the query command is received within a preset time, step S3 is executed using that serial port channel. If no response from the device to be injected to the query command is received within a preset time, the system switches to the second serial port channel to send a query command to the device to be injected. The response information carries the unique identifier of the device to be injected.
[0050] Step S3: Obtain encrypted security data matching the unique identifier from the first memory, decrypt the encrypted security data and inject it into the device to be injected;
[0051] Specifically, if device enumeration can be successfully completed using the USB transmission channel, then data injection is performed using the USB transmission channel. Encrypted security data matching the identity identifier of the device to be injected is obtained from the first memory, and security parameter data related to the identity identifier of the device to be injected is obtained from the second memory. The security parameter data and the encrypted security data are loaded into the algorithm coprocessor, and after decryption, explicit security data is obtained. The explicit security data is then injected into the device to be injected.
[0052] In one specific embodiment, the decryption method includes: AES algorithm, DES algorithm, SM1 algorithm, SM4 algorithm, etc. Decryption is performed independently by an algorithm coprocessor, and a random number generator produces the security parameter data used for decryption.
[0053] Specifically, the preset time is not strictly limited here; in a preferred embodiment, the preset time is set to 500ms.
[0054] See Figure 2 ,like Figure 2 The diagram shown is a flowchart illustrating a method for adaptive data reading across multiple serial transmission channels according to an embodiment of the present invention. In this embodiment, the method includes the following steps:
[0055] S1: Respond to the data read request sent by the device to be read, and receive the device enumeration initiated by the device to be read through the USB transmission channel;
[0056] S2: If the device enumeration can be completed, the USB transmission channel is used to receive the query command sent by the device to be read, and a response information in response to the query command is sent to the device to be read and step S3 is executed.
[0057] If the device enumeration cannot be completed, the system switches to the first serial port channel to receive the query command sent by the device to be read. If the first serial port channel receives the query command within a preset time, it sends a response message to the device to be read in response to the query command and executes step S3. If the query command is not received through the first serial port channel within a preset time, the system switches to the second serial port channel to receive the query command. The query command carries the unique identifier of the device to be read.
[0058] S3: Read the plaintext security data that matches the unique identifier from the device to be read, encrypt the plaintext security data and store it in the first memory;
[0059] Specifically, if device enumeration can be successfully completed using the USB transmission channel, then data is read using the USB transmission channel, security parameter data related to the identity of the device to be read is obtained from the second memory, the security parameter data and the plain state security data are loaded into the algorithm coprocessor, encrypted and processed to obtain encrypted state security data, and the encrypted state security data is stored in the first memory.
[0060] In this application, the specific types of the first and second serial port channels are not limited, and can be either a TTL level one-wire UART serial interface or an RS232 level two-wire UART serial interface.
[0061] This embodiment also provides a multi-serial transmission channel data adaptive injection device, which can be integrated into a data storage device. The device includes:
[0062] The enumeration module is used to respond to data injection requests sent by the device to be injected and initiate device enumeration to the device to be injected via the USB transmission channel.
[0063] The judgment module is used to determine whether the device enumeration can be completed. If so, it sends a query command to the device to be injected through the USB transmission channel, receives the response information of the device to be injected in response to the query command, and executes the injection module steps.
[0064] If the device enumeration cannot be completed, switch to the first serial port channel to send a query command to the device to be injected. If a response to the query command is received from the device to be injected within a preset time,
[0065] The injection module steps are then executed using the serial port channel; if no response information is received from the device to be injected within a preset time, the system switches to the second serial port channel to send a query instruction to the device to be injected; the response information carries the unique identifier of the device to be injected.
[0066] The injection module is used to retrieve encrypted security data that matches the unique identifier from the first memory, decrypt the encrypted security data, and inject it into the device to be injected.
[0067] Specifically, the injection module includes obtaining security parameter data related to the identity of the device to be injected from the second memory, loading the security parameter data and encrypted security data into the algorithm coprocessor, obtaining explicit security data after decryption, and injecting the explicit security data into the device to be injected.
[0068] The present invention also provides a multi-serial transmission channel data adaptive reading device, which can be integrated into a data storage device, comprising:
[0069] The enumeration module is used to respond to data read requests sent by the device to be read, and to receive device enumeration initiated by the device to be read through the USB transmission channel;
[0070] The judgment module is used to determine whether the device enumeration can be completed. If so, it uses the USB transmission channel to receive the query command sent by the device to be read, sends the response information of the query command to the device to be read, and executes the reading module steps.
[0071] If the device enumeration cannot be completed, the system switches to the first serial port channel to receive the query command sent by the device to be read. If the first serial port channel receives the query command within a preset time, it sends a response message to the device to be read in response to the query command and executes the reading module steps. If the query command is not received through the first serial port channel within a preset time, the system switches to the second serial port channel to receive the query command. The query command carries the unique identifier of the device to be read.
[0072] The reading module is used to read the plaintext security data that matches the unique identifier from the device to be read, encrypt the plaintext security data and store it in the first memory; specifically, the reading module obtains security parameter data related to the identifier of the device to be read from the second memory, loads the security parameter data and the plaintext security data into the algorithm coprocessor, obtains encrypted security data after encryption operation, and stores the encrypted security data in the first memory.
[0073] Specifically, the reading module retrieves security parameter data related to the identity of the device to be read from the second memory, loads the security parameter data and the plain state security data into the algorithm coprocessor, obtains the encrypted state security data after encryption operation, and stores the encrypted state security data in the first memory.
[0074] It should be noted that the data injection device and data reading device provided in the embodiments of the present invention can be integrated into one device. If the data injection device and data reading device are integrated into one device, it can be understood that the modules with the same name in the above-mentioned data injection device and data reading device are the same module, and have the same function as it has in the data injection device and the same function as it has in the data reading device.
[0075] Based on the same inventive concept, embodiments of the present invention provide a multi-serial transmission channel data adaptive injection and reading device, the structure of which can be as follows: Figure 3 As shown, it includes at least one processor (CPU), a first memory, a second memory, a first serial interface, a second serial interface, a USB interface, a random number generator, an algorithm coprocessor, a power supply module, a display screen, buttons, etc.
[0076] The electronic device connects to the security device via a cable. The cable end connected to the electronic device has a USB Type-C connector, which includes a USB interface, a first serial interface, and a second serial interface. By clicking the corresponding buttons for data injection or data retrieval on the display screen, adaptive data injection and retrieval for the security device can be initiated.
[0077] The processor (CPU) may include one or more processing cores. The CPU connects to various parts of the device using various interfaces and lines, and executes instructions, programs, code sets, or instruction sets stored in memory, as well as calling data stored in memory, to perform the multi-serial transmission channel data adaptive injection and reading of this invention.
[0078] The algorithm coprocessor is used to run algorithms to encrypt or decrypt secure data.
[0079] The random number generator is used to generate security parameter data for encryption or decryption.
[0080] The first memory is used to store encrypted security data, and the second memory is used to store security parameter data and the unique identifier of the security protection device.
[0081] For example, the first memory is a NandFlash memory and the second memory is an SpiFlash memory.
[0082] For example, the first serial interface is a TTL level one-wire UART serial interface, and the second serial interface is an RS232 level two-wire UART serial interface.
[0083] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0084] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0085] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0086] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0087] Furthermore, the functional units in the various embodiments of this application 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.
[0088] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0089] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0090] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of embodiments of this disclosure upon considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A method of multi-serial transmission lane data adaptive injection, characterized in that, include: S1: Respond to the data injection request sent by the device to be injected, and initiate device enumeration to the device to be injected via the USB transmission channel; S2: If the device enumeration can be completed, a query command is sent to the device to be injected using the USB transmission channel, the response information of the device to be injected in response to the query command is received, and step S3 is executed. If the device enumeration cannot be completed, switch to the first serial port channel to send a query command to the device to be injected. If a response to the query command is received from the device to be injected within a preset time, then use the serial port channel to execute step S3. If no response to the query command is received from the device to be injected within a preset time, the system switches to the second serial port channel to send the query command to the device to be injected. The response information carries a unique identifier for the device to be injected; S3: Obtain encrypted security data matching the unique identifier from the first memory, decrypt the encrypted security data and inject it into the device to be injected; Step S3 includes: The security parameter data related to the identity of the device to be injected is obtained from the second memory. The security parameter data and the encrypted security data are loaded into the algorithm coprocessor. After decryption, the explicit security data is obtained and injected into the device to be injected.
2. The method for adaptive data injection across multiple serial transmission channels as described in claim 1, characterized in that, The first serial port channel and the second serial port channel are either a TTL level one-wire UART serial interface or an RS232 level two-wire UART serial interface.
3. A method for adaptive reading of data from multiple serial transmission channels, characterized in that, Includes the following steps: S1: Respond to the data read request sent by the device to be read, and receive the device enumeration initiated by the device to be read through the USB transmission channel; S2: If the device enumeration can be completed, the USB transmission channel is used to receive the query command sent by the device to be read, and a response information in response to the query command is sent to the device to be read and step S3 is executed. If the device enumeration cannot be completed, the system switches to the first serial port channel to receive the query command sent by the device to be read. If the first serial port channel receives the query command within a preset time, it sends a response message to the device to be read in response to the query command and executes step S3. If the query command is not received through the first serial port channel within a preset time, the system switches to the second serial port channel to receive the query command. The query command carries the unique identifier of the device to be read; S3: Read the plaintext security data that matches the unique identifier from the device to be read, encrypt the plaintext security data and store it in the first memory; Step S3 includes: obtaining security parameter data related to the identity of the device to be read from the second memory, loading the security parameter data and the plain state security data into the algorithm coprocessor, obtaining the encrypted state security data after encryption operation, and storing the encrypted state security data into the first memory.
4. The method for adaptive reading of data from multiple serial transmission channels as described in claim 3, characterized in that, The first serial port channel and the second serial port channel are either a TTL level one-wire UART serial interface or an RS232 level two-wire UART serial interface.
5. A multi-serial transmission channel data adaptive injection device, characterized in that, The device includes: The enumeration module is used to respond to data injection requests sent by the device to be injected and initiate device enumeration to the device to be injected via the USB transmission channel. The judgment module is used to determine whether the device enumeration can be completed. If so, it sends a query command to the device to be injected through the USB transmission channel, receives the response information of the device to be injected in response to the query command, and executes the injection module steps. If the device enumeration cannot be completed, the system switches to the first serial port channel to send a query command to the device to be injected. If a response from the device to be injected to the query command is received within a preset time, the injection module steps are executed using that serial port channel. If no response from the device to be injected to the query command is received within a preset time, the system switches to the second serial port channel to send a query command to the device to be injected. The response information carries the unique identifier of the device to be injected. The injection module is used to retrieve encrypted security data that matches the unique identifier from the first memory, decrypt the encrypted security data, and inject it into the device to be injected. The injection module specifically includes obtaining security parameter data related to the identity of the device to be injected from the second memory, loading the security parameter data and encrypted security data into the algorithm coprocessor, obtaining explicit security data after decryption, and injecting the explicit security data into the device to be injected.
6. A multi-serial transmission channel data adaptive reading device, characterized in that, include: The enumeration module is used to respond to data read requests sent by the device to be read, and to receive device enumeration initiated by the device to be read through the USB transmission channel; The judgment module is used to determine whether the device enumeration can be completed. If so, it uses the USB transmission channel to receive the query command sent by the device to be read, sends the response information of the query command to the device to be read, and executes the reading module steps. If the device enumeration cannot be completed, the system switches to the first serial port channel to receive the query command sent by the device to be read. If the first serial port channel receives the query command within a preset time, the system sends a response message to the device to be read in response to the query command and executes the reading module steps. If the query command is not received through the first serial port channel within a preset time, the system switches to the second serial port channel to receive the query command. The query command carries the unique identifier of the device to be read; The reading module is used to read the plaintext security data that matches the unique identifier from the device to be read, encrypt the plaintext security data and store it in the first memory; The reading module specifically includes: obtaining security parameter data related to the identity of the device to be read from the second memory, loading the security parameter data and the plain state security data into the algorithm coprocessor, obtaining the encrypted state security data after encryption operation, and storing the encrypted state security data into the first memory.
7. An electronic device, characterized in that, It includes at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program that, when executed by the processing unit, causes the processing unit to perform the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Authenticating a multiple interface device on an enumerated bus
US20120047368A1