Function authorization method, electronic device, program product and storage medium

By generating a license information file and an anti-cracking signature algorithm based on hardware features, combined with a hardware selection circuit to read the public key, the problem of illegal unlocking of the BMC functional module is solved, and the security and flexibility of BMC authorization management are achieved.

CN120296771BActive Publication Date: 2025-09-12SHANDONG YINGXIN COMP TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510765111.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-09-12
Estimated Expiration
2045-06-10

AI Technical Summary

Technical Problem

In the existing BMC function module authorization management, the traditional signature algorithm is easily cracked, resulting in the failure of license protection and the client can illegally unlock the BMC function module.

Method used

The license information file is generated based on the client hardware feature information. The server uses an anti-cracking signature algorithm to generate signature information and reads the public key from the OTP area of ​​the management controller through the hardware selection circuit for verification to ensure the security and flexible replacement of the public key.

Benefits of technology

Effectively resist new computing attacks, prevent illegal unlocking of BMC function modules, and reduce device recall costs caused by private key leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120296771B_ABST
    Figure CN120296771B_ABST
Patent Text Reader

Abstract

The present application discloses a function authorization method, electronic device, program product and storage medium, which are applied to the field of security management technology. When applied to the management controller of the client, the method includes: generating a license information file based on the hardware feature information of the client itself; receiving a feedback file from the server; reading the public key specified by the circuit state from the OTP area of ​​the management controller itself through the circuit state of the hardware selection circuit; verifying the signature information based on the public key, the license information file and the hash algorithm, and when the verification passes, importing the feedback file into the function module to be unlocked to unlock the function module; the public and private key pairs are generated in advance by an anti-cracking signature algorithm; and multiple public keys are stored in the OTP area. The solution of the present application can effectively resist new computing attacks and prevent the function modules of the management controller from being illegally unlocked. It also reduces the cost of equipment recalls caused by private key leakage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of security management technology, and in particular to a function authorization method, electronic device, program product, and storage medium. Background Art

[0002] A server's BMC (Board Management Controller), as out-of-band management firmware, is a crucial component of the server management system. BMC vendors can control the authorization of certain BMC modules through BMC license management. This means that clients are only authorized to use certain BMC modules after purchasing authorization from the vendor.

[0003] License management requires the use of asymmetric encryption technology to generate digital signatures. Specifically, the BMC vendor uses a private key and encryption technology to generate a digital signature. When the client manages the license, it verifies the validity of the corresponding public key before unlocking the corresponding functional module. However, current license technology typically uses traditional signature algorithms such as RSA (asymmetric encryption algorithm) and ECDSA (Elliptic Curve Digital Signature Algorithm). With the rapid development of new, faster computing technologies, the security of traditional signature algorithms such as RSA and ECDSA is increasingly threatened. Once the algorithm is cracked, the existing digital signature can be easily cracked, rendering the license protection ineffective and allowing the client to obtain authorization without the BMC vendor's knowledge.

[0004] In summary, how to ensure the security of BMC license management, thereby preventing BMC functional modules from being illegally unlocked, is a technical problem that those skilled in the art urgently need to solve. Summary of the Invention

[0005] The present application provides a function authorization method, electronic device, program product, and storage medium to ensure the security of BMC license management and prevent the BMC's functional modules from being illegally unlocked.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] This application provides a function authorization method, which is applied to a client management controller, including:

[0008] Generate a license information file for function application to the server based on the client's own hardware feature information;

[0009] Receive a feedback file from the server; wherein the feedback file carries the license information file, signature information obtained by the server digitally signing the license information file using a private key, and a hash algorithm used by the server when performing the digital signature;

[0010] Reading a public key specified by a circuit state of a hardware selection circuit from a one-time programmable area of ​​the management controller itself through the circuit state of the hardware selection circuit; wherein the hardware selection circuit is a hardware selection circuit for selecting a public key;

[0011] Verifying the signature information based on the public key, the license information file, and the hash algorithm, and when the verification passes, importing the feedback file into the function module to be unlocked to unlock the function module;

[0012] The private key and the public key are a set of public-private key pairs generated in advance by an anti-cracking signature algorithm; and a plurality of public keys are stored in the one-time programmable area.

[0013] This application also provides a function authorization method, which is applied to the server, including:

[0014] Receiving a license information file sent by a client; wherein the license information file is a license information file generated by a management controller of the client based on hardware feature information of the client itself and used to apply for a function to a server;

[0015] Signature information obtained by digitally signing the license information file using a private key;

[0016] generating a feedback file carrying the license information file, the signature information, and the hash algorithm used when performing digital signing;

[0017] Sending the feedback file to the client, so that the management controller of the client reads the public key specified by the circuit state from the one-time programmable area of ​​the management controller itself through the circuit state of the hardware selection circuit, verifies the signature information based on the public key, the license information file, and the hash algorithm, and when the verification passes, imports the feedback file into the functional module to be unlocked to unlock the functional module;

[0018] Among them, the hardware selection circuit is a hardware selection circuit for selecting a public key; the private key and the public key are a set of public-private key pairs generated in advance by an anti-cracking signature algorithm; and multiple public keys are stored in the one-time programmable area.

[0019] The present application also provides a computer program product, including a computer program, which implements the steps of the function authorization method as described above when executed by a processor.

[0020] The present application also provides an electronic device comprising:

[0021] memory for storing computer programs;

[0022] A processor is used to implement the steps of the function authorization method as described above when executing the computer program.

