Bmc data writing method, system, device and medium

CN117932691BActive Publication Date: 2026-09-18INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410019169.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-05
Publication Date
2026-09-18
Estimated Expiration
2044-01-05

AI Technical Summary

Technical Problem

当前的技术方案并未对这部分代码进行单独管理,因此需要在新的方案中予以考虑和改进

Benefits of technology

[0059] This application provides a BMC data writing method, comprising: a trusted platform module responding to a received BMC data writing request initiated by a user by performing a first security verification on the BMC secure space storing a portion of the BMC code; after the first security verification passes, the trusted platform module authenticates the BMC data writing request; after the authentication passes, the trusted platform module generates a first hash value of the original write data contained in the data writing request and generates first data to be authenticated based on the first hash value and the original data; the trusted platform module generates second data to be authenticated based on the first data to be authenticated and the status information of the server system, and digitally signs the second data to be authenticated; responding to receiving a public key distributed by the trusted platform module, performing a second security verification on the digital signature, and writing the original write data into the BMC secure space after the second security verification passes. By managing the BMC code separately in the secure code space and performing multi-factor authentication when writing data to the BMC secure space, the overall security, integrity, and reliability of the BMC are improved, thereby ensuring the secure operation of the server system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117932691B_ABST
    Figure CN117932691B_ABST
Patent Text Reader

Abstract

The application provides a BMC data writing method, system, device and medium, comprising: a trusted platform module performing first security verification on a BMC security space storing BMC part code in response to a received user-initiated BMC data writing request; after the first security verification passes, the trusted platform module performs identity authentication on the BMC data writing request; after the identity authentication passes, the trusted platform module generates a first hash value of original writing data contained in the data writing request and generates first to-be-authenticated data according to the first hash value and the original data; the trusted platform module generates second to-be-authenticated data according to the first to-be-authenticated data and state information of a server system and performs digital signature; in response to receiving a public key distributed by the trusted platform module, performing second security verification on the digital signature, and after passing, writing the original writing data into the BMC security space. Multiple authentications are performed when writing data, thereby improving the overall security and integrity of the BMC.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of security technology, and in particular to a BMC data writing method, system, device and medium. Background Technology

[0002] With the rapid development and widespread application of information technology, human society has entered a new Internet era. The BMC (baseboard management controller), as the baseboard management controller for servers, is essentially an embedded system based on an ARM chip. During use, it faces security risks such as compromised program integrity, operating system attacks, malicious code implantation in web applications, and data leaks. In current technical solutions, the BMC firmware consists of multiple processes. However, when there are problems writing data or when it is illegally accessed and tampered with, the BMC may fail to boot properly, which can seriously affect information security and even damage the chip.

[0003] Therefore, to address the security issues of the BMC, the relevant code needs to be incorporated into a secure code space and subjected to a higher level of trusted authentication. By managing the BMC program separately within the secure code space, it can be ensured that the BMC maintains its integrity and reliability in the face of potential attacks and risks, thus providing a more trustworthy server management and operating environment. Especially for processes that support the most basic server functions, their stable operation is crucial for normal BMC web login and interaction with the BIOS. Current technical solutions do not manage this part of the code separately, therefore, it needs to be considered and improved in the new solution.

[0004] Therefore, there is an urgent need for a method to maintain the integrity and security of BMC code when writing data to BMC in order to solve the above-mentioned technical problems. Summary of the Invention

[0005] Therefore, it is necessary to provide a BMC data writing method to address the aforementioned technical issues and ensure the integrity and reliability of the BMC code.

[0006] Firstly, this application provides a BMC data writing method, the method comprising:

[0007] In response to a user-initiated BMC data write request, the trusted platform module performs a first security verification on the BMC security space where some BMC code is stored.

[0008] After the first security verification is passed, the trusted platform module authenticates the BMC data write request;

[0009] After the authentication is successful, the trusted platform module generates a first hash value of the original write data contained in the data write request and generates first data to be authenticated based on the first hash value and the original data.

[0010] The trusted platform module generates second data to be authenticated based on the first data to be authenticated and the status information of the server system, and digitally signs the second data to be authenticated.

[0011] In response to receiving the public key distributed by the trusted platform module, the digital signature is subjected to a second security verification, and after the second security verification is passed, the original written data is written to the BMC security space.

[0012] In some embodiments, the BMC data write request includes an authentication key, and the trusted platform module authenticates the BMC data write request, including:

[0013] Verify whether the authentication key is registered in the authenticator's key database;

[0014] If the authentication key is registered in the authenticator's key repository, then the authentication is successful;

[0015] If the authentication key is not registered in the key database of the authenticator, an authorization request is sent to the authenticator to determine whether the authenticator agrees to authorize the user who is currently initiating the BMC data write request.

[0016] If the authenticator agrees to the authorization, the authentication is successful; otherwise, the authentication fails.

