Offline license authentication methods, devices, equipment, and storage media

By generating authorization request files using hardware feature information and public keys in classified units or high-security industrial environments, and performing offline authorization verification in a secure enclave, the problem of low security and weak anti-copying ability in license authorization management in existing technologies is solved. Hardware-level authorization binding and fine-grained access control are achieved to ensure the trusted protection of authorization information.

CN123122887APending Publication Date: 2026-11-17JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611230252.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In classified units or high-security industrial environments, existing license authorization management cannot be adapted to offline scenarios, resulting in low security, weak anti-copying capabilities, and a lack of reliable protection for authorization information.

Method used

By obtaining the hardware characteristics and public key of the management node, an authorization request file is generated and sent to the generating device in offline mode. The encrypted license file is then verified using a secure enclave to generate a function access token, thereby achieving hardware-level authorization binding and fine-grained access control.

Benefits of technology

It prevents unauthorized copying of licenses, ensures the reliable protection of authorized information, adapts to the requirements of high-security physically isolated networks, and provides granular dynamic access control and failure protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123122887A_ABST
    Figure CN123122887A_ABST
Patent Text Reader

Abstract

This application discloses an offline license authentication method, relating to the field of computer technology. The method includes acquiring and processing the hardware characteristic information and public key of a management node, generating an authorization request file, sending it offline to a generating device, receiving the encrypted license file returned offline by the generating device and transmitting it to a secure enclave of the management node, where the secure enclave verifies the authorization of the encrypted license file. After successful authorization verification, the method receives a function access token generated by the secure enclave and confirms the authorization is effective. After authorization is effective, the method receives a user's function access request, verifies the legality of the function access request based on the authorization information of the function access token, and executes corresponding processing operations. This method solves the problems of insecure verification environment, weak anti-copying capability, and lack of trusted protection for authorization information, achieving the technical effect of hardware-level authorization binding and runtime fine-grained access control that prevents relocation and tampering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to an offline license authentication method, apparatus, device, and storage medium. Background Technology

[0002] In classified units, high-security industrial environments, or physically isolated networks, servers are typically without external network connections. License management for commercial virtualization software and other products largely relies on online activation and verification, making it unsuitable for offline scenarios. While some technologies generate fingerprints by collecting server CPU (Central Processing Unit) serial numbers and motherboard information and binding them to licenses for offline authorization, their verification logic usually runs in a regular operating system in user space. This not only lacks secure isolation, making it highly vulnerable to attacks, tampering, and bypassing by malware or high-privilege users, but also, because it simply binds hardware fingerprints, a breach in the verification logic can lead to licenses being illegally copied and used on other hardware. Furthermore, after successful verification, authorization information is often stored in plaintext or weakly encrypted form in system memory, making it susceptible to tampering to expand the scope of authorization. Overall, it suffers from low security, weak resistance to copying, and a lack of reliable protection for authorization information.

[0003] Therefore, in view of the shortcomings of related technical solutions, the present invention provides an offline license authentication method. Summary of the Invention

[0004] This application provides an offline license authentication method, electronic device, and storage medium to at least address the problems of insecure verification environment, weak anti-copying capability, and lack of reliable protection for authorization information.

[0005] This application provides an offline license authentication method, comprising: acquiring and processing the hardware feature information and public key of a management node, generating an authorization request file, and sending the authorization request file to a generating device offline, wherein the public key is stored in a secure enclave; receiving an encrypted license file returned offline by the generating device, transmitting the encrypted license file to the secure enclave of the management node, and having the secure enclave verify the authorization of the encrypted license file; in response to the encrypted license file passing the authorization verification, receiving a function access token generated by the secure enclave and confirming that the authorization is effective; in response to the encrypted license file failing the authorization verification, receiving a failure indication generated by the secure enclave; and after the authorization is effective, in response to receiving a user's function access request, verifying the legality of the function access request based on the authorization information of the function access token and performing corresponding processing operations.

[0006] This application also provides an offline license authentication device, comprising: a first processing module, configured to acquire and process the hardware feature information and public key of a management node, generate an authorization request file, and send the authorization request file to a generating device offline; a second processing module, configured to receive an encrypted license file returned offline by the generating device, transmit the encrypted license file to a secure enclave, and have the secure enclave verify the authorization of the encrypted license file; a third processing module, configured to receive a function access token generated by the secure enclave and confirm authorization validity in response to the encrypted license file passing authorization verification; a fourth processing module, configured to receive a failure indication generated by the secure enclave in response to the encrypted license file failing authorization verification; and a fifth processing module, configured to verify the legality of a function access request received from a user, based on the authorization information of the function access token, and perform corresponding processing operations.

[0007] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of any of the above-described offline license authentication methods when executing the computer program.

[0008] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described offline license authentication methods.

[0009] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described offline license authentication methods.

[0010] This application achieves the following: by acquiring and processing the hardware characteristic information and public key of the management node, generating an authorization request file, and sending the authorization request file to the generating device offline; receiving the encrypted license file returned by the generating device offline, transmitting the encrypted license file to the management node's secure enclave, where the secure enclave verifies the authorization of the encrypted license file; in response to the encrypted license file passing authorization verification, receiving the function access token generated by the secure enclave and confirming authorization validity; in response to the encrypted license file failing authorization verification, receiving the failure indication generated by the secure enclave; after authorization becomes effective, in response to receiving a user's function access request, verifying the legality of the function access request based on the authorization information of the function access token and executing corresponding processing operations. Therefore, based on offline authorization using hardware characteristics and public keys and closed-loop verification within the enclave, hardware-level authorization binding and runtime fine-grained access control that prevents relocation and tampering are achieved. Attached Figure Description

