A cloud platform trust chain construction method based on SM3 algorithm

By introducing the SM3 algorithm module into the BIOS program and the virtual machine operating system kernel, and modifying the measurement and PCR extension methods, the low security problem of the SHA1 algorithm in the cloud platform trust chain was solved, the localization and independent control of the trust chain were achieved, and the security of the system's trusted startup process was improved.

CN115292709BActive Publication Date: 2025-09-26CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210828713.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-15
Publication Date
2025-09-26
Estimated Expiration
2042-07-15

AI Technical Summary

Technical Problem

The SHA1 algorithm used in the establishment of the trust chain of existing cloud platforms has low security and lacks independent control, making it difficult to meet localization needs.

Method used

The SM3 algorithm is used to replace the SHA1 algorithm. The BIOS program and the virtual machine operating system kernel are modified to add the SM3 algorithm module. The measurement algorithm and PCR extension method are modified. The virtual machine vTPM instance is protected by the SM3 PCR 12 of the hardware TPM, and the hash record table is maintained to achieve autonomous and controllable trust chain construction.

Benefits of technology

It has achieved security improvement and independent control of the cloud platform's trust chain, ensured the localization of the trust chain, and improved the security and reliability of the system's trusted startup process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115292709B_ABST
    Figure CN115292709B_ABST
Patent Text Reader

Abstract

The present invention discloses a cloud platform trust chain construction method based on the SM3 algorithm. The BIOS program is modified to add an SM3 algorithm module and a measurement result extension module. During the BIOS program startup process, the SM3 algorithm is called and the measurement results are extended to the SM3 bank of the TPM. The kernel is also modified to add an SM3 algorithm module and an IMA measurement extension module. When the operating system is loaded, the IMA calls the SM3 algorithm to measure the operating system application and extends the measurement results to SM3 PCR register 10. Simultaneously, the BIOS firmware and kernel of the cloud platform host are modified accordingly. The vTPM instance of the cloud virtual machine is encrypted based on the SM3 algorithm, and the result is extended to PCR register 12 of the hardware TPM. This invention ensures that the entire process of establishing a cloud platform trust chain is based on the SM3 algorithm, which is more secure and has autonomous control rights, and realizes the localization of the algorithm during the trust chain establishment process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of virtualization and trusted computing, and in particular to a cloud platform trust chain construction method based on the SM3 algorithm. Background Art

[0002] Establishing a trust chain, a key technology in trusted computing, uses the Core Root of Trusted for Measurement (CRTM) as its core during the operating system boot process. This approach transfers trust through a level-by-level measurement process, enabling tampering detection of components during the OS boot process and ensuring trusted boot based on the hardware-based TPM (Trusted Platform Module). The OS boot measurement process includes measurements during the Basic Input Output System (BIOS) boot phase and the Integrity Measurement Architecture (IMA) subsystem during OS loading. Existing trusted computing technologies use the SHA1 (Secure Hash Algorithm 1) algorithm by default during the BIOS measurement phase to extend component measurement results to PCRs 0-7 in the TPM's SHA1 bank. During the IMA measurement phase, SHA1 is used to extend OS program and file measurement results to PCR 10 in the SHA1 bank.

[0003] The SM3 algorithm, designed by Academician Wang Xiaoyun, is the first domestically produced hash algorithm standard. This algorithm is suitable for digital signatures and verification, message authentication code generation and verification, and random number generation in commercial cryptographic applications. As a 256-bit hash algorithm, SM3 is more secure than the SHA1 algorithm currently used by default during operating system bootup to establish a trust chain. Furthermore, the SM3 algorithm is a Chinese-developed algorithm. In the context of information technology innovation, establishing a trust chain using the SM3 algorithm is essential for achieving the goal of domesticating operating systems. Summary of the Invention

[0004] In response to the current practice of using the SHA1 algorithm, which has low security and lacks autonomous control, in establishing trust chains, this invention aims to provide a cloud platform trust chain construction method based on the SM3 algorithm. This method changes the traditional approach of using the less secure SHA1 algorithm for trust measurement, achieving autonomous control at the trust chain establishment level. The technical solution is as follows:

[0005] A cloud platform trust chain construction method based on the SM3 algorithm includes the following steps:

[0006] Step 1: Modify the BIOS boot program used by the cloud platform, add the SM3 algorithm module, and change the measurement algorithm, measurement length, and extension method;

[0007] Step 2: Modify the kernel used by the virtual machine operating system, add the SM3 algorithm module, change the measurement algorithm used by the IMA subsystem, and expand the PCR bank;

[0008] Step 3: When the VM OS boots, the modified BIOS program calls the SM3 algorithm module for measurement and stores the result in the PCR register of the SM3 bank. Then, the IMA subsystem in the kernel calls the SM3 algorithm module to measure the application and stores the measurement result in the PCR register of the SM3 bank, completing the system trusted boot.

[0009] Step 4: For the cloud platform host, use the SM3 algorithm to replace the measurement algorithm in the BIOS, and load the new BIOS firmware to the host through the server remote management method. At the same time, use the kernel version supported by the host to modify the measurement algorithm and PCR extension method of the IMA subsystem; use the SM3 PCR 12 of the hardware TPM to protect the virtual machine vTPM, hash the vTPM instance of the cloud virtual machine based on the SM3 national secret algorithm, maintain the hash records of all vTPMs, and aggregate the records and expand them to the PCR 12 register in the SM3 bank.

[0010] Furthermore, the step 1 is specifically as follows:

[0011] Step 1.1: Add the SM3 algorithm module to the BIOS boot program and add the compilation parameters of the SM3 algorithm module program in the Makefile file;

[0012] Step 1.2: Change the algorithm length measured for the BIOS component to SM3_256_BUFSIZE and the PCR extension interface to TPM2_ALG_SM3.

[0013] Furthermore, the step 2 is specifically as follows:

[0014] Step 2.1: For the kernel version used by the virtual machine operating system that does not support the SM3 algorithm, add the SM3 algorithm operation module to it, and add the SM3 algorithm compilation option CONFIG_CRYPTO_SM3 to the cryptographic algorithm system Makefile in the kernel;

[0015] Step 2.2: Modify the IMA subsystem, change the metric algorithm ima_hash_algo macro definition to the SM3 algorithm, and change the metric length to SM3_256_DIGEST_SIZE;

[0016] Step 2.3: Modify the PCR extension mode and replace the PCR bank extended by the kernel IMA subsystem with the SM3 bank.

[0017] Furthermore, the step 3 is specifically as follows:

[0018] Step 3.1: The operating system is booted based on the modified BIOS. During the boot process, the SM3 algorithm module is called to measure the BIOS and memory buffer register components. The measurement results are stored in PCR 0-7 registers of the SM3 bank, and the trust is passed to the operating system.

[0019] Step 3.2: The IMA subsystem in the kernel calls the SM3 algorithm module to measure and store the kernel modules, executable files, and files to be accessed involved in the system startup process. The results are then expanded to register PCR10 of the SM3 bank, completing the system's trusted startup.

[0020] Furthermore, the step 4 is specifically as follows:

[0021] Step 4.1: Add the SM3 algorithm to the host BIOS firmware based on the BIOS version used by the manufacturer, modify the measurement algorithm used in the BIOS measurement process, load the newly generated BIOS firmware to the host through the server remote management method, and configure it for use. Using the kernel version supported by the host, modify the measurement algorithm of the IMA subsystem to SM3, and modify the PCR extension method to extend to PCR register 10 of SM3.

[0022] Step 4.2: Maintain a hash record table for the cloud platform virtual machine, including the virtual machine ID, timestamp time-tag, SM3 hash result hash of the vTPM instance, and usage status state; Before the cloud platform uses the vTPM or when it is initially created, the vTPM instance is hashed using the SM3 algorithm and stored in the record table. Before use, a real-time calculation is performed to compare whether the current vTPM hash result and the vTPM record are consistent. If they are consistent, the virtual machine starts normally; otherwise, the request is rejected; when the virtual machine is shut down, the vTPM instance is hashed again and the result in the record table is updated as the baseline value for the next startup; the measurement records are aggregated in a periodic manner, and the aggregated hash value is stored in the PCR 12 register of the SM3 bank of the hardware TPM to avoid calling the TPM every time the vTPM instance is used.