[0023] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the function authorization method as described above are implemented.

[0024] In the solution of this application, the server generates a public-private key pair using a specialized anti-cracking signature algorithm. This makes the digital signature generated by this private key effectively resistant to new computing attacks and difficult to crack, thereby effectively preventing the functional modules of the management controller from being illegally unlocked. Specifically, the client's management controller needs to generate a license information file for requesting functions from the server based on the client's own hardware characteristics. After obtaining the license information file, the server can digitally sign the license information file using the private key to obtain the signature information. The server then needs to send back a feedback file containing the license information file, the signature information, and the hash algorithm used for the digital signature to the client. It is understood that under normal circumstances, the client can verify the signature information based on the public key, the license information file, and the hash algorithm. If the verification is successful, the feedback file can be imported into the functional module to be unlocked, thereby unlocking the functional module. Conversely, if the verification fails, the process ends and the functional module cannot be unlocked. It should also be noted that the public key is stored in the one-time programmable area of ​​the management controller itself. After the management controller leaves the factory, the public key cannot be modified, which also helps to ensure the security of the public key. Furthermore, in the process of function authorization, the client needs to read the public key specified by the circuit state of the hardware selection circuit from its own one-time programmable area through the circuit state of the hardware selection circuit, and multiple public keys are stored in the one-time programmable area. Such a design can flexibly and effectively implement changes in the public and private key pairs used. For example, when the currently used private key is leaked, the manufacturer can discard the leaked private key and enable a new private key, and notify the user to adjust the circuit state of the hardware selection circuit accordingly, so that the client can change the public key used. This process does not require the client to be returned to the factory, effectively reducing the cost of equipment recalls caused by private key leaks.

[0025] In summary, this application solution can effectively ensure the security of public-private key pairs and resist new computing attacks, thereby preventing the illegal unlocking of functional modules of the management controller. It also effectively reduces the cost of equipment recalls caused by private key leakage. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0027] Figure 1 A flowchart of the implementation of the function authorization method provided in one specific embodiment of the present invention applied to a client;

[0028] Figure 2 A schematic diagram of a public key stored in the OTP area of ​​a management controller in a specific embodiment of the present invention;

[0029] Figure 3 A flowchart of the implementation of the function authorization method provided in one specific embodiment of the present invention applied to the server;

[0030] Figure 4 This is a schematic structural diagram of an electronic device according to the present invention;

[0031] Figure 5 This is a schematic structural diagram of a computer-readable storage medium of the present invention. DETAILED DESCRIPTION

[0032] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0033] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0034] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0035] Please refer to Figure 1 , Figure 1 This is a flowchart of an implementation method of a function authorization method provided in a specific embodiment of the present invention. The function authorization method can be applied to a management controller of a client, and includes the following steps:

[0036] Step S101: Based on the hardware feature information of the client itself, a license information file is generated for applying for a function from the server.

[0037] Specifically, the client's management controller can usually be a BMC (baseboard management controller). The management controller can generate a license information file for applying for functions from the server based on the client's own hardware feature information, that is, generate a license information file.

[0038] When generating a license information file based on the client's own hardware feature information, the specific hardware features included can be set and adjusted according to actual needs. For example, it can include the BMC model, the model of the server connected and managed by the BMC (i.e., the client model), and hardware information such as the CPU parameters, memory parameters, and hard disk parameters of the server connected and managed by the BMC.

[0039] Furthermore, in a specific embodiment of the present invention, the hardware feature information needs to include the Product ID of the client, that is, it needs to include the unique product number of the client, so that the manufacturer can determine which specific factory device is currently applying for the function of its management controller, thereby ensuring security. For example, the manufacturer can check whether the Product ID is the product of its own factory. In addition, it can be understood that the format of the license information file and the specific content it contains can be set and adjusted by the manufacturer according to actual needs, so that after the client is sold, when the function is authorized, the license information file required by the manufacturer can be generated and sent to the server. For example, in actual applications, in addition to the hardware feature information of the client itself, the license information file can usually also carry relevant information about the functional module that needs to be unlocked, such as the name, version number and other information of the functional module.

[0040] Step S102: receiving a feedback file from the server; wherein the feedback file carries the license information file, the signature information obtained by the server digitally signing the license information file with a private key, and the hash algorithm used by the server for digital signature.

[0041] The server can be a device such as a server set up by the manufacturer for implementing authorization management, and it only needs to be able to implement the functional requirements of the server in this application solution. After receiving the license information file sent by the client, the server needs to generate a feedback file based on the license information file and then send the feedback file to the client. The feedback file generation process requires the server to implement it based on the private key.

[0042] Specifically, for example, a dedicated crack-resistant signature key generation platform can be used to pre-generate multiple public-private key pairs using a crack-resistant signature algorithm. Of course, only one public-private key pair is required during a normal function authorization process. A crack-resistant signature algorithm is one that effectively resists new computing attacks. The specific algorithm can be selected as needed, but the chosen crack-resistant signature algorithm and its parameters must meet security requirements. For example, the Leighton-Micali Signature (LMS) algorithm can be selected. The LMS algorithm is a hash-based, crack-resistant signature algorithm that uses cryptographic hash functions to generate and verify signatures. Cryptographic hash functions are difficult to crack, even by modern computing. Therefore, the LMS algorithm is a crack-resistant signature algorithm that provides strong security and effectively resists new computing attacks.