[0017] In some embodiments, the method further includes:

[0018] The trusted platform module stores the first hash value in the platform configuration register built into the trusted platform module;

[0019] The trusted platform module generates a second hash value based on the server's status information and stores the second hash value in the platform configuration register;

[0020] The trusted platform module monitors the first hash value and the second hash value in the platform configuration register, and issues an alarm if it detects a change in the first hash value or the second hash value.

[0021] In some embodiments, the method further includes:

[0022] A BMC security space is allocated in the server system to store a portion of the BMC code;

[0023] The BMC security space generates a key pair based on the random number provided by the trusted platform module and provides the key pair to the trusted platform module.

[0024] In some embodiments, the first security verification includes metric authentication and key authentication, wherein the metric authentication includes:

[0025] The trusted platform module responds to the BMC security space verification request initiated by the user and obtains the current root trust metric.

[0026] Compare the current root trust metric with the preset metric that is pre-existing in the trusted platform module;

[0027] If the current root trust metric matches the preset metric, then the metric authentication is successful;

[0028] If the current root trust metric is inconsistent with the preset metric, the metric authentication fails.

[0029] In some embodiments, the key authentication includes:

[0030] The BMC security space generates a key authentication request and encrypts the key authentication request using the public key within the key pair;

[0031] The BMC security space sends the encrypted key authentication request to the trusted platform module.

[0032] The trusted platform module decrypts the encrypted key authentication request based on the private key in the key pair;

[0033] If the trusted platform module successfully decrypts the key authentication request, the key authentication is successful; otherwise, the key authentication fails.

[0034] In some embodiments, the trusted platform module performs a first security verification on the BMC security space where the BMC portion of the code is stored, including:

[0035] If the metric authentication and key authentication are successful, then the first security verification is successful;

[0036] If the metric authentication and / or key authentication fails, the first security verification fails and an alarm is triggered;

[0037] If key authentication fails, the BMC security space will regenerate the key pair.

[0038] Secondly, this application provides a BMC data writing system, the system comprising:

[0039] The first security verification module is used to perform the first security verification on the BMC security space where the BMC part of the code is stored in response to the received BMC data write request initiated by the trusted platform module.

[0040] The second security verification module is used to authenticate the BMC data write request using the trusted platform module after the first security verification is passed.

[0041] The data processing module is configured to, after the authentication is passed, use the trusted platform module to generate a first hash value of the original write data contained in the data write request and generate first data to be authenticated based on the first hash value and the original data;

[0042] The data processing module is further configured to use the trusted platform module to generate second data to be authenticated based on the first data to be authenticated and the status information of the server system, and to digitally sign the second data to be authenticated.

[0043] The second security verification module is further configured to use the server system to perform a second security verification on the digital signature based on the public key distributed by the trusted platform module, and write the original written data into the BMC security space after the second security verification is passed.

[0044] Thirdly, this application provides an electronic device, the electronic device comprising:

[0045] One or more processors;

[0046] and a memory associated with the one or more processors, the memory storing program instructions that, when read and executed by the one or more processors, perform the following operations:

[0047] In response to a user-initiated BMC data write request, the trusted platform module performs a first security verification on the BMC security space where some BMC code is stored.

[0048] After the first security verification is passed, the trusted platform module authenticates the BMC data write request;

[0049] After the authentication is successful, the trusted platform module generates a first hash value of the original write data contained in the data write request and generates first data to be authenticated based on the first hash value and the original data.

[0050] The trusted platform module generates second data to be authenticated based on the first data to be authenticated and the status information of the server system, and digitally signs the second data to be authenticated.

[0051] In response to receiving the public key distributed by the trusted platform module, the digital signature is subjected to a second security verification, and after the second security verification is passed, the original written data is written to the BMC security space.

[0052] Fourthly, this application also provides a computer-readable storage medium storing a computer program that causes a computer to perform the following operations:

[0053] In response to a user-initiated BMC data write request, the trusted platform module performs a first security verification on the BMC security space where some BMC code is stored.

[0054] After the first security verification is passed, the trusted platform module authenticates the BMC data write request;

[0055] After the authentication is successful, the trusted platform module generates a first hash value of the original write data contained in the data write request and generates first data to be authenticated based on the first hash value and the original data.

[0056] The trusted platform module generates second data to be authenticated based on the first data to be authenticated and the status information of the server system, and digitally signs the second data to be authenticated.

[0057] In response to receiving the public key distributed by the trusted platform module, the digital signature is subjected to a second security verification, and after the second security verification is passed, the original written data is written to the BMC security space.

[0058] The beneficial effects achieved by this application are as follows:

[0059] This application provides a BMC data writing method, comprising: a trusted platform module responding to a received BMC data writing request initiated by a user by performing a first security verification on the BMC secure space storing a portion of the BMC code; after the first security verification passes, the trusted platform module authenticates the BMC data writing request; after the authentication passes, the trusted platform module generates a first hash value of the original write data contained in the data writing request and generates first data to be authenticated based on the first hash value and the original data; the trusted platform module generates second data to be authenticated based on the first data to be authenticated and the status information of the server system, and digitally signs the second data to be authenticated; responding to receiving a public key distributed by the trusted platform module, performing a second security verification on the digital signature, and writing the original write data into the BMC secure space after the second security verification passes. By managing the BMC code separately in the secure code space and performing multi-factor authentication when writing data to the BMC secure space, the overall security, integrity, and reliability of the BMC are improved, thereby ensuring the secure operation of the server system. Attached Figure Description

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

[0061] Figure 1 This is a schematic diagram of a BMC data writing method provided in an embodiment of this application;

[0062] Figure 2 This is a schematic diagram of the internal space division of a BMC provided in an embodiment of this application;

[0063] Figure 3 This is a flowchart of a BMC data writing method provided in an embodiment of this application;

[0064] Figure 4 This is a BMC data writing system architecture diagram provided in an embodiment of this application;

[0065] Figure 5 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

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

[0067] It should be understood that, in the description of this application, unless the context explicitly requires it, the words "comprising," "including," and similar terms throughout the specification and claims should be interpreted as encompassing rather than being exclusive or exhaustive; that is, meaning "including but not limited to."

[0068] It should also be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0069] It should be noted that the terms "S1," "S2," etc., are used only for descriptive purposes and do not specifically refer to the order or sequence, nor are they intended to limit this application. They are merely for the convenience of describing the method of this application and should not be construed as indicating the sequential order of the steps. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0070] As described in the background section, current BMC firmware consists of multiple processes. However, if the written program has problems or is illegally accessed and tampered with, the BMC may fail to boot properly, which can seriously affect information security and even damage the chip. Furthermore, security authentication technologies like Intel SGX are not widely used in the server field. The BMC program contains many processes, and if processes supporting basic server functions, such as lighttpd and IPMI, fail to start, the BMC web interface cannot log in to view information, or even interact with the BIOS, causing a system crash. Usually, the only solution is to replace the BMC chip or re-flash the flash memory. Therefore, this related code should be managed separately in a secure code space and subjected to a higher level of trusted authentication.

[0071] Therefore, this application proposes to improve the overall security, integrity, and reliability of the BMC by managing the BMC program separately in a secure code space and using a higher level of trusted authentication methods for changes to the BMC code, thereby ensuring the secure operation of the server system.

[0072] Example 1

[0073] This application provides a BMC data writing method, specifically applied to a server system, such as... Figure 1 As shown, the method disclosed in the embodiments of this application enables secure writing of BMC data, including the following:

[0074] S1. In response to the received BMC data write request initiated by the user, the trusted platform module performs the first security verification on the BMC security space where some BMC code is stored.

[0075] It should be noted that the Trusted Platform Module (TPM) is a hardware security module designed to protect computer security; it has multiple security functions such as encryption, digital signature, random number generation, and key storage. The TPM stores keys in its own chip, enabling secure key generation, storage, and management within a specified timeframe, thus providing a higher level of security. In this embodiment, the TPM is deployed on a computer device to ensure that BMC data is not tampered with or stolen during the writing process.

[0076] It is understandable that the BMC data writing method provided in this application is based on storing the BMC code within a secure space allocated within the BMC. Specifically, for example... Figure 2 As shown, Intel SGX technology can be used to partition a memory region within the BMC chip area, called an enclave, to isolate code running within the enclave from other processes running at the same or higher priority, such as applications, operating systems, and hypervisors. This application refers to the aforementioned memory region as the BMC secure code space. Intel SGX is a technology developed to meet the needs of the trusted computing industry. It is similar to ARM Trust Zone technology, but Intel SGX is designed for desktop and server platforms; Intel SGX allows userspace code to create private memory regions.

[0077] The BMC security space generates key pairs based on random numbers provided by the trusted platform module and then provides these key pairs to the trusted platform module. Specifically, the BMC security space first needs to generate a key pair for key authentication. This can be achieved by the trusted platform module generating a random number as the key seed. Then, using the randomly generated key seed, a public key and private key (i.e., a key pair) for the BMC security space are generated through cryptographic methods. This key pair can be used for encryption, authentication, digital signatures, and key exchange. The generated key is then stored internally within the trusted platform module. The key pair generation method can utilize the key generation algorithm within the RSA encryption algorithm. Based on two randomly generated prime numbers p and q, n = pq is calculated, and the Euler's totient function φ(n) of n is calculated: φ(n) = (p-1)(q-1). A smaller positive integer e, coprime to φ(n), is selected. The modular inverse element d of e with respect to φ(n) is calculated. The "modular inverse element" refers to an integer d such that ed divided by φ(n) leaves a remainder of 1. n and e are encapsulated into a public key, and n and d are encapsulated into a private key. By implementing the partitioning of the BMC security space, the BMC code is isolated from other processes. Furthermore, by encrypting the BMC security space, a secure execution environment is established, ensuring that the BMC code executes in a trusted environment.

