Program verification method and device, electronic equipment and storage medium

By verifying the signature information of user-defined programs through a certificate chain and utilizing a multi-layered verification mechanism based on the hardware root of trust, the problem of user-defined programs being unable to be included in the secure boot process is solved, thus achieving the legality and security protection of the communication module.

CN122174224APending Publication Date: 2026-06-09ANYSMART TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-09
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In the communication module, user-defined Python scripts cannot be included in the default secure startup process, making it difficult to guarantee legitimacy and security.

Method used

The signature information of the target program is verified by a certificate chain, including the root certificate and user certificate. This multi-layered verification mechanism using the hardware root of trust ensures that only legally authorized programs can be loaded and run.

Benefits of technology

It protects the legitimacy and security of user-defined programs, prevents unauthorized replacement, and ensures the secure startup and operation of the virtual machine environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122174224A_ABST
    Figure CN122174224A_ABST
Patent Text Reader

Abstract

This application discloses a program verification method, apparatus, electronic device, and storage medium, belonging to the field of communication technology. The program verification method includes: in response to the startup of a target communication module, verifying the signature information of a target program through a certificate chain to obtain a first verification result; wherein the certificate chain includes a root certificate and a user certificate, and the target program includes a user-defined program; and determining whether to load the target program through the target communication module based on the first verification result. The technical solution of this application can prevent the user-defined program from being illegally replaced, ensuring that only legally authorized programs can be loaded and run, and protecting the legality and security of the virtual machine environment and the operation of user-defined programs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, specifically to a program verification method, apparatus, electronic device, and storage medium. Background Technology

[0002] During use, the communication module can use a secure boot function to verify the signature of the firmware to be loaded and run, ensuring the legitimacy of the currently downloaded firmware. Related technologies can integrate a MicroPython virtual machine onto the communication module, enabling it to load and run user-developed Python scripts. However, user-developed Python scripts are imported separately into the file system for loading and execution, separate from the firmware, and can be dynamically imported and loaded. Therefore, they cannot be incorporated into the default secure boot process, making it difficult to guarantee their legitimacy and security. Summary of the Invention

[0003] This application provides a program verification method, apparatus, electronic device, and storage medium that can protect the legality and security of virtual machine environments and the execution of custom programs.

[0004] Firstly, a program verification method is provided, including the following steps:

[0005] In response to the startup of the target communication module, the signature information of the target program is verified through the certificate chain to obtain a first verification result; wherein, the certificate chain includes a root certificate and a user certificate, and the target program includes a user-defined program; Based on the first verification result, determine whether to load the target program through the target communication module.

[0006] Optionally, before verifying the signature information of the target program via the certificate chain, the following steps are also included: Burn the hash value of the root certificate public key into the immutable area.

[0007] Optionally, before verifying the signature information of the target program through the certificate chain, the method further includes: The signature information of the firmware image in the target communication module is verified by the certificate chain, and the target communication module is enabled if the verification is successful.

[0008] Optionally, the step of verifying the signature information of the firmware image in the target communication module through the certificate chain includes: The root certificate is verified based on the hash value of the root certificate public key; If the verification passes, the user certificate is then verified using the public key of the root certificate. If the verification passes, the signature information of the firmware image is verified based on the public key in the user certificate.

[0009] Optionally, before verifying the signature information of the target program through the certificate chain, the method further includes: The target program is signed using the user's private key.

[0010] Optionally, the verification of the target program's signature information via the certificate chain includes: The root certificate is verified based on the hash value of the root certificate public key; If the verification passes, the user certificate is then verified based on the hash value in the root certificate. If the verification passes, the signature information of the target program is verified based on the public key in the user certificate.

[0011] Optionally, the method further includes: If the target communication module loads an external application during operation, the external application is signed and verified. If the verification passes, the external application will be loaded into the target communication module.