[0043] After pre-generating multiple sets of public and private key pairs using an anti-cracking signature algorithm, the manufacturer needs to securely store these private keys. For example, in one specific implementation, the private keys are stored in a cryptographic machine. In other words, each private key generated by the anti-cracking signature algorithm is stored in a cryptographic machine. The cryptographic machine is a device that can securely store private keys. Unauthorized personnel cannot obtain private keys from it, which can effectively prevent illegal personnel from stealing private keys from manufacturers. Each public key generated by the anti-cracking signature algorithm needs to be stored in the OTP (One Time Programmable) area of ​​the management controller before it leaves the factory. For example, in one scenario, the public key can be directly transferred from the anti-cracking signature key generation platform to the BMC production system for secure storage. This process does not require manual operation, thereby ensuring the security of the public key.

[0044] The following example uses a public-private key pair consisting of private key A and public key A. After receiving the license information file from the client, the server needs to perform a hash calculation on the license information file according to the principle of digital signature to obtain a hash result. The server then obtains private key A from the cipher machine and encrypts the hash result using private key A. The result is the signature information obtained after the server digitally signs the license information file using private key A. The client then needs to verify the license information using public key A.

[0045] After obtaining the signature information, the server needs to generate a feedback file using the signature information, along with the license information file and the hash algorithm used for the digital signature. It is understood that the specific format of the feedback file can be pre-defined, but it should include the license information file, the signature information obtained by digitally signing the license information file with the server's private key, and the hash algorithm used by the server for digital signature, so that the client can verify and unlock the function.

[0046] Step S103: Reading the public key specified by the circuit state of the hardware selection circuit from the one-time programmable area of ​​the management controller itself through the circuit state of the hardware selection circuit. The hardware selection circuit is a hardware selection circuit for performing public key selection.

[0047] Multiple public keys are stored in the one-time programmable area of ​​the management controller itself. Which public key should be used currently depends on the circuit status of the hardware selection circuit. Of course, the manufacturer should inform the customer how to set the circuit status of the hardware selection circuit currently, so that the client's management controller can read the correct public key currently required from the one-time programmable area of ​​the management controller itself after detecting the circuit status of its own hardware selection circuit.

[0048] The specific structure of the hardware selection circuit can be customized based on actual needs. It can change its state under user control and be detected by the management controller to achieve the purpose of public key selection. In other words, the hardware selection circuit, as a hardware selection circuit for public key selection, provides an external communication interface for the management controller to control, allowing users to change public keys by operating the hardware selection circuit.

[0049] For example, in a specific embodiment of the present invention, the hardware selection circuit is a DIP switch type hardware selection circuit, so that the circuit state of the hardware selection circuit can be conveniently adjusted through the DIP switch of the hardware selection circuit.

[0050] In this embodiment, the hardware selection circuit is a DIP switch-type hardware selection circuit, which features a simple structure and high reliability. The required hardware selection circuit can be implemented using DIP switches and associated resistors. For example, in one scenario, four public keys are stored in the one-time programmable area of ​​the management controller. In this case, the DIP switch-type hardware selection circuit requires four external DIP switches for user operation, resulting in a total of four circuit states for the hardware selection circuit. For example, in one scenario, if the user turns DIP switch 1 to ON and DIP switches 2, 3, and 4 to OFF, pin 1 of the management controller will be high (controlled by DIP switch 1), and pins 2 through 4 will be low (controlled, in sequence, by DIP switches 2, 3, and 4). The management controller can then determine the current circuit state of the hardware selection circuit and read the public key specified by this circuit state from the OTP area. This public key is the public key corresponding to DIP switch 1. In other words, the state of DIP switch 1 is equivalent to the control bit of this public key, determining whether the public key is currently in use.

[0051] In addition, it should be noted that in some cases, if the public key used needs to be switched, the management controller needs to be restarted. This is because in some cases, the management controller will only detect the circuit status of the hardware selection circuit during the startup phase, and will no longer update the circuit status of the hardware selection circuit after the startup is completed.

[0052] In a specific embodiment of the present invention, the dip switches of the hardware selection circuit are hardware interlocking dip switches, so that at most a single dip switch is in a trigger state at the same time.

[0053] The hardware selection circuit includes a plurality of dip switches. When any one of the dip switches is in a triggered state, the other dip switches are in a non-triggered state.

[0054] This implementation takes into account that in some cases, customers may mistakenly operate the dip switch of the hardware selection circuit. Therefore, the dip switch of the hardware selection circuit is set to a hardware interlocked dip switch so that at the same time, at most a single dip switch is in the trigger state, which can effectively reduce the probability of misoperation.

[0055] Taking the above-described scenario where a DIP switch-type hardware selection circuit provides four DIP switches for user operation as an example, if hardware interlocked DIP switches are not used, and the user turns both DIP switches 1 and 2 of the four DIP switches to ON, the subsequent process of determining the circuit state of the hardware selection circuit may be erroneous. However, if hardware interlocked DIP switches are used, the user can at most turn ON one of the four DIP switches, DIP switch 1, effectively reducing the probability of erroneous operation. In this example, a DIP switch is turned ON when it is in the triggered state, and correspondingly, it is turned OFF when it is in the untriggered state. For example, in one scenario, the user needs to turn DIP switch 1 of the four DIP switches to ON, and turn DIP switches 2, 3, and 4 to OFF. Later, for example, the user's arm accidentally touches DIP switch 3, causing DIP switch 3 to be turned ON. At this time, due to the hardware interlock structure, DIP switch 1, which was previously turned ON, will be turned OFF, making it easier for the user to discover the situation and then turn DIP switch 1 back to ON, causing DIP switch 3 to be turned back to OFF.