[0078] Specifically, the first security verification of the BMC security space storing part of the BMC code includes metric authentication and key authentication of the BMC security space.

[0079] The measurement authentication specifically includes: The Trusted Platform Module responds to the user-initiated BMC security space verification request by obtaining the current Root of Trust Measurement (RTM); comparing the current RTM with a preset measurement stored in the Trusted Platform Module; if the current RTM matches the preset measurement, the measurement authentication passes; if the current RTM does not match the preset measurement, the measurement authentication fails. It is understood that a new RTM is generated each time the server starts. Therefore, by comparing it with the previously stored measurement (i.e., the preset measurement) in the Trusted Platform Module, it can be determined whether the BMC security space has changed. Only when the RTM has not changed can it be determined that the BMC security space has not been tampered with; this process can also be called "secure startup" or "trusted startup." If the security code space has been tampered with, authentication failure is immediately reported to avoid data leakage and damage to the security code space; this further protects the security and integrity of the data in the BMC chip, providing a more trusted environment for server management and operation.

[0080] Preferably, the root trust metric value can be stored in the Platform Configuration Register (PCR) of the Trusted Platform Module to protect the root trust metric value and reduce the probability that the root trust metric may be changed due to other factors, resulting in inaccurate results of the above-mentioned metric authentication.

[0081] To further prevent the root trust metrics stored in the platform configuration register from being tampered with or forged by malicious code, this application proposes to pre-restrict the operations that can be executed in the platform configuration register through the trusted platform module. These restrictions include: disallowing arbitrary read / write operations to the platform configuration register using port mapping methods typically employed when reading and writing registers of ordinary character devices; and allowing modification of the PCR value only through reset and extension operations, with the reset operation permitted after a power outage or restart. These measures ensure that the two root trust metrics used for comparison are not tampered with or forged by malicious code attacks before comparison, thereby guaranteeing the accuracy of the metric authentication in the first security verification.

[0082] The key authentication process includes: the BMC security space generating a key authentication request and encrypting it using the public key within the key pair; the BMC security space sending the encrypted key authentication request to the trusted platform module; the trusted platform module decrypting the encrypted key authentication request using the private key within the key pair; if the trusted platform module successfully decrypts the key authentication request, the key authentication is successful; otherwise, the key authentication fails.

[0083] Specifically, the BMC security space generates a key pair for key authentication, including a public key and a private key. The BMC security space uses the functionality provided by the Trusted Platform Module (TPM) to encrypt the generated private key and stores the encrypted private key inside the TPM chip. The BMC security space provides the public key to the TPM for registration. The TPM records and manages these keys, ensuring their protection. The TPM records and manages these public keys for subsequent key authentication and verification. When the BMC security space needs key authentication, it can send a key authentication request to the TPM. Upon receiving the key authentication request, the TPM checks the identity and permissions of the BMC security space and decrypts the request using the encrypted private key stored in the TPM. If the TPM successfully decrypts the key authentication request and confirms the validity of the BMC security space's identity, it will pass the key authentication and return the authentication result to the BMC security space; the BMC security space can then continue to perform corresponding security operations. Otherwise, it will report a verification failure to avoid data leakage affecting the BMC code space.

[0084] If both metric authentication and key authentication pass, the first security verification is successful; if metric authentication and / or key authentication fail, the first security verification fails and an alarm is triggered. If key authentication fails, it means that the key in the BMC security space has been accidentally lost or maliciously leaked. Therefore, to ensure the security of the BMC security space, the BMC security space regenerates the key pair, i.e., reinitializes the BMC security space. Specifically, the trusted platform module regenerates and stores the new key to further verify the integrity of the BMC security space and prevent unauthorized access and malicious operations from altering the BMC security space.

[0085] In summary, before writing data to the BMC secure space, the BMC secure space is verified first to ensure its integrity and legitimacy, preventing malicious attackers from stealing or tampering with the data in the BMC secure space. In addition, the exception handling mechanism is improved: in the case of authentication failure, an alarm is set up in time or corresponding measures are taken to prevent data leakage and damage to the secure code space, thereby further improving the fault tolerance and security of the system.

[0086] S2. After the first security verification is passed, the trusted platform module authenticates the BMC data write request.

[0087] Specifically, the BMC data write request to the BMC secure space includes the original data to be written and an authentication key matching the user client initiating the request. The authentication process for the BMC data write request mainly includes: verifying whether the authentication key is registered in the authenticator's key database; if the authentication key is registered in the authenticator's key database, authentication is successful; if the authentication key is not registered in the authenticator's key database, an authorization request is sent to the authenticator to determine whether the authenticator agrees to authorize the user currently initiating the BMC data write request; if the authenticator agrees to authorize, authentication is successful; otherwise, authentication fails. Here, the authenticator refers to the authentication service provider, which can authenticate users who can legally write data to the BMC chip.