[0012] On the other hand, embodiments of this application also provide a program verification device, the device comprising: The verification module is used to: in response to the startup of the target communication module, verify the signature information of the target program through the certificate chain to obtain a first verification result; wherein, the certificate chain includes a root certificate and a user certificate, and the target program includes a user-defined program; The determining module is used to: determine whether to load the target program through the target communication module based on the first verification result.

[0013] On the other hand, embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program or instructions, and when the computer program or instructions are executed by the processor, the processor performs the following steps: In response to the startup of the target communication module, the signature information of the target program is verified through the certificate chain to obtain a first verification result; wherein, the certificate chain includes a root certificate and a user certificate, and the target program includes a user-defined program; Based on the first verification result, determine whether to load the target program through the target communication module.

[0014] On the other hand, embodiments of this application also provide a computer-readable storage medium having a computer program or instructions stored thereon, wherein the computer program or instructions, when executed by a processor, implement the steps in the program verification method described above.

[0015] In summary, the technical solution provided in this application, in response to the startup of the target communication module, verifies the signature information of the target program through a certificate chain to obtain a first verification result. This certificate chain includes a root certificate and a user certificate, and the target program includes a user-defined program. Based on the first verification result, it is determined whether to load the target program through the target communication module. This application embodiment verifies the signature information of the target program using a certificate chain each time the target communication module starts. Only after successful verification will the target program be loaded and run. This prevents the user-defined program from being illegally replaced, ensuring that only legally authorized programs can be loaded and run, thereby protecting the virtual machine environment and the legality and security of the user-defined program's operation. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 A flowchart of a program verification method provided in an embodiment of this application; Figure 2 A flowchart of a secure boot process provided in an embodiment of this application; Figure 3 A flowchart of another secure boot process provided in this application embodiment; Figure 4 A flowchart illustrating a signature verification process via a certificate chain is provided for an embodiment of this application. Figure 5 A flowchart of script processing and signing is provided for an embodiment of this application; Figure 6 A secure startup process for a communication module is provided in the embodiments of this application; Figure 7 A flowchart illustrating the secure startup process of another communication module provided in this application embodiment; Figure 8 An example diagram of a program verification method provided in an embodiment of this application; Figure 9 A schematic diagram of a program verification device provided in an embodiment of this application; Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] In the following description, specific embodiments of this application will be illustrated with reference to steps and symbols performed by one or more computers, unless otherwise stated. Therefore, these steps and operations will be referred to several times as being performed by a computer. Computer performance as referred to in this application includes operations performed by a computer processing unit on electronic signals represented by data in a structured format. This operation transforms the data or maintains it at a location in the computer's memory system, which can be reconfigured or otherwise alter the operation of the computer in a manner well known to those skilled in the art. The data structure maintained by the data is the physical location of the memory, which has specific characteristics defined by the data format. However, the principles of this application are illustrated with specific embodiments and are not intended to be limiting. Those skilled in the art will understand that many of the steps and operations described below can also be implemented in hardware.

[0020] The terms "module" or "unit" as used in this application can be considered as software objects executing on the computing system. The different components, modules, engines, and services described in this application can be considered as implementation objects on the computing system. While the apparatus and methods described in this application are preferably implemented in software, they can also be implemented in hardware, both of which are within the scope of protection of this invention.

[0021] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used in the embodiments of this application may also include the plural forms. It should be further understood that the term “comprising” as used in the specification of this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or combinations thereof. It should be understood that when an element is “connected” or “coupled” to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein may include wireless connection or wireless coupling. The term “and / or” as used herein includes all or any unit and all combinations of one or more associated listed items.

[0022] Please see Figure 1 , Figure 1 This is a flowchart illustrating a program verification method provided in an embodiment of this application. Figure 1As shown, the verification method of this program includes the following steps: S110: In response to the startup of the target communication module, the signature information of the target program is verified through the certificate chain to obtain the first verification result; wherein, the certificate chain includes the root certificate and the user certificate, and the target program includes the user-defined program.

[0023] S120: Determine whether to load the target program through the target communication module based on the first verification result.