[0056] In a specific embodiment of the present invention, step S103 may specifically include:

[0057] When the circuit state of the hardware selection circuit is in the i-th state, a public key pre-stored in the i-th storage block of the one-time programmable area of ​​the management controller is read from the i-th storage block of the one-time programmable area of ​​the management controller. The one-time programmable area of ​​the management controller has multiple storage blocks, and i is a positive integer.

[0058] This implementation takes into account that the OTP area of ​​the management controller needs to store multiple public keys. In order to facilitate management and differentiation, they can be stored in different storage blocks of the OTP area. Figure 2 , is a schematic diagram of a public key stored in the OTP area of ​​the management controller in a specific implementation manner, Figure 2 In the example, the OTP area of ​​the management controller stores four different public keys through four different storage blocks, which are respectively recorded as public key A, public key B, public key C and public key D.

[0059] In this implementation, when the circuit state of the hardware selection circuit is the i-th state, the public key pre-stored in the i-th storage block can be read from the i-th storage block in the OTP area of ​​the management controller. It can be seen that this implementation effectively realizes the correspondence between different public keys and different circuit states of the hardware selection circuit, and the correspondence is simple and convenient, easy to implement, and not prone to errors.

[0060] In a specific embodiment of the present invention, the circuit state of the hardware selection circuit is read from the one-time programmable area of ​​the management controller itself by the circuit state, including:

[0061] According to the set order, the level status of each specified pin is detected in turn;

[0062] When it is detected that the level state of the i-th pin is a set state, determining that the circuit state of the hardware selection circuit is an i-th state;

[0063] When the circuit state of the hardware selection circuit is the i-th state, the public key pre-stored in the i-th storage block is read from the i-th storage block of the one-time programmable area of ​​the management controller itself.

[0064] This implementation method takes into account that, under normal circumstances, for the level state of each designated pin, only one pin's level state is in the set state, for example, the set state is a high level state. However, in some special cases, due to interference with the circuit and other reasons, the level states of multiple pins may be in the set state. In order to effectively deal with such a situation, in this implementation method, the level state of each designated pin will be detected in sequence according to the set order. Once the level state of a certain pin is detected to be in the set state, there is no need to detect subsequent pins. The circuit state of the hardware selection circuit can be directly determined based on the current pin. That is, when the current pin is the i-th pin, the circuit state of the hardware selection circuit can be directly determined to be the i-th state without continuing to detect the remaining pins. After determining that the circuit state of the hardware selection circuit is the i-th state, the public key pre-stored in the i-th storage block can be read from the i-th storage block of the one-time programmable area of ​​the management controller itself.

[0065] Step S104: The signature information is verified based on the public key, the license information file and the hash algorithm. When the verification passes, the feedback file is imported into the function module to be unlocked to unlock the function module.

[0066] After selecting the circuit state of the circuit through hardware and reading the public key specified by the circuit state from the OTP area of ​​the management controller, the signature information in the feedback file can be verified based on the public key, combined with the license information file in the feedback file and the hash algorithm.

[0067] Under normal circumstances, the public key read from the OTP area of ​​the management controller is the current correct public key and can be successfully verified. The verification process is a universal digital signature verification process. Specifically, the signature information can be decrypted using the public key, and the resulting hash value is called, for example, the first hash value. In addition, the license information file is hashed using the hash algorithm provided in the feedback file, and the resulting hash value is called, for example, the second hash value. If the first hash value and the second hash value are consistent, it can be determined that the verification has passed; otherwise, it can be determined that the verification has failed.

[0068] When the verification passes, the client's management controller can determine that it has obtained the manufacturer's authorization, and will then import the feedback file into the functional module to be unlocked, thereby unlocking the functional module. Correspondingly, if the verification fails, the management controller will end the process, which means that the functional module to be unlocked cannot be unlocked. In addition, in some cases, when the verification fails, operations such as logging and signing failure can also be performed.

[0069] In a specific embodiment of the present invention, reading the public key pre-stored in the i-th storage block of the one-time programmable area of ​​the management controller itself from the i-th storage block may specifically include:

[0070] Obtain the activation flag of the i-th memory block of the one-time programmable area of ​​the management controller itself;

[0071] When the activation flag is a first value indicating an inactive state, the activation flag is changed to a second value indicating an active state, and the public key pre-stored in the i-th storage block is read;

[0072] When the activation flag is a second value indicating an activation state, reading a public key pre-stored in the i-th storage block;

[0073] Among them, reading the public key in the i-th storage block is allowed only when the activation flag bit of the i-th storage block is the second value.

[0074] This embodiment takes into account that, according to the circuit state of the hardware selection circuit, when reading the public key specified by the circuit state from the OTP area of ​​the management controller itself, the public key selection can be achieved specifically by activating the flag bit.

[0075] Specifically, still Figure 2For example, the OTP area of ​​the management controller stores four different public keys through four different storage blocks, which are respectively recorded as public key A, public key B, public key C and public key D, and these four different storage blocks each have their own activation flag. The function of the activation flag is to indicate whether the public key in the corresponding storage block needs to be used. The activation flag cannot be directly modified by the user, but the value of the activation flag can be changed by adjusting the value in the relevant register through the underlying code. That is, the value of the activation flag can be changed according to certain rules according to the description of the embodiment of this application.