[0023] Compared with the prior art, the beneficial effects of the present invention are as follows: in response to the problem that the SHA1 algorithm with low security and no autonomous control is used in the current cloud platform trust chain establishment process, the present invention proposes a cloud platform trust chain construction method based on the SM3 algorithm, changes the measurement algorithm and extension method used by the BIOS program, and modifies the measurement algorithm and extended PCR bank used by the system kernel IMA subsystem, so that the entire process of cloud platform trust chain establishment is based on the SM3 algorithm with higher security and autonomous control, thereby realizing the localization of the algorithm in the trust chain establishment process. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is a schematic diagram of the cloud platform trust chain construction method based on the SM3 algorithm in the present invention.

[0025] Figure 2 Schematic diagram of the cloud platform trust chain construction process based on the SM3 algorithm in the present invention. DETAILED DESCRIPTION

[0026] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0027] A cloud platform trust chain construction method based on the SM3 algorithm includes the following steps:

[0028] Step 1: Modify the BIOS boot program used by the cloud platform, add the SM3 algorithm module, and change the measurement algorithm, measurement length, and extension method.

[0029] Step 1.1: Add the SM3 algorithm module to the BIOS boot program and add the compilation parameters of the SM3 algorithm module program in the Makefile file;

[0030] Step 1.2: Change the algorithm length measured for the BIOS component to SM3_256_BUFSIZE and the PCR extension interface to TPM2_ALG_SM3.

[0031] Step 2: Modify the kernel used by the virtual machine operating system, add the SM3 algorithm module, change the measurement algorithm used by the IMA subsystem, and expand the PCR bank.

[0032] Step 2.1: For kernel versions that do not support the SM3 algorithm, add the SM3 algorithm operation module to it and add the SM3 algorithm compilation option CONFIG_CRYPTO_SM3 to the kernel's cryptographic algorithm system Makefile file;

[0033] Step 2.2: Modify the IMA subsystem, change the metric algorithm ima_hash_algo macro definition to the SM3 algorithm, and change the metric length to SM3_256_DIGEST_SIZE;

[0034] Step 2.3: Modify the PCR extension mode and replace the PCR bank extended by the kernel IMA subsystem with the SM3 bank.

[0035] Step 3: When the VM OS starts, the modified BIOS program calls the SM3 algorithm module for measurement and stores the result in the PCR register of the SM3 bank. Then, the IMA subsystem in the kernel calls the SM3 algorithm module to measure the application and stores the measurement result in the PCR register of the SM3 bank, completing the trusted boot of the system.

[0036] Step 3.1: The operating system is booted based on the modified BIOS. During the boot process, the SM3 algorithm module is called to measure components such as the BIOS and the MBR (Memory Buffer Register). The measurement results are stored in registers 0-7 of the SM3 bank, and the trust is passed to the operating system.

[0037] Step 3.2: The IMA subsystem in the kernel calls the SM3 algorithm module to measure and store the kernel modules, executable files, and files to be accessed involved in the system startup process. The results are then expanded to register PCR10 of the SM3 bank, completing the trusted startup of the virtual machine system.

[0038] Step 4: For the cloud platform host, replace the measurement algorithm in the BIOS with the SM3 algorithm and load the new BIOS firmware to the host through server remote management. At the same time, modify the measurement algorithm and PCR extension method of the IMA subsystem using a kernel version supported by the host. Protect the virtual machine vTPM using the hardware TPM's SM3 PCR 12. Hash the cloud virtual machine's vTPM instance based on the SM3 national secret algorithm. Maintain a record of all vTPM hashes and aggregate the records to PCR 12 in the SM3 bank.

[0039] Step 4.1: Add the SM3 algorithm implementation to the host BIOS firmware based on the BIOS version used by the manufacturer, modify the measurement algorithm used in the BIOS measurement process, load the newly generated BIOS firmware to the host through server remote management, and configure it for use. Use a kernel version supported by the host, modify the measurement algorithm of the IMA subsystem to SM3, and modify the PCR extension method to extend to SM3's PCR register 10.