[0011] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the 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.

[0012] Figure 1 A flowchart illustrating an offline license authentication method provided in this application embodiment; Figure 2 A schematic diagram of the system interaction process for an offline license authentication method provided in this application embodiment; Figure 3 A structural block diagram of an offline license authentication device provided in this application embodiment; Figure 4 This is an internal structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0013] The technical solutions of 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 of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

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

[0015] 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.

[0016] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0017] The embodiments of this application provide an offline license authentication method, and the method is described in detail below in conjunction with the execution flow of the offline license authentication method.

[0018] S101: Obtain and process the hardware characteristic information and public key of the management node, generate an authorization request file, and send the authorization request file to the generating device offline, wherein the public key is stored in a secure enclave.

[0019] Here, the management node is the core server in a cluster or data center responsible for controlling, configuring, and monitoring other computing nodes. Examples include the master control server in a virtualization platform, the management node in a cloud platform, and the consensus node in a blockchain.

[0020] Here, an enclave is an isolated region in memory that is encrypted at the hardware level, and even the operating system kernel or virtual machine monitor cannot access the code and data within it.

[0021] Here, the public key is an asymmetric encryption public key generated within the enclave and made public.

[0022] The hardware feature information may include CPU serial number, number of sockets, motherboard information and serial number, and other custom related information.

[0023] Offline methods can include transferring files via physical media such as USB flash drives, CDs, or intranet transfers, without going through the internet.

[0024] Here, "generating device" refers to a server that provides hardware or software licenses.

[0025] S102: Receive the encrypted license file returned by the generating device offline, transmit the encrypted license file to the secure enclave of the management node, and have the secure enclave verify the authorization of the encrypted license file.

[0026] Here, a secure enclave is a hardware-isolated secure area integrated within a modern processor (CPU). Through specialized hardware mechanisms, it creates a protected execution environment for sensitive code and data, isolated from the main operating system (OS), hypervisor, BIOS / UEFI, and even the system administrator with the highest privileges, making it impossible for them to be spied on or tampered with.

[0027] Here, the encrypted license file is an encrypted and digitally signed authorization credential generated by the generating device based on the authorization request file.

[0028] S103: In response to the encrypted license file passing authorization verification, receive the function access token generated by the secure enclave and confirm that the authorization is effective.

[0029] Here, the function access token is a temporary or permanent credential generated within the secure enclave, used to prove that the current node has been legally authorized and is allowed to invoke specific functions.

[0030] Specifically, after authorization verification is successful, the security enclave will generate a function access token, which contains a list of authorized functions and the number of authorized functions (such as the number of supported physical nodes). The security enclave will digitally sign the security token using a signing key.

[0031] S104: In response to the encryption license file failing authorization verification, receive a failure indication for secure enclave generation.

[0032] Here, the failure indication is a structured error message generated internally by the secure enclave, used to report the reason for the authorization verification failure to the management node. It typically includes an error code, a detailed error description, and the specific stage of the failure (such as invalid signature, hardware incompatibility, expired license, incorrect format, etc.).

[0033] Verification failures can include signature verification failure, decryption failure, hardware binding failure, validity period check failure, and format error.

[0034] Specifically, when authorization verification fails, the security enclave will return a failure message to the authorization service. When the authorization service receives a system request, it will directly return this failure message and will not allow system function operations.

[0035] S105: After authorization takes effect, in response to receiving a user's function access request, verify the legality of the function access request based on the authorization information of the function access token and perform the corresponding processing operation.

[0036] Here, a function access request is a request sent by an authenticated user, application, or system component to the management node to invoke a specific function.

[0037] Function access requests can be operations related to confidential computing and hardware security, such as starting an enclave, performing remote authentication, exporting protected keys, and querying hardware status.

[0038] The authorization information may include a list of function permissions, validity period, resource restrictions, binding identifiers, etc.

[0039] The validity verification can include token validity checks, permission matching, and context verification.

[0040] It should be noted that this application relies on a hardware-level isolated secure enclave to implement the core verification logic, possessing extremely high resistance to attacks and fundamentally preventing local license cracking and forgery; it adopts a purely offline working mode, completing the entire license processing process without a network connection, adapting to the requirements of high-security physically isolated networks; through strong binding and trusted verification of the license and server hardware fingerprint, it effectively prevents the illegal copying of the license; relying on the secure enclave to issue tamper-proof access tokens, it can achieve fine-grained and reliable dynamic access control; at the same time, it is equipped with a clear expiration protection mechanism, which automatically downgrades and restricts system functions in a restricted mode when the license expires, ensuring system security, controllability, and orderly management.

[0041] In some specific implementations, the hardware characteristic information and public key of the management node are obtained and processed to generate an authorization request file, which is then sent to the generating device offline. This includes: Obtain and encrypt the hardware characteristic information of the management node to obtain the first hardware fingerprint; Obtain the public key from the asymmetric key pair from the secure enclave of the processor on the management node; The authorization request file is determined based on the first hardware fingerprint and public key.