[0024] In this embodiment, the target communication module integrates a MicroPython virtual machine. MicroPython is an open-source Python virtual machine used in the embedded systems field, capable of parsing and running Python scripts. Through specific techniques, the communication module integrating the MicroPython virtual machine can run Python scripts.

[0025] In this embodiment of the application, the target program includes a user-defined program, which can be a user-defined Python script program, and the user-defined program can also contain a firmware image of the user-defined Python script program.

[0026] Regarding the target communication module in this application embodiment, after purchasing a target communication module with pre-programmed firmware, the user can directly develop a Python script application and import the developed Python script into the target communication module's file system to load and run the Python script. However, since the user-developed Python script is imported into the file system separately for loading and running, and is separate from the firmware, and can be dynamically imported and loaded, it cannot be included in the default secure boot process, and its legitimacy cannot be guaranteed. Therefore, this application embodiment designs a security protection method for the Python virtual machine and Python script program by utilizing the secure boot process of the target communication module's own firmware and using the public key hash stored in the module's efuse as a root of trust.

[0027] In the embodiments of this application, before verifying the signature information of the target program through the certificate chain, the secure boot process of the target communication module is first enabled to ensure the security of firmware operation. The secure boot process of the target communication module may include the following steps: Burn the hash value of the root certificate public key into the immutable area; The signature information of the firmware image in the target communication module is verified by the certificate chain, and the target communication module is enabled if the verification is successful.

[0028] The aforementioned immutable region is the eFuse region of the communication module. eFuse is a one-time programmable memory that stores data by melting a metal fuse. Once the data is written, it cannot be modified or erased.

[0029] Before use, the target communication module in this embodiment first enables a secure boot process to automatically generate an eFuse configuration image, which contains the hash value of the root certificate public key. Then, the firmware image is signed using the user's private key to obtain a firmware image with signature information. Finally, the eFuse configuration image and the firmware image with signature information are burned into the communication module. When the communication module restarts, the signature information of the firmware image is verified according to the hash value of the root certificate public key stored in eFuse. If the verification passes, the target communication module is started to ensure the legitimacy of the firmware.

[0030] See further Figure 2 and Figure 3 The secure boot process in this application embodiment specifically includes the following steps: S210: Import the unsigned firmware image, user private key, and user certificate into the secure boot signing process.

[0031] The user's private key and the public key stored in the user certificate are user-defined and generated.

[0032] S220 outputs a firmware image and an eFuse configuration image with signature information.

[0033] The secure boot tool uses a private key to sign the firmware image, resulting in a firmware image with signature information. The private key and the public key from the user certificate are paired.

[0034] Users generate an eFuse configuration image using a secure boot tool. This configuration sets the eFuse to be burned to enable secure boot functionality. Furthermore, the eFuse configuration image also contains the hash value of the root certificate public key. For example, in this embodiment, the hash value is calculated using the SHA-384 algorithm.

[0035] S230. Burn the firmware image with signature information and the eFuse configuration image into the target communication module.

[0036] First, the signed firmware image and eFuse configuration image are burned to the Flash partition of the module. When the target communication module restarts, eFuse is burned, and the hash value of the root certificate public key is automatically configured by TrustZone to the one-time programmable (OTP) memory area of ​​the target communication module.

[0037] Once the firmware image is signed and the hash value of the root certificate public key is stored in eFuse, the public key hash value stored in eFuse is used as the root of trust. Each time the target communication module starts up, the certificate chain is used to encrypt and verify each stage of the startup process to ensure the authenticity of all firmware images.

[0038] The certificate chain includes the root certificate and user certificates.

[0039] The signature information of the firmware image in the target communication module is verified through the certificate chain, including: The root certificate is verified based on the hash value of the root certificate's public key; If the verification passes, the user certificate is then verified using the public key of the root certificate. If the verification passes, the signature information of the firmware image is verified based on the public key in the user certificate.

[0040] In this embodiment of the application, the verification method of the above certificate chain is described using the verification of a modem software image as an example.

