Security protection methods, devices and systems for embedded devices in smart grids

By constructing a trusted software base and encryption/decryption algorithm engine based on a TF card, the security issues of embedded device terminals in smart grids were solved, enabling trusted reading and writing of data, enhancing the security and data protection capabilities of terminal devices, and preventing malicious program attacks.

CN115776405BActive Publication Date: 2026-04-03STATE GRID CHONGQING ELECTRIC POWER COMPANY +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-28
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

The security protection of embedded devices in smart grids is not perfect, making them a new target for criminals. Especially with the increase in data volume and the large number of IoT devices connected, confidential information and sensitive data of terminal devices are easily stolen.

Method used

A trusted software base based on TF cards is constructed. The encryption and decryption algorithm engine and trusted benchmark library in the TF card are used to read and write data to the secure application in the embedded device terminal. The data security and the trusted state of the system are ensured through trusted whitelists and integrity verification mechanisms.

Benefits of technology

It effectively isolates malicious operations, detects illegal application packages, protects critical data, realizes security protection in the "thing-to-thing" interconnection scenario of smart grid, and enhances the security of device terminals and the ability to prevent data theft.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115776405B_ABST
    Figure CN115776405B_ABST
Patent Text Reader

Abstract

This invention discloses a method, device, and system for embedded device terminal security protection in smart grids. It employs a comprehensive trust measurement and security protection scheme featuring a dual-architecture and star-topic trust architecture, including a threat model that assumes attackers of IoT terminals can obtain relevant information about the target through the following methods; an overall scheme framework whose core idea is to build a trusted software base based on a TF card, using encryption and decryption algorithms within the TF card to achieve authentication, integrity verification, and data storage functions; and TF card-based signature verification, primarily used to distinguish different applications, with the signature containing the app developer's identification information. This invention is applicable to detecting illegal application packages in smart grid terminal devices, possesses resistance to malicious programs, and protects critical data from theft, achieving security protection in smart grid "thing-to-thing" interconnection scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart grid technology, and in particular to a method, apparatus and system for protecting the security of embedded device terminals for smart grids. Background Technology

[0002] Smart grids are characterized by openness and sharing, with various distributed devices coordinating and optimizing control. my country currently advocates building a safe and intelligent smart grid to meet global electricity demand in the most intelligent and efficient way possible. However, as the scale of smart grids gradually expands, a massive number of IoT devices are connected, and due to the continuous accumulation of data in the era of big data, including confidential and sensitive information, most of these terminal devices require operating systems to perform the corresponding complex tasks.

[0003] Compared to the traditional Internet, the security mechanisms of smart grids are not yet perfect, and terminal devices, as an important part of smart grids, are gradually becoming a new focus of attacks by criminals. Summary of the Invention

[0004] This invention provides a method, apparatus, and system for protecting the security of embedded device terminals in smart grids, which solves or at least partially solves the technical problem of insufficient security protection for embedded device terminals in the prior art.

[0005] To address the aforementioned technical problems, the first aspect of this invention provides a method for protecting the security of embedded device terminals in smart grids, comprising:

[0006] Construct a trusted software base based on TF cards, where the TF card serves as security hardware and contains an encryption / decryption algorithm engine for encrypting and decrypting data, and the trusted software base serves as a security module, setting up a trusted benchmark library;

[0007] Based on a trusted benchmark library and encryption / decryption algorithm engine, this system enables data reading and writing for various secure applications in embedded device terminals.

[0008] In one implementation, data is read from various security applications in an embedded device terminal based on a trusted benchmark library and an encryption / decryption algorithm engine, including:

[0009] When a security application reads data, it calls the middleware driver to send the data read request to the security module. The data read request carries the identity identifier of the security application.

[0010] The security module verifies the legitimacy of data read requests sent by the security application and compares the identity information stored in the trusted benchmark library with the identity identifier of the security application to authenticate it.

