Communication establishment method based on security assessment and electronic device
By performing dual authentication of communication devices and measuring system operating status before establishing a communication channel, and introducing trusted third-party authentication, the problem of system integrity detection in a TPM-free environment is solved, thereby improving communication security assessment and proactive defense capabilities in a TPM-free environment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING LINX SOFTWARE CORP
- Filing Date
- 2026-02-04
- Publication Date
- 2026-05-22
AI Technical Summary
Existing technologies cannot effectively detect whether terminal systems are infected by malware or critical components are tampered with in a TPM-free environment, resulting in weak communication security, especially in critical infrastructure and IoT devices where it is difficult to achieve system integrity protection.
By implementing dual authentication of communication devices before establishing a communication channel, verifying the identity of digital certificates and strictly checking system operating status metrics, and introducing trusted third parties for authentication, the system operating environment is ensured to remain tampered with, and software-defined security mechanisms are used to replace hardware dependencies.
It enables communication security assessment in a TPM-free environment, enhances proactive defense capabilities, improves the reliability of security assessment, moves the defense checkpoint forward to the initial stage of the attack chain, and blocks the possibility of malicious code execution.
Smart Images

Figure CN121644236B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication security technology, and in particular to a communication establishment method and electronic device based on security assessment. Background Technology
[0002] With the rapid development of information technology, especially the widespread application of emerging technologies such as the Internet of Things, cloud computing, and edge computing, communication between devices is becoming increasingly frequent, and system scale is constantly expanding. However, the open network environment also brings serious security challenges, such as frequent occurrences of unauthorized device access, man-in-the-middle attacks, and identity forgery. Against this backdrop, ensuring the authenticity of communication entities, especially authenticating the authenticity of system states, has become a core foundation for building trustworthy systems.
[0003] Traditional authentication channels primarily rely on usernames / passwords, digital certificates, or two-factor authentication to verify the identities of both users. These mechanisms can only confirm "who is accessing," not "from what system environment." In other words, traditional authentication mechanisms completely ignore the verification of the terminal system's operational status, failing to detect whether the system has been infected with malware or whether critical components have been tampered with. Attackers can use man-in-the-middle attacks, rootkit implantation, system component tampering, and session hijacking to steal sensitive data and gain system control without compromising user authentication.
[0004] Current mainstream system operation status verification technologies are mainly based on trusted computing architecture, with a hardware-level root of trust built around a Trusted Platform Module (TPM). This technology establishes a complete trust chain from hardware to operating system during system startup, and uses the cryptographic capabilities of the TPM chip to measure and verify critical system components step by step.
[0005] However, in critical infrastructure sectors such as banking, power, and energy, many outdated devices are unable to support modern security chips like TPMs due to hardware architecture limitations, making it difficult to solve security issues through hardware upgrades. Meanwhile, embedded devices in IoT and edge computing scenarios are generally limited by cost, power consumption, and size, lacking the physical conditions and computing power to integrate TPM chips. These devices often directly connect to core business networks, becoming weak links in security protection. This hardware limitation makes traditional TPM-based security assessment-driven communication establishment mechanisms ineffective in critical infrastructure, necessitating a communication security determination method that is not dependent on specific hardware and adaptable to various computing environments. Summary of the Invention
[0006] Based on the above analysis, the embodiments of the present invention aim to provide a communication establishment method and electronic device based on security assessment, so as to solve the problem that existing methods cannot achieve communication security assessment in a TPM-free environment.
[0007] On one hand, embodiments of the present invention provide a communication establishment method based on security assessment. The method includes: obtaining a first system operating status metric of a first device; in response to the first device successfully authenticating a second certificate for a second device and obtaining information that the second device has successfully authenticated the first certificate for the first device, requesting a trusted third party to authenticate the first system operating status of the first device based on the first system operating status metric; in response to receiving a result from the trusted third party indicating that the second system operating status of the second device has been authenticated, and obtaining information that the second device has received a result from the trusted third party indicating that the second system operating status has been authenticated, determining to establish communication between the first device and the second device; wherein the second system operating status is the authentication result requested by the second device from the trusted third party based on the second system operating status metric of the second device.
[0008] The present invention also provides a communication establishment method based on security assessment, the method comprising: receiving a first system operation status authentication request sent by a first device; wherein the first system operation status authentication request includes a first system operation status metric value of the first device; authenticating the first system operation status of the first device according to the first system operation status metric value, and sending the obtained authentication result of the first system operation status to a second device; receiving a second system operation status authentication request sent by the second device; wherein the second system operation status authentication request includes a second system operation status metric value of the second device; authenticating the second system operation status of the second device according to the second system operation status metric value, and sending the obtained authentication result of the second system operation status to the first device.
[0009] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the communication establishment method based on security assessment as described above.
[0010] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the communication establishment method based on security assessment as described above.
[0011] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the communication establishment method based on security assessment as described above.
[0012] The communication establishment method and electronic device based on security assessment provided by this invention implement dual authentication of communication devices before the communication channel is established—not only verifying the identity of the digital certificate, but also strictly verifying the underlying system state represented by the system operation state metric, ensuring that the operating environment has not been tampered with. This pre-emptive authentication mechanism moves the defense gate to the initial stage of the attack chain, fundamentally blocking the possibility of malicious code execution, realizing a paradigm shift from "post-event response" to "pre-event immunity", significantly improving proactive defense capabilities. Furthermore, by introducing a third-party verification mechanism, it achieves an objective assessment of the system state of both communicating parties, improving the reliability of the security assessment. Moreover, this security assessment is based on a software mechanism and does not rely on a TPM module, enabling communication security assessment in a TPM-free environment.
[0013] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description
[0014] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.
[0015] Figure 1 This is one of the flowcharts of the communication establishment method based on security assessment provided by the present invention.
[0016] Figure 2 This is the second flowchart of the communication establishment method based on security assessment provided by the present invention.
[0017] Figure 3 A schematic diagram of the physical structure of an electronic device is provided. Detailed Implementation
[0018] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0019] Terminology Explanation:
[0020] Rootkit: Malware that disguises itself as a driver and loads into the operating system kernel.
[0021] TPM: Trusted Platform Module. A Trusted Platform Module is an international standard for secure cryptographic processors designed to process encryption keys within a device using a dedicated microprocessor integrated into the device.
[0022] CPU: Central Processing Unit. One of the main components of a computer, its primary function is to interpret computer instructions and process data within the computer software.
[0023] BIOS: Basic Input / Output System. The BIOS is the firmware that performs hardware initialization during the power-on startup phase and provides runtime services to the operating system.
[0024] SCADA stands for Supervisory Control and Data Acquisition. SCADA systems are generally computer control systems with monitoring programs and data collection capabilities.
[0025] TLS: Transport Layer Security. It was formerly known as the SSL protocol.
[0026] SSL: Secure Sockets Layer. SSL is a security protocol designed to provide security and data integrity guarantees for internet communications.
[0027] VPN: Virtual Private Network. A VPN extends a private network onto a public network, allowing users to send and receive data on a shared or public network as if their computing devices were directly connected to the private network.
[0028] TTP: Trusted Third Party.
[0029] CSR: Certificate Signing Request.
[0030] Fork: Fork (process copying) is an action that creates a copy of the process itself.
[0031] GRUB: GRand Unified Bootloader, abbreviated as GRUB. GRUB allows users to have multiple operating systems running on their computer simultaneously and to select the desired operating system when the computer boots up.
[0032] Traditional VPN authentication mechanisms focus solely on user authentication while neglecting the verification of system component integrity. This fundamental flaw directly leads to serious security risks: because they cannot detect whether the communication terminal system has been infected with malware or whether critical components have been tampered with, attackers can use man-in-the-middle attacks, rootkit implantation, or system component tampering to steal sensitive data and gain system control without compromising user authentication. Existing system operation status verification technologies mainly rely on TPM-based trusted computing architectures, which require TPM 2.0 and above hardware support. However, in critical infrastructure sectors such as banking, power, and energy, many older devices, due to their early construction, lack hardware specifications that support modern security chips. Simultaneously, embedded devices in IoT and edge computing scenarios are generally limited by cost, power consumption, and size, lacking the physical conditions to integrate TPM chips. Ultimately, these critically positioned devices cannot obtain effective system integrity protection, becoming weak links for attackers to infiltrate core business networks.
[0033] To address the aforementioned technical problems, the core objective of this invention is to provide a method for determining communication security based on system operating status in a TPM-free environment. This method replaces hardware reliance with software-defined security mechanisms, providing system-level integrity verification capabilities for both communicating parties without altering the existing channel infrastructure. Ultimately, it enables effective detection of whether a terminal system has been infected by low-level malware such as rootkits in a TPM-free environment, preventing attackers from stealing channel communication data through system-level vulnerabilities.
[0034] The communication establishment method based on security assessment provided by this invention is used to determine the channel security between a first device and a second device, and to establish communication between the first device and the second device if the channel security is confirmed. The first device and the second device can be a server and a client, or any two devices with data processing capabilities that need to communicate.
[0035] Figure 1 This is one of the flowcharts illustrating the communication establishment method based on security assessment provided by this invention. For example... Figure 1 As shown, the method is used in a first device, and the method includes:
[0036] Step S1: Obtain the first system operating status metric value of the first device.
[0037] In this embodiment, the execution entity is the first device. In this step, the first device acquires its own first system operating status metric. The first system operating status metric is a metric used to evaluate the operating status of the first system.
[0038] Since the communication involves a first device and a second device, one of which is the first device and the other is the second device, and the specific first device can be any one of the communicating devices, it can be understood that the first device can be either of the communicating devices. Furthermore, the communication establishment method based on security assessment proposed in this invention can be applied to both the first and second devices communicating with each other.
[0039] Step S2: In response to the first device successfully authenticating the second certificate of the second device and obtaining the information that the second device successfully authenticates the first certificate of the first device, a trusted third party is requested to authenticate the first system operating status of the first device based on the first system operating status metric.
[0040] The first device authenticates the second device's identity by verifying the second device's second certificate. The second device authenticates the first device's identity by verifying the first device's first certificate. If the first device successfully authenticates the second device's second certificate and receives information indicating that the second device has successfully authenticated the first device's first certificate, the first device requests a trusted third party to authenticate the first system's operational status based on a first system operational status metric. The request information sent by the first device to the trusted third party includes the first system operational status metric. If either the first device or the second device fails to authenticate the other's certificate, communication between them will not be established. The subsequent steps can be skipped, and the program can be terminated.
[0041] Step S3: In response to receiving the result of the second system operating status authentication of the second device sent by the trusted third party, and obtaining the result of the first system operating status authentication of the second device sent by the trusted third party, it is determined that communication is established between the first device and the second device; wherein, the second system operating status is the authentication performed by the trusted third party based on the second system operating status metric value of the second device requested by the second device.
[0042] Similarly, after obtaining a second system operating status metric used to measure the system status of the second device, the second device requests a trusted third party to authenticate the second system operating status. After the trusted third party successfully authenticates the first system operating status, it sends the authentication result to the second device. That is, although the request for authentication of the first system operating status is sent by the first device, the result of the authentication is sent to the second device, so that the second device can understand the system operating status of the first device. The request for authentication of the first system operating status may include information about the second device.
[0043] After a trusted third party successfully authenticates the operating status of the second system, it sends the authentication result to the first device. In other words, although the request for authentication of the second system's operating status originates from the second device, the authentication result is sent to the first device so that the first device can understand the operating status of the second system. The request for authentication of the second system's operating status may include information from the first device.
[0044] After receiving the authentication result of the second system's operating status from the trusted third party, the first device will send a message to the second device confirming receipt of the authentication result, indicating that the first device has determined that the second device's system operating status is normal. Similarly, after receiving the authentication result of the first system's operating status from the trusted third party, the second device will send a message to the first device confirming receipt of the authentication result, indicating that the second device has determined that the first device's system operating status is normal.
[0045] Therefore, if the first device receives the result of the second system operation status authentication of the second device sent by the trusted third party, and obtains the result of the second device receiving the first system operation status authentication of the trusted third party, it indicates that both the first device and the second device have confirmed the security of each other's system operation status, and normal communication between the first device and the second device can be established.
[0046] This invention places system state integrity authentication after traditional communication certificate authentication, constructing a two-dimensional authentication architecture from identity trust to state trust, thereby effectively defending against runtime injection and credential hijacking attacks with zero dedicated hardware cost, and providing a deployable defense-in-depth capability for resource-constrained scenarios.
[0047] The communication establishment method based on security assessment provided by this invention performs dual authentication on communication devices before the communication channel is established—verifying not only the identity of the digital certificate but also rigorously checking the underlying system state represented by the system operation state metric, ensuring that the operating environment has not been tampered with. This pre-emptive authentication mechanism moves the defense checkpoint to the initial stage of the attack chain, fundamentally blocking the possibility of malicious code execution, realizing a paradigm shift from "post-event response" to "pre-event immunity," significantly improving proactive defense capabilities. Furthermore, by introducing a third-party verification mechanism, it achieves an objective assessment of the system state of both communicating parties, improving the reliability of the security assessment. Moreover, this security assessment is based on a software mechanism and does not rely on a TPM module, enabling communication security assessment in a TPM-free environment.
[0048] According to a communication establishment method based on security assessment provided by the present invention, obtaining a first system operating status metric value of the first device includes: obtaining a first boot metric value according to a preset boot component of the first device during the system boot phase of the first device and before reading the grub.cfg file; obtaining a first operating metric value according to a preset operating component of the first device in response to obtaining communication trigger information with the second device; correspondingly, the second system operating status metric value includes a second boot metric value and a second operating metric value; the second boot metric value is obtained by the second device according to the preset boot component of the second device during the system boot phase of the second device and before reading the grub.cfg file; the second operating metric value is obtained by the second device according to the preset operating component of the second device in response to obtaining communication trigger information with the first device.
[0049] The first system operating status metrics include a first startup metric and a first operating metric. The first startup metric represents the system security status during the startup process of the first device, and is used to monitor whether critical startup components have been tampered with. The first operating metric represents the system security status after the first device starts up but before actual communication, and is used to monitor whether critical operating components have been tampered with. The critical startup components and critical operating components can be preset.
[0050] When the first device acquires its first system running status metric, it acquires the first boot metric based on its preset boot components before reading the grub.cfg file during the system boot phase. After acquiring communication trigger information with the second device, it acquires the first running metric based on its preset running components. Acquiring communication trigger information with the second device indicates that communication with the second device is imminent but has not yet occurred, such as before sending a handshake signal to the second device.
[0051] The second system operation status metrics include a second startup metric and a second operation metric. The second startup metric represents the system security status during the startup process of the second device, and is used to monitor whether critical startup components have been tampered with. The second operation metric represents the system security status after the second device starts up but before actual communication, and is used to monitor whether critical operation components have been tampered with.
[0052] When the second device acquires its second system operating status metric, it acquires the second boot metric based on a preset boot component before reading the grub.cfg file during the system boot phase. After acquiring the communication trigger information with the first device, it acquires the second operating metric based on a preset operating component. Acquiring the communication trigger information with the first device indicates that communication with the first device is about to begin but has not yet commenced, such as before sending a handshake signal to the first device.
[0053] The communication establishment method based on security assessment provided by this invention improves the accuracy of determining the system's operating status by acquiring startup and running metrics to characterize the system's operating status.
[0054] According to a communication establishment method based on security assessment provided by the present invention, the step of requesting a trusted third party to authenticate the first system operating status of the first device based on the first system operating status metric includes: requesting a first random number from the trusted third party; performing a first hash operation based on the first startup metric, the first operating metric, and the first random number to obtain a first hash value; encrypting the first hash value using the private key of the first device to obtain a first encrypted file; and sending the first startup metric, the first operating metric, the first random number, and the first encrypted file to the trusted third party to request the trusted third party to authenticate the first system operating status; wherein, the result of the first system operating status authentication being passed is that the trusted third party decrypts the first encrypted file using the public key of the first device to obtain the first hash value, performs the first hash operation based on the first startup metric, the first operating metric, and the first random number to obtain a second hash value, and makes the decision under the following conditions: the first hash value and the second hash value are consistent; the first random number is the latest random number sent by the trusted third party to the first device; the first startup metric is consistent with the baseline value of the first startup metric; and the first operating metric is consistent with the baseline value of the first operating metric.
[0055] The first device requests a trusted third party to authenticate the operating status of the first system. After the trusted third party authenticates the operating status of the first system, it sends the authentication result of the operating status of the first system to the second device.
[0056] When the first device requests authentication of the first system's operational status from a trusted third party, it first requests a random number from the trusted third party to prevent replay attacks. The trusted third party can generate a first random number based on a random number seed and the process identifier (PID) of the currently forked child process and send it to the first device. The trusted third party can use the XOR operation between the current timestamp and the process PID of the current child process as the random number seed, and then use a random number generation function to generate a random number. The random number generation mechanism does not need to be strictly limited to the combination of the random seed and the process PID; the key is that the output meets cryptographic security requirements—that is, it has high entropy, unpredictability, and resistance to replay attacks—to ensure the security of the authentication process.
[0057] The first device performs a first hash operation based on the first startup metric, the first running metric, and the first random number to obtain a first hash value. The first device encrypts the first hash value using its private key to obtain a first encrypted file. The first device then sends the first startup metric, the first running metric, the first random number, and the first encrypted file to a trusted third party to request the trusted third party to authenticate the operating status of the first system.
[0058] When authenticating the operating status of the first system, the trusted third party first decrypts the first encrypted file using the public key of the first device to obtain the first hash value. The trusted third party pre-stores the baseline values of the first startup metric and the first operating metric, sent by the first device in a secure environment. Provided the system status is confirmed to be secure, the first device can send the baseline values of its own first startup metric and the first operating metric to the trusted third party via out-of-band communication.
[0059] A trusted third party performs a first hash operation based on the first startup metric, the first running metric, and a first random number to obtain a second hash value. The trusted third party compares the first hash value with the second hash value, compares the first startup metric with its baseline value, compares the first running metric with its baseline value, and confirms that the first random number is the latest random number sent by the trusted third party to the first device. If the first hash value and the second hash value are consistent, the first random number is the latest random number sent by the trusted third party to the first device, the first startup metric is consistent with its baseline value, and the first running metric is consistent with its baseline value, the first system running status authentication is deemed successful; otherwise, the first system running status authentication is deemed unsuccessful.
[0060] The comparison between the first hash value and the second hash value is used to verify whether the first startup metric, the first running metric, and the first random number have been tampered with during transmission. A trusted third party can first compare the first hash value and the second hash value. If the data has not been tampered with during transmission, then the timeliness of the first random number, i.e., whether the first random number is fresh, can be determined. After confirming that the first random number is the most recently sent random number to the first device, the startup-related components are then compared with the first startup metric and its baseline value to determine whether they have been tampered with. Similarly, the running-related components are compared with the first running metric and its baseline value to determine whether they have been tampered with.
[0061] The trusted third party can generate a first random number queue locally based on the IP address of the first device. This queue stores the random numbers generated by the trusted third party for the first device. When the first device sends a message containing random numbers to the trusted third party, the trusted third party determines whether the obtained random number is fresh based on the locally stored random number queue.
[0062] When the first device performs a first hash operation based on the first startup metric, the first running metric, and the first random number to obtain the first hash value, it can concatenate the first startup metric, the first running metric, and the first random number in sequence, and then perform the first hash operation on the concatenated result to obtain the second hash value. A trusted third party performs the first hash operation based on the first startup metric, the first running metric, and the first random number using the same method as the first device to obtain the second hash value.
[0063] For example, the first hash value can be represented as:
[0064]
[0065] in, Indicates the first hash value. This indicates the first startup metric. This indicates the first running metric. Represents the first random number. This indicates the first hash operation. This indicates a splicing operation.
[0066] The communication establishment method based on security assessment provided by this invention determines whether the data during the data transmission process has been tampered with by comparing hash values, determines whether a replay attack has been suffered by using random numbers, and determines whether the system operating status is normal by comparing the first startup metric and the first running metric with a benchmark value, thereby improving the accuracy of the first system operating status judgment.
[0067] According to a communication establishment method based on security assessment provided by the present invention, the result of the second system operation status authentication of the second device is that, after receiving the second startup metric value, the second operation metric value, the second random number and the second encrypted file sent by the second device, the trusted third party decrypts the second encrypted file using the public key of the second device to obtain a third hash value, performs a second hash operation based on the second startup metric value, the second operation metric value and the second random number to obtain a fourth hash value, and determines that the third hash value and the fourth hash value are consistent, the second random number is the latest random number sent by the trusted third party to the second device, the second startup metric value and the base value of the second startup metric value are consistent, and the second operation metric value and the base value of the second operation metric value are consistent; wherein, the second encrypted file is obtained by the second device requesting the second random number from the trusted third party, performing the second hash operation based on the second startup metric value, the second operation metric value and the second random number to obtain the third hash value, and encrypting the third hash value using the private key of the second device.
[0068] The second device requests a trusted third party to authenticate the operating status of the second system. After the trusted third party authenticates the operating status of the second system, it sends the authentication result of the operating status of the second system to the first device.
[0069] When the second device requests authentication of the second system's operational status from a trusted third party, it first requests a random number from the trusted third party to prevent replay attacks. The trusted third party can generate a second random number based on the random number seed and the process PID of the currently forked child process and send it to the second device.
[0070] The second device performs a second hash operation based on the second startup metric, the second running metric, and the second random number to obtain a third hash value. The second device encrypts the third hash value using its private key to obtain a second encrypted file. The second device then sends the second startup metric, the second running metric, the second random number, and the second encrypted file to a trusted third party to request authentication of the second system's operating status.
[0071] When authenticating the operational status of the second system, the trusted third party first decrypts the second encrypted file using the public key of the second device to obtain a third hash value. The trusted third party pre-stores the baseline values of the second startup metric and the second operational metric sent by the second device in a secure environment. The trusted third party performs a second hash operation based on the second startup metric, the second operational metric, and a second random number to obtain a fourth hash value. The trusted third party compares the third and fourth hash values for consistency, the second startup metric for consistency with its baseline value, the second operational metric for consistency with its baseline value, and whether the second random number is the latest random number sent by the trusted third party to the second device. If the third and fourth hash values are consistent, the second random number is the latest random number sent by the trusted third party to the second device, the second startup metric is consistent with its baseline value, and the second operational metric is consistent with its baseline value, the authentication of the second system's operational status is deemed successful; otherwise, the authentication is deemed unsuccessful.
[0072] The communication establishment method based on security assessment provided by this invention determines whether the data has been tampered with during the data transmission process by comparing hash values, determines whether a replay attack has occurred by using random numbers, and determines whether the system is operating normally by comparing the second startup metric and the second running metric with a benchmark value, thereby improving the accuracy of the second system operating status judgment.
[0073] According to a communication establishment method based on security assessment provided by the present invention, the step of obtaining a first boot metric value according to a preset boot component of the first device includes: during the GRUB phase of system startup, reading grub.cfg file information, kernel file information, and initrd file information; performing an integrity measurement on the grub.cfg file according to the grub.cfg file information to obtain a first metric value; concatenating a first preset initial value and the first boot metric value in sequence, and then performing a hash operation to obtain a second metric value; performing an integrity measurement on the kernel file according to the kernel file information to obtain a third metric value; concatenating the second metric value and the third metric value in sequence, and then performing a hash operation to obtain a fourth metric value; performing an integrity measurement on the initrd file according to the initrd file information to obtain a fifth metric value; and concatenating the fourth metric value and the fifth metric value in sequence, and then performing a hash operation to obtain the first boot metric value.
[0074] Accordingly,
[0075] The second boot metric is obtained by the second device during the GRUB phase of system startup, by reading the grub.cfg file information, kernel file information, and initrd file information, performing an integrity metric on the grub.cfg file based on the grub.cfg file information to obtain a sixth metric, concatenating the second preset initial value with the sixth metric in sequence, and then performing a hash operation to obtain a seventh metric. The kernel file is then subjected to an integrity metric based on the kernel file information to obtain an eighth metric, concatenating the seventh metric with the eighth metric in sequence, and then performing a hash operation to obtain a ninth metric. Finally, the initrd file is subjected to an integrity metric based on the initrd file information to obtain a tenth metric, and the ninth metric and the tenth metric are concatenated in sequence and then subjected to a hash operation.
[0076] During the system startup phase, the first device acquires the first startup metric, IntegrityBoot. Before reading grub.cfg, the first device sequentially calculates the hash values of the critical startup components (grub.cfg, kernel, initrd) and expands these hash values strictly according to a predefined order to generate the first startup metric, IntegrityBoot. This value uniquely represents the integrity status of these three core components. If an attacker tampers with system components or exploits vulnerabilities to modify the contents of grub.cfg, kernel, or initrd, the re-measured IntegrityBoot value will change. In the subsequent system status authentication phase, a trusted third party compares the measured IntegrityBoot value with a pre-stored security baseline value. If the two do not match, the trusted third party determines that the system integrity has been compromised, and the second device will refuse to establish a secure communication channel with the first device, effectively blocking insecure communication.
[0077] The process of obtaining the first startup metric, IntegrityBoot, can be as follows:
[0078] During the GRUB phase of system startup, the first device reads information from the grub.cfg, kernel, and initrd files according to its configuration.
[0079] Perform integrity measurements on grub.cfg and then extend it. First, an initial value is needed as the extended integrity measurement value. Then, an integrity measurement is performed on grub.cfg to ensure that its contents have not been modified by an attacker. The calculated measurement value is... Finally, regarding and After concatenation, hash again to get Preparing for the expansion of kernel metrics.
[0080]
[0081] in, This represents the first preset initial value. Indicates the first metric value. This represents a hash operation. This indicates the second metric value.
[0082] The kernel undergoes integrity measurement and is then extended. First, the kernel's integrity is measured to ensure that its content has not been modified by an attacker; the calculated measurement value is... Then, regarding and After performing the AND operation, hash again to get Preparing for initrd metric expansion.
[0083]
[0084] in, Indicates the third metric value. This represents the fourth metric value.
[0085] Integrity measurement and expansion are performed on the initrd. First, integrity measurement is performed on the initrd to ensure that its contents have not been modified by an attacker. The calculated measurement value is... Then, regarding and After performing an AND operation, hash again to obtain the final first startup metric value, IntegrityBoot.
[0086]
[0087] in, This represents the fifth metric.
[0088] After the first boot metric is obtained, the system boot process continues, including reading grub.cfg, loading the kernel, and loading the initrd.
[0089] The second device can obtain the second boot metric value using a similar method. During the GRUB phase of system startup, the second device reads the grub.cfg file information, kernel file information, and initrd file information. It performs an integrity measurement on the grub.cfg file to obtain the sixth metric value. After concatenating the second preset initial value with the sixth metric value in sequence, it performs a hash operation to obtain the seventh metric value. It then performs an integrity measurement on the kernel file to obtain the eighth metric value. After concatenating the seventh and eighth metric values in sequence, it performs a hash operation to obtain the ninth metric value. Finally, it performs an integrity measurement on the initrd file to obtain the tenth metric value. After concatenating the ninth and tenth metric values in sequence, it performs a hash operation to obtain the second boot metric value.
[0090] The communication establishment method based on security assessment provided by this invention improves the accuracy of the first startup metric and the startup metric by obtaining the startup metric value through hash calculation and concatenation operation based on a preset startup component.
[0091] According to a communication establishment method based on security assessment provided by the present invention, the preset running components are two or more; the step of obtaining a first running metric value according to the preset running components of the first device includes: performing hash operations on each of the preset running components of the first device to obtain multiple first hash operation results; concatenating the multiple first hash operation results to obtain a first hash value concatenation result; further performing hash operations on the first hash value concatenation result to obtain the first running metric value; correspondingly, the second running metric value is obtained by the second device performing hash operations on each of the preset running components of the second device to obtain multiple second hash operation results, concatenating the multiple second hash operation results to obtain a second hash value concatenation result, and further performing hash operations on the second hash value concatenation result.
[0092] When communication between the first and second devices is triggered, the first device acquires a first runtime metric, IntegrityRuntime. The first device sequentially collects the hash values of preset runtime components such as executable programs, dynamic libraries, configuration files, service units, network status, and runtime logs to generate a unique first runtime metric, IntegrityRuntime, representing the integrity of the system runtime. This value is stored in a unified file. If an attacker tampers with any preset runtime component, the calculated IntegrityRuntime value will differ from the baseline value of the first runtime metric. During the system status authentication phase, a trusted third party compares this metric with a pre-stored security baseline value. If they do not match, the system integrity is deemed compromised, and the first and second devices will refuse to establish a secure communication channel, effectively blocking insecure communication.
[0093] The process of obtaining the first runtime metric, IntegrityRuntime, is illustrated below:
[0094] For example, if the preset running components for which system runtime integrity measurement is required are a, b, c, and d, then hash operations are performed on a, b, c, and d respectively to obtain hash values 123, 456, 789, and 000. The results are then concatenated according to the order of the hash operations to obtain 123456789000. This value is then hashed again to obtain the final first runtime metric value, IntegrityRuntime.
[0095] The preset running components are shown in the table below:
[0096]
[0097] Understandably, the composition of the default runtime components does not need to be fixed to a predefined set of executable programs, dynamic libraries, configuration files, service units, network status, and runtime logs. Instead, it should be dynamically trimmed and customized according to the security requirements and resource constraints of the actual deployment scenario to achieve the optimal balance between security strength and system overhead.
[0098] The communication establishment method based on security assessment provided by this invention improves the accuracy of operational metrics.
[0099] According to a communication establishment method based on security assessment provided by the present invention, before obtaining a first startup metric value according to a preset startup component of the first device, the method further includes: generating a first certificate signing request based on the public key of the first device and the device information of the first device, and sending the first certificate signing request to the trusted third party; receiving the first certificate generated by the trusted third party based on the first certificate signing request; wherein, the first certificate is obtained by the trusted third party performing a third hash operation on the public key of the first device and the device information of the first device to obtain a fifth hash value, and then performing a first asymmetric encryption on the fifth hash value using the private key of the trusted third party to obtain a first encrypted hash value, based on the first certificate metadata, the first certificate core information, and the first certificate signature information; wherein, the first certificate core information includes the public key of the first device and the device information of the first device; the first certificate signature information includes the hash algorithm corresponding to the third hash operation, the asymmetric encryption algorithm corresponding to the first asymmetric encryption, and the first encrypted hash value;
[0100] Before requesting a trusted third party to authenticate the first system operating status of the first device based on the first system operating status metric, the method further includes: sending the first certificate to the second device for the second device to authenticate the first certificate; receiving a second certificate sent by the second device to authenticate the second certificate;
[0101] The second certificate is obtained by the trusted third party after receiving a second certificate signing request from the second device, which includes the public key and device information of the second device. The trusted third party performs a fourth hash operation on the public key and device information of the second device to obtain a sixth hash value, and then performs a second asymmetric encryption on the sixth hash value using the private key of the trusted third party to obtain a second encrypted hash value. This is based on the second certificate metadata, the second certificate core information, and the second certificate signature information. The second certificate core information includes the public key and device information of the second device; the second certificate signature information includes the hash algorithm corresponding to the fourth hash operation, the asymmetric encryption algorithm corresponding to the second asymmetric encryption, and the second encrypted hash value.
[0102] The first device needs to apply for a first certificate from a trusted third party in advance, so that the second device can authenticate the first certificate. The second device needs to apply for a second certificate from a trusted third party in advance, so that the first device can authenticate the second certificate.
[0103] When the first device applies for a first certificate from a trusted third party, it generates a first certificate signing request based on its public key and device information, and sends the first certificate signing request to the trusted third party. The first certificate signing request includes the first device's public key and device information. The first device's public key can be derived from its private key.
[0104] After receiving the first certificate signing request, the trusted third party performs a third hash operation on the public key and device information of the first device to obtain a fifth hash value. Then, it uses the trusted third party's private key to perform a first asymmetric encryption on the fifth hash value to obtain a first encrypted hash value. Based on the first certificate metadata, the first certificate core information, and the first certificate signature information, the first certificate certificate is obtained. The first certificate core information includes the public key and device information of the first device. The first certificate signature information includes the hash algorithm corresponding to the third hash operation, the asymmetric encryption algorithm corresponding to the first asymmetric encryption, and the first encrypted hash value. The first certificate metadata includes the certificate version number, certificate owner, certificate validity period, and other information of the first certificate.
[0105] Before requesting a trusted third party to authenticate the first system's operating status based on the first system's operating status metric, the first device sends a first certificate to the second device for the second device to authenticate the first certificate; and receives a second certificate sent by the second device to authenticate the second certificate.
[0106] When the second device applies for a second certificate from a trusted third party, it generates a second certificate signing request based on its public key and device information, and sends the second certificate signing request to the trusted third party. The second certificate signing request includes the second device's public key and device information.
[0107] After receiving the second certificate signing request, the trusted third party performs a fourth hash operation on the public key and device information of the second device to obtain a sixth hash value. Then, it performs a second asymmetric encryption on the sixth hash value using its private key to obtain a second encrypted hash value. Finally, it obtains the second certificate based on the second certificate metadata, the second certificate core information, and the second certificate signature information. The second certificate core information includes the public key and device information of the second device. The second certificate signature information includes the hash algorithm corresponding to the fourth hash operation, the asymmetric encryption algorithm corresponding to the second asymmetric encryption, and the second encrypted hash value. The second certificate metadata includes the certificate version number, certificate owner, and certificate validity period.
[0108] The communication establishment method based on security assessment provided by this invention enables the acquisition of digital certificates for identity authentication through a trusted third party, and the digital certificates are signed using the private key of the trusted third party, thereby improving the reliability of identity authentication.
[0109] According to a communication establishment method based on security assessment provided by the present invention, the authentication of the second certificate includes: verifying whether the metadata of the second certificate meets the requirements; in response to the second certificate metadata meeting the requirements, comparing the asymmetric encryption algorithm corresponding to the second asymmetric encryption with the algorithm adopted by the public key of the trusted third party; in response to the asymmetric encryption algorithm corresponding to the second asymmetric encryption being consistent with the algorithm adopted by the public key of the trusted third party, decrypting the second encrypted hash value using the public key of the trusted third party to obtain the sixth hash value; performing a hash operation on the public key of the second device and the device information of the second device according to the hash algorithm corresponding to the fourth hash operation to obtain the seventh hash value; in response to the sixth hash value being consistent with the seventh hash value, determining that the second certificate authentication is successful;
[0110] Accordingly,
[0111] The result of the first certificate authentication is that the second device verifies whether the first certificate metadata meets the requirements. In response to the first certificate metadata meeting the requirements, the asymmetric encryption algorithm corresponding to the first asymmetric encryption is compared with the algorithm adopted by the public key of the trusted third party. In response to the first asymmetric encryption algorithm corresponding to the first asymmetric encryption being consistent with the algorithm adopted by the public key of the trusted third party, the first encrypted hash value is decrypted using the public key of the trusted third party to obtain the fifth hash value. The public key of the first device and the device information of the first device are hashed according to the hash algorithm corresponding to the third hash operation to obtain the eighth hash value. The eighth hash value is determined in response to the fifth hash value being consistent with the eighth hash value.
[0112] When the first device authenticates the second certificate, it can first verify whether the metadata of the second certificate meets the requirements, such as whether it is within the validity period. If the metadata of the second certificate meets the requirements, it compares the asymmetric encryption algorithm corresponding to the second asymmetric encryption with the algorithm adopted by the public key of the trusted third party. If the asymmetric encryption algorithm corresponding to the second asymmetric encryption is consistent with the algorithm adopted by the public key of the trusted third party, it decrypts the second encryption hash value using the public key of the trusted third party to obtain the sixth hash value. It then performs a hash operation on the public key of the second device and the device information of the second device according to the hash algorithm corresponding to the fourth hash operation to obtain the seventh hash value. If the sixth hash value is consistent with the seventh hash value, the second certificate authentication is confirmed to be successful; otherwise, the second certificate authentication is confirmed to be unsuccessful.
[0113] When the second device authenticates the first certificate, it can first verify whether the first certificate metadata meets the requirements, such as whether it is within the validity period. If the first certificate metadata meets the requirements, it compares the asymmetric encryption algorithm corresponding to the first asymmetric encryption with the algorithm adopted by the public key of the trusted third party. If the asymmetric encryption algorithm corresponding to the first asymmetric encryption is consistent with the algorithm adopted by the public key of the trusted third party, it decrypts the first encryption hash value using the public key of the trusted third party to obtain the fifth hash value. It then performs a hash operation on the public key of the first device and the device information of the first device according to the hash algorithm corresponding to the third hash operation to obtain the eighth hash value. If the fifth hash value is consistent with the eighth hash value, it is determined that the first certificate authentication is successful; otherwise, it is determined that the first certificate authentication is unsuccessful.
[0114] The certificate authentication phase, taking the mutual certificate authentication between the server and the client as an example, can include the following process:
[0115] The client and server request certificates from each other and authenticate with each other. After successful authentication, the server sends the symmetric key negotiation parameters to the client for subsequent symmetric key negotiation.
[0116] (1) The client initiates a connection request to the server and sends a ClientHello message containing information such as the supported TLS version, cipher suite information, and random number.
[0117] (2) After receiving the message, the server sends a ServerHello message to the client, which includes the selected TLS version, the selected cipher suite, the random number, the session ID and other information.
[0118] (3) The server sends the server certificate CertServer to the client for authentication and the message ReqCert to request the client certificate.
[0119] (4) After the client verifies the server certificate, the client sends the client certificate CertClient to the server for the server to perform identity authentication.
[0120] (5) After the server verifies the client's certificate, it sends the symmetric key parameter DHparams, which is used to negotiate the symmetric key, to the client. Both parties generate a symmetric key based on the symmetric key parameter DHparams, their own private key, and the other party's public key for encrypted communication after system status authentication.
[0121] The communication establishment method based on security assessment provided by this invention improves the accuracy of digital certificate authentication.
[0122] Figure 2 This is the second flowchart illustrating the communication establishment method based on security assessment provided by this invention. The method is used for trusted third parties, such as... Figure 2 As shown, the method includes:
[0123] Step S101: Receive a first system operation status authentication request sent by the first device; wherein, the first system operation status authentication request includes the first system operation status metric value of the first device.
[0124] Step S102: Authenticate the first system operating status of the first device based on the first system operating status metric, and send the authentication result of the first system operating status to the second device.
[0125] Step S103: Receive the second system operation status authentication request sent by the second device; wherein, the second system operation status authentication request includes the second system operation status metric value of the second device.
[0126] Step S104: Authenticate the second system operating status of the second device according to the second system operating status metric, and send the authentication result of the second system operating status to the first device.
[0127] This invention proposes a communication establishment method based on security assessment in a TPM-free environment, which combines the traditional certificate-based authentication method of channels with the system operating status to build a trust chain from bootloader startup to application operation.
[0128] The trusted third party, as the core trusted entity of this invention, undertakes three key responsibilities: first, to issue digital certificates to the communicating parties to support the foundation of identity authentication; second, to generate and securely distribute random numbers to both communicating parties to enhance session freshness and resist replay attacks; and third, to verify and authenticate the system status metrics reported by both communicating parties based on pre-obtained benchmark values.
[0129] The communication establishment method based on security assessment by a trusted third party corresponds to the communication establishment method based on security assessment of the first device described in the above embodiments, and will not be repeated here.
[0130] The communication establishment method based on security assessment provided by this invention performs dual authentication on communication devices before the communication channel is established—verifying not only the identity of the digital certificate but also rigorously checking the underlying system state represented by the system operation state metric, ensuring that the operating environment has not been tampered with. This pre-emptive authentication mechanism moves the defense checkpoint to the initial stage of the attack chain, fundamentally blocking the possibility of malicious code execution, realizing a paradigm shift from "post-event response" to "pre-event immunity," significantly improving proactive defense capabilities. Furthermore, by introducing a third-party verification mechanism, it achieves an objective assessment of the system state of both communicating parties, improving the reliability of the security assessment. Moreover, this security assessment is based on a software mechanism and does not rely on a TPM module, enabling communication security assessment in a TPM-free environment.
[0131] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3 As shown, the electronic device may include a processor 310, a communications interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communications interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute the communication establishment method based on security assessment provided in the above embodiments.
[0132] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0133] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer is able to execute the communication establishment method based on security assessment provided in the above embodiments.
[0134] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the communication establishment method based on security assessment provided in the above embodiments.
[0135] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0136] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0137] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
[0139] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A communication establishment method based on security assessment, characterized in that, The method is used in a first device, and the method includes: Obtain the first system operating status metric value of the first device; In response to the first device successfully authenticating the second certificate of the second device and obtaining information that the second device successfully authenticates the first certificate of the first device, a trusted third party is requested to authenticate the first system operating status of the first device based on the first system operating status metric. In response to receiving the result of the second system operating status authentication of the second device sent by the trusted third party, and obtaining the result of the first system operating status authentication of the second device sent by the trusted third party, it is determined that communication is established between the first device and the second device; wherein, the second system operating status is the authentication performed by the trusted third party based on the second system operating status metric value of the second device requested by the second device; The first system operating status metric includes a first startup metric and a first operating metric, and the second system operating status metric includes a second startup metric and a second operating metric. The request for a trusted third party to authenticate the first system operating status of the first device based on the first system operating status metric includes: Request a first random number from the trusted third party; A first hash value is obtained by performing a first hash operation based on the first startup metric, the first running metric, and the first random number; The first hash value is encrypted using the private key of the first device to obtain a first encrypted file. The first startup metric, the first running metric, the first random number, and the first encrypted file are then sent to the trusted third party to request the trusted third party to authenticate the operating status of the first system. The result of the first system running status authentication is that the trusted third party uses the public key of the first device to decrypt the first encrypted file to obtain the first hash value, performs the first hash operation based on the first startup metric value, the first running metric value and the first random number to obtain the second hash value, and makes the decision under the following conditions: the first hash value and the second hash value are consistent, the first random number is the latest random number sent by the trusted third party to the first device, the first startup metric value and the base value of the first startup metric value are consistent, and the first running metric value and the base value of the first running metric value are consistent. The result of the second system operation status authentication of the second device is that after receiving the second startup metric value, the second operation metric value, the second random number and the second encrypted file sent by the second device, the trusted third party decrypts the second encrypted file using the public key of the second device to obtain the third hash value, performs a second hash operation based on the second startup metric value, the second operation metric value and the second random number to obtain the fourth hash value, and makes the decision under the following conditions: the third hash value and the fourth hash value are consistent, the second random number is the latest random number sent by the trusted third party to the second device, the second startup metric value and the base value of the second startup metric value are consistent, and the second operation metric value and the base value of the second operation metric value are consistent. The second encrypted file is obtained by the second device requesting the second random number from the trusted third party, performing the second hash operation based on the second startup metric, the second running metric, and the second random number to obtain the third hash value, and then encrypting the third hash value using the private key of the second device.
2. The communication establishment method based on security assessment according to claim 1, characterized in that, The step of obtaining the first system operating status metric value of the first device includes: obtaining the first boot metric value according to the preset boot components of the first device during the system boot phase of the first device and before reading the grub.cfg file; and obtaining the first operating metric value according to the preset operating components of the first device in response to obtaining communication trigger information with the second device. Accordingly, the second boot metric is obtained by the second device during the system boot phase of the second device, before reading the grub.cfg file, based on the preset boot component of the second device; the second running metric is obtained by the second device in response to obtaining communication trigger information with the first device, based on the preset running component of the second device.
3. The communication establishment method based on security assessment according to claim 2, characterized in that, The step of obtaining the first boot metric value according to the preset boot components of the first device includes: during the GRUB stage of system boot, reading grub.cfg file information, kernel file information, and initrd file information; performing an integrity measurement on the grub.cfg file based on the grub.cfg file information to obtain a first metric value; concatenating the first preset initial value and the first boot metric value in sequence, and then performing a hash operation to obtain a second metric value; performing an integrity measurement on the kernel file based on the kernel file information to obtain a third metric value; concatenating the second metric value and the third metric value in sequence, and then performing a hash operation to obtain a fourth metric value; performing an integrity measurement on the initrd file based on the initrd file information to obtain a fifth metric value; and concatenating the fourth metric value and the fifth metric value in sequence, and then performing a hash operation to obtain the first boot metric value. Accordingly, The second boot metric is obtained by the second device during the GRUB phase of system startup, by reading the grub.cfg file information, kernel file information, and initrd file information, performing an integrity metric on the grub.cfg file based on the grub.cfg file information to obtain a sixth metric, concatenating the second preset initial value with the sixth metric in sequence, and then performing a hash operation to obtain a seventh metric. The kernel file is then subjected to an integrity metric based on the kernel file information to obtain an eighth metric, concatenating the seventh metric with the eighth metric in sequence, and then performing a hash operation to obtain a ninth metric. Finally, the initrd file is subjected to an integrity metric based on the initrd file information to obtain a tenth metric, and the ninth metric and the tenth metric are concatenated in sequence and then subjected to a hash operation.
4. The communication establishment method based on security assessment according to claim 2, characterized in that, The preset running components are two or more; The step of obtaining the first operating metric value based on the preset operating components of the first device includes: performing a hash operation on each of the preset operating components of the first device to obtain a plurality of first hash operation results; concatenating the plurality of first hash operation results to obtain a first hash value concatenation result; and further performing a hash operation on the first hash value concatenation result to obtain the first operating metric value. Accordingly, The second operating metric is obtained by the second device performing hash operations on each of the preset operating components of the second device to obtain multiple second hash operation results, concatenating the multiple second hash operation results to obtain a second hash value concatenation result, and further performing hash operations on the second hash value concatenation result.
5. The communication establishment method based on security assessment according to claim 2, characterized in that, Before obtaining the first startup metric value based on the preset startup component of the first device, the method further includes: A first certificate signing request is generated based on the public key of the first device and the device information of the first device, and the first certificate signing request is sent to the trusted third party; The system receives the first certificate generated by the trusted third party based on the first certificate signing request; wherein the first certificate is obtained by the trusted third party performing a third hash operation on the public key and device information of the first device to obtain a fifth hash value, and then performing a first asymmetric encryption on the fifth hash value using the private key of the trusted third party to obtain a first encrypted hash value, based on the first certificate metadata, the first certificate core information, and the first certificate signature information; wherein the first certificate core information includes the public key and device information of the first device; the first certificate signature information includes the hash algorithm corresponding to the third hash operation, the asymmetric encryption algorithm corresponding to the first asymmetric encryption, and the first encrypted hash value; Before requesting a trusted third party to authenticate the first system operating status of the first device based on the first system operating status metric, the method further includes: The first certificate is sent to the second device so that the second device can authenticate the first certificate; Receive the second certificate sent by the second device, and authenticate the second certificate; The second certificate is obtained by the trusted third party after receiving a second certificate signing request from the second device, which includes the public key and device information of the second device. The trusted third party performs a fourth hash operation on the public key and device information of the second device to obtain a sixth hash value, and then performs a second asymmetric encryption on the sixth hash value using the private key of the trusted third party to obtain a second encrypted hash value. This is based on the second certificate metadata, the second certificate core information, and the second certificate signature information. The second certificate core information includes the public key and device information of the second device; the second certificate signature information includes the hash algorithm corresponding to the fourth hash operation, the asymmetric encryption algorithm corresponding to the second asymmetric encryption, and the second encrypted hash value.
6. The communication establishment method based on security assessment according to claim 5, characterized in that, The authentication of the second certificate includes: verifying whether the metadata of the second certificate meets the requirements; in response to the second certificate metadata meeting the requirements, comparing the asymmetric encryption algorithm corresponding to the second asymmetric encryption with the algorithm adopted by the public key of the trusted third party; in response to the asymmetric encryption algorithm corresponding to the second asymmetric encryption being consistent with the algorithm adopted by the public key of the trusted third party, decrypting the second encrypted hash value using the public key of the trusted third party to obtain the sixth hash value; performing a hash operation on the public key of the second device and the device information of the second device according to the hash algorithm corresponding to the fourth hash operation to obtain the seventh hash value; in response to the sixth hash value being consistent with the seventh hash value, determining that the second certificate authentication is successful. Accordingly, The result of the first certificate authentication is that the second device verifies whether the first certificate metadata meets the requirements. In response to the first certificate metadata meeting the requirements, the asymmetric encryption algorithm corresponding to the first asymmetric encryption is compared with the algorithm adopted by the public key of the trusted third party. In response to the first asymmetric encryption algorithm corresponding to the first asymmetric encryption being consistent with the algorithm adopted by the public key of the trusted third party, the first encrypted hash value is decrypted using the public key of the trusted third party to obtain the fifth hash value. The public key of the first device and the device information of the first device are hashed according to the hash algorithm corresponding to the third hash operation to obtain the eighth hash value. The eighth hash value is determined in response to the fifth hash value being consistent with the eighth hash value.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the communication establishment method based on security assessment as described in any one of claims 1 to 6.