[0041] Please see Figure 4 First, the hash value of the root certificate public key to be verified is compared with the hash value of the root certificate public key stored in the eFuse area. If they are the same, the root certificate verification passes. Then, the user certificate is decrypted using the root certificate public key, and the resulting hash value is compared with the hash value calculated on the user certificate. If they are the same, the user certificate verification passes.

[0042] The signature information of the modem software image is decrypted using the public key in the user certificate to obtain the decrypted hash value. The hash value obtained from the decryption is compared with the hash value obtained from calculating the modem software image. If the two are the same, the modem software image verification is successful, and the target communication module can start normally. Otherwise, the target communication module is prohibited from starting.

[0043] The technical solution of this embodiment enables a secure boot process each time the target communication module is enabled, and verifies the signature information of the firmware image through a certificate chain. This multi-layer verification mechanism based on the hardware root of trust can immediately prevent the target communication module from starting when any tampering or unauthorized firmware update occurs, so as to ensure the authenticity of all security software images.

[0044] The program verification method in this application embodiment is based on the above-mentioned secure boot process. When the target communication module stores the target program, the secure boot process will be activated to verify the target program every time the target module is started.

[0045] The target program includes user-defined programs, which can be a combination of firmware images and script programs, or a standalone script program.

[0046] Before verifying the signature information of the target program through the certificate chain, the process also includes signing the target program based on the user's private key.

[0047] When the target program is a combination of a firmware image and a script, the firmware image and the script can be compiled into a unified binary firmware, which can then be signed using the user's private key. When the target program is a standalone script, each script can be signed separately using the user's private key.

[0048] For example, please refer to Figure 5 When the target program is a single script program, multiple scripts, user private keys, and user certificates are imported into the Secure Boot Signing Tool. The Secure Boot Signing Tool signs each script separately according to the user private key and stores the script with the signature information in the target communication module's file system.

[0049] After script signing is completed, the signature information of the target program is verified using a certificate chain. Specifically, the verification of the target program's signature information using a certificate chain includes: The root certificate is verified based on the hash value of the root certificate's public key; If the verification passes, the user certificate is then verified based on the hash value in the root certificate. If the verification passes, the signature information of the target program is verified based on the public key in the user certificate.

[0050] In this embodiment of the application, the process of verifying the signature information of the target program using a certificate chain is the same as the process of verifying the signature information of the firmware image using a certificate chain, and will not be described again.

[0051] The technical solution provided in this application, in response to the startup of the target communication module, verifies the signature information of the target program through a certificate chain to obtain a first verification result; the certificate chain includes a root certificate and a user certificate, and the target program includes a user-defined program; based on the first verification result, it is determined whether to load the target program through the target communication module. This application embodiment verifies the signature information of the target program using a certificate chain each time the target communication module starts. Only when the verification is successful will the target program be loaded and run. This prevents the user-defined program from being illegally replaced, ensuring that only legally authorized programs can be loaded and run, thereby protecting the virtual machine environment and the legality and security of the user-defined program's operation.

[0052] Please see Figure 6 and Figure 7 , Figure 6 This application provides a flowchart of a secure boot process for a communication module, the target program of which is a combination of firmware image and script program. Figure 7 This is a flowchart of a secure startup process for another communication module provided in an embodiment of this application. The target program for this process is a separate script program.

[0053] When the target communication module starts up, the main bootloader loads and verifies the secondary bootloader. After the secondary bootloader passes the verification, it runs and loads and verifies the main program. After the main program runs successfully, the target program is loaded and verified. After the target program passes the verification, it is loaded and run on the target communication module.

[0054] In this embodiment, the loading and verification of the main boot program, secondary boot program, and main program are all standard schemes for target communication module signature verification. During each startup process, the target communication module will perform signature verification according to the above path. By adopting a multi-signature and verification strategy, this embodiment ensures that only the target program that has passed verification is allowed to be loaded and executed, thus guaranteeing the security and integrity of script execution.

[0055] Based on the above embodiments, the above program verification method further includes: If the target communication module loads an external application during operation, the external application is signed and verified. If the verification passes, the external application will be loaded into the target communication module.