[0011] If both the legitimacy and authentication are successful, the system checks if a data record corresponding to the data read request exists. If it does, the corresponding data record is retrieved from the target location of the security hardware. This data record is encrypted. Simultaneously, the application's identity and the encrypted data are sent to the security hardware. The security hardware retrieves the key used to decrypt the encrypted data from the storage device. The key is stored in an encrypted manner. Then, the encryption / decryption algorithm engine decrypts the encrypted key to obtain the original key. The original key is used to decrypt the encrypted data, and the decrypted data is returned to the security application.

[0012] In one implementation, data is written to various secure applications in the embedded device terminal based on a trusted benchmark library and an encryption / decryption algorithm engine, including:

[0013] When a security application requests to write data, the middleware driver is invoked to send a data write request to it. The data write request carries the security application's identity and the data to be written.

[0014] The middle layer driver authenticates the security application based on the identity identifier. After successful authentication, the encryption and decryption algorithm engine is called. The data to be written is encrypted inside the security hardware of the encryption and decryption algorithm engine and then returned to the middle layer driver.

[0015] The middleware layer drives the encrypted data to be written to the storage device.

[0016] In one embodiment, the method further includes performing integrity verification on the embedded device terminal based on the TF card, including:

[0017] Sign each APK file in the embedded device terminal and generate signature information;

[0018] The generated signature information is compared with a trusted benchmark library to measure the legitimacy of the secure application or APK and the integrity of the files.

[0019] In one implementation, the method further includes verifying the signature of the embedded device terminal by setting a trusted whitelist.

[0020] Based on the same inventive concept, a second aspect of the present invention provides an embedded device terminal security protection device for smart grids, comprising:

[0021] The Trusted Software Base Construction Module is used to build a Trusted Software Base based on a TF card. The TF card serves as security hardware and contains an encryption / decryption algorithm engine for encrypting and decrypting data. The Trusted Software Base is a security module that sets up a trusted benchmark library.

[0022] The data interaction module is used to read and write data to various secure applications in the embedded device terminal based on a trusted benchmark library and encryption / decryption algorithm engine.

[0023] In one embodiment, the apparatus further includes an integrity verification module, used for:

[0024] Sign each APK file in the embedded device terminal and generate signature information;

[0025] The generated signature information is compared with a trusted benchmark library to measure the legitimacy of the secure application or APK and the integrity of the files.

[0026] In one embodiment, the apparatus further includes a signature verification module for verifying the signature of the embedded device terminal by setting a trusted whitelist.

[0027] Based on the same inventive concept, the third aspect of the present invention provides an embedded device terminal security protection system for smart grids, comprising: an embedded device terminal security protection device for smart grids as described in the second aspect, and an embedded device terminal.

[0028] Compared with the prior art, the advantages and beneficial technical effects of the present invention are as follows:

[0029] This invention provides a security protection method for embedded device terminals in smart grids. It constructs a trusted software base based on a TF card, and uses a trusted benchmark library and encryption / decryption algorithm engine to read and write data to various secure applications within the embedded device terminal. This invention enhances the security of device terminals in smart grids by using the TF card as a trusted hardware platform. It can isolate various malicious operations, ensuring the system remains in a trusted state at all times. Furthermore, it can effectively detect illegal application packages in smart grid terminal devices, resisting malicious programs and protecting critical data from theft, thus achieving security protection in the "thing-to-thing" interconnection scenario of smart grids. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0031] Figure 1 This is the overall solution framework in the embodiments of the present invention;

[0032] Figure 2This is a flowchart of the APK verification process in an embodiment of the present invention. Detailed Implementation