[0088] Understandably, if the authentication key of the user client initiating the BMC data write request is not registered in the authenticator's keystore, it proves that the current user client is not a legitimate write client that has been authenticated by the authenticator. In this case, the authenticator further requests authorization from the authenticator. If the authenticator grants authorization, the user client is then recognized by the authenticator as a legitimate write client. If the authenticator does not grant authorization, the current user client is considered to be writing illegally. In this case, authentication fails, and an alarm is triggered to alert staff that the current BMC security space has been subjected to an illegal attack.

[0089] S3. After successful authentication, the trusted platform module generates the first hash value of the original write data contained in the data write request and generates the first data to be authenticated based on the first hash value and the original data.

[0090] Specifically, after the trusted platform module obtains the original written data, it first encrypts the original written data to ensure its confidentiality during transmission or storage. The trusted platform module uses a hash algorithm to generate a first hash value for the original written data to be verified, such as the SHA-256 algorithm. This application does not limit the hash algorithm. The original written data with the first hash value appended is then the first data to be authenticated.

[0091] S4. The trusted platform module generates second data to be authenticated based on the first data to be authenticated and the status information of the server system, and digitally signs the second data to be authenticated.

[0092] Specifically, the trusted platform module obtains status information related to the current server system state from the server, including but not limited to hardware configuration, firmware version, and operating system state. The trusted platform module combines the first hash value from the first data to be authenticated with the server system information and records it in the platform configuration register. For example, the trusted platform module writes the second hash value corresponding to the server system state into the first slot of the platform configuration register, and the first hash value corresponding to the original data into the second slot of the platform configuration register; here, the recorded first and second hash values ​​are referred to as the second data to be authenticated. After determining the second data to be authenticated, the trusted platform module performs a Quote operation, using the second data to be authenticated in the platform configuration register as input, and generates a digital signature; the digital signature is based on a private key generated by the random number generator inside the trusted platform module, used to prove the integrity and trustworthiness of the second data to be authenticated.

[0093] Understandably, the trusted platform module stores the first hash value in its built-in platform configuration register. The trusted platform module generates a second hash value based on the server's status information and stores it in the platform configuration register as well. After the original data is legally written to the BMC secure space, the trusted platform module can also monitor the first and second hash values ​​in the platform configuration register. If changes to either hash value are detected, an alarm is triggered. Since the first hash value is generated based on the original data and the second hash value is generated based on the server's status information, a change in the first hash value indicates a change in the original data; a change in the second hash value indicates a change in the server system. In other words, the original data has been tampered with, prompting an alarm to alert staff that the original input operation has been maliciously altered. By monitoring the hash values ​​after data is written, the system monitors both the original data and the server system, preventing malicious attacks and tampering, thus protecting the security and stability of the server system.

[0094] S5. In response to receiving the public key distributed by the trusted platform module, perform a second security verification on the digital signature, and write the original data to the BMC security space after the second security verification is passed.

[0095] Specifically, the server system compares the digital signature generated by the trusted platform module with the public key distributed by the trusted platform stored in the server system to complete the second security verification, verifying the validity of the data signature. If the digital signature is valid, the second security verification passes, and the original data can be written into the BMC secure space. If the digital signature fails verification, the second security verification fails, a verification failure is reported, and an alarm is issued to alert staff that the original data was attacked and altered during transmission. The trusted platform module stores the corresponding public key. The above digital signature verification process is a conventional technique in the field and is not limited herein.

[0096] Typically, the verification results of the first and second security checks mentioned above may be a Boolean value indicating the integrity and trustworthiness of the data, or an error code indicating the reason for the verification failure. The original data is written to the BMC secure space only after authentication is complete, and then protected for read and write access. For example, if the BMC secure space integrity check fails, error code 0001 is returned; if data integrity is compromised, error code 0005 is returned. The Trusted Platform module interacts with the BMC using a software interface. After reading the error code, the BMC program parses it into a text description, which is then displayed on the front-end web page or stored in the logs to clarify the cause of the problem.

[0097] This application prevents the execution of malicious code and the abuse of system resources by restricting the scope of code execution. During the process of writing raw data to the secure code space after authentication by the server system, the server system will judge, verify, and compare the data in the secure code to see if the key is consistent with the previously written key. If the secure code space has been tampered with, the authenticated data cannot be written to the chip, and authentication failure will be immediately reported to avoid data leakage and damage to the secure code space. This effectively protects the security and integrity of data in the BMC chip, providing a more trusted environment for server management and operation; it effectively prevents the execution of malware, viruses, and malicious scripts, protecting the security and stability of the system. During the authentication process, secure data transmission protocols and encryption algorithms are used to enhance the security of data transmission; this effectively prevents malicious attackers from stealing or tampering with sensitive information during data requests and authentication.