[0076] When leaving the factory, the activation flag of each storage block is the first value, indicating that the public key of each storage block is in an inactive state. Figure 2 In the specific example, the activation flag of each storage block is a first value, and the first value is specifically 0x00.

[0077] For example, in one of the scenarios mentioned above, the user turns the DIP switch 1 of the 4 DIP switches to ON and the other 3 DIP switches to OFF, so that the pin 1 of the management controller is high and the pins 2 to 4 are low. The management controller can then determine that the current circuit state of the hardware selection circuit is the 1st state, that is, it determines that the activation flag of the 1st storage block should be read from the OTP area. For example, if the activation flag of the 1st storage block read is the first value 0x00, then at this time, the activation flag needs to be changed to the second value indicating the activation state, and then the public key pre-stored in the 1st storage block is read, that is, read Figure 2 The public key A in the IO_CONNECT_STATE_LOGIN_LOG. The specific value of the second value representing the activation state can be set as needed. For example, in one case, the second value is specifically 0x01.

[0078] In practice, changing a memory block's activation flag from a first value to a second value, typically occurs when the public key corresponding to that activation flag is used for the first time. In the above example, after changing the activation flag of the first memory block to the second value, 0x01, indicating the activation state, public key A pre-stored in the first memory block can be read.

[0079] In another example, the management controller can determine that the current circuit state of the hardware selection circuit is state 1, that is, it determines that the activation flag of the first storage block should be read from the OTP area. And for example, if the activation flag of the first storage block is already the second value 0x01 indicating the activation state, then there is no need to change the value of the activation flag, and the public key A pre-stored in the first storage block can be directly read. The activation flag already has the second value indicating the activation state, which usually occurs when the public key corresponding to the activation flag is not being used for the first time.

[0080] Furthermore, it is understandable that, for any storage block, the public key in the storage block is allowed to be read only when the activation flag of the storage block is the second value; otherwise, the subsequent process cannot be performed due to code settings.

[0081] In a specific embodiment of the present invention, when the activation flag is a first value indicating an inactive state, changing the activation flag to a second value indicating an active state may further include:

[0082] The public key used in the last function authorization is invalidated;

[0083] The activation flag of the storage block storing the invalid public key is changed to a third value indicating an invalid state.

[0084] After the activation flag corresponding to a public key is changed from the first value indicating the inactive state to the second value indicating the active state, it means that the public key is currently in use. For example, in the above example, the activation flag of the first storage block is changed from the first value 0x00 to the second value 0x01, so that public key A is used in this function authorization.

[0085] Furthermore, this embodiment takes into account that when such a situation occurs, it means that the management controller is either performing function authorization for the first time, that is, using a public key for the first time, or that a previously used public key has expired. It is understandable that if this is the first time a public key is used, then the public key used in the previous function authorization does not exist and can be ignored. If, on the other hand, the public key used in the previous function authorization does exist, then the public key used in the previous function authorization needs to be treated as an expired public key, and the activation flag of the storage block storing the expired public key is changed to a third value indicating an expired state, to indicate that the expired public key has expired and cannot be used again.

[0086] Still Figure 2For example, for example, the management controller is performing function authorization for the first time, and the user operates the dip switch to make the circuit state of the hardware selection circuit the first state in accordance with the manufacturer's requirements, so that the management controller reads the public key A from the first storage block in its own OTP area to complete this function authorization based on the public key A. Later, for example, if the manufacturer discovers that both private key A and private key B have been leaked and need to be discarded, then the corresponding public key A and public key B should also be abandoned. For example, if the manufacturer selects private key C and public key C as the public-private key pair for function authorization, then when the management controller needs to perform function authorization later, the user needs to operate the dip switch to make the circuit state of the hardware selection circuit the third state in accordance with the manufacturer's requirements, so that during the verification process of function authorization, the management controller can read the public key C in the third storage block to complete the verification. It can be seen that if public key C needs to be selected, the management controller needs to change the activation flag of the third storage block from the first value 0x00 to the second value 0x01, so that public key C can be used in this function authorization. In this example, there is the public key used in the last function authorization, that is, public key A. Then public key A needs to be used as an invalid public key, and the activation flag of the first storage block storing public key A is changed to a third value indicating an invalid state. For example, in one scenario, the third value is specifically 0xFF.

[0087] It can be seen that in this implementation mode, the public key used is replaced. Since the old public-private key pair will no longer be used, in this implementation mode, the activation flag of the storage block storing the invalid public key will be changed to a third value indicating the invalid state to further ensure security and help avoid illegal unlocking of the functional module.

[0088] In a specific embodiment of the present invention, it may further include:

[0089] After obtaining the activation flag of the i-th storage block in the one-time programmable area of ​​the management controller itself, when the activation flag is a third value indicating a failure state, the current function authorization process is terminated.

[0090] It can be seen from the above description that for any storage block, the activation flag of the storage block may be the first value, the second value, or the third value, and this implementation further takes into account that if after obtaining the activation flag of the i-th storage block in the one-time programmable area of ​​the management controller itself, it is found that the activation flag is the third value indicating the failure state, then it can be immediately determined that the function authorization has failed. Therefore, at this time, the public key cannot be successfully obtained to verify the feedback file, and the current function authorization process can be directly terminated to further ensure security, which is conducive to avoiding illegal unlocking of the function module.