[0033] The embedded device terminal security protection method for smart grids provided by this invention is a comprehensive trust measurement and security protection scheme featuring a dual-system architecture and a star-shaped trust architecture. The dual-system architecture refers to the Trusted Computing 3.0 dual-system architecture running on the embedded mobile terminal, achieving security and trust within the chip. The star-shaped trust architecture refers to establishing a star-shaped trust chain from the on-chip memory storage area to the upper-layer embedded operating system. The security protection scheme of this invention comprises three parts: a threat model, an overall scheme framework, and Android signature verification based on a TF card. 1) The threat model assumes that attackers of IoT terminals can obtain relevant information about the target through methods such as the target device's system version number, the list of installed applications, and the user's application operation preferences. 2) The overall scheme framework's core idea is to build a trusted software base based on a TF card, using encryption and decryption algorithms in the TF card to achieve authentication, integrity verification, and data storage functions for the trusted software base. 3) Android signature verification based on a TF card is mainly used to distinguish different applications; the signature contains the identity information of the APP developer. This invention is applicable to detecting illegal application packages in smart grid terminal equipment, has the ability to resist malicious programs, and protects critical data from theft, thereby achieving security protection in the "thing-to-thing" interconnection scenario of smart grids.

[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0035] Example 1

[0036] This invention provides a method for protecting the security of embedded device terminals for smart grids, including:

[0037] Construct a trusted software base based on TF cards, where the TF card serves as security hardware and contains an encryption / decryption algorithm engine for encrypting and decrypting data, and the trusted software base serves as a security module, setting up a trusted benchmark library;

[0038] Based on a trusted benchmark library and encryption / decryption algorithm engine, this system enables data reading and writing for various secure applications in embedded device terminals.

[0039] Please see Figure 1 , which is the overall solution framework in the embodiments of the present invention; the Android terminal device is an embedded device terminal. The Android terminal device is a typical mobile terminal device in the smart grid, and ensuring the security of the embedded terminal device is an important cornerstone of the current smart grid security protection.

[0040] The above security protection method is an all-round trusted measurement and security protection solution with the characteristics of a dual-system architecture and a star-shaped trust architecture, including a threat model. The model assumes that attackers of Internet of Things terminals can obtain relevant information about the attack target through the following methods, such as the system version number of the target device, the list of installed applications on the system, the application operation preferences of the device user, etc.; the overall solution framework, whose core idea is to build a trusted software base based on the TF card, and through the encryption and decryption algorithm services in the TF card, implement the functions of identity authentication, integrity verification and data storage of the trusted software base; the signature verification based on the TF card, whose main function is to distinguish different applications, and the signature contains the identity identification information of the APP developer. The present invention is applicable to detecting illegal application packages in smart grid terminal devices, has the ability to resist malicious programs, and at the same time protects key data from being stolen, realizing security protection in the "thing-to-thing" interconnection scenario of the smart grid.

[0041] The threat model and the overall solution framework are described below:

[0042] 1. Threat model

[0043] Attacks by attackers on energy Internet of Things embedded terminal devices may occur when the device is being operated by a user, or when the device is unattended. The present invention assumes that attackers of Internet of Things terminals can obtain relevant information about the attack target through the following methods, such as the system version number of the target device, the list of installed applications on the system, the application operation preferences of the device user, etc. Then, the attacker will carefully design an intrusion plan based on the known information to create a corresponding malicious program. The intrusion methods may include directly transmitting the installation package of the malicious program; providing a phishing link to trick the user into downloading the malicious program, or disguising it as a normal APK installation package and transmitting the APK installation package to the target device indirectly through methods such as upgrading the installation package, waiting for the user to click and install to trigger; infecting the target device through removable storage; intercepting data information in the target system or uploaded, etc. The attacker's purpose is to steal important data information or install a certain malicious software on the target terminal device, and then use the implanted malicious APP as a medium to launch more attack behaviors, such as escalating privileges, stealing information, paralyzing the target system, infecting more targets, thereby preventing the normal and stable operation of the smart grid and causing accidents in the network operation process.

[0044] 2. Overall solution framework