[0042] Here, a hardware fingerprint is the final representation of encrypted hardware characteristic information. It is an irreversible string that uniquely identifies the physical device.

[0043] Here, the asymmetric key pair includes a public key and a private key. The private key is always stored within the CPU enclave and is never exported; it is used for decryption and signing. The public key can be exported and is used for encrypting data and verifying signatures.

[0044] For example, encryption can be performed using hash operations (such as the SHA-256 algorithm), message authentication code algorithms (HMAC), encryption algorithms, key derivation functions, etc., either individually or in combination.

[0045] Specifically, the hardware fingerprint sequence of the management node is obtained, including but not limited to CPU serial number, number of sockets, motherboard information and serial number and other custom related information. The hardware fingerprint sequence is encrypted using the SHA-256 algorithm and other methods to generate a hardware fingerprint. The public key of the asymmetric key pair of the CPU of the management node is obtained from its secure enclave. The public key and hardware fingerprint information are packaged and an authorization request file is generated. This file contains hardware fingerprint information, security public key, etc.

[0046] In this way, by encrypting hardware features into irreversible fingerprints and binding them to public keys, hardware privacy protection and anti-counterfeiting of authorization requests are achieved, and device uniqueness binding can prevent authorization piracy and copying.

[0047] In one embodiment, the hardware characteristic information of the management node is obtained and encrypted to obtain a hardware fingerprint, including: Generate random salt values ​​using a random number generator; Collect multiple hardware feature information of the management node, process the multiple hardware feature information through a fuzz extractor, and generate a stable secret value; The hardware fingerprint is obtained by combining a stable secret value with a random salt value for encryption.

[0048] Here, the random salt value is a random number (usually 16 or 32 bytes) introduced when generating a hardware fingerprint to increase the unpredictability of the fingerprint.

[0049] Here, the fuzz extractor is used to extract a stable, uniformly random key from input data that has noise or slight variations.

[0050] The fuzz extractor can include algorithms such as fuzzy extraction, secure sketching, and fuzzy commitment.

[0051] Here, the stable key value is a fixed-length, uniformly distributed key extracted from multiple hardware feature information by a fuzzy extractor.

[0052] Specifically, during authorization verification, the hardware feature information collected in real time is processed using the same fuzz extractor, and combined with the random salt value carried in the encrypted license file, the fingerprint for comparison is recovered.

[0053] This allows the hardware to pass verification even after minor changes (such as component aging or firmware upgrades), avoiding license invalidation due to normal hardware maintenance and preventing cloning attacks.

[0054] In some specific implementations, the encryption license file is generated in the following way: Generate a device parsing authorization request file to obtain hardware feature information and public key; Determine the authorization parameters based on the authorization policy; The authorization information is determined based on the authorization parameters and hardware characteristic information; The authorization information is encrypted using a public key to generate an encrypted license file.

[0055] Here, an authorization policy is a set of business rules and restrictions defined internally by the vendor to determine what level of authorization is granted to a user. For example, an authorization policy may include authorization type, validity period, permitted scope of functions, node quantity limits, and geographical restrictions.

[0056] The authorization parameters may include the authorization validity period, the maximum number of authorized physical nodes, and the list of authorized functions.

[0057] Specifically, the software vendor's operators import the authorization request file provided by the customer, parse out the hardware fingerprint and public key, set the authorization parameters, and use the security public key parsed from the authorization request file to encrypt the plaintext authorization information containing the management node hardware fingerprint, authorized function list, authorization period, and authorization quantity, generating an authorization file (i.e., an encrypted license file), which can be delivered to the customer via email, USB flash drive, or other means.

[0058] In this way, by using public key encryption to encrypt authorization information, the confidentiality of the license is bound to a specific hardware device, ensuring that only the target secure enclave can decrypt and use it, thus preventing authorization leakage and unauthorized migration from the source.

[0059] In some specific implementations, the encrypted license file is authorized and verified by a secure enclave, including: The secure enclave accesses the private key in the asymmetric key pair, decrypts the encrypted license file using the private key, and obtains the authorization information. Parse the authorization information to obtain the first hardware fingerprint and license identifier information; Verify the legality of the license information; In response to the license identification information failing the legality verification, it is determined that the encrypted license file has failed the authorization verification; In response to the legality verification of the license identification information, the current hardware feature information of the management node is collected in real time through the secure enclave. The current hardware feature information is encrypted using the same encryption method and feature splicing order as the first hardware fingerprint to obtain the second hardware fingerprint. In the internal isolated storage area of ​​the secure enclave, the first hardware fingerprint and the second hardware fingerprint are compared byte by byte. If the first hardware fingerprint and the second hardware fingerprint match, it is determined that the encrypted license file has passed the authorization verification. In response to the discrepancy between the first and second hardware fingerprints, it is determined that the encrypted license file has failed authorization verification.

[0060] Specifically, the user logs into the management node and uploads the obtained license file (i.e., the encrypted license file) to the software system. The authorization service parses it, and the management node's authorization service transmits the license to a secure enclave on the local server. The secure enclave uses its internal private key to decrypt the license, obtaining plaintext authorization information. The secure enclave collects the hardware information of the current management node in real time and calculates the real-time hardware fingerprint using the same encryption algorithm. It then compares this fingerprint with the hardware fingerprint obtained after decrypting the license. If they do not match, an authorization failure message is returned directly, and subsequent operations are not allowed. If they match, it indicates that the license authorization verification has passed.