[0098] Example 2

[0099] Corresponding to Embodiment 1 above, this application also provides a BMC data writing method, such as... Figure 3 The flowchart shown specifically includes:

[0100] 310. In response to the received BMC data write request initiated by the user, the Trusted Platform Module performs the first security verification on the BMC security space where the BMC code is stored.

[0101] Preferably, before the trusted platform module performs the first security verification on the BMC security space storing part of the BMC code, the method further includes:

[0102] A BMC security space is allocated in the server system to store a portion of the BMC code;

[0103] The BMC security space generates a key pair based on the random number provided by the trusted platform module and provides the key pair to the trusted platform module.

[0104] Preferably, the first security verification includes metric authentication and key authentication, wherein the metric authentication includes:

[0105] The trusted platform module responds to the BMC security space verification request initiated by the user and obtains the current root trust metric.

[0106] Compare the current root trust metric with the preset metric that is pre-existing in the trusted platform module;

[0107] If the current root trust metric matches the preset metric, then the metric authentication is successful;

[0108] If the current root trust metric is inconsistent with the preset metric, the metric authentication fails.

[0109] Preferably, the key authentication includes:

[0110] The BMC security space generates a key authentication request and encrypts the key authentication request using the public key within the key pair;

[0111] The BMC security space sends the encrypted key authentication request to the trusted platform module.

[0112] The trusted platform module decrypts the encrypted key authentication request based on the private key in the key pair;

[0113] If the trusted platform module successfully decrypts the key authentication request, the key authentication is successful; otherwise, the key authentication fails.

[0114] Preferably, the trusted platform module performs a first security verification on the BMC security space storing part of the BMC code, including:

[0115] If the metric authentication and key authentication are successful, then the first security verification is successful;

[0116] If the metric authentication and / or key authentication fails, the first security verification fails and an alarm is triggered;

[0117] If key authentication fails, the BMC security space will regenerate the key pair.

[0118] 320. After the first security verification is passed, the trusted platform module authenticates the BMC data write request;

[0119] Preferably, the BMC data write request includes an authentication key, and the trusted platform module authenticates the BMC data write request, including:

[0120] Verify whether the authentication key is registered in the authenticator's key database;

[0121] If the authentication key is registered in the authenticator's key repository, then the authentication is successful;

[0122] If the authentication key is not registered in the key database of the authenticator, an authorization request is sent to the authenticator to determine whether the authenticator agrees to authorize the user who is currently initiating the BMC data write request.

[0123] If the authenticator agrees to the authorization, the authentication is successful; otherwise, the authentication fails.

[0124] 330. After the authentication is successful, the trusted platform module generates a first hash value of the original write data contained in the data write request and generates first data to be authenticated based on the first hash value and the original data;

[0125] 340. The trusted platform module generates second data to be authenticated based on the first data to be authenticated and the status information of the server system, and digitally signs the second data to be authenticated.

[0126] 350. In response to receiving the public key distributed by the trusted platform module, perform a second security verification on the digital signature, and write the original written data into the BMC security space after the second security verification is passed.

[0127] Preferably, the method further includes:

[0128] The trusted platform module stores the first hash value in the platform configuration register built into the trusted platform module;

[0129] The trusted platform module generates a second hash value based on the server's status information and stores the second hash value in the platform configuration register;

[0130] The trusted platform module monitors the first hash value and the second hash value in the platform configuration register, and issues an alarm if it detects a change in the first hash value or the second hash value.

[0131] Example 3

[0132] Corresponding to Embodiment 1 and Embodiment 2 above, as Figure 4 As shown in the illustration, this application also provides a BMC data writing system, comprising:

[0133] The first security verification module 410 is used to perform a first security verification on the BMC security space where the BMC part of the code is stored in response to the received BMC data write request initiated by the user using the trusted platform module.

[0134] The second security verification module 420 is used to authenticate the BMC data write request using the trusted platform module after the first security verification is passed.

[0135] Data processing module 430 is used to generate a first hash value of the original write data contained in the data write request using the trusted platform module after the authentication is passed, and to generate first data to be authenticated based on the first hash value and the original data;

[0136] The data processing module 430 is further configured to use the trusted platform module to generate second data to be authenticated based on the first data to be authenticated and the status information of the server system, and to digitally sign the second data to be authenticated.

[0137] The second security verification module 420 is further configured to use the server system to perform a second security verification on the digital signature based on the public key distributed by the trusted platform module, and write the original written data into the BMC security space after the second security verification is passed.