[0045] The startup process of mobile terminals within a smart grid requires strict control. After the mobile terminal is powered on, the bootloader starts the embedded system. By designing measurement code with measurement functionality in the bootloader, this code is placed at the beginning of the kernel code. Combined with trusted security hardware, the corresponding measurement values ​​are stored, serving as the starting point of the entire trust chain. Based on this root of trust, the kernel is measured using the IMA (Integer Matrix Assessment) method. If the measurement result indicates that the system is secure and trustworthy, control is transferred to the kernel. The kernel then becomes the next node in the trust chain. Starting from the kernel, the trusted modules and layer applications in the system's middleware layer are further measured using the same IMA method, thus establishing a complete trust chain from the bootloader to user-space applications. The trusted modules in the middleware layer mainly refer to the Trusted Software Stack (TSS), which is the supporting software on the trusted computing platform. Layer applications refer to system and network applications attached to the middleware layer, such as antivirus software and firewalls, to distinguish them from upper-layer applications.

[0046] It should be noted that this invention uses the Integrity Measurement Method (IMA) to perform trust measurement on the kernel. Once the kernel code passes the trust measurement, the kernel is treated as the second level in the trust chain, and subsequent measurements are still performed using the IMA method. Here, trusted modules mainly refer to the Trusted Software Stack (TSS), and layer applications mainly refer to system applications and network applications located between the lower and application layers. Trusted modules in the system middle layer primarily refer to the Trusted Software Stack (TSS), which is the supporting software on the trusted computing platform. Layer applications refer to system applications and network applications attached to the system middle layer, such as antivirus software and firewalls, to distinguish them from upper-layer applications.

[0047] In one implementation, data is read from various security applications in an embedded device terminal based on a trusted benchmark library and an encryption / decryption algorithm engine, including:

[0048] When a security application reads data, it calls the middleware driver to send the data read request to the security module. The data read request carries the identity identifier of the security application.

[0049] The security module verifies the legitimacy of data read requests sent by the security application and compares the identity information stored in the trusted benchmark library with the identity identifier of the security application to authenticate it.

[0050] If both the legitimacy and authentication are successful, the system checks if a data record corresponding to the data read request exists. If it does, the corresponding data record is retrieved from the target location of the security hardware. This data record is encrypted. Simultaneously, the application's identity and the encrypted data are sent to the security hardware. The security hardware retrieves the key used to decrypt the encrypted data from the storage device. The key is stored in an encrypted manner. Then, the encryption / decryption algorithm engine decrypts the encrypted key to obtain the original key. The original key is used to decrypt the encrypted data, and the decrypted data is returned to the security application.

[0051] In practice, the target location of the security hardware refers to the data storage area of ​​the security hardware, which is used to store the data requested by the application. The role of the storage device is to store various data, including the encrypted application key (i.e., the key used to decrypt the data requested by the application).

[0052] In one implementation, data is written to various secure applications in the embedded device terminal based on a trusted benchmark library and an encryption / decryption algorithm engine, including:

[0053] When a security application requests to write data, the middleware driver is invoked to send a data write request to it. The data write request carries the security application's identity and the data to be written.

[0054] The middle layer driver authenticates the security application based on the identity identifier. After successful authentication, the encryption and decryption algorithm engine is called. The data to be written is encrypted inside the security hardware of the encryption and decryption algorithm engine and then returned to the middle layer driver.

[0055] The middleware layer drives the encrypted data to be written to the storage device.

[0056] The above process describes how an application writes data to a storage device. This method ensures that the data stored on the storage device is always encrypted, preventing plaintext data from being easily obtained.

[0057] In one embodiment, the method further includes performing integrity verification on the embedded device terminal based on the TF card, including:

[0058] Sign each APK file in the embedded device terminal and generate signature information;

[0059] The generated signature information is compared with a trusted benchmark library to measure the legitimacy of the secure application or APK and the integrity of the files.