[0040] Step 4.2: The trust relationship between the vTPM instance and the TPM is established by maintaining a hash table containing the virtual machine ID, timestamp, SM3 hash result of the vTPM instance, and usage status. Before the vTPM is used on the cloud platform (or initially created), a hash result is calculated using the SM3 algorithm for the vTPM instance and stored in the table. Before use, a real-time calculation is performed to verify whether the current vTPM hash result and the vTPM record are consistent. If they are consistent, the virtual machine boots normally; otherwise, the request is rejected. When the virtual machine is shut down, the vTPM instance is hashed again and the result in the table is updated, serving as the baseline for the next boot. To avoid invoking the TPM every time the vTPM instance is used, measurement records are periodically aggregated, and the aggregated hash value is stored in register PCR 12 of the hardware TPM's SM3 bank.

[0041] like Figure 1 The schematic diagram of the cloud platform trust chain construction method based on the SM3 algorithm is shown. The double-boxed part in the figure represents the key content that needs to be added in the present invention, including modifications to the BIOS program and kernel. The specific principles are as follows:

[0042] For the BIOS program, an SM3 algorithm module and a measurement result extension module are added. The SM3 algorithm operation module includes SM3 algorithm operation functions based on national standards, and the compilation parameters of the SM3 algorithm operation module program are added to the Makefile file. The measurement result extension module modifies the algorithm length of the BIOS component measurement to SM3_256_BUFSIZE and changes the PCR extension interface to TPM2_ALG_SM3.

[0043] The kernel adds an SM3 algorithm module and an SM3 measurement extension module. The SM3 algorithm operation module includes SM3 algorithm operation functions implemented according to national standards and adds the SM3 algorithm compilation option CONFIG_CRYPTO_SM3 to the kernel's cryptographic algorithm system Makefile. The SM3 algorithm measurement extension module changes the IMA subsystem's measurement algorithm ima_hash_algo macro definition to the SM3 algorithm, modifies the measurement length to SM3_256_DIGEST_SIZE, and extends the IMA measurement results to register PCR10 of the SM3 bank.

[0044] like Figure 2 The diagram below shows the cloud platform trust chain construction process based on the SM3 algorithm. The specific construction process is as follows:

[0045] For cloud platform hosts, the host BIOS calls the added SM3 algorithm module during power-on startup. It performs measurements in the order of CRTM, BIOS, OS Loader, and OS, and extends the measurement results to the hardware TPM's SM3 bank. The IMA subsystem in the OS kernel then calls the added SM3 algorithm module to measure applications loaded during the operating system startup process (such as the virtual machine monitor (VMM) and virtual trusted platform module (vTPM) components) according to the settings of the IMA measurement extension module. The measurement results are stored in the host IMA measurement log file, and the final measurement results are aggregated and extended to PCR register 10 in the TPM's SM3 bank. For cloud platform virtual machines, the virtual machine seabios calls the added SM3 algorithm module when it is powered on and started. It measures the vCRTM, vBIOS, OS Loader, and OS in the order of measurement and extends the measurement results to the SM3 bank of the virtual trusted platform module vTPM. Then, the IMA subsystem in the OS kernel calls the added SM3 algorithm module and measures the applications loaded during the operating system startup process according to the settings of the IMA measurement extension module. The measurement results are stored in the virtual machine IMA measurement log file, and the final measurement results are aggregated and extended to PCR register 10 in the SM3 bank of the vTPM.

Claims