[0091] In actual applications, such a situation may be caused by the user attempting to illegally unlock the device, or it may be caused by the user incorrectly setting the circuit state of the hardware selection circuit. Therefore, in some cases, after the current function authorization process ends, relevant prompt information can be output to allow the user to check whether the circuit state of the hardware selection circuit is set correctly.

[0092] In a specific embodiment of the present invention, it may further include:

[0093] When the circuit state of the hardware selection circuit is the i-th state, obtaining the index value stored in the i-th storage block of the one-time programmable area of ​​the management controller itself;

[0094] Determine whether the index value is i;

[0095] If yes, then executing an operation of reading the public key pre-stored in the i-th storage block from the i-th storage block of the one-time programmable area of ​​the management controller itself;

[0096] If not, the current function authorization process ends.

[0097] In this implementation, each storage block stores an index value of the storage block, which serves as the number of the public key. For example, Figure 2 In the implementation manner, index values ​​1 to 4 are stored in 4 storage blocks respectively.

[0098] For example, in one scenario, a user turns DIP switch 2 of the four DIP switches to ON and the remaining three DIP switches to OFF, causing the circuit state of the hardware selection circuit to be in state 2. After the management controller determines the circuit state of the hardware selection circuit, it can obtain the index value stored in the second storage block of the management controller's own OTP area. Under normal circumstances, the stored index value 2 can be successfully read from the second storage block. That is, the index value is normally consistent with the state number of the circuit state, and the subsequent operation can be performed normally, that is, the operation described in step S103 of reading the public key pre-stored in the i-th storage block from the i-th storage block of the management controller's own one-time programmable area. However, in rare cases, due to circuit errors, signal interference, and other factors, the determined circuit state i of the hardware selection circuit may be inconsistent with the index value stored in the i-th storage block. In this case, to ensure reliability and prevent illegal unlocking of the functional module, the current function authorization process can be directly terminated.

[0099] In a specific scenario, the pseudo code may be: void activate_key(uint8_t new_index) {if (read_jumper() == new_index) {if (otp_block[new_index].active ==0) {otp_block[current_index].active = 0xFF; otp_block[new_index].active = 0x01; current_index = new_index;}}. Here, read_jumper is the circuit state of the hardware selection circuit, and new_index is the index value stored in the i-th storage block. Therefore, the function of if (read_jumper() == new_index) is to detect whether the circuit state of the hardware selection circuit matches the index value stored in the i-th storage block. The function of if (otp_block[new_index].active == 0) is to check whether the activation flag of the i-th storage block indicates the inactive state. The function of otp_block[current_index].active = 0xFF is to invalidate the old key, and the function of otp_block[new_index].active = 0x01 is to activate the new key.

[0100] In a specific embodiment of the present invention, the hardware selection circuit is arranged inside the chassis, so that the circuit state of the hardware selection circuit is adjusted only after the chassis is opened.

[0101] This implementation takes into account that the hardware selection circuit requires user operation to determine its circuit state, which in turn affects the public key used. To ensure security and reduce the probability of accidental touches, this implementation will place the hardware selection circuit inside the chassis, making it accessible only to authorized personnel by disassembling the chassis. This means that the hardware selection circuit's circuit state can only be adjusted after the chassis is opened, making operation simple and safe. Furthermore, in a specific embodiment of the present invention, when the chassis is detected to be opened, an alarm can be generated and a log can be recorded for audit purposes, further improving security.

[0102] In a specific embodiment of the present invention, the anti-cracking signature algorithm used includes multiple different anti-cracking signature algorithms, so that the multiple public keys stored in the one-time programmable area are public keys generated from multiple different anti-cracking signature algorithms.

[0103] This implementation method takes into account that multiple public keys need to be stored in the OTP area of ​​the management controller. These public keys can be derived from the same anti-cracking signature algorithm or from multiple different anti-cracking signature algorithms. The latter implementation method is more reliable and helps to flexibly meet user needs. For example, in one scenario, the public key A in the OTP area is specifically a public key generated based on the LMS algorithm, and the public key B is specifically a public key generated based on the XMSS algorithm, and the public key C is specifically a public key generated based on the Crystal-Dilithum algorithm. For example, after a management controller is sold to user 1, user 1 believes that the public-private key pair generated by the LMS algorithm is more secure, that is, user 1 prefers the LMS algorithm. Then, when authorizing the function of user 1's management controller, the manufacturer can meet the needs of user 1 and use the private key in the public-private key pair generated by the LMS algorithm to perform a digital signature on the license information file, so that user 1 can complete the verification based on the corresponding public key. Similarly, for example, after a management controller is sold to user 2, user 2 believes that the public-private key pair generated by the XMSS algorithm is more secure, that is, user 2 prefers the XMSS algorithm. Then, when authorizing the functions of user 2's management controller, the manufacturer can meet user 2's needs and use the private key in the public-private key pair generated by the XMSS algorithm to digitally sign the license information file, so that user 2 can complete the verification based on the corresponding public key.

[0104] It can be seen that since multiple public keys are stored in the OTP area, and the public keys are generated from a variety of different anti-cracking signature algorithms, the compatibility of this application solution is strong, which is conducive to flexibly meeting the needs of different users and adapting to multiple algorithm scenarios without the need to recall the management controller.

[0105] In the solution of this application, the server generates a public-private key pair using a specialized anti-cracking signature algorithm. This makes the digital signature generated by this private key effectively resistant to new computing attacks and difficult to crack, thereby effectively preventing the functional modules of the management controller from being illegally unlocked. Specifically, the client's management controller needs to generate a license information file for requesting functions from the server based on the client's own hardware characteristics. After obtaining the license information file, the server can digitally sign the license information file using the private key to obtain the signature information. The server then needs to send back a feedback file containing the license information file, the signature information, and the hash algorithm used for the digital signature to the client. It is understood that under normal circumstances, the client can verify the signature information based on the public key, the license information file, and the hash algorithm. If the verification is successful, the feedback file can be imported into the functional module to be unlocked, thereby unlocking the functional module. Conversely, if the verification fails, the process ends and the functional module cannot be unlocked. It should also be noted that the public key is stored in the one-time programmable area of ​​the management controller itself. After the management controller leaves the factory, the public key cannot be modified, which also helps to ensure the security of the public key. Furthermore, in the process of function authorization, the client needs to read the public key specified by the circuit state of the hardware selection circuit from its own one-time programmable area through the circuit state of the hardware selection circuit, and multiple public keys are stored in the one-time programmable area. Such a design can flexibly and effectively implement changes in the public and private key pairs used. For example, when the currently used private key is leaked, the manufacturer can discard the leaked private key and enable a new private key, and notify the user to adjust the circuit state of the hardware selection circuit accordingly, so that the client can change the public key used. This process does not require the client to be returned to the factory, effectively reducing the cost of equipment recalls caused by private key leaks.

[0106] In summary, this application solution can effectively ensure the security of public-private key pairs and resist new computing attacks, thereby preventing the illegal unlocking of functional modules of the management controller. It also effectively reduces the cost of equipment recalls caused by private key leakage.

[0107] See Figure 3 The present invention also provides a function authorization method that can be applied to a server, comprising the following steps:

[0108] Step S301: receiving a license information file sent by a client; wherein the license information file is a license information file generated by a management controller of the client based on the hardware feature information of the client itself and used to apply for a function from a server;

[0109] Step S302: The license information file is digitally signed using a private key to obtain signature information.

[0110] Step S303: Generate a feedback file that carries the license information file, signature information, and the hash algorithm used for digital signature.

[0111] Step S304: Send the feedback file to the client, so that the client's management controller reads the public key specified by the circuit state from the one-time programmable area of ​​the management controller itself through the circuit state of the hardware selection circuit, and verifies the signature information based on the public key, license information file and hash algorithm. When the verification passes, the feedback file is imported into the functional module to be unlocked to unlock the functional module.

[0112] The hardware selection circuit is used to select a public key. The private key and public key are a pair of public and private keys generated in advance by the server using an anti-cracking signature algorithm. Multiple public keys are stored in the one-time programmable area.

[0113] Corresponding to the above method embodiments, embodiments of the present invention further provide an electronic device, a computer-readable storage medium, and a computer program product, which may refer to each other in correspondence with the above.

[0114] See also Figure 4 As shown, the electronic device may include:

[0115] Memory 401, used for storing computer programs;

[0116] The processor 402 is configured to execute a computer program to implement the steps of the function authorization method in any of the above embodiments.

[0117] The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the function authorization method in any of the above embodiments are implemented.

[0118] See Figure 5 The computer-readable storage medium 50 stores a computer program 51. When executed by a processor, the computer program 51 implements the steps of the function authorization method described in any of the above embodiments. The computer-readable storage medium 50 herein includes random access memory (RAM), internal memory, read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, removable disks, or any other form of storage medium known in the art.

[0119] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0120] The above is a detailed introduction to a function authorization method, electronic device, program product, and storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.