[0060] Specifically, the core idea of ​​this invention's security design is to construct a trusted software base based on a TF card. Through encryption and decryption algorithms within the TF card, the trusted software base achieves authentication, integrity verification, and data storage functions. Authentication and integrity verification are implemented based on a new signature, achieved through signature detection. The system signs each Android APK file, and the integrity verification module in the TF card compares the signature information to measure the legitimacy and file integrity of applications or APKs within the system. Encrypted data storage is presented in the form of a trusted benchmark library, primarily used to store the measured benchmark values.

[0061] In one implementation, the method further includes verifying the signature of the embedded device terminal by setting a trusted whitelist.

[0062] Specifically, to distinguish between unknown and known Android applications, prevent APKs that have not passed security verification from being installed on the system, and avoid accidents to other devices in the smart grid caused by malware, this invention proposes a signature implementation scheme based on a TF card. The signature is mainly used to distinguish different Android applications, and it contains the identity information of the APP developer. Due to the higher security requirements in the smart grid scenario, this invention adopts a signature verification method similar to a whitelist in firewall access rules. That is, only programs that must pass verification are allowed to run; otherwise, they are considered unknown and risky software programs, and their related operations are blocked. This principle is used to ensure the security of the Android system.

[0063] To improve the efficiency of the signature verification process, the length of the encrypted information should be shortened before applying an asymmetric encryption algorithm to the signature information. Therefore, this embodiment of the invention uses a digest algorithm to generate a fixed, short-length value, which is one of the reasons for using a TF card to implement trusted protection for trusted terminal devices. The specific implementation of signature verification based on a TF card in this embodiment of the invention is as follows:

[0064] First, the app to be signed is read as a byte stream and copied to the location specified by the TF card program. Then, after the TF card completes the digest algorithm, it generates the corresponding result. This result can be temporarily stored on the system as a text file (txt). For security reasons, this digest value should not be stored in plaintext in the Android system environment to avoid the risk of it being stolen and used to impersonate a legitimate application. Next, the TF card performs a signing operation on the simplified app information. It uses the newly generated fixed-length digest as the input source for the subsequent signing algorithm. After encryption with the private key in the algorithm, the signature base value of the application is obtained. At this point, the process of generating a new signature for an app based on the TF card is complete.

[0065] When the TF card control application captures the installation behavior of the APK file, it performs signature verification on the application installation package and only allows the installation of applications that pass the verification. If the signature of an application is tampered with, the installation is prohibited and the user is prompted that the installation fails. The APK signature verification includes two parts. First, it checks whether it is in the system whitelist based on the pre-initialized signature reference library. If it is not in the trusted list (i.e., the whitelist), it may be a file tampered with by a third party.

[0066] After the monitoring service of the TF card control application is started, when the APK package is installed, the application uses the interception mechanism to intercept this behavior, obtains the APK path and calls the TF card service according to the path, then uses the TF card class trust root to perform signature verification on it, obtains the APK signature information based on the binary content of the APK using the signature verification algorithm, and compares it with the APK signature information in the reference library. If the results are the same, the verification passes. If the APK has been tampered with by a third party, the signature comparison fails, the verification fails, and the installation is prohibited. Due to the same certificate, if the package names are different, two different applications will be found to exist when the installation is successful. For the same application, if the package name is the same but the certificates used are different, it will cause the problem of unable to overwrite the installation. Therefore, only when the package name and signature information are both the same is the installation and operation allowed.

[0067] Please refer to Figure 2 , which is the medium-sized APK verification flowchart in the embodiment of the present invention.

[0068] In this figure, the process on the left mainly generates the SM3 digest based on the APK file, and the process on the right is to perform a signature operation on the simplified APP information. The two are mutually related. After obtaining the SM3 digest from the left, this digest information needs to be used as the input source of the signature algorithm.