[0056] The external application refers to a script program imported from an external source in real time during the operation of the target communication module, or an external script program run through the interactive port. To ensure the security of the external application, when an external application is detected, the target communication module will dynamically verify the external application using the aforementioned certificate chain method to prevent unsigned or tampered code from being inserted into the virtual machine environment.

[0057] Please see Figure 8 , Figure 8 An example diagram of a program verification method provided in an embodiment of this application.

[0058] The target program in this application embodiment includes a script program loaded from an external source in real time and a script program that has been signed and stored in the target communication module.

[0059] During operation, the target communication module verifies the signed script based on the hash value of the root certificate public key, the signature information of the script, and the script itself. Only after the verification is passed will the corresponding script be loaded and executed. This part of the script is the main script in the target communication module.

[0060] Furthermore, during operation, the target communication module can import external functional modules using the Import command or run scripts via the REPL interactive port. These scripts are loaded from external sources in real time without signature verification and serve as dynamic modules within the target communication module. The target communication module dynamically verifies these loaded external modules and scripts; only those that pass verification are loaded and executed, thus preventing unsigned or tampered code from being inserted into the virtual machine environment.

[0061] The technical solution of this application focuses on enhancing the security of the virtual machine runtime environment. It provides a layered security verification architecture, which verifies the main script and dynamic modules through strict execution paths. This ensures that the calls to the main script and dynamic modules in the virtual machine are trustworthy. It can provide users with configurable, strongly encrypted, and scalable script protection functions, thereby fully meeting the security needs of modern Internet of Things applications.

[0062] Please see Figure 9 , Figure 9 This is a schematic diagram of a program verification device provided in an embodiment of this application. Figure 9 As shown, the program verification device 900 may include a verification module 910 and a determination module 920.

[0063] The verification module is used to: in response to the startup of the target communication module, verify the signature information of the target program through the certificate chain to obtain the first verification result; wherein, the certificate chain includes the root certificate and the user certificate, and the target program includes the user-defined program; The determination module is used to: determine whether to load the target program through the target communication module based on the first verification result.

[0064] In some embodiments, the program verification apparatus further includes a burning module for burning the hash value of the root certificate public key into an immutable area.

[0065] In some embodiments, the verification module is further configured to: verify the signature information of the firmware image in the target communication module through the certificate chain, and enable the target communication module if the verification passes.

[0066] In some embodiments, the verification module is specifically used to: verify the root certificate based on the hash value of the root certificate public key; if the verification passes, verify the user certificate based on the public key of the root certificate; if the verification passes, verify the signature information of the firmware image based on the public key in the user certificate.

[0067] In some embodiments, the program verification device further includes a signature module for signing the target program based on the user's private key.

[0068] In some embodiments, the verification module is further configured to: verify the root certificate based on the hash value of the root certificate public key; if the verification passes, verify the user certificate based on the hash value in the root certificate; if the verification passes, verify the signature information of the target program based on the public key in the user certificate.

[0069] In some embodiments, the verification module is further configured to: if the target communication module loads an external application during operation, sign and verify the external application; If the verification passes, the external application will be loaded into the target communication module.

[0070] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 10 The electronic device 1000 can be used to implement the methods described in the above method embodiments. The electronic device 1000 may be a chip, terminal device, server, or computer device, etc.

[0071] Electronic device 1000 may include one or more processors 1010. The processor 1010 can support the electronic device 1000 in implementing the methods described in the preceding method embodiments. The processor 1010 may be a general-purpose processor or a special-purpose processor. For example, the processor may be implemented as a Central Processing Unit (CPU). Alternatively, the processor may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0072] The electronic device 1000 may also include one or more memories 1020. The memories 1020 store computer programs or instructions. The memories 1020 may be independent of the processor 1010 or integrated into the processor 1010.

[0073] The electronic device 1000 may also include a transceiver 1030. The processor 1010 can communicate with other devices or chips through the transceiver 1030. For example, the processor 1010 can send and receive data with other devices or chips through the transceiver 1030.