[0061] In this way, the real-time hardware status is dynamically bound to prevent license duplication.

[0062] In some specific implementations, the hardware fingerprint includes a core hardware fingerprint and an auxiliary hardware fingerprint, wherein the core hardware fingerprint is mandatory binding information when generating the authorization request file; the authorization verification of the encrypted license file by the secure enclave also includes: In response to the detection that the core hardware fingerprint in the first hardware fingerprint is consistent with the core hardware fingerprint in the second hardware fingerprint and that the auxiliary hardware fingerprint in the first hardware fingerprint is inconsistent with the auxiliary hardware fingerprint in the second hardware fingerprint, the security enclave determines that the authorization verification result is downgraded and generates a downgraded function access token, wherein the downgraded function access token is a non-core function in the list of open authorized functions.

[0063] Here, the core hardware fingerprint is the hardware characteristic information that must be bound when generating the authorization request file. It is usually the most stable and difficult-to-replace or tamper with hardware identifier in the device.

[0064] The core hardware fingerprint can include the CPU serial number, motherboard serial number, TPM endorsement key hash, etc.

[0065] Here, auxiliary hardware fingerprints are optional hardware feature information that can be bound when generating the authorization request file. They are usually identifiers of components in the device that are relatively easy to change or hot-swap.

[0066] Among them, auxiliary hardware fingerprints can include MAC address, hard drive serial number, and memory serial number, etc.

[0067] Among them, the required binding information is key information that must be verified and cannot be missing when generating authorization requests and performing authorization verification.

[0068] In this way, by distinguishing between core and auxiliary hardware fingerprints and introducing a downgrade authorization mechanism, while ensuring that the core identity cannot be migrated, management and monitoring capabilities are allowed to be retained after changes to non-critical hardware. This ensures the security of authorization binding while balancing availability and compatibility.

[0069] In some specific implementations, the secure enclave has a built-in anti-rollback counter. In response to the encrypted license file passing authorization verification, it receives a function access token generated by the secure enclave to confirm that the authorization is effective, including: The secure enclave reads the license version number from the encrypted license file and compares it with the highest historical version number recorded in the anti-rollback counter. In response to the license version number being lower than the highest historical version number, the encrypted license file is determined to be a rollback attack file, and the authorization activation process is terminated; In response to the license version number being equal to the highest historical version number, the secure enclave reads the expiration timestamp in the encrypted license file and compares it with the historical authorization time recorded in the anti-rollback counter. If the validity period timestamp is earlier than the historical authorization time, the encrypted license file is determined to be a rollback attack file, and the authorization activation process is terminated.

[0070] Here, the rollback prevention counter is a monotonically increasing hardware-level status register maintained within the secure enclave, used to record the latest version and time information during the authorization process.

[0071] Here, the license version number is an incrementing version identifier written by the vendor in the encrypted license file, used to distinguish license files from different periods.

[0072] Here, the highest historical version number is the highest license version number that has been successfully activated to date, as recorded in the rollback prevention counter.

[0073] Here, the historical authorization time is the latest expiration timestamp of the authorization files that have been successfully activated to date, as recorded in the rollback prevention counter.

[0074] In this way, by forcing the license version number to monotonically increase and the license time to shift unidirectionally through a hardware-level anti-rollback counter, license downgrade and replay attacks are completely blocked, ensuring that old licenses that have been revoked or expired cannot be maliciously reactivated.

[0075] In some specific implementations, in response to receiving a user's function access request, the validity of the function access request is verified based on the authorization information of the function access token, and corresponding operations are performed, including: Add a license verification module before the privileged operation function interface; When a user's function access request is received, the license verification module retrieves the currently valid function access token from the authorization service interface provided by the security enclave. The authorization service verifies the signature validity of the access token and, upon successful verification, parses out the authorized resource limit and authorized function scope from the access token. The license verification module checks whether the operation corresponding to the function access request falls within the scope of the authorized function. If the operation corresponding to the function access request falls within the authorized function scope, determine whether the resources occupied by the system after the operation exceed the authorized resource limit; The system executed the operation normally as the resources used after the operation did not exceed the authorized resource limit.

[0076] Here, the privileged operation function interface is the entry point for high-privilege operations in the management node that require authorization to execute.

[0077] Here, the authorization service interface is a query service exposed by the security enclave, used to provide the current authorization status to other components of the system.

[0078] Here, the authorized resource limit is the maximum resource usage limit recorded in the token.

[0079] The function access token may also include token validity information, token usage count counter, and token binding session identifier.

[0080] Specifically, a license verification hook (i.e., a license verification module) is added before the API interfaces of all privileged operation functions (such as adding compute nodes, creating virtual machines, etc.) in the virtualization system. When a user attempts to execute a privileged function operation, the verification hook requests a currently valid function access token from the authorization service. After the authorization service verifies the validity of the function access token's signature, it parses out the authorized quantity, authorized function list, etc. from the function access token. The verification hook checks whether the current operation (such as adding a compute node) is in the authorized function list, and whether the combined number of compute nodes in the system and the compute node to be added is within the authorized quantity. If both conditions are met, the function is executed normally. If not, an error message is displayed indicating insufficient authorized quantity or functional restriction.