[0069] Among them, the system whitelist and the trusted whitelist have the same meaning, which refers to the software whitelist of the APK installation package preset in the system. The software within the whitelist is considered safe by the system. The filtering method is: traverse in the whitelist to confirm whether the APK is included in the whitelist (judge by traversing the whitelist list and comparing the values of the items in the table. If the values are equal, the comparison is successful, otherwise it fails). The APK behavior means that when the system is ready to install the APK, a series of behaviors such as decompression and installation are generated based on the APK. The "obtaining the APK behavior" in the figure means that the APK behavior occurs and is monitored and recorded by the TF card control application. The SM3 digest is generated by the national cryptographic SM3 digest algorithm and is also the result produced after the TF completes the digest algorithm. The SM3 digest algorithm has formed a national standard, and it can be implemented according to the standard algorithm process.

[0070] APK signing is achieved by performing a signing algorithm on the APK application installation package and is used to verify whether the APK is on the system whitelist. SM3 digest is a digest of simplified application information, which is then used to obtain the final signature base value.

[0071] In a specific example, within the Android Studio development environment, the adb tool can be used to connect to the experimental device. Then, mimicking the operation on a Linux system, the `top` command can be used to view system resource usage, specifically the processes currently running in the system. The main purpose of this command is to dynamically monitor system resource allocation, and its key feature is the ability to sort and display each process based on a single system resource attribute, such as CPU, memory, and disk I / O. In practice, using the `top` command to view resource usage reveals that the process in this invention consumes a very low percentage of system resources, without affecting the operation of other processes.

[0072] As shown in Table 1, in the development environment, the time taken for signature verification is calculated using functions such as the system's application startup time, and the results are statistically analyzed multiple times.

[0073] Table 1 shows the startup time (ms) for applications with and without verification.

[0074]

[0075] Example 2

[0076] Based on the same inventive concept, this embodiment provides an embedded device terminal security protection device for smart grids, including:

[0077] The Trusted Software Base Construction Module is used to build a Trusted Software Base based on a TF card. The TF card serves as security hardware and contains an encryption / decryption algorithm engine for encrypting and decrypting data. The Trusted Software Base is a security module that sets up a trusted benchmark library.

[0078] The data interaction module is used to read and write data to various secure applications in the embedded device terminal based on a trusted benchmark library and encryption / decryption algorithm engine.

[0079] In one implementation, an integrity verification module is further included, for:

[0080] Sign each APK file in the embedded device terminal and generate signature information;

[0081] The generated signature information is compared with a trusted benchmark library to measure the legitimacy of the secure application or APK and the integrity of the files.

[0082] In one implementation, a signature verification module is also included, which is used to verify the signature of the embedded device terminal by setting a trusted whitelist.

[0083] Since the device described in Embodiment 2 of this invention is the same device used in implementing the embedded device terminal security protection method for smart grids in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this device based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All devices used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.

[0084] Example 3

[0085] Based on the same inventive concept, the present invention also provides an embedded device terminal security protection system for smart grids, including: the embedded device terminal security protection device for smart grids described in Embodiment 2 and the embedded device terminal.

[0086] Since the system described in Embodiment 3 of this invention is the system used to implement the embedded device terminal security protection method for smart grids in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this system based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All systems used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.

[0087] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0088] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0089] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the invention.

[0090] Obviously, those skilled in the art can make various modifications and variations to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, if these modifications and variations to the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention also intends to include these modifications and variations.

Claims