1. A cloud platform trust chain construction method based on the SM3 algorithm, characterized in that: The following steps are involved: Step 1: Modify the BIOS boot program used by the cloud platform, add the SM3 algorithm module, and change the measurement algorithm, measurement length, and extension method; Step 2: Modify the kernel used by the virtual machine operating system, add the SM3 algorithm module, change the measurement algorithm used by the IMA subsystem, and expand the PCR bank; Step 3: When the VM OS boots, the modified BIOS program calls the SM3 algorithm module for measurement and stores the result in the PCR register of the SM3 bank. Then, the IMA subsystem in the kernel calls the SM3 algorithm module to measure the application and stores the measurement result in the PCR register of the SM3 bank, completing the system trusted boot. Step 4: For the cloud platform host, use the SM3 algorithm to replace the measurement algorithm in the BIOS, and load the new BIOS firmware to the host through the server remote management method. At the same time, use the kernel version supported by the host to modify the measurement algorithm and PCR extension method of the IMA subsystem; use the SM3 PCR 12 of the hardware TPM to protect the virtual machine vTPM, hash the vTPM instance of the cloud virtual machine based on the SM3 national secret algorithm, maintain the hash records of all vTPMs, and aggregate the records and expand them to the PCR 12 register in the SM3 bank.

2. A cloud platform trust chain construction method based on the SM3 algorithm according to claim 1, characterized in that: The step 1 is specifically as follows: Step 1.1: Add the SM3 algorithm module to the BIOS boot program and add the compilation parameters of the SM3 algorithm module program in the Makefile file; Step 1.2: Change the algorithm length measured for the BIOS component to SM3_256_BUFSIZE and the PCR extension interface to TPM2_ALG_SM3.

3. A cloud platform trust chain construction method based on the SM3 algorithm according to claim 1, characterized in that: The step 2 is specifically as follows: Step 2.1: For the kernel version used by the virtual machine operating system that does not support the SM3 algorithm, add the SM3 algorithm operation module to it, and add the SM3 algorithm compilation option CONFIG_CRYPTO_SM3 to the cryptographic algorithm system Makefile in the kernel; Step 2.2: Modify the IMA subsystem, change the metric algorithm ima_hash_algo macro definition to the SM3 algorithm, and change the metric length to SM3_256_DIGEST_SIZE; Step 2.3: Modify the PCR extension mode and replace the PCR bank extended by the kernel IMA subsystem with the SM3 bank.

4. A cloud platform trust chain construction method based on the SM3 algorithm according to claim 1, characterized in that: The step 3 is specifically as follows: Step 3.1: The operating system is booted based on the modified BIOS. During the boot process, the SM3 algorithm module is called to measure the BIOS and memory buffer register components. The measurement results are stored in PCR 0-7 registers of the SM3 bank, and the trust is passed to the operating system. Step 3.2: The IMA subsystem in the kernel calls the SM3 algorithm module to measure and store the kernel modules, executable files, and files to be accessed involved in the system startup process. The results are then expanded to PCR register 10 of the SM3 bank, completing the system's trusted startup.

5. The cloud platform trust chain construction method based on the SM3 algorithm according to claim 1 is characterized in that: The step 4 is specifically as follows: Step 4.1: Add the SM3 algorithm to the host BIOS firmware based on the BIOS version used by the manufacturer, modify the measurement algorithm used in the BIOS measurement process, load the newly generated BIOS firmware to the host through the server remote management method, and configure it for use. Using the kernel version supported by the host, modify the measurement algorithm of the IMA subsystem to SM3, and modify the PCR extension method to extend to PCR register 10 of SM3. Step 4.2: Maintain a hash record table for the cloud platform virtual machine, including the virtual machine ID, timestamp time-tag, SM3 hash result hash of the vTPM instance, and usage status state; Before the cloud platform uses the vTPM or when it is initially created, the vTPM instance is hashed using the SM3 algorithm and stored in the record table. Before use, a real-time calculation is performed to compare whether the current vTPM hash result and the vTPM record are consistent. If they are consistent, the virtual machine starts normally; otherwise, the request is rejected; when the virtual machine is shut down, the vTPM instance is hashed again and the result in the record table is updated as the baseline value for the next startup; the measurement records are aggregated in a periodic manner, and the aggregated hash value is stored in the PCR 12 register of the SM3 bank of the hardware TPM to avoid calling the TPM every time the vTPM instance is used.

Citation Information

Patent Citations

  • Chain-of-trust construction method and device based on chip

    CN104966022A

  • A method and apparatus for verify ingthat integrity of hardware resources of a virtual machine

    CN109358945A