[0081] Specifically, when license verification fails (e.g., enclave decryption failure, hardware fingerprint or cluster topology mismatch, license expiration), the authorization service will be unable to generate a function access token. At this point, all privileged operation verification hooks will receive a "no valid license" status signal, and the system will switch to restricted mode, prohibiting all privileged operations.

[0082] In this way, multi-dimensional token verification and resource management can be carried out to achieve fine-grained and reliable interception and control of functional operations, ensuring operational security while preventing unauthorized use of resources.

[0083] In one embodiment, Figure 2 This is a schematic diagram of the system interaction process in the embodiments of this application, such as... Figure 2 As shown, the system in this application includes a client side and a vendor side, and the system interaction process includes: authorization request generation on the client side, license generation on the vendor side, and authorization verification and function execution on the client side.

[0084] Specifically, the authorization request generation on the client side includes: the client virtualization system collecting hardware feature information of the management node, encrypting and generating a hardware fingerprint using hash algorithms such as SHA256, exporting the public key of the asymmetric key pair from the hardware security enclave (CPU security enclave), and encapsulating the hardware fingerprint and public key into a structured request file for authorization from the manufacturer.

[0085] Specifically, the license generation process on the manufacturer's side includes: generating a device import file to be authorized, parsing and extracting the public key and hardware fingerprint information from the file; configuring the authorization policy, including the authorization validity period, authorization resource quota, and authorization function list; encrypting the authorization policy using the extracted public key; generating an offline license file to ensure that it can only be decrypted by the corresponding enclave.

[0086] Specifically, the client-side authorization verification and function execution include: the hardware security enclave receives the offline authorization file, decrypts the license using its internally stored private key, acquires the current hardware information in real time, generates a fingerprint using the same SHA256 encryption, and compares it with the hardware fingerprint bound to the license: if the verification matches, authorization is successful, and a function access token is generated, containing a digital signature, authorization information, etc.; if the verification does not match, authorization fails, and the function is restricted. After successful authorization, the enclave issues a function access token to the client system. Based on this, the user initiates a privileged operation request for the virtualization system. The client system requests a currently valid function access token from the hardware security enclave and verifies the validity and timeliness of the token signature: if the signature is invalid, the function is directly determined to be restricted; if the signature is valid, the authorized function list in the token is parsed, and it is checked whether the currently requested operation is within the authorized function list. If it is outside the range, the function is restricted; if it is within the range, the privileged operation is executed normally. After all verifications pass, the privileged operation requested by the user is executed, and the process is completed.

[0087] It should be understood that, although Figure 1 and 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 and 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0088] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0089] Embodiments of this application also provide an offline license authentication device, comprising: a first processing module 301, configured to acquire and process the hardware feature information and public key of a management node, generate an authorization request file, and send the authorization request file to a generating device offline, wherein the public key is stored in a secure enclave; a second processing module 302, configured to receive an encrypted license file returned offline by the generating device, transmit the encrypted license file to the secure enclave of the management node, and have the secure enclave perform authorization verification on the encrypted license file; a third processing module 303, configured to receive a function access token generated by the secure enclave and determine that the authorization is effective in response to the encrypted license file passing the authorization verification; a fourth processing module 304, configured to receive a failure indication generated by the secure enclave in response to the encrypted license file failing the authorization verification; and a fifth processing module 305, configured to, after the authorization is effective, in response to receiving a function access request from a user, verify the legality of the function access request based on the authorization information of the function access token and perform corresponding processing operations.

[0090] As a preferred implementation, in this embodiment of the application, the first processing module 301 is specifically used to: obtain and encrypt the hardware feature information of the management node to obtain a first hardware fingerprint; obtain the public key in the asymmetric key pair from the secure enclave of the processor of the management node; and determine the authorization request file based on the first hardware fingerprint and the public key.

[0091] In this embodiment, the device further includes a generation module. The generation module is specifically used for: generating a device to parse an authorization request file to obtain hardware feature information and a public key; determining authorization parameters according to an authorization policy; determining authorization information based on the authorization parameters and hardware feature information; and encrypting the authorization information using the public key to generate an encrypted license file.

[0092] As a preferred implementation, in this embodiment, the third processing module 303 is specifically used for: calling the private key in the asymmetric key pair from the secure enclave, decrypting the encrypted license file using the private key to obtain authorization information; parsing the authorization information to obtain a first hardware fingerprint and license identification information; performing a legality check on the license identification information; determining that the encrypted license file has failed authorization verification in response to the license identification information failing the legality check; in response to the license identification information passing the legality check, collecting the current hardware feature information of the management node in real time through the secure enclave, encrypting the current hardware feature information using the same encryption method and feature concatenation order as that used to generate the first hardware fingerprint, to obtain a second hardware fingerprint; comparing the first hardware fingerprint and the second hardware fingerprint byte-by-byte in the internal isolated storage area of ​​the secure enclave; determining that the encrypted license file has passed authorization verification in response to the first hardware fingerprint and the second hardware fingerprint being identical; and determining that the encrypted license file has failed authorization verification in response to the first hardware fingerprint and the second hardware fingerprint being different.

[0093] As a preferred implementation, in this embodiment of the application, the third processing module 303 is further configured to: in response to detecting that the core hardware fingerprint in the first hardware fingerprint is consistent with the core hardware fingerprint in the second hardware fingerprint and that the auxiliary hardware fingerprint in the first hardware fingerprint is inconsistent with the auxiliary hardware fingerprint in the second hardware fingerprint, the security enclave determines that the authorization verification result is downgraded and generates a downgraded function access token, wherein the downgraded function access token is a non-core function in the list of open authorized functions.

