National password security method, device and system
By integrating the national secret algorithm into the memory card of the Internet of Things device, and using existing modules for data transparent transmission, the problem of difficulty and high cost in the integrated design of the Chinese secret algorithm for the Internet of Things device is solved, and the national secret security is achieved. Easy to promote and use.
Patent Information
- Application Number
- CN202410870596.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-20
AI Technical Summary
In the existing technology, the integration design difficulty and production cost of the national secret algorithm in IoT devices are high, which affects its promotion and use.
Integrate the national secret algorithm into the memory card used by IoT devices, and transparently transmit data through the existing modules in the IoT device, avoiding the need to set up a special national secret algorithm module and an adapted underlying operating system in the device.
It reduces the design difficulty and production cost of IoT devices that apply national secret algorithms, and facilitates the promotion and use of national secret security in IoT devices.
Smart Images

Figure CN118677675A
Abstract
Description
Technical Field
[0001] The present application relates to the field of network communication technology, and in particular to a national secret security method, device and system. Background Art
[0002] On the one hand, the National Commercial Cryptography System (abbreviated as "National Cryptography") is a set of commercial encryption algorithm systems independently developed by China, which aims to protect information security and enhance the country's independent and controllable network security capabilities. On the other hand, with the vigorous development of the Internet of Things business, more and more devices are connected to the network, which has brought great convenience to our lives. At the same time, the security issues faced by the Internet of Things are becoming increasingly severe, and are magnified with the increase in the number of Internet of Things devices. How to apply the National Cryptography to the construction of the Internet of Things can not only ensure the security of the Internet of Things, but also protect against the problems caused by technological blockades that may be faced in the future.
[0003] In the existing technology, national secret security requires the installation of dedicated hardware chips to be applicable to devices with different systems in the IoT scenario. However, the solution of integrating the underlying operating system and modules that are compatible with the national secret algorithm for each IoT device will increase the design difficulty and production cost of IoT devices, which is not conducive to the promotion of IoT devices. Summary of the invention
[0004] The technical problem to be solved by this application is to provide a national secret security method, device and system in response to the above-mentioned deficiencies in the prior art. By using this method, the difficulty and production cost of the integrated design of Internet of Things devices that apply national secret algorithms can be reduced, thereby facilitating the promotion and use of national secret security in Internet of Things devices.
[0005] In a first aspect, the present application provides a national secret security method, which is applied to an Internet of Things device, and the method comprises:
[0006] The first plaintext data obtained is sent to a storage card through a module transparent transmission mode, wherein the storage card is integrated with a national secret algorithm and stores a device key uniquely corresponding to the IoT device;
[0007] Receiving first ciphertext data fed back by the memory card in a module transparent transmission mode, where the first ciphertext data is formed by encrypting the first plaintext data by the memory card based on the national secret algorithm and using the device key;
[0008] The first ciphertext data is reported to the platform for use after decryption by the platform.
[0009] In some embodiments, before receiving the first ciphertext data fed back by the memory card through the module transparent transmission mode, the method further includes:
[0010] According to the unique identifier of the IoT device, obtain a device key uniquely corresponding to the IoT device from the platform interface;
[0011] The device key is sent to the memory card through the module transparent transmission method.
[0012] In some embodiments, the memory card stores a unique identifier of the IoT device.
[0013] Before obtaining a device key uniquely corresponding to the IoT device from a platform interface according to the unique identifier of the IoT device, the method further includes:
[0014] The unique identifier of the IoT device is obtained from the memory card through module transparent transmission.
[0015] In some embodiments, the method further comprises:
[0016] The second ciphertext data issued by the platform is sent to the storage card through the module transparent transmission method;
[0017] The second plaintext data fed back by the memory card through the module transparent transmission mode is received, where the second plaintext data is formed by the memory card decrypting the second ciphertext data based on the national secret algorithm using the device key.
[0018] In a second aspect, the present application provides a national secret security method, which is applied to a memory card, wherein the memory card is integrated with a national secret algorithm, and the method comprises:
[0019] Receiving first plaintext data sent by the IoT device through module transparent transmission;
[0020] Based on the national secret algorithm, using a device key uniquely corresponding to the IoT device, encrypting the first plaintext data to form first ciphertext data;
[0021] The first ciphertext data is fed back to the IoT device through module transparent transmission, so that the IoT device reports the first ciphertext data to the platform for use after decryption by the platform.
[0022] In some embodiments, the method further comprises:
[0023] Receiving second ciphertext data sent by the IoT device through module transparent transmission; the second ciphertext data is received by the IoT device from the platform;
[0024] Based on the national secret algorithm, the second ciphertext data is decrypted using the device key to form second plaintext data;
[0025] The second plaintext data is fed back to the IoT device through module transparent transmission for use by the IoT device.
[0026] In a third aspect, the present application provides a national secret security device, which is applied to an Internet of Things device, and the device includes:
[0027] A first sending module, configured to send the acquired first plaintext data to a storage card through a module transparent transmission mode, wherein the storage card is integrated with a national secret algorithm and stores a device key uniquely corresponding to the IoT device;
[0028] A first receiving module, connected to the first sending module, configured to receive first ciphertext data fed back by the memory card in a module transparent transmission manner, wherein the first ciphertext data is formed by encrypting the first plaintext data by the memory card based on the national secret algorithm and using the device key;
[0029] The reporting module is connected to the first receiving module and is configured to report the first ciphertext data to the platform for use after decryption by the platform.
[0030] In some embodiments, the first sending module is further configured to send the second ciphertext data issued by the platform to the storage card through module transparent transmission;
[0031] The first receiving module is also configured to receive second plaintext data fed back by the storage card through module transparent transmission, and the second plaintext data is formed by the storage card after decrypting the second ciphertext data based on the national secret algorithm using the device key.
[0032] In a fourth aspect, the present application provides a national secret security device, which is applied to a memory card, wherein the memory card is integrated with a national secret algorithm, and the device comprises:
[0033] A second receiving module, which is configured to receive first plaintext data sent by the IoT device through a module transparent transmission mode;
[0034] an encryption module connected to the second receiving module, configured to encrypt the first plaintext data based on the national secret algorithm and using a device key uniquely corresponding to the IoT device to form first ciphertext data;
[0035] The feedback module is connected to the encryption module and is configured to feed back the first ciphertext data to the IoT device through module transparent transmission, so that the IoT device reports the first ciphertext data to the platform for use after decryption by the platform.
[0036] In a fifth aspect, the present application provides a national secret security system, including: an Internet of Things device, a module and a memory card,
[0037] The IoT device is used to transparently transmit the acquired first plaintext data to the memory card through the module;
[0038] The memory card is integrated with a national secret algorithm and stores a device key uniquely corresponding to the IoT device. The memory card is used to encrypt the first plaintext data using the device key based on the national secret algorithm to form first ciphertext data, and feed the first ciphertext data back to the IoT device through the module;
[0039] The IoT device is also used to report the first ciphertext data to the platform for use after decryption by the platform.
[0040] The national secret security method, device and system provided in this application integrate the national secret algorithm into the storage card used by the Internet of Things device, and use the existing modules in the Internet of Things device for data transparent transmission, thereby eliminating the need to set up a module specifically used for the national secret algorithm in the Internet of Things device, and an underlying operating system compatible with the national secret algorithm. This can reduce the design difficulty and production cost of the Internet of Things device that uses the national secret algorithm, and facilitate the promotion and use of national secret security in Internet of Things devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0042] Figure 1 A flowchart of the national secret security method provided in the embodiment of the present application;
[0043] Figure 2 A schematic diagram of the structure of the Internet of Things devices in the application embodiment provided in the embodiment of the present application;
[0044] Figure 3 A flowchart of an application embodiment of the national secret security method provided in the embodiment of the present application;
[0045] Figure 4 A flowchart of another application embodiment of the national secret security method provided in the embodiment of the present application;
[0046] Figure 5 A flowchart of another application embodiment of the national secret security method provided in the embodiment of the present application;
[0047] Figure 6 A schematic diagram of the structure of a national secret security device provided in an embodiment of the present application;
[0048] Figure 7 A schematic diagram of the structure of another national secret security device provided in an embodiment of the present application;
[0049] Figure 8 A schematic diagram of the structure of a national secret security system provided in an embodiment of the present application;
[0050] Fig. 9 Another structural schematic diagram of a national secret security device provided in an embodiment of the present application.
[0051] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0052] In order to enable those skilled in the art to better understand the technical solution of the present application, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments and drawings described herein are only used to explain the present application, rather than to limit the present application.
[0053] It can be understood that, in the absence of conflict, the various embodiments in the present application and the various features in the embodiments can be combined with each other.
[0054] It can be understood that, for the convenience of description, the drawings of the present application only show the parts related to the present application, while the parts unrelated to the present application are not shown in the drawings.
[0055] It can be understood that each unit and module involved in the embodiments of the present application may correspond to only one physical structure, or may be composed of multiple physical structures, or multiple units and modules may be integrated into one physical structure.
[0056] It can be understood that the terms "first", "second", etc. in the embodiments of the present application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.
[0057] It is understandable that, in the absence of conflict, the functions and steps marked in the flowcharts and block diagrams of the present application may occur in an order different from that marked in the drawings.
[0058] It is understood that the flowcharts and block diagrams of the present application illustrate the possible architectures, functions, and operations of the systems, devices, equipment, and methods according to the various embodiments of the present application. Among them, each box in the flowchart or block diagram may represent a unit, module, program segment, code, which contains executable instructions for implementing the specified functions. Moreover, each box or combination of boxes in the block diagram and flowchart may be implemented by a hardware-based system that implements the specified functions, or by a combination of hardware and computer instructions.
[0059] It can be understood that the units and modules involved in the embodiments of the present application can be implemented by software or hardware, for example, the units and modules can be located in a processor.
[0060] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0061] Various IoT devices in IoT scenarios are mostly configured with underlying lightweight systems. The national encryption algorithm has a dedicated hardware chip, which can be applied to IoT devices with different operating systems in IoT scenarios. However, in related technologies, in order to use the national encryption algorithm in IoT devices, it is necessary to set up a special operating system in the IoT device, as well as a module adapted to the national encryption algorithm, which will increase the design difficulty and production cost of IoT devices, and is not conducive to the promotion of IoT devices.
[0062] The inventor has found through research that IoT devices are generally equipped with a Subscriber Identity Module (SIM) card (storage card). Since the models of SIM cards are far less than those of IoT devices, if the national secret algorithm is integrated into the SIM card, the existing module of the SIM card and the original instruction channel of the module can be used, and only the calling instruction needs to be designed in the IoT device. Compared with setting up a special operating system and a module adapted to the national secret algorithm in the IoT device, designing a calling instruction to call the national secret chip integrated in the SIM card to use the national secret algorithm makes the cost of integration more controllable, reduces the difficulty of integrated design and implementation, and is easier to promote and use.
[0063] Based on this, in order to solve the problems of the prior art, the present invention proposes a national secret security method to reduce the difficulty and production cost of the integrated design of Internet of Things devices that apply national secret algorithms, thereby facilitating the promotion and use of national secret security in Internet of Things devices.
[0064] Embodiment 1:
[0065] Figure 1 A flowchart of the national secret security method provided in the embodiment of the present application is shown in FIG. Figure 1 As shown, the present application provides a national secret security method, which is applied to IoT devices. The method includes steps S11 to S13:
[0066] Step S11. Send the acquired first plaintext data to the storage card through module transparent transmission, wherein the storage card is integrated with a national encryption algorithm and stores a device key uniquely corresponding to the IoT device.
[0067] Specifically, the first plaintext data may be various data generated by the IoT device during operation and interaction, and these data exist in a readable form in an unencrypted state. For example, the first plaintext data may be status data, usage records, environmental data, user input data, etc. of the IoT device.
[0068] The way in which the IoT device obtains the first plaintext data may specifically be: collecting environmental data through sensors, inputting user data through a user interface, reading saved status data from a local memory, using records, etc.
[0069] The module transparent transmission method is a method of transmitting data through a module connecting an IoT device and a memory card. It can be understood that the module is a channel that provides transparent transmission of IoT device instructions. It should be noted that the module used in this embodiment can be a module conventionally used in existing IoT devices. In this way, the production cost caused by the special setting of modules for adapting the national encryption algorithm can be reduced, which is convenient for the promotion and use of national encryption security in IoT devices.
[0070] The national secret algorithm can be at least one of a symmetric encryption algorithm and an asymmetric encryption algorithm. Symmetric encryption algorithms, such as SM1 and SM4, use the same device key for encryption and decryption. Asymmetric encryption algorithms, such as SM2, are based on elliptic curve cryptography (ECC). SM2 uses a pair of device keys, with a public key for encryption and a private key for decryption. The public key can be made public, while the private key must be kept strictly confidential.
[0071] It is understandable that the device key includes a device encryption key and a device decryption key. The device encryption key and the device decryption key may be the same or different.
[0072] During implementation, after acquiring the first plaintext data, the IoT device generates a call instruction, which carries the first plaintext data, so that the call instruction passes through the module serving as an instruction transmission channel and is transmitted to the storage card.
[0073] The memory card may be a SIM card, a micro Secure Digital (microSD) card, or a universal flash storage (Universal Flash Storage, UFS).
[0074] Step S12. Receive the first ciphertext data fed back by the memory card through the module transparent transmission mode, where the first ciphertext data is formed by the memory card encrypting the first plaintext data based on the national secret algorithm using the device key.
[0075] During implementation, the memory card calls the national secret algorithm pre-stored inside it, uses the device key, encrypts the first plaintext data to form first ciphertext data, and feeds back the first ciphertext data through the card application in the memory card, so that the first ciphertext data is transmitted to the Internet of Things device through the module serving as a data transmission channel.
[0076] Step S13: reporting the first ciphertext data to the platform for use after decryption by the platform.
[0077] Here, the connection method between the IoT device and the platform can be a direct connection or an indirect connection, and can be a wired connection or a wireless connection. For example, the method in which the IoT device reports the first ciphertext data to the platform can be Message Queuing Telemetry Transport (MQTT), HyperText Transfer Protocol (HTTP) or other transmission methods, which are not limited in this embodiment.
[0078] The platform is provided with a password resource pool, which stores the password resources of the IoT devices managed by the platform. The platform calls the password resource pool interface according to the unique identifier of the IoT device, obtains the password resource, and uses it after decrypting the first ciphertext data.
[0079] In this embodiment, by integrating the national encryption algorithm into the storage card used by the Internet of Things device, designing a calling instruction in the Internet of Things device, and using the existing modules in the Internet of Things device for data transparent transmission, there is no need to set up a module specifically used for the national encryption algorithm in the Internet of Things device, and an underlying operating system compatible with the national encryption algorithm. This can reduce the design difficulty and production cost of the Internet of Things device that uses the national encryption algorithm, and facilitate the promotion and use of national encryption security in Internet of Things devices.
[0080] In some embodiments, before the above step S12, the method further includes steps S111 to S112:
[0081] Step S111. According to the unique identifier of the IoT device, obtain a device key uniquely corresponding to the IoT device from the platform interface.
[0082] The unique identifier of the IoT device is specifically an Integrated Circuit Card Identifier (ICCID), a Network Interface Card (NIC) or a Media Access Control Address (MAC address).
[0083] The unique identifier of the IoT device can be stored in a memory card, for example, the ICCID is stored in a SIM card; the unique identifier of the IoT device can also be stored in the IoT device, for example, the NIC is stored in the firmware of the IoT device, or the MAC is stored on the motherboard of the IoT device.
[0084] During implementation, the IoT device generates a request to obtain a device key, which carries the unique identifier of the IoT device. The platform obtains the device key corresponding to the unique identifier of the IoT device from the cryptographic resource pool and returns the device key to the IoT device.
[0085] Step S112: Send the device key to the memory card via module transparent transmission.
[0086] During implementation, the IoT device transmits the received device key to the memory card through the module channel.
[0087] In this embodiment, by sending the acquired device key to the storage card in a module transparent transmission manner, there is no need to set up a special module and a special operating system for the key storage process in the IoT device, which can reduce the design difficulty and production cost of the IoT device that uses the national encryption algorithm.
[0088] In some embodiments, the memory card stores a unique identifier of the IoT device. Before the above step S111, the method further includes step S110:
[0089] Step S110: Obtain the unique identifier of the IoT device from the memory card through module transparent transmission.
[0090] During implementation, the ICCID is integrated into the SIM card. After the IoT device is started for the first time, an instruction to obtain the device key is generated, and the instruction is transmitted to the storage card through module transparent transmission to obtain the ICCID. The data ICCID is transmitted from the storage card to the IoT device through module transparent transmission. The IoT device generates a request to the platform to obtain the device key, and the request to obtain the device key carries the ICCID. After the platform obtains the ICCID corresponding to the IoT device, it configures the device key corresponding to the ICCID and returns the device key to the IoT device. After receiving the device key, the IoT device sends the device key to the storage card through module transparent transmission, and the storage card stores the device key.
[0091] In some implementations, the memory card stores the key of the device and generates a successful response instruction, and sends the successful response instruction to the IoT device through the module transparent transmission method, so as to improve the security of using the national encryption algorithm.
[0092] In this embodiment, the unique identifier of the IoT device is obtained from the memory card through module transparent transmission. By using the unique identifier in the memory card and the existing module channel, it is only necessary to design instructions for obtaining the device key in the IoT device, thereby reducing the design difficulty and production cost of using the national encryption algorithm in the IoT device, and facilitating the use and promotion of the national encryption algorithm in the IoT scenario.
[0093] In some embodiments, the method further includes steps S14 to S15:
[0094] Step S14. Send the second ciphertext data issued by the platform to the memory card through the module transparent transmission mode;
[0095] Step S15. Receive the second plaintext data fed back by the memory card through the module transparent transmission mode, where the second plaintext data is formed by the memory card after decrypting the second ciphertext data based on the national secret algorithm using the device key.
[0096] During implementation, after obtaining the second ciphertext data issued by the platform, the IoT device generates a call instruction, which carries the second ciphertext data, and transmits the call instruction to the memory card through the module serving as the instruction transmission channel. The memory card calls the national secret algorithm and uses the device key to decrypt the second ciphertext data to generate the second plaintext data. The second plaintext data is transmitted to the IoT device through the module channel. The IoT device receives the second plaintext data and uses the second plaintext data on the IoT device.
[0097] In this embodiment, the national secret algorithm is integrated into the memory card used by the IoT device, and a call instruction is designed in the IoT device to realize the decryption of the ciphertext data. By using the existing modules in the IoT device for data transparent transmission, the design difficulty and production cost of the IoT device using the national secret algorithm are reduced.
[0098] The implementation process of the method of the present application is described below in conjunction with an application example. Figure 2 The schematic diagram of the structure of the Internet of Things device in the application embodiment provided in the embodiment of the present application is as follows: Figure 2 As shown, the structure of the IoT device cluster includes the following:
[0099] The SIM card side is equipped with a card application, as well as an integrated national secret chip and a national secret application. The module provides a channel for transparent transmission of instructions, and the device application side (corresponding to the above-mentioned IoT device) implements the call of the national secret algorithm through different instructions. Among them, the card application is the software interface for calling the module, that is, the SIM card; the national secret application is the software interface part of the card application calling the national secret chip; the national secret chip corresponds to the hardware of the national secret algorithm.
[0100] The call of the national secret algorithm is divided into the following scenarios:
[0101] 1. Device key initialization
[0102] Figure 3 A flowchart of an application embodiment of the national secret security method provided in the embodiment of the present application is as follows: Figure 3 As shown in the figure, after the IoT device is started for the first time, it needs to call the platform interface to obtain the device encryption key, and then call the instruction to pass it through the module to the SIM card to store the device key. The key is unique to the device and is stored for subsequent use in calling the national encryption algorithm.
[0103] 2. The device encrypts the plaintext data and reports it to the platform
[0104] Figure 4 A flowchart of another application embodiment of the national secret security method provided in the embodiment of the present application is as follows: Figure 4 As shown in the figure, after obtaining the plaintext data, the IoT device needs to call instructions. After transparent transmission through the module, it calls the national encryption algorithm integrated in the SIM card to encrypt the plaintext data into ciphertext data. Finally, the encrypted ciphertext data is reported to the platform. The platform uses the device's unique identifier to call the password resource pool interface to decrypt the data for use.
[0105] 3. The device decrypts the ciphertext data sent by the platform
[0106] Figure 5 A flowchart of another application embodiment of the national secret security method provided in the embodiment of the present application is as follows: Figure 5 As shown, after obtaining the ciphertext data sent by the platform, the IoT device calls the instruction, and after transparent transmission through the module, calls the national encryption algorithm integrated in the SIM card to decrypt the ciphertext data into plaintext data, and finally uses the plaintext data obtained after decryption on the device side.
[0107] In this embodiment, the SIM card end is configured with a card application, as well as an integrated national secret chip and a national secret application. The module provides a channel for transparent transmission of instructions, and the device application end implements the key initialization, encryption, decryption and other calls of the national secret algorithm through different instructions. Only setting the call instructions of the national secret algorithm on the device application end reduces the difficulty of integrated design and implementation, and is easier to promote and use.
[0108] Embodiment 2:
[0109] The present application provides a national secret security method, which is applied to a memory card, wherein the memory card is integrated with a national secret algorithm, and the method comprises steps S21 to S23:
[0110] Step S21. Receive the first plaintext data sent by the IoT device via the module transparent transmission mode;
[0111] Step S22. Based on the national secret algorithm, use the device key uniquely corresponding to the Internet of Things device to encrypt the first plaintext data to form first ciphertext data.
[0112] Step S23: Feedback the first ciphertext data to the IoT device through module transparent transmission, so that the IoT device reports the first ciphertext data to the platform for use after decryption by the platform.
[0113] Specifically, different types of national encryption algorithms are set according to different security and computing efficiency requirements. For example, for IoT devices that encrypt a large amount of data, symmetric encryption algorithms are configured to improve computing efficiency; for scenarios with high security, asymmetric encryption algorithms are configured. In addition, national encryption algorithms can also be set by combining symmetric encryption algorithms with asymmetric encryption algorithms.
[0114] During implementation, for a symmetric encryption algorithm, the encryption process and the decryption process use the same device key. The encryption process of the symmetric encryption algorithm includes initialization of generating a subkey using the device encryption key, initial permutation of the first plaintext data for initial processing, round encryption of multiple rounds of encryption operations on the first plaintext data, and a final round. The output after all rounds of encryption is the first ciphertext data.
[0115] For an asymmetric encryption algorithm, the encryption process and the decryption process use two different keys, one is a public key and the other is a private key. The encryption process of the asymmetric encryption algorithm includes: obtaining a public key (i.e., a device encryption key) sent by the platform, creating a temporary device key, performing elliptic curve point operations, symmetrically encrypting the first plaintext data, and combining the elliptic curve point operations and symmetric encryption to form the first ciphertext data.
[0116] In this embodiment, the national secret algorithm is integrated into the memory card to encrypt the plaintext data in the memory card, and the module is used as the data transmission channel between the memory card and the Internet of Things device, and the existing modules in the Internet of Things device are used for data transparent transmission. Since the types of memory cards are far less than the types of Internet of Things devices, the design difficulty and production cost of integrating the national secret algorithm in the memory card are much lower than those integrated in the Internet of Things device, and it is convenient to promote and use the national secret security in the Internet of Things devices.
[0117] In some embodiments, the method further comprises steps S24 to S26:
[0118] Step S24. receiving second ciphertext data sent by the IoT device through the module transparent transmission mode; the second ciphertext data is received by the IoT device from the platform;
[0119] Step S25. Based on the national secret algorithm, use the device key to decrypt the second ciphertext data to form second plaintext data;
[0120] Step S26: Feedback the second plaintext data to the IoT device through module transparent transmission for use by the IoT device.
[0121] Specifically, for different types of national secret algorithms, the memory card performs different decryption processes. The decryption process of the symmetric encryption algorithm is the reverse process of the encryption process of the above-mentioned symmetric encryption algorithm. For the decryption process of the asymmetric encryption algorithm, taking the decryption process of SM2 as an example, the memory card uses the private key (i.e., the device decryption key) to decrypt the points on the elliptic curve in the received second ciphertext data to obtain the session key. The symmetrically encrypted ciphertext is decrypted using the session key to form the second plaintext data.
[0122] In this embodiment, the second ciphertext data sent by the Internet of Things device through the module transparent transmission is received through the storage card, and based on the national secret algorithm, the second ciphertext data is decrypted using the device key to form second plaintext data, and the second plaintext data is fed back to the Internet of Things device through the module transparent transmission, thereby realizing the decryption of the ciphertext data, utilizing the national secret algorithm in the storage card and the existing module channel in the Internet of Things device to avoid integration in the Internet of Things device, reducing the design difficulty and production cost of applying the national secret algorithm to the Internet of Things device, and facilitating the promotion and use of national secret security in Internet of Things devices.
[0123] For ease of understanding, in an example, the IoT device takes a lighting control gateway as an example to specifically illustrate the above method. The lighting control gateway hardware contains a microprocessor, a module, various sensors, etc., and the operating environment is a general real-time operating system (RTOS). The SIM card is inserted into the gateway and connected to the gateway through the module for communication.
[0124] The gateway controls the lighting equipment of a road section or building. In this scenario, sensitive information includes: the coordinates of the lighting equipment (lower-level monitoring equipment) sent to the platform, and the instructions sent from the platform to the gateway to control the lighting equipment switch. The following is the national secret application process of the lighting control gateway:
[0125] 1. National secret initialization
[0126] 1.1 The device application (IoT device) calls the SM2 interface to generate a public-private key pair and caches it for subsequent use: SM2PBK (public key) / SM2PRK (private key);
[0127] 1.2 The device application calls the SM3 interface to generate a device signature value using the International Mobile Equipment Identity (IMEI) as the unique code of the device: SM3MAC = SM3 (IMEI);
[0128] 1.3 The device application uses the generated SM2 public key, device unique code, and SM3 signature value to request the IoT platform interface and initiate an SM9 key download request: REQUEST (IMEI, SM2PBK, SM3MAC);
[0129] 1.4 The IoT platform receives the request, calls the national secret capability of the platform to verify the signature and generate the device SM9 key response, uses the device public key SM2PBK to encrypt the key ciphertext SM9ENCRYPT, and calculates the platform signature value SM3MAC2, and returns the key ciphertext data message to the device: RESPONSE (SM9ENCRYPT, SM3MAC2);
[0130] 1.5 The device application receives the key ciphertext data message and verifies the platform signature value SM3MAC2;
[0131] 1.6 After the device application verifies the platform signature value, it uses the device public key SM2PRK to decrypt SM9ENCRYPT to obtain the key plaintext SM9K (device key), which is stored in the SIM card for subsequent use: SM9K = SM2 (SM2PRK, SM9ENCRYPT). The formula is expressed as: decryption using the SM2 algorithm, the parameters are SM2PRK (SM2 private key) and SM9ENCRYPT (SM9 algorithm key ciphertext, the result of the platform using the SM2 public key encryption), and the decryption result is SM9K (SM9 algorithm key plaintext).
[0132] 2. National secret transmission
[0133] 2.1 The device application receives the specific coordinate location ADDRESS (first plaintext data) of the lower-level monitoring device, and through the module, calls the SIM card to use the device key SM9K to encrypt the ciphertext data SM9ENCRYPT2, that is, the first ciphertext data: SM9ENCRYPT2 = SM9 (SM9K, ADDRESS)
[0134] 2.2 The device application reports the first ciphertext data to the IoT platform: REQUEST (IMEI, SM9ENCRYPT2);
[0135] 2.3 After receiving the first ciphertext data (message data), the IoT platform decrypts it for operation and maintenance and responds that the device application is successful;
[0136] 2.4 The IoT platform calls the national encryption capability to encrypt the control instructions of a monitoring device to obtain SM9ENCRYPT3, the second ciphertext data, and then sends the second ciphertext data to the device application: REQUEST (SM9ENCRYPT3);
[0137] 2.5 The device application receives the control data (the second ciphertext data), and through the module, calls the SM9 interface through the SIM card to decrypt the device's plaintext control instructions (the second plaintext data), and then performs device control: CONTROL = SM9 (SM9K, SM9ENCRYPT3).
[0138] In this embodiment, by combining the national encryption algorithms of SM2, SM3, and SM9 in the lighting control gateway, the specific location information of the lower-level monitoring equipment is encrypted and sent to the platform, and the instructions for controlling the lighting equipment switches received from the platform are decrypted to achieve secure processing of sensitive business data.
[0139] Embodiment 3:
[0140] Figure 6 A schematic diagram of the structure of a national secret security device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the present application provides a national secret security device, which is applied to an Internet of Things device, and the device includes:
[0141] A first sending module 21, which is configured to send the acquired first plaintext data to a storage card through a module transparent transmission method, wherein the storage card is integrated with a national secret algorithm and stores a device key uniquely corresponding to the IoT device;
[0142] A first receiving module 22 is connected to the first sending module 21, and is configured to receive first ciphertext data fed back by the memory card through module transparent transmission, wherein the first ciphertext data is formed by encrypting the first plaintext data by the memory card based on the national secret algorithm and using the device key;
[0143] The reporting module 23 is connected to the first receiving module 22, and is configured to report the first ciphertext data to the platform for use after decryption by the platform.
[0144] In some embodiments, the first sending module is further configured to send the second ciphertext data issued by the platform to the storage card through module transparent transmission;
[0145] The first receiving module is also configured to receive second plaintext data fed back by the storage card through module transparent transmission, and the second plaintext data is formed by the storage card after decrypting the second ciphertext data based on the national secret algorithm using the device key.
[0146] It should be noted that this embodiment is a corresponding device of the national secret security method in the above-mentioned embodiment 1. The method in embodiment 1 can be implemented by using this device. The specific implementation method can refer to the description in embodiment 1, and this embodiment will not be repeated here.
[0147] Embodiment 4:
[0148] Figure 7 A structural diagram of another national secret security device provided in an embodiment of the present application is shown as follows: Figure 7 As shown, the present application provides a national secret security device, which is applied to a memory card, wherein the memory card is integrated with a national secret algorithm, and the device comprises:
[0149] A second receiving module 31, which is configured to receive first plaintext data sent by the IoT device via module transparent transmission;
[0150] The encryption module 32 is connected to the second receiving module 31 and is configured to encrypt the first plaintext data based on the national secret algorithm using a device key uniquely corresponding to the IoT device to form first ciphertext data;
[0151] The feedback module 33 is connected to the encryption module 32, and is configured to feed back the first ciphertext data to the IoT device through module transparent transmission, so that the IoT device reports the first ciphertext data to the platform for use after decryption by the platform.
[0152] It should be noted that this embodiment is a corresponding device of the national secret security method in the above-mentioned embodiment 2. The method in embodiment 2 can be implemented by using this device. The specific implementation method can refer to the description in embodiment 2, and this embodiment will not be repeated here.
[0153] Embodiment 5:
[0154] Figure 8 A national secret security system provided for this application, such as Figure 8 As shown, the system includes: an IoT device 100, a module 200 and a memory card 300.
[0155] The IoT device 100 is used to transparently transmit the acquired first plaintext data to the storage card 300 through the module 200;
[0156] The memory card 300 is integrated with a national secret algorithm and stores a device key uniquely corresponding to the IoT device. The memory card is used to encrypt the first plaintext data using the device key based on the national secret algorithm to form first ciphertext data, and feed the first ciphertext data back to the IoT device 100 through the module 200;
[0157] The IoT device 100 is also used to report the first ciphertext data to the platform for use after decryption by the platform.
[0158] Among them, IoT devices refer to devices that can send, receive and process data through the Internet, thereby realizing automatic control and intelligent management. For example, based on the usage scenarios, IoT devices include: smart home devices (such as smart door locks, smart sweeping robots), industrial IoT devices (such as industrial monitoring equipment, industrial sensors), smart agricultural equipment (such as smart irrigation systems, smart weather stations), sensors for smart city applications (such as smart street lights, smart parking systems), smart medical equipment (such as smart blood pressure monitors, smart monitoring systems), etc.
[0159] The module can be at least one of a 2G module, a 3G module, a 4G / LTE module, a 5G module, a NB-IoT module, an eMTC / CAT-M module, etc.
[0160] The memory card, which may be a Subscriber Identity Module (SIM) card, enables IoT devices to send and receive information via mobile networks and supports remote monitoring, management and control of IoT devices.
[0161] In some embodiments, the memory card includes a card application and a national encryption algorithm application. The card application is connected to the national encryption algorithm application and is connected to the Internet of Things device through a module to enable the Internet of Things device to call the national encryption algorithm through different instructions.
[0162] In some embodiments, the IoT device is also used to: before receiving the first ciphertext data fed back by the storage card through the module transparent transmission method, obtain a device key uniquely corresponding to the IoT device from the platform interface according to the unique identifier of the IoT device; and send the device key to the storage card through the module transparent transmission method.
[0163] In some embodiments, the unique identifier of the IoT device is stored in the storage card, and the IoT device is also used to: obtain the unique identifier of the IoT device from the storage card through module transparent transmission before obtaining the device key uniquely corresponding to the IoT device from the platform interface based on the unique identifier of the IoT device.
[0164] In some embodiments, the IoT device is further used to send the second ciphertext data issued by the platform to the storage card through the module transparent transmission method;
[0165] The memory card is also used to decrypt the second ciphertext data based on the national secret algorithm and the device key to form the second plaintext data; and feed the second plaintext data back to the IoT device through the module transparent transmission mode;
[0166] The IoT device is also used to receive second plaintext data fed back by the memory card through the module transparent transmission method.
[0167] In this embodiment, conventional connection methods can be used in the connection relationship between the Internet of Things device and the module, and between the module and the storage card, without making special improvements to the above connection methods. In this way, the overall design cost of the national secret security system and the overall production difficulty of the system can be reduced, which facilitates the promotion and use of national secret security in Internet of Things devices.
[0168] It should be noted that this embodiment is a corresponding device of the national secret security method in the above-mentioned embodiment 1 or embodiment 2. This device can be used to implement the method in embodiment 1 or embodiment 2. The specific implementation method can refer to the description in embodiment 1 or embodiment 2, and this embodiment will not be repeated here.
[0169] Fig. 9 Another structural diagram of a national secret security device provided by this application is as follows: Fig. 9 As shown, the present application provides a national secret security device, including a memory 31 and a processor 32, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the national secret security method in the above-mentioned embodiments of the present application.
[0170] The memory is connected to the processor, the memory may be a flash memory or a read-only memory or other memory, and the processor may be a central processing unit or a single-chip microcomputer.
[0171] In some embodiments, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the national secret security method in the above-mentioned embodiments of the present application is implemented.
[0172] The computer-readable storage medium includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.
[0173] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present application, but the present application is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and substance of the present application, and these modifications and improvements are also considered to be within the scope of protection of the present application.
Claims
1. A national secret security method, applied to IoT devices, characterized in that: The method comprises: The first plaintext data obtained is sent to a storage card through a module transparent transmission mode, wherein the storage card is integrated with a national secret algorithm and stores a device key uniquely corresponding to the IoT device; Receiving first ciphertext data fed back by the memory card in a module transparent transmission mode, where the first ciphertext data is formed by encrypting the first plaintext data by the memory card based on the national secret algorithm and using the device key; The first ciphertext data is reported to the platform for use after decryption by the platform.
2. The national secret security method according to claim 1, characterized in that: Before receiving the first ciphertext data fed back by the memory card in the module transparent transmission mode, the method further includes: According to the unique identifier of the IoT device, obtain a device key uniquely corresponding to the IoT device from the platform interface; The device key is sent to the memory card through the module transparent transmission method.
3. The national secret security method according to claim 2, characterized in that: The memory card stores a unique identifier of the IoT device. Before obtaining a device key uniquely corresponding to the IoT device from a platform interface according to the unique identifier of the IoT device, the method further includes: The unique identifier of the IoT device is obtained from the memory card through module transparent transmission.
4. The national secret security method according to any one of claims 1 to 3, characterized in that: The method further comprises: The second ciphertext data issued by the platform is sent to the storage card through the module transparent transmission method; The second plaintext data fed back by the memory card through the module transparent transmission mode is received, where the second plaintext data is formed by the memory card decrypting the second ciphertext data based on the national secret algorithm using the device key.
5. A national secret security method, applied to a memory card, characterized in that: The memory card is integrated with a national encryption algorithm, and the method comprises: Receiving first plaintext data sent by the IoT device through module transparent transmission; Based on the national secret algorithm, using a device key uniquely corresponding to the IoT device, encrypting the first plaintext data to form first ciphertext data; The first ciphertext data is fed back to the IoT device through module transparent transmission, so that the IoT device reports the first ciphertext data to the platform for use after decryption by the platform.
6. The national secret security method according to claim 5, characterized in that: The method further comprises: Receiving second ciphertext data sent by the IoT device through module transparent transmission; the second ciphertext data is received by the IoT device from the platform; Based on the national secret algorithm, the second ciphertext data is decrypted using the device key to form second plaintext data; The second plaintext data is fed back to the IoT device through module transparent transmission for use by the IoT device.
7. A national secret security device, applied to Internet of Things devices, characterized in that: The device comprises: A first sending module, configured to send the acquired first plaintext data to a storage card through a module transparent transmission mode, wherein the storage card is integrated with a national secret algorithm and stores a device key uniquely corresponding to the IoT device; A first receiving module, connected to the first sending module, configured to receive first ciphertext data fed back by the memory card in a module transparent transmission manner, wherein the first ciphertext data is formed by encrypting the first plaintext data by the memory card based on the national secret algorithm and using the device key; The reporting module is connected to the first receiving module and is configured to report the first ciphertext data to the platform for use after decryption by the platform.
8. The national secret security device according to claim 7, characterized in that: The first sending module is also configured to send the second ciphertext data issued by the platform to the storage card through the module transparent transmission mode; The first receiving module is also configured to receive second plaintext data fed back by the storage card through module transparent transmission, and the second plaintext data is formed by the storage card after decrypting the second ciphertext data based on the national secret algorithm using the device key.
9. A national secret security device, applied to a memory card, characterized in that: The memory card is integrated with a national secret algorithm, and the device comprises: A second receiving module, which is configured to receive first plaintext data sent by the IoT device through a module transparent transmission mode; an encryption module connected to the second receiving module, configured to encrypt the first plaintext data based on the national secret algorithm and using a device key uniquely corresponding to the IoT device to form first ciphertext data; The feedback module is connected to the encryption module and is configured to feed back the first ciphertext data to the IoT device through module transparent transmission, so that the IoT device reports the first ciphertext data to the platform for use after decryption by the platform.
10. A national secret security system, characterized in that: include: IoT devices, modules and memory cards, The IoT device is used to transparently transmit the acquired first plaintext data to the memory card through the module; The memory card is integrated with a national secret algorithm and stores a device key uniquely corresponding to the IoT device. The memory card is used to encrypt the first plaintext data using the device key based on the national secret algorithm to form first ciphertext data, and feed the first ciphertext data back to the IoT device through the module; The IoT device is also used to report the first ciphertext data to the platform for use after decryption by the platform.
Citation Information
Patent Citations
Gas meter data transmission method and gas meter
CN112333656A
Internet of Things security cloud platform implementation method based on national cryptographic algorithm security chip
CN113595985A
Gas meter security authentication and communication eSIM module based on national secret algorithm
CN114553485A
National key identification cryptographic algorithm-based private key distribution system
WO2022143030A1