[0138] In some implementation scenarios, the second security verification module 420 is also used to verify whether the identity authentication key is registered in the key database within the authenticator; if the identity authentication key is registered in the data key database within the authenticator, the identity verification is successful; if the identity authentication key is not registered in the key database within the authenticator, an authorization request is sent to the authenticator to determine whether the authenticator agrees to authorize the user currently initiating the BMC data write request; if the authenticator agrees to authorize, the identity verification is successful, otherwise, the identity verification fails.

[0139] In some implementation scenarios, the data processing module 430 is further used to store the first hash value in the platform configuration register built into the trusted platform module using the trusted platform module; the trusted platform module generates a second hash value according to the server's status information and stores the second hash value in the platform configuration register; the trusted platform module monitors the first hash value and the second hash value in the platform configuration register, and issues an alarm if it detects a change in the first hash value and the second hash value.

[0140] In some implementation scenarios, the first security verification module 410 is also used to divide the BMC security space in the server system to store the BMC part code; the BMC security space generates a key pair according to the random number provided by the trusted platform module, and provides the key pair to the trusted platform module.

[0141] In some implementation scenarios, the first security verification module 410 is also used to respond to the BMC security space verification request initiated by the user using the trusted platform module to obtain the current root trust metric; compare the current root trust metric with the preset metric that is stored in the trusted platform module in advance; if the current root trust metric is consistent with the preset metric, the metric authentication is successful; if the current root trust metric is inconsistent with the preset metric, the metric authentication is unsuccessful.

[0142] In some implementation scenarios, the first security verification module 410 is further configured to trigger the BMC security space to generate a key authentication request and encrypt the key authentication request using the public key in the key pair; the BMC security space sends the encrypted key authentication request to the trusted platform module; the trusted platform module decrypts the encrypted key authentication request using the private key in the key pair; if the trusted platform module successfully decrypts the key authentication request, the key authentication is successful; otherwise, the key authentication fails.

[0143] In some implementation scenarios, the first security verification module 410 is further configured to determine that the first security verification is successful when the measurement authentication and key authentication are successful; and to determine that the first security verification is unsuccessful and issue an alarm when the measurement authentication and / or key authentication are unsuccessful; wherein, if the key authentication is unsuccessful, the BMC security space is triggered to regenerate the key pair.

[0144] Example 4

[0145] Corresponding to all the above embodiments, this application provides an electronic device, including:

[0146] One or more processors; and memory associated with the one or more processors, the memory storing program instructions that, when read and executed by the one or more processors, perform the following operations:

[0147] In response to a user-initiated BMC data write request, the trusted platform module performs a first security verification on the BMC security space where some BMC code is stored.

[0148] After the first security verification is passed, the trusted platform module authenticates the BMC data write request;

[0149] After the authentication is successful, the trusted platform module generates a first hash value of the original write data contained in the data write request and generates first data to be authenticated based on the first hash value and the original data.

[0150] The trusted platform module generates second data to be authenticated based on the first data to be authenticated and the status information of the server system, and digitally signs the second data to be authenticated.

[0151] In response to receiving the public key distributed by the trusted platform module, the digital signature is subjected to a second security verification, and after the second security verification is passed, the original written data is written to the BMC security space.

[0152] in, Figure 5 An exemplary architecture of an electronic device is shown, which may include a processor 510, a video display adapter 511, a disk drive 512, an input / output interface 513, a network interface 514, and a memory 520. The processor 510, video display adapter 511, disk drive 512, input / output interface 513, network interface 514, and memory 520 can communicate with each other via a bus 530.

[0153] The processor 510 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to achieve the technical solution provided in this application.

[0154] The memory 520 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 520 can store the operating system 521 for controlling the execution of the electronic device 500, and the basic input / output system (BIOS) 522 for controlling the low-level operations of the electronic device 500. Additionally, it can store a web browser 523, a data storage management system 524, and an icon / font processing system 525, etc. The aforementioned icon / font processing system 525 can be the application program that specifically implements the aforementioned steps in this embodiment. In summary, when the technical solution provided in this application is implemented through software or firmware, the relevant program code is stored in the memory 520 and is called and executed by the processor 510.

[0155] Input / output interface 513 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.

[0156] Network interface 514 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0157] Bus 530 includes a pathway for transmitting information between various components of the device, such as processor 510, video display adapter 511, disk drive 512, input / output interface 513, network interface 514, and memory 520.

[0158] In addition, the electronic device 500 can also obtain information on specific claim conditions from the virtual resource object claim condition information database for condition judgment, etc.

[0159] It should be noted that although the above-described device only shows the processor 510, video display adapter 511, disk drive 512, input / output interface 513, network interface 514, memory 520, bus 530, etc., in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the solution of this application, and does not necessarily include all the components shown in the figures.

[0160] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, 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 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, a cloud server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0161] Example 5

[0162] Corresponding to all the above embodiments, this application also provides a computer-readable storage medium, characterized in that it stores a computer program that causes a computer to perform the following operations:

[0163] In response to a user-initiated BMC data write request, the trusted platform module performs a first security verification on the BMC security space where some BMC code is stored.