[0094] In a preferred implementation, in this embodiment, the fourth processing module 304 is specifically configured to: securely read the license version number in the encrypted license file and compare it with the highest historical version number recorded in the anti-rollback counter; in response to the license version number being lower than the highest historical version number, determine that the encrypted license file is a rollback attack file and terminate the authorization activation process; in response to the license version number being equal to the highest historical version number, securely read the validity period timestamp in the encrypted license file and compare it with the historical authorization time recorded in the anti-rollback counter; in response to the validity period timestamp being earlier than the historical authorization time, determine that the encrypted license file is a rollback attack file and terminate the authorization activation process.

[0095] In a preferred implementation, in this embodiment, the fifth processing module 305 is specifically configured to: add a permission verification module before the privileged operation function interface; in response to receiving a user's function access request, the permission verification module retrieves the currently valid function access token from the authorization service interface provided by the security enclave; the authorization service verifies the signature legality of the function access token, and after successful verification, parses at least one of the following from the function access token: authorized resource limit, authorized function scope, token validity period information, token usage count counter, and token binding session identifier; the permission verification module checks whether the operation corresponding to the function access request falls within the authorized function scope; in response to the operation corresponding to the function access request falling within the authorized function scope, it determines whether the resources occupied by the system after the operation exceed the authorized resource limit; in response to the resources occupied by the system after the operation not exceeding the authorized resource limit, the operation is executed normally.

[0096] For a description of the features in the embodiment corresponding to the offline license authentication device, please refer to the relevant description of the embodiment corresponding to the offline license authentication method, which will not be repeated here.

[0097] Embodiments of this application also provide an electronic device, which may be a terminal, and its internal structure diagram may be as follows: Figure 4As shown, the electronic device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements an offline license authentication method. The display screen can be a liquid crystal display (LCD) or an e-ink display. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.

[0098] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0099] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps: S1: Obtains and processes the hardware characteristic information and public key of the management node, generates an authorization request file, and sends the authorization request file to the generating device offline, wherein the public key is stored in a secure enclave; S2: Receives an encrypted license file returned offline by the generating device, transmits the encrypted license file to the secure enclave of the management node, and the secure enclave verifies the authorization of the encrypted license file; S3: In response to the encrypted license file passing authorization verification, receives a function access token generated by the secure enclave and confirms that the authorization is effective; S4: In response to the encrypted license file failing authorization verification, receives a failure indication generated by the secure enclave; S5: After the authorization is effective, in response to receiving a user's function access request, verifies the legality of the function access request based on the authorization information of the function access token and performs corresponding processing operations.

[0100] In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining and encrypting the hardware feature information of the management node to obtain a first hardware fingerprint; obtaining the public key from the asymmetric key pair in the secure enclave of the processor of the management node; and determining the authorization request file based on the first hardware fingerprint and the public key.

[0101] In one embodiment, when the processor executes the computer program, it further performs the following steps: generating a device parsing authorization request file to obtain hardware feature information and a public key; determining authorization parameters according to the authorization policy; determining authorization information according to the authorization parameters and hardware feature information; and encrypting the authorization information using the public key to generate an encrypted license file.

[0102] In one embodiment, when the processor executes the computer program, it further performs the following steps: The secure enclave calls the private key from the asymmetric key pair to decrypt the encrypted license file, obtaining authorization information; parses the authorization information to obtain a first hardware fingerprint and license identification information; performs a legality verification on the license identification information; in response to the license identification information failing the legality verification, determines that the encrypted license file has failed authorization verification; in response to the license identification information passing the legality verification, the secure enclave collects the current hardware feature information of the management node in real time, and encrypts the current hardware feature information using the same encryption method and feature concatenation order as used to generate the first hardware fingerprint, obtaining a second hardware fingerprint; in the internal isolated storage area of ​​the secure enclave, the first hardware fingerprint and the second hardware fingerprint are compared byte by byte; in response to the first hardware fingerprint and the second hardware fingerprint being identical, determines that the encrypted license file has passed authorization verification; in response to the first hardware fingerprint and the second hardware fingerprint being different, determines that the encrypted license file has failed authorization verification.

[0103] In one embodiment, when the processor executes the computer program, it further performs the following steps: in response to detecting that the core hardware fingerprint in the first hardware fingerprint is consistent with the core hardware fingerprint in the second hardware fingerprint and that the auxiliary hardware fingerprint in the first hardware fingerprint is inconsistent with the auxiliary hardware fingerprint in the second hardware fingerprint, the security enclave determines that the authorization verification result is downgrade passed and generates a downgrade function access token, wherein the downgrade function access token is a non-core function in the list of open authorized functions.

[0104] In one embodiment, when the processor executes the computer program, it further performs the following steps: Secure Enclave reads the license version number in the encrypted license file and compares it with the highest historical version number recorded in the rollback prevention counter; in response to the license version number being lower than the highest historical version number, determines that the encrypted license file is a rollback attack file and terminates the authorization activation process; in response to the license version number being equal to the highest historical version number, Secure Enclave reads the expiration timestamp in the encrypted license file and compares it with the historical authorization time recorded in the rollback prevention counter; in response to the expiration timestamp being earlier than the historical authorization time, determines that the encrypted license file is a rollback attack file and terminates the authorization activation process.

