Firmware starting method and device and server
By obtaining the solidified area information in the server hardware layer to verify the BMC, the problem of slow BMC security startup speed is solved, the accuracy and speed of startup information verification is improved, and the overall security of the server is enhanced.
Patent Information
- Application Number
- CN202310537836.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-12
- Publication Date
- 2024-11-12
AI Technical Summary
In the prior art, the secure startup speed of the substrate management controller (BMC) is slow, affecting the overall security of the server.
通过获取服务器硬件层中固化区域的信息,对BMC的启动信息进行校验,若校验通过则控制BMC启动,采用硬件层中固化区域内不易被篡改或丢失的信息进行校验,简化校验 process to improve the secure boot speed and server performance of BMC.
Improves the accuracy and speed of BMC startup information verification, saves verification costs, and enhances the security after BMC startup. It does not require extrapolation of trusted security platform modules or system-level security chips, and is only implemented through the in-server processor. Safety verification.
Smart Images

Figure CN118939332A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a firmware startup method, device and server. Background Art
[0002] With the development of information technology, servers serve as the basis of large data centers and various Internet application services, so it is of great significance to ensure the safe operation of servers.
[0003] Among them, the baseboard management controller (Baseboard Management Control, BMC) is an important firmware in the server. The security of BMC is crucial to the security of the entire server. Therefore, before the BMC is securely started, the BMC startup information needs to be security checked to ensure the security of the server after the BMC is securely started.
[0004] However, the use of related technologies may result in a slow secure boot speed of the BMC. Summary of the invention
[0005] Based on this, it is necessary to provide a firmware startup method, device and server to address the above technical problems, which can improve the safe startup speed of the BMC.
[0006] In a first aspect, an embodiment of the present application provides a firmware startup method, which is applied to a processor in a server; the method includes:
[0007] Obtain information in the solidified area of the server's hardware layer;
[0008] Verify the startup information of the baseboard management controller by using the information in the solidification area;
[0009] If the information verification passes, the startup information of the baseboard management controller is controlled to run to complete the startup of the baseboard management controller.
[0010] The technical solution in the embodiment of the present application obtains information in a solidified area in the hardware layer of the server, verifies the startup information of the baseboard management controller through the information in the solidified area, and controls the startup information of the baseboard management controller to run when the information verification passes, so as to complete the startup of the baseboard management controller; the above method verifies the startup information of the baseboard management controller through the information in the solidified area in the hardware layer that is not easy to be tampered with or lost, which can improve the accuracy of information verification and further improve the security of the baseboard management controller after startup; at the same time, the above method can realize security verification through the stored solidified information, so that the information verification process is relatively simple, thereby improving the security verification speed of the startup information of the baseboard management controller, further improving the security startup speed of the baseboard management controller and the server performance; in addition, the above method does not require manual participation, thereby not only saving verification costs, but also improving the accuracy of information verification, and can greatly improve the security of the baseboard management controller after startup; further, the method does not require the baseboard management controller to be externally plugged with a trusted security platform module or a system-level security chip, and the security verification of the startup information of the baseboard management controller can be realized only through the processor in the server, thereby improving the speed of security verification of the startup information of the baseboard management controller, and further greatly improving the security startup speed of the baseboard management controller.
[0011] In one of the embodiments, before verifying the startup information of the baseboard management controller, the method further includes:
[0012] The startup information of the baseboard management controller is read from the storage unit of the baseboard management controller.
[0013] The technical solution in the embodiment of the present application can directly read the startup information of the baseboard management controller from the storage unit of the baseboard management controller, thereby increasing the speed at which the processor obtains the startup information.
[0014] In one embodiment, the processor is communicatively connected to the storage unit of the baseboard management controller, and the communication connection mode includes a serial communication connection or a parallel communication connection.
[0015] The technical solution in the embodiment of the present application establishes a communication connection between the processor and the storage unit of the baseboard management controller, so that the processor can directly interact with the storage unit storing the startup information of the baseboard management controller, helping to speed up the speed at which the processor obtains the startup information.
[0016] In one embodiment, controlling the startup information operation of the baseboard management controller includes:
[0017] A power-on instruction is sent to the baseboard management controller to instruct the baseboard management controller to power on, read the startup information in the storage unit of the baseboard management controller, and execute the startup information of the baseboard management controller.
[0018] The technical solution in the embodiment of the present application sends a power-on instruction to the baseboard management controller to instruct the baseboard management controller to power on, reads the startup information in the storage unit of the baseboard management controller, and runs the startup information of the baseboard management controller; the method will send a power-on instruction to the baseboard management controller only after the startup information of the baseboard management controller has passed the security check, so as to control the baseboard management controller to read and run the startup information. This process can avoid the problem of the baseboard management controller reading and running the startup information without completing the security check of the startup information, and can improve the security of the baseboard management controller after startup.
[0019] In one embodiment, the hardware layer includes a processor, and the information in the solidified area includes the trusted root information of the processor; and the startup information of the baseboard management controller in the server is verified by the information in the solidified area, including:
[0020] The startup information of the baseboard management controller in the server is verified according to the trusted root information of the processor.
[0021] The technical solution in the embodiment of the present application verifies the startup information of the baseboard management controller in the server according to the trusted root information of the processor; the above method can verify the startup information of the baseboard management controller through the information in the solidified area in the hardware layer that is not easy to be tampered with or lost, thereby improving the accuracy of the startup information verification of the baseboard management controller.
[0022] In one embodiment, the startup information of the baseboard management controller includes a coprocessor startup program, a baseboard management controller startup program and a platform public key certificate; and the startup information of the baseboard management controller in the server is verified according to the trusted root information of the processor, including:
[0023] Verify the coprocessor startup program through the processor's trusted root information;
[0024] If the coprocessor startup program passes the verification, the startup program of the baseboard management controller is verified by the coprocessor startup program;
[0025] If the startup program passes the verification, the platform public key certificate is verified through the startup program.
[0026] The technical solution in the embodiment of the present application verifies the coprocessor startup program through the trusted root information of the processor, and when the coprocessor startup program passes the verification, the startup program of the baseboard management controller is verified through the coprocessor startup program, and then when the startup program passes the verification, the platform public key certificate is verified through the startup program; the above method adopts an interlocking chain-type verification method to form a complete trust chain, and each information in the startup information of the baseboard management controller is verified layer by layer according to the solidified information that cannot be tampered with or lost, thereby greatly improving the accuracy of the startup information verification of the baseboard management controller.
[0027] In one embodiment, verifying the startup program of the baseboard management controller by the coprocessor startup program includes:
[0028] Controlling the execution of the coprocessor startup program to verify the public key certificate chain of the baseboard management controller;
[0029] If the public key certificate chain is verified, the startup program of the baseboard management controller is verified using the public key in the public key certificate chain.
[0030] The technical solution in the embodiment of the present application controls the execution of the coprocessor startup program, verifies the public key certificate chain of the baseboard management controller, and when the public key certificate chain verification passes, verifies the startup program of the baseboard management controller through the public key in the public key certificate chain; the method performs a security check on the public key certificate chain, and when the public key certificate chain verification passes, further performs a security check on the startup program of the baseboard management controller according to the public key in the public key certificate chain, thereby improving the accuracy of the security check of the startup program of the baseboard management controller.
[0031] In one embodiment, verifying the public key certificate chain of the baseboard management controller includes:
[0032] The public key certificate chain of the baseboard management controller is verified through the trusted root information, the public key in the public key certificate chain of the baseboard management controller, and the signature value in the public key certificate chain of the baseboard management controller.
[0033] The technical solution in the embodiments of the present application verifies the public key certificate chain of the basic management controller through trusted root information, the public key in the public key certificate chain of the basic management controller, and the signature value in the public key certificate chain of the basic management controller, so as to prepare for accurate verification of the startup program of the baseboard management controller, and can also further improve the accuracy of the security verification of the startup program of the baseboard management controller through the public key certificate chain of the baseboard management controller that has passed the security verification.
[0034] In a second aspect, an embodiment of the present application provides a firmware startup device, which is applied to a processor in a server; the device includes:
[0035] An information acquisition module, used to acquire information in a solidified area in a hardware layer of a server;
[0036] An information verification module, used to verify the startup information of the baseboard management controller by using the information in the solidification area;
[0037] The control module is used to control the startup information of the baseboard management controller to run when the information verification passes, so as to complete the startup of the baseboard management controller.
[0038] In a third aspect, an embodiment of the present application further provides a server, the server comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the method of any embodiment of the first aspect when executing the computer program.
[0039] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method of any embodiment in the above-mentioned first aspect are implemented.
[0040] In a fifth aspect, an embodiment of the present application further provides a computer program product, the computer program product comprising a computer program, which, when executed by a processor, implements the steps of the method of any embodiment of the first aspect above.
[0041] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 is an internal structure diagram of a server in one embodiment;
[0043] Figure 2 A schematic diagram of a firmware startup method in one embodiment;
[0044] Figure 3 is a flowchart of a firmware startup method in another embodiment;
[0045] Figure 4 is a flowchart of a firmware startup method in another embodiment;
[0046] Figure 5 is a flowchart of a firmware startup method in another embodiment;
[0047] Figure 6 FIG. 4 is a structural block diagram of a firmware startup device in an embodiment. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] In the server startup field, BMC is an important firmware in the server. The security of BMC is crucial to the security of the entire server. Therefore, before the BMC is securely started, the BMC startup information needs to be security checked to ensure the security of the server after the BMC is securely started.
[0050] In the related art, a trusted security platform module or a system-level security chip is mainly plugged in to perform security verification on the BMC startup information. However, the use of the related art will result in a slow security startup speed of the BMC. Based on this, the embodiment of the present application provides a firmware startup method that can improve the security startup speed of the BMC.
[0051] The firmware startup method provided in the embodiment of the present application can be applied to Figure 1 The processor in the server shown. Optionally, the processor includes but is not limited to a microcontroller unit (MCU), an embedded processor (Digital Signal Processing, DSP), a programmable logic device (Field-Programmable Gate Array, FPGA), etc., but in the embodiment of the present application, the above processor is a central processing unit (Central Processing Unit, CPU). The specific process of the firmware startup method is introduced below with the processor in the server as the execution subject.
[0052] like Figure 2 FIG. 1 is a flow chart of a firmware startup method provided in an embodiment of the present application. The method is applied to a processor in a server. The method can be implemented by the following steps:
[0053] S100: Obtain information in a solidified area in a hardware layer of a server.
[0054] It should be noted here that the hardware layer of the server may include multiple hardware structures, such as an arithmetic unit, a controller, a memory, a motherboard, an input device, and an output device. However, the core hardware structure of the hardware layer in the server is the processor.
[0055] Optionally, the information in the hardware layer of the server may be the built-in code of the processor in the hardware layer. The built-in code of the processor is usually stored in a solidified area, which may be a storage area that cannot be permanently changed after the information in the processor is written. The information in the solidified area is relatively secure, that is, after the information is written to the solidified area, the information is not easily tampered with or lost.
[0056] Since the built-in code written into the hardened area is usually not easy to be tampered with or lost, there is no need to perform security verification on the built-in code of the processor. After the server is powered on, the built-in code of the processor can be automatically run to enable the hardware layer of the server to start securely. Optionally, the built-in code of the processor can perform operations such as CPU memory initialization, user registration information filling, and pin parameter initialization of the chip in the server.
[0057] Correspondingly, when the processor of the server is started, the processor in the server can obtain information in the solidified area in the hardware layer.
[0058] S200 , verifying the startup information of the baseboard management controller by using the information in the solidification area.
[0059] Optionally, in addition to storing the built-in code of the processor, the solidified area may also store relevant information of the hardware structure in the hardware layer.
[0060] In practical applications, in order to ensure the security of the server, it is possible to effectively prevent the operation of unauthorized or potentially unsafe information in the firmware layer. When the hardware layer of the server is securely started, the processor in the server can obtain the information in its own solidified area, and perform a security check on the startup information of the baseboard management controller based on the information in the solidified area, so as to prepare for the secure startup of the baseboard management controller. In the embodiment of the present application, the information in the solidified area can be understood as solidified information.
[0061] In one embodiment, a method for performing security verification on the startup information of the baseboard management controller based on the information in the solidified area can be to pre-train an algorithm model, and then input both the information in the solidified area and the startup information of the baseboard management controller into the algorithm model, and the algorithm model outputs the verification result of the startup information of the baseboard management controller.
[0062] In another embodiment, the method of performing security verification on the startup information of the baseboard management controller based on the information in the solidified area can also be to decrypt the startup information of the baseboard management controller based on the information in the solidified area, and compare the decryption result with the preset decryption value. If the two are equal, it is determined that the verification has passed; if the two are not equal, it is determined that the verification has failed.
[0063] In actual applications, the processor is communicated with the baseboard management controller in the server, so the processor can read the startup information of the baseboard management controller so that the processor can directly check the startup information of the baseboard management controller. This process does not require the baseboard management controller to insert a trusted security platform module or a system-level security chip to achieve security verification of the startup information of the baseboard management controller.
[0064] Optionally, the communication connection between the processor and the baseboard management controller in the server may be a network communication connection or a wireless communication connection, etc.
[0065] S300: If the information verification passes, the startup information of the baseboard management controller is controlled to run to complete the startup of the baseboard management controller.
[0066] When the startup information verification of the baseboard management controller passes, it can be determined that the startup information verification of the baseboard management controller is completed, and further, the startup information operation of the baseboard management controller can be controlled.
[0067] In actual applications, the processor and the baseboard management controller are connected through a general-purpose input / output (GPIO) pin, and the GPIO pin can control the operation of the startup information of the baseboard management controller. For example, by pulling down the Reset signal of the GPIO pin or controlling not to power on the baseboard management controller, the startup information of the baseboard management controller can be controlled to stop running; after the ROM file of the baseboard management controller is verified, the Reset signal of the GPIO pin can be pulled up or the baseboard management controller can be controlled to power on, and the ROM file of the baseboard management controller can be run to run, so that the startup information of the baseboard management controller can be run.
[0068] In addition, a complex programmable logic device (CPLD) can also be set in the server. In this case, after the processor completes the information verification, the processor can send the result of the information verification to the CPLD. Correspondingly, the CPLD can control the startup information operation of the baseboard management controller (that is, control the power-on of the baseboard management controller).
[0069] The technical solution in the embodiment of the present application obtains information in a solidified area in the hardware layer of the server, verifies the startup information of the baseboard management controller through the information in the solidified area, and controls the startup information of the baseboard management controller to run when the information verification passes, so as to complete the startup of the baseboard management controller; the above method verifies the startup information of the baseboard management controller through the information in the solidified area in the hardware layer that is not easy to be tampered with or lost, which can improve the accuracy of information verification and further improve the security of the baseboard management controller after startup; at the same time, the above method can realize security verification through the stored solidified information, so that the information verification process is relatively simple, thereby improving the security verification speed of the startup information of the baseboard management controller, further improving the security startup speed of the baseboard management controller and the server performance; in addition, the above method does not require manual participation, thereby not only saving verification costs, but also improving the accuracy of information verification, and can greatly improve the security of the baseboard management controller after startup; further, the method does not require the baseboard management controller to be externally plugged with a trusted security platform module or a system-level security chip, and the security verification of the startup information of the baseboard management controller can be realized only through the processor in the server, thereby improving the speed of security verification of the startup information of the baseboard management controller, and further greatly improving the security startup speed of the baseboard management controller.
[0070] The following describes how the processor obtains the startup information of the baseboard management controller. In one embodiment, before executing the step in S200, the method further includes: reading the startup information of the baseboard management controller from a storage unit of the baseboard management controller.
[0071] Among them, the storage unit of the baseboard management controller can be the server's memory, hard disk or disk, etc., but in the embodiment of the present application, the storage unit of the above-mentioned baseboard management controller is the server's flash memory, that is, the flash memory of the baseboard management controller.
[0072] In some scenarios, in order for the processor in the server to quickly read the startup information of the baseboard management controller from the storage unit of the baseboard management controller, the processor needs to communicate with the storage unit of the baseboard management controller. Based on this, in one embodiment, the processor and the storage unit of the baseboard management controller are communicated and connected, and the communication connection mode includes a serial communication connection or a parallel communication connection.
[0073] In practical applications, the communication connection between the processor and the storage unit of the baseboard management controller is a serial communication connection or a parallel communication connection. The serial communication connection can be an interface protocol communication connection such as I2C, SPI, QSPI, LPC, Nand Flash, etc.; the parallel communication connection can be an interface protocol communication connection such as eMMC, Nor Flash, etc.
[0074] The embodiment of the present application can establish a communication connection between the processor and the storage unit of the baseboard management controller, so that the processor can directly interact with the storage unit storing the startup information of the baseboard management controller, helping to speed up the speed at which the processor obtains the startup information.
[0075] The technical solution in the embodiment of the present application can directly read the startup information of the baseboard management controller from the storage unit of the baseboard management controller, thereby increasing the speed at which the processor obtains the startup information.
[0076] In one embodiment, the step of controlling the execution of the startup information of the baseboard management controller in the above S300 may include: sending a power-on instruction to the baseboard management controller to instruct the baseboard management controller to power on, reading the startup information in the storage unit of the baseboard management controller, and executing the startup information of the baseboard management controller.
[0077] Specifically, after the information verification is passed, the processor can output relevant prompt information of the information verification passing for the user to view. Optionally, the relevant prompt information can be output in the form of text, view, voice, etc.
[0078] Furthermore, the user can trigger the processor to send a power-on instruction to the baseboard management controller according to the received relevant prompt information. Alternatively, the processor can automatically send a power-on instruction to the baseboard management controller after the information verification is passed.
[0079] It should be noted here that after the baseboard management controller reads its own startup information, it automatically runs the startup information to complete the startup of the baseboard management controller.
[0080] The technical solution in the embodiment of the present application sends a power-on instruction to the baseboard management controller to instruct the baseboard management controller to power on, reads the startup information in the storage unit of the baseboard management controller, and runs the startup information of the baseboard management controller; the method will send a power-on instruction to the baseboard management controller only after the startup information of the baseboard management controller has passed the security check, so as to control the baseboard management controller to read and run the startup information. This process can avoid the problem of the baseboard management controller reading and running the startup information without completing the security check of the startup information, and can improve the security of the baseboard management controller after startup.
[0081] The following is an explanation of the process of verifying the startup information of the baseboard management controller in the server through the information in the solidified area. In one embodiment, the hardware layer includes a processor, and the information in the solidified area includes the trusted root information of the processor; the steps in S200 may include: verifying the startup information of the baseboard management controller in the server according to the trusted root information of the processor.
[0082] Specifically, the information in the solidified area includes the trusted root information of the processor. In the embodiment of the present application, the trusted root information of the processor is also the trusted root information of the central processing unit, and can also be understood as the root public key of the processor.
[0083] In one implementation, based on the acquired trusted root information of the processor, the startup information of the baseboard management controller in the server can be processed, and the security verification of the startup information of the baseboard management controller in the server is completed according to the processing result.
[0084] In another implementation, based on the obtained trusted root information of the processor, an information verification algorithm can also be used to verify the startup information of the baseboard management controller in the server. Optionally, the information verification algorithm can be a cyclic redundancy check method, a parity check method, a Hamming code check method, etc.
[0085] The technical solution in the embodiment of the present application verifies the startup information of the baseboard management controller in the server according to the trusted root information of the processor; the above method can verify the startup information of the baseboard management controller through the information in the solidified area in the hardware layer that is not easy to be tampered with or lost, thereby improving the accuracy of the startup information verification of the baseboard management controller.
[0086] In some scenarios, in order to improve the accuracy of the startup information verification of the baseboard management controller in the server, the solidified information can be used to perform security verification on it. The following is an explanation of the process of verifying the startup information of the baseboard management controller in the server based on the trusted root information of the processor. In one embodiment, the startup information of the baseboard management controller includes a coprocessor startup program, a baseboard management controller startup program, and a platform public key certificate; Figure 3 As shown, the above step of verifying the startup information of the baseboard management controller in the server according to the trusted root information of the processor can be implemented in the following way:
[0087] S210: Verify the coprocessor startup program through the trusted root information of the processor.
[0088] In the embodiment of the present application, the startup information of the baseboard management controller includes a coprocessor startup program, a baseboard management controller startup program and a platform public key certificate. Among them, the coprocessor in the server can be understood as a security coprocessor.
[0089] In actual applications, the startup program is not loaded into the coprocessor at the initial moment, that is, the coprocessor cannot run at the initial moment. Naturally, the coprocessor needs to load the startup program before it can start running. Therefore, in order to improve the safe operation of the coprocessor, the coprocessor startup program needs to be security checked.
[0090] The processor may use the trusted root information of the processor and an information verification algorithm to perform security verification on the coprocessor boot program. Optionally, the coprocessor boot program may be represented as a secure coprocessor boot loader (Platform Security Processor Boot Loader, PSP Boot Loader).
[0091] In an embodiment of the present application, the processor decrypts the signature value in the coprocessor startup program through the processor's trusted root information to obtain a hash value, and then uses the hash algorithm in the coprocessor startup program to hash the public key in the coprocessor startup program to obtain another hash value, and then compares the two hash values. If the two hash values are equal, it is determined that the coprocessor startup program security check has passed.
[0092] S220: If the coprocessor startup program passes the verification, the startup program of the baseboard management controller is verified by the coprocessor startup program.
[0093] After determining that the coprocessor startup program has passed the verification, the processor may verify the startup program of the baseboard management controller by using the information verification algorithm through the coprocessor startup program.
[0094] S230: If the startup program passes the verification, the platform public key certificate is verified through the startup program.
[0095] In an embodiment of the present application, before executing the above S230, the above method also includes: detecting whether the BMC ROM file includes a platform public key certificate. If not, it is necessary to read the platform public key certificate, and then execute the steps in the above S230 based on the read platform public key certificate. If it is included, directly execute the steps in the above S230.
[0096] After the baseboard management controller startup program is verified, the processor can control the execution of the baseboard management controller startup program, and verify the platform public key certificate using the information verification algorithm through the BMC public key in the baseboard management controller public key certificate chain. Optionally, the above platform public key certificate can be called a PK (Platform Key) certificate.
[0097] In addition, the processor can also control the execution of the startup program of the baseboard management controller, and calculate the platform public key certificate through the public key of the BMC in the public key certificate chain of the baseboard management controller to obtain a third verification value, and then compare the third verification value with the preset third verification threshold, and determine whether the platform public key certificate has passed the verification according to the comparison result. If the third verification value is equal to the preset third verification threshold, it is determined that the platform public key certificate has passed the verification; if the third verification value is equal to the preset third verification threshold, it is determined that the platform public key certificate has not passed the verification.
[0098] The platform public key certificate includes the public key, public key length, signature algorithm, signature value and other information of the PK certificate. In the embodiment of the present application, the processor uses the signature algorithm in the PK certificate to sign the public key in the PK certificate according to the public key in the public key certificate chain of the baseboard management controller to obtain the signature value, and then compares the signature value with the signature value in the PK certificate. If the two are equal, it is determined that the platform public key certificate verification has passed.
[0099] The technical solution in the embodiment of the present application verifies the coprocessor startup program through the trusted root information of the processor, and when the coprocessor startup program passes the verification, the startup program of the baseboard management controller is verified through the coprocessor startup program, and then when the startup program passes the verification, the platform public key certificate is verified through the startup program; the above method adopts an interlocking chain-type verification method to form a complete trust chain, and each information in the startup information of the baseboard management controller is verified layer by layer according to the solidified information that cannot be tampered with or lost, thereby greatly improving the accuracy of the startup information verification of the baseboard management controller.
[0100] The following is a description of the process of verifying the startup program of the baseboard management controller by the coprocessor startup program. Figure 4 As shown, the steps in the above S220 may include:
[0101] S221, controlling the execution of the coprocessor startup program to verify the public key certificate chain of the baseboard management controller.
[0102] The processor may control the coprocessor startup program to be loaded into the coprocessor, and then control the execution of the coprocessor startup program, and use an information verification algorithm to verify the public key certificate chain in the signed BMC file.
[0103] In addition, the processor can also control the execution of the coprocessor startup program, process the public key certificate chain in the signed BMC file to obtain a first verification value, and then compare the first verification value with the preset first verification threshold, and determine whether the public key certificate chain has passed the verification based on the comparison result. Among them, if the first verification value is equal to the preset first verification threshold, it is determined that the public key certificate chain has passed the verification; if the first verification value is equal to the preset first verification threshold, it is determined that the public key certificate chain has not passed the verification. Optionally, the preset first verification threshold can be determined by user-defined, or it can be determined based on historical experience values, which is not limited in the embodiments of the present application.
[0104] Optionally, the signed BMC file can be called a bin file generated by compiling the BMC code, that is, a BMC ROM file. In the embodiment of the present application, the BMC ROM file may include a public key certificate chain, a baseboard management controller startup program, and a platform public key certificate.
[0105] It should be noted here that the signed BMC file can be generated by a third-party signature server, and the generation process does not require the participation of developers. Therefore, if the BMC ROM file includes the platform public key certificate, during the generation process of the signed BMC file, the developer can be less exposed to the certificates in the platform public key certificate, thereby reducing the possibility of tampering or loss of each certificate.
[0106] Among them, the third-party signature server can obtain the compiled BMC code file and the corresponding file identification information, and then obtain the corresponding public key certificate chain and private key from the storage module of the BMC manufacturer according to the file identification information, and then use the signature algorithm in the public key certificate chain to sign the BMC startup code according to the private key to obtain the signature value, and then write the signature value and the public key certificate chain into the compiled BMC code file to obtain the signed BMC file. In the embodiment of the present application, the compiled BIOS code file may include the platform public key certificate; the storage module of the above-mentioned BMC manufacturer may include the file identification information of the compiled BMC code file, the corresponding public key certificate chain, the private key, and the corresponding relationship between the three.
[0107] S222: If the public key certificate chain is verified, verify the startup program of the baseboard management controller using the public key in the public key certificate chain.
[0108] When it is determined that the public key certificate chain verification passes, the processor may verify the startup program of the baseboard management controller by using the public key in the public key certificate chain and an information verification algorithm.
[0109] Alternatively, when determining that the public key certificate chain has passed the verification, the processor may also process the startup program of the baseboard management controller through the public key in the public key certificate chain to obtain a second verification value, and then compare the second verification value with a preset second verification threshold, and determine whether the startup program of the baseboard management controller has passed the verification according to the comparison result. If the second verification value is equal to the preset second verification threshold, it is determined that the startup program of the baseboard management controller has passed the verification; if the second verification value is equal to the preset second verification threshold, it is determined that the startup program of the baseboard management controller has not passed the verification.
[0110] In the embodiment of the present application, the startup program of the baseboard management controller is the BMC startup code, and the BMC startup code includes the signature value, hash value, hash algorithm, public key and other information of the BMC startup code. Among them, the signature value in the BMC startup code can be obtained by signing and calculating the BMC startup code according to the private key information of the BMC.
[0111] In actual applications, the processor decrypts the signature value in the startup program of the baseboard management controller according to the public key in the public key certificate chain to obtain a hash value, and then performs a hash operation on the startup program of the baseboard management controller through the hash algorithm in the startup program of the baseboard management controller to obtain another hash value, and then compares the two hash values. If the two hash values are equal, it is determined that the startup program of the baseboard management controller has passed the verification.
[0112] The technical solution in the embodiment of the present application controls the execution of the coprocessor startup program, verifies the public key certificate chain of the baseboard management controller, and when the public key certificate chain verification passes, verifies the startup program of the baseboard management controller through the public key in the public key certificate chain; the method performs a security check on the public key certificate chain, and when the public key certificate chain verification passes, further performs a security check on the startup program of the baseboard management controller according to the public key in the public key certificate chain, thereby improving the accuracy of the security check of the startup program of the baseboard management controller.
[0113] The process of verifying the public key certificate chain of the baseboard management controller is described below. In one embodiment, the step of verifying the public key certificate chain of the baseboard management controller in the above S221 may include: verifying the public key certificate chain of the baseboard management controller through the trusted root information, the public key in the public key certificate chain of the baseboard management controller, and the signature value in the public key certificate chain of the baseboard management controller.
[0114] In the embodiment of the present application, the public key certificate chain of the basic management controller may include information such as the public key, public key length, signature algorithm, hash algorithm and signature value of the basic management controller.
[0115] In practical applications, the root private key information of the processor can be used to sign the public key in the public key certificate chain of the basic management controller using a signature algorithm to generate a signature value in the public key certificate chain. The signature algorithm here corresponds to the signature algorithm in the public key certificate chain of the basic management controller. The signature value in the public key certificate chain of the basic management controller can be understood as an encrypted signature value.
[0116] Specifically, the processor can pre-train an algorithm model, and then input the trusted root information, the public key in the public key certificate chain of the basic management controller, and the signature value in the public key certificate chain of the basic management controller into the algorithm model to verify the public key certificate chain of the basic management controller. The algorithm model outputs the verification result of the public key certificate chain of the basic management controller.
[0117] In addition, the processor may also verify the public key certificate chain of the basic management controller using an asymmetric encryption algorithm according to the trusted root information, the public key in the public key certificate chain of the basic management controller, and the signature value in the public key certificate chain of the basic management controller. Optionally, the asymmetric encryption algorithm may be a public key cryptographic algorithm (i.e., RSA algorithm), a national standard digital signature algorithm (i.e., DSA algorithm), an elliptic encryption algorithm (i.e., ECC algorithm), or a key exchange algorithm (i.e., DH algorithm), etc.
[0118] The technical solution in the embodiments of the present application verifies the public key certificate chain of the basic management controller through trusted root information, the public key in the public key certificate chain of the basic management controller, and the signature value in the public key certificate chain of the basic management controller, so as to prepare for accurate verification of the startup program of the baseboard management controller, and can also further improve the accuracy of the security verification of the startup program of the baseboard management controller through the public key certificate chain of the baseboard management controller that has passed the security verification.
[0119] In one embodiment, if Figure 5 As shown, the above step of verifying the public key certificate chain of the baseboard management controller through the trusted root information, the public key in the public key certificate chain of the baseboard management controller and the signature value in the public key certificate chain of the baseboard management controller can be implemented by the following steps:
[0120] S2211. Decrypt the signature value in the public key certificate chain using the trusted root information to obtain a first hash value.
[0121] In an embodiment of the present application, the processor may use an asymmetric public key decryption algorithm to decrypt the signature value in the public key certificate chain according to the trusted root information of the processor to obtain a first hash value.
[0122] S2212. Perform hash processing on the public key in the public key certificate chain according to the hash algorithm in the public key certificate chain to obtain a second hash value.
[0123] Among them, the hash algorithm in the public key certificate chain can be obtained, and the public key in the public key certificate chain is hashed according to the hash algorithm in the public key certificate chain to obtain a second hash value. Optionally, the above hash algorithm can be an irreversible encryption algorithm (such as MD5 algorithm), a data verification algorithm (such as CRC algorithm) or a secure hash algorithm (such as SHA-1 algorithm, international SHA1 algorithm, SHA256 algorithm, SHA284 algorithm, SHA512 algorithm, national secret SM3 algorithm) and the like.
[0124] S2213: If the first hash value and the second hash value are equal, it is determined that the public key certificate chain verification of the baseboard management controller passes.
[0125] Based on the first hash value and the second hash value obtained in the previous steps, it can be further determined whether the first hash value is equal to the second hash value. If the first hash value is equal to the second hash value, it is determined that the public key certificate chain verification of the baseboard management controller has passed.
[0126] The technical solution in the embodiment of the present application can decrypt the signature value in the public key certificate chain according to the trusted root information of the processor to obtain a first hash value, and hash the public key value in the public key certificate chain according to the hash algorithm in the public key certificate to obtain a second hash value. When the first hash value is equal to the second hash value, the signature value in the public key certificate chain of the baseboard management controller is verified. The above method can perform a security check on the public key certificate chain of the baseboard management controller, so as to provide an effective basis for completing the precise and secure verification of the startup procedure of the baseboard management controller, thereby further improving the security of the baseboard management controller after startup.
[0127] In one embodiment, the present application also provides a firmware startup method, which is applied to a processor in a server; the method includes the following process:
[0128] (1) Obtain the trusted root information in the hardened area of the server's processor.
[0129] (2) reading startup information of the baseboard management controller from a storage unit of the baseboard management controller, wherein the startup information includes a coprocessor startup program, a baseboard management controller startup program, and a platform public key certificate; and establishing a communication connection between the processor and the storage unit of the baseboard management controller, wherein the communication connection mode includes a serial communication connection or a parallel communication connection.
[0130] (3) Verify the coprocessor startup program through the processor's trusted root information.
[0131] (4) If the coprocessor startup program passes the verification, the coprocessor startup program is controlled to execute, and the signature value in the public key certificate chain is decrypted through the trusted root information to obtain the first hash value.
[0132] (5) According to the hash algorithm in the public key certificate chain, the public key in the public key certificate chain is hashed to obtain a second hash value.
[0133] (6) If the first hash value and the second hash value are equal, it is determined that the public key certificate chain verification of the baseboard management controller passes.
[0134] (7) If the public key certificate chain is verified, the startup program of the baseboard management controller is verified using the public key in the public key certificate chain.
[0135] (8) If the startup program verification passes, the control executes the startup program of the baseboard management controller, and verifies the platform public key certificate through the public key in the public key certificate chain of the baseboard management controller.
[0136] (9) If the platform public key certificate verification passes, a power-on instruction is sent to the baseboard management controller to instruct the baseboard management controller to power on, read the startup information in the storage unit of the baseboard management controller, and run the startup information of the baseboard management controller to complete the startup of the baseboard management controller.
[0137] The execution process of the above (1) to (9) can be specifically referred to the description of the above embodiment. The implementation principle and technical effect are similar and will not be repeated here.
[0138] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0139] Based on the same inventive concept, the embodiment of the present application also provides a firmware startup device for implementing the firmware startup method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more firmware startup device embodiments provided below can refer to the limitations on the firmware startup method above, and will not be repeated here.
[0140] In one embodiment, Figure 6 This is a schematic diagram of the structure of a firmware startup device in one embodiment of the present application. Figure 6 As shown, the firmware startup device of the embodiment of the present application is applied to a processor in a server; the device may include: an information acquisition module 11, an information verification module 12 and a control module 13, wherein:
[0141] The information acquisition module 11 is used to acquire information in a solidified area in the hardware layer of the server;
[0142] The information verification module 12 is used to verify the startup information of the baseboard management controller by using the information in the solidification area;
[0143] The control module 13 is used to control the startup information of the baseboard management controller to run when the information verification passes, so as to complete the startup of the baseboard management controller.
[0144] The firmware startup device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned firmware startup method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0145] In one embodiment, the firmware startup device further includes: an information reading module, wherein:
[0146] The information reading module is used to read the startup information of the baseboard management controller from the storage unit of the baseboard management controller.
[0147] The firmware startup device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned firmware startup method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0148] In one embodiment, the processor is communicatively connected to the storage unit of the baseboard management controller, and the communication connection mode includes a serial communication connection or a parallel communication connection.
[0149] The firmware startup device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned firmware startup method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0150] In one embodiment, the control module 13 is specifically used for:
[0151] A power-on instruction is sent to the baseboard management controller to instruct the baseboard management controller to power on, read the startup information in the storage unit of the baseboard management controller, and execute the startup information of the baseboard management controller.
[0152] The firmware startup device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned firmware startup method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0153] In one embodiment, the hardware layer includes a processor, and the information in the solidified area includes the trusted root information of the processor; the information verification module 12 includes: an information verification unit, wherein:
[0154] The information verification unit is used to verify the startup information of the baseboard management controller in the server according to the trusted root information of the processor.
[0155] The firmware startup device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned firmware startup method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0156] In one embodiment, the startup information of the baseboard management controller includes a coprocessor startup program, a baseboard management controller startup program and a platform public key certificate; the information verification unit includes: a first verification subunit, a second verification subunit and a third verification subunit, wherein:
[0157] A first verification subunit, used to verify the coprocessor startup program through the trusted root information of the processor;
[0158] A second verification subunit is used to verify the startup program of the baseboard management controller through the coprocessor startup program when the verification result of the first verification subunit is passed;
[0159] The third verification subunit verifies the platform public key certificate by starting a program when the verification result of the second verification subunit is passed.
[0160] The firmware startup device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned firmware startup method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0161] In one embodiment, the second verification subunit is specifically used for: a certificate chain verification subunit and a startup program verification subunit, wherein:
[0162] The certificate chain verification subunit is used to control the execution of the coprocessor startup program and verify the public key certificate chain of the baseboard management controller;
[0163] The startup program verification subunit is used to verify the startup program of the baseboard management controller through the public key in the public key certificate chain when the verification result of the certificate chain verification subunit is passed.
[0164] The firmware startup device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned firmware startup method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0165] In one embodiment, the certificate chain verification subunit is specifically used to:
[0166] Verifying the public key certificate chain of the baseboard management controller through the trusted root information, the public key in the public key certificate chain of the baseboard management controller, and the signature value in the public key certificate chain of the baseboard management controller;
[0167] The public key certificate chain of the baseboard management controller is verified by the trusted root information, the public key in the public key certificate chain of the baseboard management controller, and the signature value in the public key certificate chain of the baseboard management controller, including:
[0168] Decrypting the signature value in the public key certificate chain through the trusted root information to obtain a first hash value;
[0169] According to the hash algorithm in the public key certificate chain, hashing the public key in the public key certificate chain to obtain a second hash value;
[0170] If the first hash value and the second hash value are equal, it is determined that the public key certificate chain verification of the baseboard management controller passes.
[0171] The firmware startup device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned firmware startup method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0172] For the specific definition of the firmware startup device, please refer to the definition of the firmware startup method above, which will not be repeated here. Each module in the above-mentioned firmware startup device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the server in the form of hardware, or can be stored in the memory in the server in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0173] In one embodiment, a server is provided, the internal structure diagram of the server can be as follows: Figure 1As shown. The server includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the server is used to provide processing capabilities. The memory of the server includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the server is used to store the trusted root information of the processor. The network interface of the server is used to communicate with an external endpoint through a network connection. When the computer program is executed by the processor, a firmware startup method is implemented.
[0174] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the server to which the solution of the present application is applied. The specific server may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0175] In one embodiment, a server is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the technical solution in the above-mentioned firmware startup method embodiment of the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.
[0176] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the technical solution of the firmware startup method of the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.
[0177] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the technical solution of the above-mentioned firmware startup method of the present application. The implementation principle and technical effect are similar and will not be repeated here.
[0178] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0179] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0180] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A firmware startup method, characterized in that: A processor applied to a server; the method comprising: Acquire information in a solidified area in the hardware layer of the server; Verifying the startup information of the baseboard management controller through the information in the solidification area; If the information verification passes, the startup information of the baseboard management controller is controlled to run to complete the startup of the baseboard management controller.
2. The method according to claim 1, characterized in that Before verifying the startup information of the baseboard management controller, the method further includes: The startup information of the baseboard management controller is read from a storage unit of the baseboard management controller.
3. The method according to claim 2, characterized in that The processor is communicatively connected to the storage unit of the baseboard management controller, and the communication connection mode includes a serial communication connection or a parallel communication connection.
4. The method according to any one of claims 1 to 3, characterized in that The controlling the startup information operation of the baseboard management controller includes: A power-on instruction is sent to the baseboard management controller to instruct the baseboard management controller to power on, read the startup information in the storage unit of the baseboard management controller, and execute the startup information of the baseboard management controller.
5. The method according to any one of claims 1 to 3, characterized in that: The hardware layer includes a processor, and the information in the solidified area includes the trusted root information of the processor; and verifying the startup information of the baseboard management controller in the server by using the information in the solidified area includes: The startup information of the baseboard management controller in the server is verified according to the trusted root information of the processor.
6. The method according to claim 5, characterized in that The startup information of the baseboard management controller includes a coprocessor startup program, a startup program of the baseboard management controller and a platform public key certificate; and verifying the startup information of the baseboard management controller in the server according to the trusted root information of the processor includes: Verifying the coprocessor startup program through the trusted root information of the processor; If the coprocessor startup program passes the verification, the startup program of the baseboard management controller is verified by the coprocessor startup program; If the startup program passes the verification, the platform public key certificate is verified through the startup program.
7. The method according to claim 6, characterized in that The verifying the startup program of the baseboard management controller by the coprocessor startup program includes: Controlling the execution of the coprocessor startup program to verify the public key certificate chain of the baseboard management controller; If the public key certificate chain passes the verification, the startup program of the baseboard management controller is verified by using the public key in the public key certificate chain.
8. The method according to claim 7, characterized in that The verifying the public key certificate chain of the baseboard management controller includes: The public key certificate chain of the baseboard management controller is verified by using the trusted root information, the public key in the public key certificate chain of the baseboard management controller, and the signature value in the public key certificate chain of the baseboard management controller.
9. A firmware startup device, characterized in that: A processor applied to a server; the device comprises: An information acquisition module, used to acquire information in a solidified area in the hardware layer of the server; An information verification module, used to verify the startup information of the baseboard management controller through the information in the curing area; The control module is used to control the startup information of the baseboard management controller to run when the information verification passes, so as to complete the startup of the baseboard management controller.
10. A server comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
