Method, device and equipment for verifying bootstrap program of embedded system and medium
By verifying multiple target subroutines in the embedded system boot program, the problem of difficulty in achieving comprehensive verification in the prior art is solved, and the security and reliability of the operating system are improved.
Patent Information
- Application Number
- CN202411878740.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-22
AI Technical Summary
The prior art is difficult to achieve comprehensive verification of embedded system boot programs, which makes it difficult to ensure the security and reliability of the operating system after startup.
By loading the boot program of the embedded system, multiple target subroutines are determined, including subroutines related to firmware, key management, device identity authentication and tamper-proof mechanisms, verify each target subroutine, obtain subverification results, and determine the target verification results of the boot program based on the subverification results.
Improves comprehensive verification of embedded system boot programs to ensure the security and reliability of the operating system after startup.
Smart Images

Figure CN119862578A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer application technology, and in particular to a boot program verification method, device, equipment and medium for an embedded system. Background Art
[0002] The boot program is the program that boots the operating system. Verification of the boot program can ensure the security and reliability of the operating system after startup.
[0003] The boot program includes many types of subprograms. Currently, before loading the boot program, relevant technicians usually conduct targeted verification of familiar subprograms to ensure the accuracy of the verification. However, with the continuous upgrade of operating systems, boot programs are becoming more and more complex. Due to the limitations of relevant technicians in the same company, this method is difficult to achieve comprehensive verification of the boot program. Summary of the invention
[0004] The present invention provides a boot program verification method, device, equipment and medium for an embedded system, so as to solve the technical problem that it is currently difficult to fully verify the boot program of the embedded system.
[0005] According to one aspect of the present invention, a boot program verification method for an embedded system is provided, the method comprising:
[0006] Loading the boot program of the embedded system, determining a plurality of target subprograms in the boot program, wherein the target subprograms include a subprogram related to firmware, a subprogram related to key management, a subprogram related to device identity authentication, or a subprogram related to an anti-tampering mechanism;
[0007] For each of the target subprograms, verify the target subprogram to obtain a sub-verification result corresponding to the target subprogram;
[0008] A target verification result corresponding to the boot program is determined according to the sub-verification result, wherein the target verification result includes a target verification pass or a target verification fail.
[0009] According to another aspect of the present invention, a boot program verification device for an embedded system is provided, the device comprising:
[0010] A program loading module, used to load the boot program of the embedded system, and determine multiple target subprograms in the boot program, wherein the target subprograms include subprograms related to firmware, subprograms related to key management, subprograms related to device identity authentication, or subprograms related to an anti-tampering mechanism;
[0011] A program verification module, used for verifying each target subprogram and obtaining a sub-verification result corresponding to the target subprogram;
[0012] The result determination module is used to determine the target verification result corresponding to the boot program according to the sub-verification result, wherein the target verification result includes target verification pass or target verification fail.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the boot program verification method for an embedded system described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the boot program verification method of an embedded system described in any embodiment of the present invention when executed.
[0018] The technical solution of the embodiment of the present invention is to load the boot program of the embedded system, determine multiple target subprograms in the boot program, wherein the target subprograms include subprograms related to firmware, subprograms related to key management, subprograms related to device identity authentication, or subprograms related to anti-tampering mechanisms; for each of the target subprograms, verify the target subprogram to obtain a sub-verification result corresponding to the target subprogram; determine the target verification result corresponding to the boot program according to the sub-verification result, wherein the target verification result includes target verification passed or target verification failed. Based on the technical solution of the present invention, the comprehensiveness of the boot program verification of the embedded system is improved.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 is a flowchart of a boot program verification method for an embedded system provided according to Embodiment 1 of the present invention;
[0022] Figure 2 is a flowchart of a boot program verification method for an embedded system provided according to Embodiment 2 of the present invention;
[0023] Figure 3 is an overall flow chart of a boot program verification method for an embedded system provided according to an embodiment of the present invention;
[0024] Figure 4 2 is a schematic diagram of the structure of a boot program verification device for an embedded system provided according to Embodiment 3 of the present invention;
[0025] Figure 5 The present invention is a schematic diagram of the structure of an electronic device for implementing the boot program verification method of an embedded system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Embodiment 1
[0029] Figure 1 A flowchart of a boot program verification method for an embedded system is provided for the first embodiment of the present invention. This embodiment is applicable to the case where a boot program is verified during the process of loading the boot program of the embedded system. The method can be executed by a boot program verification device for the embedded system. The boot program verification device for the embedded system can be implemented in the form of hardware and / or software. The boot program verification device for the embedded system can be configured in a computer. Figure 1 As shown, the method includes:
[0030] S110, loading the boot program of the embedded system, and determining a plurality of target subprograms in the boot program.
[0031] The target subprogram includes a subprogram related to firmware, a subprogram related to key management, a subprogram related to device identity authentication, or a subprogram related to an anti-tampering mechanism.
[0032] The boot program may be understood as a program for booting the operating system.
[0033] It is important to understand that comprehensive verification of the bootloader ensures the security and reliability of the operating system after startup.
[0034] S120: For each of the target subprograms, verify the target subprogram to obtain a sub-verification result corresponding to the target subprogram.
[0035] The sub-verification result can be understood as the verification result corresponding to the target subprogram. Optionally, the sub-verification result can include a first verification result corresponding to the subprogram related to firmware, a second verification result corresponding to the subprogram related to key management, a third verification result corresponding to the subprogram related to device identity authentication, or a fourth verification result corresponding to the subprogram related to the anti-tampering mechanism.
[0036] The first verification result may include firmware verification passed or firmware verification failed. The second verification result may include key verification passed or key verification failed. The third verification result may include device verification passed or device verification failed. The fourth verification result may include anti-tampering verification passed or anti-tampering verification failed.
[0037] S130. Determine a target verification result corresponding to the bootstrap program according to the sub-verification result.
[0038] The target verification result includes target verification passed or target verification failed.
[0039] Optionally, when the first verification result, the second verification result, the third verification result and the fourth verification result are all verified to be passed, the target verification result is determined as the target verification passed; otherwise, it is determined as the target verification failed.
[0040] Optionally, the sub-verification result includes a second verification result corresponding to the subprogram related to key management; and the verifying the target subprogram to obtain the sub-verification result corresponding to the target subprogram includes:
[0041] The subroutine related to key management is verified through a key agreement algorithm to obtain the second verification result.
[0042] The principle of the key negotiation algorithm is that two or more entities negotiate and jointly establish a session key. Any participant can affect the result, and no trusted third party is required.
[0043] Specifically, the integrity of the subprogram related to key management can be verified through the key negotiation algorithm. In the event that the subprogram related to key management is missing, a session abnormality occurs.
[0044] Based on the above embodiment, the key management-related subprogram is verified by using a key agreement algorithm, thereby improving the accuracy of the obtained related second verification result.
[0045] Optionally, after determining the target verification result corresponding to the bootstrap program according to the sub-verification result, the method further includes:
[0046] When the target verification result is that the target verification fails, a loading exception prompt of the boot program is performed.
[0047] In the embodiment of the present invention, the specific manner of prompting the loading exception of the boot program can be preset according to the scene requirements and is not specifically limited here.
[0048] Based on the above embodiment scheme, a prompt of abnormal loading of the boot program is implemented, so that the user can take corresponding measures in time.
[0049] The technical solution of the embodiment of the present invention is to load the boot program of the embedded system, determine multiple target subprograms in the boot program, wherein the target subprograms include subprograms related to firmware, subprograms related to key management, subprograms related to device identity authentication, or subprograms related to anti-tampering mechanisms; for each of the target subprograms, verify the target subprogram to obtain a sub-verification result corresponding to the target subprogram; determine the target verification result corresponding to the boot program according to the sub-verification result, wherein the target verification result includes target verification passed or target verification failed. Based on the technical solution of the present invention, the comprehensiveness of the boot program verification of the embedded system is improved.
[0050] Embodiment 2
[0051] Figure 2 This is a flowchart of a boot program verification method for an embedded system provided in the second embodiment of the present invention. This embodiment verifies the target subprogram described in the above embodiment and obtains a sub-verification result corresponding to the target subprogram. Figure 2 As shown, the method includes:
[0052] S210: Load the boot program of the embedded system and determine a plurality of target subprograms in the boot program.
[0053] S220: Verify the subroutine related to the firmware by using a hash algorithm to obtain the first verification result.
[0054] Optionally, the verifying the subroutine related to the firmware by using a hash algorithm to obtain a first verification result includes:
[0055] Determine the startup hash value corresponding to the subroutine related to the firmware by a hash algorithm;
[0056] A pre-stored target hash value is determined, and the first verification result is determined according to the startup hash value and the target hash value.
[0057] Specifically, any set of input information of arbitrary length is received, converted into a fixed-length data format through a hash algorithm, and outputted, and the output is a hash value.
[0058] The target hash value is a hash value generated when the started subroutine related to the firmware is complete. In the embodiment of the present invention, the target hash value is a hash value.
[0059] The startup hash value is a hash value generated by the started subroutine related to the firmware.
[0060] In the embodiment of the present invention, the startup hash value and the target hash value may be the same or different.
[0061] Optionally, the first verification result includes firmware verification passing or firmware verification failing; and determining the first verification result according to the startup hash value and the target hash value includes:
[0062] When the startup hash value and the target hash value are the same, the first verification result is determined as the firmware verification is passed.
[0063] Based on the above embodiment, the effect of verifying the integrity of the subroutine related to the firmware can be achieved.
[0064] S230, respectively verifying the subprogram related to key management, the subprogram related to device identity authentication, and the subprogram related to the anti-tampering mechanism, and obtaining a second verification result, a third verification result, and a fourth verification result in turn.
[0065] S240: Determine a target verification result corresponding to the bootstrap program according to the sub-verification result.
[0066] The technical solution of the embodiment of the present invention verifies the subprogram related to the firmware by using a hash algorithm to obtain the first verification result, thereby ensuring the accuracy of the verification result obtained by verifying the subprogram related to the firmware.
[0067] Figure 3 1 is an overall flow chart of a boot program verification method for an embedded system provided according to an embodiment of the present invention. Figure 3 Further elaboration of the bootloader verification method for embedded systems:
[0068] 1. Through the hash value verification method, a unique hash value of the firmware is generated using a hash function and stored in the system. When the firmware is loaded or running, the hash value is recalculated and compared with the stored hash value to verify the firmware integrity. Subsequently, key management and device identity authentication are performed through key negotiation and distribution technology. At the same time, through real-time blocking, illegal operations on protected web pages can be blocked, legal and illegal processes can be effectively identified, illegal processes can be blocked from tampering with web pages, and illegal processes can be directly blocked to achieve an anti-tampering mechanism.
[0069] 2. Build a comprehensive security upgrade framework through remote firmware upgrade (Over-The-Air Technology, OTA) security protocol design and upgrade package integrity and authenticity verification, rollback protection, differential upgrade, system recovery mechanism and other technologies.
[0070] 3. Strengthen the network infrastructure by using role-based access control (RBAC) technology for permission management and encrypted transmission, and then adopt control operations such as dynamic address resolution protocol (ARP) detection and dynamic host configuration protocol (DHCP) snooping. Prevent attackers from using and analyzing network traffic through secure socket layer (SSL) and transport layer security (TLS).
[0071] 4. Send a request from the client to the DispacherServlet distributor; the DispacherServlet controller queries HanderMapping to find the Controller that processes the request, and then uses the Controller to call the business logic and return to ModelAndView; query the view resolver through DispacherSerclet to find the view specified by ModelAndView, and then display the result to the client through the view, thereby integrating the hardware security module, trusted execution environment and multi-level boot program, and supporting firmware integrity verification, key management and device authentication.
[0072] 5. Use secure boot and cloud verification mechanisms to achieve all-round protection of devices (for example, Dianhong devices) and support multi-level security verification mechanisms.
[0073] 6. The traceability of firmware upgrades is enhanced by using blockchain technology. Combined with artificial intelligence (AI) technology, the accuracy of upgrade risk assessment is improved, and more intelligent upgrade decisions are achieved. Through hardware-supported secure boot chain and dynamic permission management, a comprehensive security protection system from the bottom layer to the application layer is built, which greatly improves the security and reliability of system upgrades.
[0074] In the embodiments of the present invention, unauthorized modification and malicious code implantation are effectively prevented. The secure boot technology also integrates advanced cryptographic algorithms, hardware binding technology and secure time sources to provide strong protection for the boot process. By implementing strict integrity measurement, anomaly detection and audit log recording, potential security threats can be discovered and responded to in a timely manner.
[0075] In the embodiment of the present invention, a multi-level verification algorithm is adopted and a multi-level verification algorithm based on hash chain and digital signature is designed to implement step-by-step integrity verification from the boot program to the operating system kernel to prevent illegal modification at any stage.
[0076] In an embodiment of the present invention, a secure boot log and remote attestation are used, and a distributed logging system based on blockchain technology is designed, which cooperates with a remote attestation protocol to achieve the auditability of the boot process and remote verification of device integrity.
[0077] In the embodiment of the present invention, by designing a multi-level security verification mechanism and a dynamic key management strategy, full-link protection from hardware to software is achieved, solving the security vulnerability problem in the traditional startup process.
[0078] In an embodiment of the present invention, a system vulnerability management objective (Service Level Object, SLO) can be determined, and a complete vulnerability management system can be built based on the SLO to achieve full life cycle management of system vulnerabilities (for example, the Dianhong system), including vulnerability perception, vulnerability verification, vulnerability repair, information release, and repair deployment.
[0079] In the embodiment of the present invention, a secure boot and firmware integrity verification mechanism is newly added, vulnerability mitigation and access control are implemented at the kernel level, and sandbox technology and permission management are adopted in the user space to implement integrity verification at each stage of the system and prevent the boot process from being tampered with.
[0080] In an embodiment of the present invention, through the deep integration of remote firmware upgrade technology and advanced security mechanisms, a unified standard security upgrade platform is constructed to achieve efficient and secure management of the system, support collaborative upgrades of multiple devices, and ensure the security and reliability of the upgrade process. Especially in the face of security challenges such as upgrade failures, middle attacks, and data leakage, the system can be driven to develop in a safer and smarter direction.
[0081] Based on the technical solution of the present invention, a multi-level security verification mechanism is implemented to ensure the integrity and credibility of the startup process, especially when facing security threats such as firmware tampering, key leakage, and device identity forgery. It can ensure the reliability and anti-attack capabilities of the system and promote the development of Dianhong equipment to a higher security level.
[0082] Based on the technical solution of the present invention, which integrates mature hardware security technology and cutting-edge cryptographic algorithms, and designs a multi-level security verification mechanism and a dynamic key management strategy, it realizes full-link protection from hardware to software, solves the security vulnerability problem in the traditional startup process, and utilizes a trusted execution environment and hardware isolation technology to enhance the protection capabilities of key operations and sensitive data, meeting the needs of high-security level devices. Combined with device identity binding and remote attestation technology, it improves the system's ability to resist advanced persistent threats and accelerates the standardization of Dianhong equipment security startup technology.
[0083] Embodiment 3
[0084] Figure 4 This is a schematic diagram of the structure of a boot program verification device for an embedded system provided by Embodiment 3 of the present invention. Figure 4 As shown, the device includes: a program loading module 310 , a program verification module 320 and a result determination module 330 .
[0085] Among them, the program loading module 310 is used to load the boot program of the embedded system and determine multiple target subprograms in the boot program, wherein the target subprograms include subprograms related to firmware, subprograms related to key management, subprograms related to device authentication, or subprograms related to anti-tampering mechanisms; the program verification module 320 is used to verify the target subprogram for each of the target subprograms and obtain a sub-verification result corresponding to the target subprogram; the result determination module 330 is used to determine the target verification result corresponding to the boot program according to the sub-verification result, wherein the target verification result includes a target verification pass or a target verification fail.
[0086] Optionally, the sub-verification result includes a first verification result corresponding to the sub-program related to the firmware; the program verification module 320 is specifically used to:
[0087] The firmware verification unit is used to verify the subroutine related to the firmware through a hash algorithm to obtain the first verification result.
[0088] Optionally, the program verification module 320 includes: a startup value determination unit and a hash value comparison unit;
[0089] Wherein, the startup value determination unit is used to determine the startup hash value corresponding to the subroutine related to the firmware through a hash algorithm;
[0090] The hash value comparison unit is used to determine a pre-stored target hash value, and determine the first verification result according to the startup hash value and the target hash value.
[0091] Optionally, the first verification result includes firmware verification passing or firmware verification failing; the hash value comparison unit is specifically used to:
[0092] When the startup hash value and the target hash value are the same, the first verification result is determined as the firmware verification is passed.
[0093] Optionally, the sub-verification result includes a second verification result corresponding to the subprogram related to key management; the program verification module 320 is specifically used to:
[0094] The subroutine related to key management is verified through a key agreement algorithm to obtain the second verification result.
[0095] Optionally, the boot program verification device of the embedded system further includes:
[0096] The abnormal prompt module is used for, after determining the target verification result corresponding to the boot program according to the sub-verification result, and in the case that the target verification result is the target verification failure, providing a loading abnormal prompt for the boot program.
[0097] Optionally, the sub-verification result also includes a third verification result corresponding to the sub-program related to device identity authentication or a fourth verification result corresponding to the sub-program related to the anti-tampering mechanism.
[0098] The boot program verification device for an embedded system provided by an embodiment of the present invention can execute the boot program verification method for an embedded system provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
[0099] Embodiment 4
[0100] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0101] like Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0102] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0103] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a boot program verification method for an embedded system.
[0104] In some embodiments, the boot program verification method for an embedded system may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the boot program verification method for an embedded system described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the boot program verification method for an embedded system in any other appropriate manner (e.g., by means of firmware).
[0105] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0106] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0107] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0108] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0109] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0110] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0111] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0112] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A boot program verification method for an embedded system, characterized in that: include: Loading the boot program of the embedded system, determining a plurality of target subprograms in the boot program, wherein the target subprograms include a subprogram related to firmware, a subprogram related to key management, a subprogram related to device identity authentication, or a subprogram related to an anti-tampering mechanism; For each of the target subprograms, verify the target subprogram to obtain a sub-verification result corresponding to the target subprogram; A target verification result corresponding to the boot program is determined according to the sub-verification result, wherein the target verification result includes a target verification pass or a target verification fail.
2. The method according to claim 1, characterized in that The sub-verification result includes a first verification result corresponding to the sub-program related to the firmware; the verification of the target sub-program to obtain the sub-verification result corresponding to the target sub-program includes: The subroutine related to the firmware is verified by using a hash algorithm to obtain the first verification result.
3. The method according to claim 2, characterized in that The step of verifying the subroutine related to the firmware by using a hash algorithm to obtain a first verification result includes: Determine the startup hash value corresponding to the subroutine related to the firmware by a hash algorithm; A pre-stored target hash value is determined, and the first verification result is determined according to the startup hash value and the target hash value.
4. The method according to claim 3, characterized in that The first verification result includes firmware verification passing or firmware verification failing; and determining the first verification result according to the startup hash value and the target hash value includes: When the startup hash value and the target hash value are the same, the first verification result is determined as the firmware verification is passed.
5. The method according to claim 1, characterized in that The sub-verification result includes a second verification result corresponding to the subprogram related to key management; the verification of the target subprogram to obtain the sub-verification result corresponding to the target subprogram includes: The subroutine related to key management is verified through a key agreement algorithm to obtain the second verification result.
6. The method according to claim 1, characterized in that After determining the target verification result corresponding to the bootstrap program according to the sub-verification result, the method further includes: When the target verification result is that the target verification fails, a loading exception prompt of the boot program is performed.
7. The method according to claim 1, characterized in that The sub-verification results also include a third verification result corresponding to the sub-program related to device identity authentication or a fourth verification result corresponding to the sub-program related to the anti-tampering mechanism.
8. A boot program verification device for an embedded system, characterized in that: include: A program loading module, used to load the boot program of the embedded system, and determine multiple target subprograms in the boot program, wherein the target subprograms include subprograms related to firmware, subprograms related to key management, subprograms related to device identity authentication, or subprograms related to an anti-tampering mechanism; A program verification module, used for verifying each target subprogram and obtaining a sub-verification result corresponding to the target subprogram; The result determination module is used to determine the target verification result corresponding to the boot program according to the sub-verification result, wherein the target verification result includes target verification pass or target verification fail.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the boot program verification method for an embedded system according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the boot program verification method for an embedded system according to any one of claims 1 to 7 when executed.