[0105] In one embodiment, when the processor executes the computer program, it further implements the following steps: adding a license verification module before the privileged operation function interface; in response to receiving a user's function access request, the license verification module retrieves the currently valid function access token from the authorization service interface provided by the security enclave; the authorization service verifies the signature validity of the function access token, and in response to passing the verification, parses out the authorized resource quota and authorized function scope in the function access token; the license verification module checks whether the operation corresponding to the function access request belongs to the authorized function scope; in response to the operation corresponding to the function access request belonging to the authorized function scope, it determines whether the resources occupied by the system after the operation exceed the authorized resource quota; in response to the resources occupied by the system after the operation not exceeding the authorized resource quota, the operation is executed normally.

[0106] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it performs the following steps: S1: Obtain and process the hardware feature information and public key of the management node, generate an authorization request file, and send the authorization request file to the generating device offline, wherein the public key is stored in a secure enclave; S2: Receive the encrypted license file returned by the generating device offline, transmit the encrypted license file to the secure enclave of the management node, and have the secure enclave verify the authorization of the encrypted license file; S3: In response to the encrypted license file passing the authorization verification, receive the function access token generated by the secure enclave and confirm that the authorization is effective; S4: In response to the encrypted license file failing the authorization verification, receive the failure indication generated by the secure enclave; S5: After the authorization is effective, in response to receiving a user's function access request, verify the legality of the function access request based on the authorization information of the function access token and perform the corresponding processing operation.

[0107] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining and encrypting the hardware feature information of the management node to obtain a first hardware fingerprint; obtaining the public key from the asymmetric key pair in the secure enclave of the processor of the management node; and determining the authorization request file based on the first hardware fingerprint and the public key.

[0108] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: generating a device parsing authorization request file to obtain hardware feature information and a public key; determining authorization parameters according to the authorization policy; determining authorization information according to the authorization parameters and hardware feature information; and encrypting the authorization information using the public key to generate an encrypted license file.

[0109] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: The secure enclave calls the private key from the asymmetric key pair to decrypt the encrypted license file, obtaining authorization information; parses the authorization information to obtain a first hardware fingerprint and license identification information; performs a legality verification on the license identification information; in response to the license identification information failing the legality verification, determines that the encrypted license file has failed authorization verification; in response to the license identification information passing the legality verification, the secure enclave collects the current hardware feature information of the management node in real time, and encrypts the current hardware feature information using the same encryption method and feature concatenation order as used to generate the first hardware fingerprint, obtaining a second hardware fingerprint; in the internal isolated storage area of ​​the secure enclave, the first hardware fingerprint and the second hardware fingerprint are compared byte by byte; in response to the first hardware fingerprint and the second hardware fingerprint being identical, determines that the encrypted license file has passed authorization verification; in response to the first hardware fingerprint and the second hardware fingerprint being different, determines that the encrypted license file has failed authorization verification.

[0110] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: in response to detecting that the core hardware fingerprint in the first hardware fingerprint is consistent with the core hardware fingerprint in the second hardware fingerprint and that the auxiliary hardware fingerprint in the first hardware fingerprint is inconsistent with the auxiliary hardware fingerprint in the second hardware fingerprint, the security enclave determines that the authorization verification result is downgrade passed and generates a downgrade function access token, wherein the downgrade function access token is a non-core function in the list of open authorized functions.

[0111] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: Secure Enclave reads the license version number in the encrypted license file and compares it with the highest historical version number recorded in the rollback prevention counter; in response to the license version number being lower than the highest historical version number, determines that the encrypted license file is a rollback attack file and terminates the authorization activation process; in response to the license version number being equal to the highest historical version number, Secure Enclave reads the expiration timestamp in the encrypted license file and compares it with the historical authorization time recorded in the rollback prevention counter; in response to the expiration timestamp being earlier than the historical authorization time, determines that the encrypted license file is a rollback attack file and terminates the authorization activation process.

[0112] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: adding a license verification module before the privileged operation function interface; in response to receiving a user's function access request, the license verification module retrieves the currently valid function access token from the authorization service interface provided by the security enclave; the authorization service verifies the signature validity of the function access token, and in response to passing the verification, parses out the authorized resource quota and authorized function scope in the function access token; the license verification module checks whether the operation corresponding to the function access request belongs to the authorized function scope; in response to the operation corresponding to the function access request belonging to the authorized function scope, it determines whether the resources occupied by the system after the operation exceed the authorized resource quota; in response to the resources occupied by the system after the operation not exceeding the authorized resource quota, the operation is executed normally.

[0113] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0114] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0115] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for offline license authentication, characterized in that, The method includes: The hardware characteristic information and public key of the management node are obtained and processed to generate an authorization request file. The authorization request file is then sent to the generating device offline, wherein the public key is stored in a secure enclave. The system receives the encrypted license file returned by the generating device offline, transmits the encrypted license file to the secure enclave of the management node, and the secure enclave verifies the authorization of the encrypted license file. In response to the encrypted license file passing the authorization verification, the function access token generated by the secure enclave is received and the authorization is confirmed to be effective; In response to the encrypted license file failing the authorization verification, a failure indication generated by the secure enclave is received; After authorization takes effect, in response to receiving a user's function access request, the system verifies the legality of the function access request based on the authorization information of the function access token and performs the corresponding processing operation.