[0164] After the first security verification is passed, the trusted platform module authenticates the BMC data write request;

[0165] After the authentication is successful, the trusted platform module generates a first hash value of the original write data contained in the data write request and generates first data to be authenticated based on the first hash value and the original data.

[0166] The trusted platform module generates second data to be authenticated based on the first data to be authenticated and the status information of the server system, and digitally signs the second data to be authenticated.

[0167] In response to receiving the public key distributed by the trusted platform module, the digital signature is subjected to a second security verification, and after the second security verification is passed, the original written data is written to the BMC security space.

[0168] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system 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 creative effort.

[0169] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A BMC data write-in method, characterized in that, The method includes: In response to a user-initiated BMC data write request, the trusted platform module performs a first security verification on the BMC security space where some BMC code is stored. After the first security verification is passed, the trusted platform module authenticates the BMC data write request; After the authentication is successful, the trusted platform module generates a first hash value of the original write data contained in the data write request and generates first data to be authenticated based on the first hash value and the original write data. The trusted platform module generates second data to be authenticated based on the first data to be authenticated and the status information of the server system, and digitally signs the second data to be authenticated. In response to receiving the public key distributed by the trusted platform module, the digital signature is subjected to a second security verification, and after the second security verification is passed, the original written data is written to the BMC security space.

2. The method according to claim 1, characterized in that, The BMC data write request includes an authentication key, and the trusted platform module authenticates the BMC data write request, including: Verify whether the authentication key is registered in the authenticator's key database; If the authentication key is registered in the authenticator's key repository, then the authentication is successful; If the authentication key is not registered in the key database of the authenticator, an authorization request is sent to the authenticator to determine whether the authenticator agrees to authorize the user who is currently initiating the BMC data write request. If the authenticator agrees to the authorization, the authentication is successful; otherwise, the authentication fails.

3. The method according to claim 1, characterized in that, The method further includes: The trusted platform module stores the first hash value in the platform configuration register built into the trusted platform module; The trusted platform module generates a second hash value based on the server's status information and stores the second hash value in the platform configuration register; The trusted platform module monitors the first hash value and the second hash value in the platform configuration register, and issues an alarm if it detects a change in the first hash value or the second hash value.

4. The method according to claim 1, characterized in that, Before the trusted platform module performs the first security verification on the BMC security space storing part of the BMC code, the method further includes: A BMC security space is allocated in the server system to store a portion of the BMC code; The BMC security space generates a key pair based on the random number provided by the trusted platform module and provides the key pair to the trusted platform module.

5. The method according to claim 4, characterized in that, The first security verification includes metric authentication and key authentication, wherein the metric authentication includes: The trusted platform module responds to the BMC security space verification request initiated by the user by obtaining the current root trust metric. Compare the current root trust metric with a preset metric that is pre-existing in the trusted platform module; If the current root trust metric matches the preset metric, then the metric authentication is successful; If the current root trust metric is inconsistent with the preset metric, the metric authentication fails.

6. The method according to claim 5, characterized in that, The key authentication includes: The BMC security space generates a key authentication request and encrypts the key authentication request using the public key within the key pair; The BMC security space sends the encrypted key authentication request to the trusted platform module. The trusted platform module decrypts the encrypted key authentication request based on the private key in the key pair; If the trusted platform module successfully decrypts the key authentication request, the key authentication is successful; otherwise, the key authentication fails.

7. The method according to any one of claims 5-6, characterized in that, The trusted platform module performs a first security verification on the BMC security space where some BMC code is stored, including: If the metric authentication and key authentication are successful, then the first security verification is successful; If the metric authentication and / or key authentication fails, the first security verification fails and an alarm is triggered; If key authentication fails, the BMC security space will regenerate the key pair.

8. A BMC data writing system, characterized in that, The system includes: The first security verification module is used to perform the first security verification on the BMC security space where the BMC part of the code is stored in response to the received BMC data write request initiated by the trusted platform module. The second security verification module is used to authenticate the BMC data write request using the trusted platform module after the first security verification is passed. The data processing module is configured to, after the authentication is passed, use the trusted platform module to generate a first hash value of the original write data contained in the data write request and generate first data to be authenticated based on the first hash value and the original write data; The data processing module is further configured to use the trusted platform module to generate second data to be authenticated based on the first data to be authenticated and the status information of the server system, and to digitally sign the second data to be authenticated. The second security verification module is further configured to use the server system to perform a second security verification on the digital signature based on the public key distributed by the trusted platform module, and write the original written data into the BMC security space after the second security verification is passed.

9. An electronic device, characterized in that, The electronic device includes: One or more processors; And a memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the method of any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, It stores a computer program that causes the computer to perform the method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Security code space authentication method and device, storage medium and processor

    CN111371726A

  • Management controller-based verification of platform certificates

    US20230342446A1