[0074] The computer program or instructions in memory 1020 can be executed by processor 1010, causing processor 1010 to perform the following steps: In response to the startup of the target communication module, the signature information of the target program is verified through the certificate chain to obtain a first verification result; wherein, the certificate chain includes a root certificate and a user certificate, and the target program includes a user-defined program; Based on the first verification result, determine whether to load the target program through the target communication module.

[0075] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0076] Therefore, embodiments of this application also provide a computer-readable storage medium storing a computer program or instructions thereon, which is loaded by a processor to perform the steps described in the above-described method embodiments of this application. For example, the computer program or instructions loaded by the processor can perform the following steps: In response to the startup of the target communication module, the signature information of the target program is verified through the certificate chain to obtain a first verification result; wherein, the certificate chain includes a root certificate and a user certificate, and the target program includes a user-defined program; Based on the first verification result, determine whether to load the target program through the target communication module.

[0077] For details on the implementation of each of the above operations / steps, please refer to the previous examples, which will not be repeated here.

[0078] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0079] Since the computer program stored in the computer-readable storage medium can execute the steps in any of the above method embodiments provided in the embodiments of this application, the beneficial effects that the methods described in any of the above method embodiments can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0080] This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various optional implementations of the above embodiments.

[0081] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0082] The above provides a detailed description of a program verification method, apparatus, electronic device, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A program verification method, characterized in that, The method includes: In response to the startup of the target communication module, the signature information of the target program is verified through the certificate chain to obtain a first verification result; wherein, the certificate chain includes a root certificate and a user certificate, and the target program includes a user-defined program; Based on the first verification result, determine whether to load the target program through the target communication module.

2. The method according to claim 1, characterized in that, Before verifying the signature information of the target program through the certificate chain, the following steps are also included: Burn the hash value of the root certificate public key into the immutable area.

3. The method according to claim 2, characterized in that, Before verifying the signature information of the target program through the certificate chain, the process also includes: The signature information of the firmware image in the target communication module is verified by the certificate chain, and the target communication module is enabled if the verification is successful.

4. The method according to claim 3, characterized in that, The verification of the signature information of the firmware image in the target communication module through the certificate chain includes: The root certificate is verified based on the hash value of the root certificate public key; If the verification passes, the user certificate is then verified using the public key of the root certificate. If the verification passes, the signature information of the firmware image is verified based on the public key in the user certificate.

5. The method according to claim 2, characterized in that, Before verifying the signature information of the target program through the certificate chain, the process also includes: The target program is signed using the user's private key.

6. The method according to claim 2, characterized in that, The verification of the target program's signature information via the certificate chain includes: The root certificate is verified based on the hash value of the root certificate public key; If the verification passes, the user certificate is then verified based on the hash value in the root certificate. If the verification passes, the signature information of the target program is verified based on the public key in the user certificate.

7. The method according to claim 1, characterized in that, The method further includes: If the target communication module loads an external application during operation, the external application is signed and verified. If the verification passes, the external application will be loaded into the target communication module.

8. A program verification device, characterized in that, The device includes: The verification module is used to: in response to the startup of the target communication module, verify the signature information of the target program through the certificate chain to obtain a first verification result; wherein, the certificate chain includes a root certificate and a user certificate, and the target program includes a user-defined program; The determining module is used to: determine whether to load the target program through the target communication module based on the first verification result.

9. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores computer programs or instructions, and when the computer programs or instructions are executed by the processor, the processor causes the processor to perform the following steps: In response to the startup of the target communication module, the signature information of the target program is verified through the certificate chain to obtain a first verification result; wherein, the certificate chain includes a root certificate and a user certificate, and the target program includes a user-defined program; Based on the first verification result, determine whether to load the target program through the target communication module.

10. A computer-readable storage medium, characterized in that, It stores a computer program or instructions, which, when executed by a processor, implement the steps in the program verification method as described in any one of claims 1 to 7.