2. The license offline authentication method of claim 1, wherein, The process of acquiring and processing the hardware characteristic information and public key of the management node to generate an authorization request file, and sending the authorization request file to the generating device offline, includes: The hardware feature information of the management node is obtained and encrypted to obtain the first hardware fingerprint; Obtain the public key from the asymmetric key pair from the secure enclave of the processor of the management node; The authorization request file is determined based on the first hardware fingerprint and the public key.

3. The license offline authentication method of claim 1, wherein, The encrypted license file is generated in the following way: The generating device parses the authorization request file to obtain the hardware feature information and the public key; Determine the authorization parameters based on the authorization policy; The authorization information is determined based on the authorization parameters and the hardware feature information; The authorization information is encrypted using the public key to generate the encrypted license file.

4. The offline license authentication method according to claim 2, characterized in that, The authorization verification of the encrypted license file by the secure enclave includes: The secure enclave calls the private key in the asymmetric key pair, and uses the private key to decrypt the encrypted license file to obtain the authorization information; The authorization information is parsed to obtain the first hardware fingerprint and license identifier information; The legality of the license identification information is verified; In response to the license identification information failing the legality verification, it is determined that the encrypted license file has failed the authorization verification; In response to the license identification information passing the legality verification, the current hardware feature information of the management node is collected in real time through the secure enclave. The current hardware feature information is encrypted using the same encryption method and feature splicing order as the first hardware fingerprint to obtain the second hardware fingerprint. In the internal isolated storage area of ​​the secure enclave, the first hardware fingerprint and the second hardware fingerprint are compared byte by byte. In response to the consistency between the first hardware fingerprint and the second hardware fingerprint, it is determined that the encrypted license file has passed the authorization verification; In response to the discrepancy between the first hardware fingerprint and the second hardware fingerprint, it is determined that the encrypted license file has failed the authorization verification.

5. The license offline authentication method of claim 4, wherein, The hardware fingerprint includes a core hardware fingerprint and an auxiliary hardware fingerprint, wherein the core hardware fingerprint is mandatory binding information when generating the authorization request file; The authorization verification of the encrypted license file by the secure enclave also includes: In response to the detection that the core hardware fingerprint in the first hardware fingerprint is consistent with the core hardware fingerprint in the second hardware fingerprint and the auxiliary hardware fingerprint in the first hardware fingerprint is inconsistent with the auxiliary hardware fingerprint in the second hardware fingerprint, the security enclave determines that the authorization verification result is downgraded and generates a downgraded function access token, wherein the downgraded function access token is for opening non-core functions in the authorized function list.

6. The license offline authentication method of claim 1, wherein, The secure enclave has a built-in anti-rollback counter. In response to the encrypted license file passing the authorization verification, the system receives a function access token generated by the secure enclave to confirm authorization validity, including: The secure enclave reads the license version number from the encrypted license file and compares it with the highest historical version number recorded in the anti-rollback counter. In response to the fact that the license version number is lower than the highest historical version number, the encrypted license file is determined to be a rollback attack file, and the authorization activation process is terminated; In response to the license version number being equal to the highest historical version number, the secure enclave reads the expiration timestamp in the encrypted license file and compares it with the historical authorization time recorded in the anti-rollback counter; If the validity period timestamp is earlier than the historical authorization time, the encrypted license file is determined to be a rollback attack file, and the authorization activation process is terminated.

7. The license offline authentication method of claim 1, wherein, The step of responding to a received function access request from a user, verifying the validity of the function access request based on the authorization information of the function access token, and performing corresponding operations includes: Add a license verification module before the privileged operation function interface; Upon receiving a user's function access request, the permission verification module retrieves the currently valid function access token from the authorization service interface provided by the security enclave. The authorization service verifies the signature validity of the function access token, and in response to the successful verification, parses out the authorized resource quota and authorized function scope in the function access token; The license verification module checks whether the operation corresponding to the function access request falls within the scope of the authorized function. In response to the fact that the operation corresponding to the function access request falls within the scope of the authorized function, it is determined whether the resources occupied by the system after the operation exceed the authorized resource limit; If the system's resource usage after the operation does not exceed the authorized resource limit, the operation will be executed normally.

8. A license offline authentication apparatus characterized by comprising: The device includes: The first processing module is used to obtain and process the hardware feature information and public key of the management node, generate an authorization request file, and send the authorization request file to the generating device offline. The second processing module is used to receive the encrypted license file returned by the generating device offline, transmit the encrypted license file to the secure enclave, and have the secure enclave perform authorization verification on the encrypted license file. The third processing module is used to receive the function access token generated by the secure enclave and determine that the authorization is effective in response to the encrypted license file passing the authorization verification. The fourth processing module is used to receive the failure indication generated by the secure enclave in response to the encrypted license file failing the authorization verification; The fifth processing module is used to respond to a user's function access request, verify the legality of the function access request based on the authorization information of the function access token, and perform corresponding processing operations.

9. An electronic device, comprising: include: Memory, used to store computer programs; A processor for executing a computer program to implement the steps of the license offline authentication method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program, wherein when executed by a processor, the computer program implements the steps of the license offline authentication method as described in any one of claims 1 to 7.