Claims

1. A function authorization method, characterized in that: Management controllers for clients, including: Generate a license information file for function application to the server based on the client's own hardware feature information; Receive a feedback file from the server; wherein the feedback file carries the license information file, signature information obtained by the server digitally signing the license information file using a private key, and a hash algorithm used by the server when performing the digital signature; Reading a public key specified by a circuit state of a hardware selection circuit from a one-time programmable area of ​​the management controller itself through the circuit state of the hardware selection circuit; wherein the hardware selection circuit is a hardware selection circuit for selecting a public key; Verifying the signature information based on the public key, the license information file, and the hash algorithm, and when the verification passes, importing the feedback file into the function module to be unlocked to unlock the function module; The private key and the public key are a set of public-private key pairs generated in advance by an anti-cracking signature algorithm; and a plurality of public keys are stored in the one-time programmable area; The anti-cracking signature algorithm used includes a plurality of different anti-cracking signature algorithms, so that the plurality of public keys stored in the one-time programmable area are public keys generated from the plurality of different anti-cracking signature algorithms; The method comprises: selecting a circuit state of a circuit by hardware, and reading a public key specified by the circuit state from a one-time programmable area of ​​the management controller. When the circuit state of the hardware selection circuit is the i-th state, reading the public key pre-stored in the i-th storage block from the i-th storage block of the one-time programmable area of ​​the management controller itself; The one-time programmable area of ​​the management controller itself has multiple storage blocks, and i is a positive integer; Reading a public key pre-stored in the i-th storage block of the one-time programmable area of ​​the management controller itself from the i-th storage block includes: Obtaining an activation flag bit of an i-th storage block of a one-time programmable area of ​​the management controller itself; When the activation flag is a first value indicating an inactive state, the activation flag is changed to a second value indicating an active state, and a public key pre-stored in the i-th storage block is read; When the activation flag is the second value indicating an activation state, reading the public key pre-stored in the i-th storage block; The public key in the i-th storage block is allowed to be read only when the activation flag of the i-th storage block is the second value; The activation flag cannot be modified directly by the user. The value of the activation flag can only be changed by adjusting the value in the relevant register through the underlying code. When the activation flag is a first value indicating an inactive state, the method further includes: changing the activation flag to a second value indicating an active state; The public key used in the last function authorization is invalidated; The activation flag of the storage block storing the invalid public key is changed to a third value indicating an invalid state.