1. A method for protecting the security of embedded device terminals in smart grids, characterized in that, include: Construct a trusted software base based on TF cards, where the TF card serves as security hardware and contains an encryption / decryption algorithm engine for encrypting and decrypting data, and the trusted software base serves as a security module, setting up a trusted benchmark library; Based on a trusted benchmark library and encryption / decryption algorithm engine, data reading and writing are implemented for various secure applications in embedded device terminals; This includes reading data from various secure applications in the embedded device terminal based on a trusted benchmark library and encryption / decryption algorithm engine, including: When a security application reads data, it calls the middleware driver to send a data read request to the security module. The data read request carries the identity identifier of the security application. The security module verifies the legitimacy of data read requests sent by the security application and compares the identity information stored in the trusted benchmark library with the identity identifier of the security application to verify its identity. If both the legitimacy and authentication are successful, the system checks if a data record corresponding to the data read request exists. If it does, the corresponding data record is retrieved from the target location of the security hardware. This data record is encrypted. Simultaneously, the application's identity and the encrypted data are sent to the security hardware. The security hardware retrieves the key used to decrypt the encrypted data from the storage device. The key is stored in an encrypted manner. Then, the encryption / decryption algorithm engine decrypts the encrypted key to obtain the original key. The original key is used to decrypt the encrypted data, and the decrypted data is returned to the security application.

2. The embedded device terminal security protection method for smart grids as described in claim 1, characterized in that, Based on a trusted benchmark library and encryption / decryption algorithm engine, data writing is implemented for various secure applications in embedded device terminals, including: When a security application requests to write data, the middleware driver is invoked to send a data write request to it. The data write request carries the security application's identity and the data to be written. The middle layer driver authenticates the security application based on the identity identifier. After successful authentication, the encryption and decryption algorithm engine is called. The data to be written is encrypted inside the security hardware of the encryption and decryption algorithm engine and then returned to the middle layer driver. The middleware layer drives the encrypted data to be written to the storage device.

3. The embedded device terminal security protection method for smart grids as described in claim 1, characterized in that, The method also includes integrity verification of the embedded device terminal based on the TF card, including: Sign each APK file in the embedded device terminal and generate signature information; The generated signature information is compared with a trusted benchmark library to measure the legitimacy of the secure application or APK and the integrity of the files.

4. The embedded device terminal security protection method for smart grids as described in claim 1, characterized in that, The method also includes verifying the signature of the embedded device terminal by setting a trusted whitelist.

5. An embedded device terminal security protection device for smart grids, characterized in that, include: The Trusted Software Base Construction Module is used to build a Trusted Software Base based on a TF card. The TF card serves as security hardware and contains an encryption / decryption algorithm engine for encrypting and decrypting data. The Trusted Software Base is a security module that sets up a trusted benchmark library. The data interaction module is used to read and write data to various secure applications in the embedded device terminal based on a trusted benchmark library and encryption / decryption algorithm engine. Specifically, the data interaction module is used for: When a security application reads data, it calls the middleware driver to send a data read request to the security module. The data read request carries the identity identifier of the security application. The security module verifies the legitimacy of data read requests sent by the security application and compares the identity information stored in the trusted benchmark library with the identity identifier of the security application to verify its identity. If both the legitimacy and authentication are successful, the system checks if a data record corresponding to the data read request exists. If it does, the corresponding data record is retrieved from the target location of the security hardware. This data record is encrypted. Simultaneously, the application's identity and the encrypted data are sent to the security hardware. The security hardware retrieves the key used to decrypt the encrypted data from the storage device. The key is stored in an encrypted manner. Then, the encryption / decryption algorithm engine decrypts the encrypted key to obtain the original key. The original key is used to decrypt the encrypted data, and the decrypted data is returned to the security application.

6. The embedded device terminal security protection device for smart grids as described in claim 5, characterized in that, It also includes an integrity verification module, used for: Sign each APK file in the embedded device terminal and generate signature information; The generated signature information is compared with a trusted benchmark library to measure the legitimacy of the secure application or APK and the integrity of the files.

7. The embedded device terminal security protection device for smart grids as described in claim 5, characterized in that, It also includes a signature verification module, which is used to verify the signature of the embedded device terminal by setting a trusted whitelist.

8. An embedded device terminal security protection system for smart grids, characterized in that, include: The embedded device terminal security protection device for smart grids and the embedded device terminal as described in any one of claims 5 to 7.