2. The function authorization method according to claim 1, characterized in that: The hardware selection circuit is a DIP switch type hardware selection circuit, so that the circuit state of the hardware selection circuit can be adjusted through the DIP switch of the hardware selection circuit.

3. The function authorization method according to claim 2, characterized in that: The DIP switches of the hardware selection circuit are hardware interlocked DIP switches, so that at most one DIP switch is in the trigger state at the same time; The hardware selection circuit includes a plurality of dip switches. When any one of the dip switches is in the trigger state, the other dip switches are in the non-trigger state.

4. The function authorization method according to claim 1, characterized in that: The method comprises: selecting a circuit state of a circuit by hardware, and reading a public key specified by the circuit state from a one-time programmable area of ​​the management controller. According to the set order, the level status of each specified pin is detected in turn; When it is detected that the level state of the i-th pin is a set state, determining that the circuit state of the hardware selection circuit is an i-th state; When the circuit state of the hardware selection circuit is the i-th state, the public key pre-stored in the i-th storage block is read from the i-th storage block of the one-time programmable area of ​​the management controller itself.

5. The function authorization method according to claim 1, characterized in that: Also includes: After obtaining the activation flag of the i-th storage block of the one-time programmable area of ​​the management controller itself, when the activation flag is a third value indicating a failure state, the current function authorization process is terminated.

6. The function authorization method according to claim 1, characterized in that: Also includes: When the circuit state of the hardware selection circuit is the i-th state, obtaining an index value stored in the i-th storage block of the one-time programmable area of ​​the management controller itself; Determine whether the index value is i; If yes, then executing the operation of reading the public key pre-stored in the i-th storage block from the i-th storage block of the one-time programmable area of ​​the management controller itself; If not, the current function authorization process ends.

7. The function authorization method according to claim 1, characterized in that: The hardware selection circuit is arranged inside the chassis so that the circuit state of the hardware selection circuit is adjusted only after the chassis is opened; The method also includes: when it is detected that the chassis is opened, an alarm is issued and a log is recorded.

8. A function authorization method, characterized in that: Applied to the server, including: Receiving a license information file sent by a client; wherein the license information file is a license information file generated by a management controller of the client based on hardware feature information of the client itself and used to apply for a function to a server; Signature information obtained by digitally signing the license information file using a private key; generating a feedback file carrying the license information file, the signature information, and the hash algorithm used when performing digital signing; Sending the feedback file to the client, so that the management controller of the client reads the public key specified by the circuit state from the one-time programmable area of ​​the management controller itself through the circuit state of the hardware selection circuit, verifies the signature information based on the public key, the license information file, and the hash algorithm, and when the verification passes, imports the feedback file into the functional module to be unlocked to unlock the functional module; The hardware selection circuit is a hardware selection circuit for selecting a public key; the private key and the public key are a set of public-private key pairs generated in advance by an anti-cracking signature algorithm; and a plurality of public keys are stored in the one-time programmable area; The anti-cracking signature algorithm used includes a plurality of different anti-cracking signature algorithms, so that the plurality of public keys stored in the one-time programmable area are public keys generated from the plurality of different anti-cracking signature algorithms; The method comprises: selecting a circuit state of a circuit by hardware, and reading a public key specified by the circuit state from a one-time programmable area of ​​the management controller. When the circuit state of the hardware selection circuit is the i-th state, reading the public key pre-stored in the i-th storage block from the i-th storage block of the one-time programmable area of ​​the management controller itself; The one-time programmable area of ​​the management controller itself has multiple storage blocks, and i is a positive integer; Reading a public key pre-stored in the i-th storage block of the one-time programmable area of ​​the management controller itself from the i-th storage block includes: Obtaining an activation flag bit of an i-th storage block of a one-time programmable area of ​​the management controller itself; When the activation flag is a first value indicating an inactive state, the activation flag is changed to a second value indicating an active state, and a public key pre-stored in the i-th storage block is read; When the activation flag is the second value indicating an activation state, reading the public key pre-stored in the i-th storage block; The public key in the i-th storage block is allowed to be read only when the activation flag of the i-th storage block is the second value; The activation flag cannot be modified directly by the user. The value of the activation flag can only be changed by adjusting the value in the relevant register through the underlying code. When the activation flag is a first value indicating an inactive state, the method further includes: changing the activation flag to a second value indicating an active state; The public key used in the last function authorization is invalidated; The activation flag of the storage block storing the invalid public key is changed to a third value indicating an invalid state.

9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the steps of the function authorization method according to any one of claims 1 to 7, or implements the steps of the function authorization method according to claim 8.

10. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the function authorization method according to any one of claims 1 to 7, or implement the steps of the function authorization method according to claim 8 when executing the computer program.

11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the computer program implements the steps of the function authorization method according to any one of claims 1 to 7, or implements the steps of the function authorization method according to claim 8.

Citation Information

Patent Citations

  • Software authorization method and system

    CN117725563A

  • Device and method for providing data encipher to identity authentication

    CN1956374A