Secret key protection method, secret key management server, equipment and readable storage medium
By using a trusted execution environment in the key management server for layer-by-layer protection, and establishing an encrypted secure channel between the client and the server, and using pass tokens and trusted metrics for security verification, TEE cloud computing is solved The problem that the key management solution in the environment cannot effectively protect the secret key, which realizes all-round protection and high security of the secret key.
Patent Information
- Application Number
- CN202411324966.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2024-11-22
AI Technical Summary
Existing key management solutions cannot effectively protect secret keys in TEE cloud computing environment, especially in private cloud scenarios, and cannot provide real, safe and reliable protection.
The root key is protected by using a securely derived seal key in the key management server, the root key protects the service master key, the service master key protects the secret key, and the client and server side Establish a two-way trusted environmental authentication and encryption security channel between them, and use pass tokens and trusted metrics for security verification to ensure the acquisition and transmission of secret keys.
Achieve all-round protection of secret keys, significantly improve the security of secret keys, ensure that the keys are not tampered, stolen, and unauthorized use throughout their life cycle, providing highly secure and reliable key management plan.
Smart Images

Figure CN119011142A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of security technology, and in particular to a secret key protection method, a key management server, a device and a readable storage medium. Background Art
[0002] As data security and privacy protection become increasingly important, privacy computing has emerged. Privacy computing refers to a collection of technologies that implement data analysis and computing while protecting the data itself from external leaks. Trusted Execution Environment (TEE), as a technology that can provide isolated execution and protect code and data from malicious attacks during processing, is the main technical route in the field of privacy computing.
[0003] The key management service (KMS) in TEE-based privacy computing scenarios plays an increasingly critical role in data protection. In TEE cloud computing environments, especially private cloud scenarios, users and enterprises need more effective and secure key management solutions. However, current key management solutions cannot provide real, secure and reliable protection for keys.
[0004] In summary, how to effectively improve the security of secret keys is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0005] The purpose of this application is to provide a key protection method, a key management server, a device and a readable storage medium, which not only effectively protects the storage of keys through TEE, but also effectively protects the acquisition and transmission of keys, thereby achieving all-round protection of keys and significantly improving the security of keys.
[0006] In order to solve the above technical problems, this application provides the following technical solutions:
[0007] An access control method is applied to a key management server, in which a sealed key fixedly derived from a trusted execution environment protects a root key, the root key protects a service master key, and the service master key protects a secret key; the method comprises:
[0008] When the key management client needs to access the target service, a two-way trusted execution environment authentication is performed with the client through a remote authentication protocol;
[0009] After the environment authentication is passed, an encrypted secure channel is established with the client;
[0010] Receiving a key acquisition request sent by the client, parsing the key acquisition request, and obtaining a pass token and a trust metric value;
[0011] Perform security verification using the pass token and the trust metric value;
[0012] After the security verification is passed, the secret key of the target service is fed back to the client through the encrypted secure channel.
[0013] Preferably, before performing security verification using the pass token and the trust metric value, the method further includes:
[0014] Determining whether the access token is expired;
[0015] If so, it is determined that the security verification has failed;
[0016] If not, security verification is performed using the pass token and the trust metric value.
[0017] Preferably, using the pass token and the trust metric value to perform security verification includes:
[0018] Determine whether the pass token matches the target service, and determine whether the trust metric value matches the target service;
[0019] In the case where both the pass token and the trust metric value match the target service, it is determined that the security verification is passed; otherwise, it is determined that the security verification is not passed.
[0020] Preferably, registering the target service includes:
[0021] Receiving service registration information sent by the client;
[0022] Registering a target service based on the service registration information;
[0023] After successful registration, a pass token corresponding to the target service is fed back to the client;
[0024] An association is established between the target service and the pass token.
[0025] Preferably, registering the trust metric value comprises:
[0026] Performing two-way trusted execution environment authentication with the client via a remote authentication protocol;
[0027] After the environment authentication is passed, the trust metric value corresponding to the client and the target service is registered.
[0028] Preferably, the secret key generation includes:
[0029] Receiving the key definition data sent by the client through the encrypted secure channel;
[0030] creating a secret key using the target service;
[0031] An association relationship is established between the secret key of the target service and the trust metric value through the pass token.
[0032] Preferably, it includes:
[0033] Receiving a public key acquisition request sent by the client;
[0034] Parsing the public key acquisition request to determine the designated service corresponding to the public key;
[0035] Feedback the public key of the specified service to the client.
[0036] A key management server, comprising:
[0037] A secret key protection module, used for the sealed key fixedly derived from the trusted execution environment in the key management server to protect the root key, the root key to protect the service master key, and the service master key to protect the secret key;
[0038] An environment authentication module, used to perform a two-way trusted execution environment authentication with the client through a remote authentication protocol when the client of the key management needs to access the target service;
[0039] A secure channel establishment module, used to establish an encrypted secure channel with the client after the environment authentication is passed;
[0040] A request receiving and parsing module, used for receiving a secret key acquisition request sent by the client, and parsing the secret key acquisition request to obtain a pass token and a trust metric value;
[0041] A security verification module, used for performing security verification using the pass token and the trust metric value;
[0042] The secret key feedback module is used to feedback the secret key of the target service to the client through the encrypted secure channel after the security verification is passed.
[0043] An electronic device, comprising:
[0044] Memory for storing computer programs;
[0045] A processor is used to implement the steps of the above-mentioned key protection method when executing the computer program.
[0046] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned secret key protection method are implemented.
[0047] The method provided by the embodiment of the present application is applied on the key management server side, and a sealed key fixedly derived from a trusted execution environment in the key management server side protects a root key, the root key protects a service master key, and the service master key protects a secret key; the method comprises: when a client of the key management needs to access a target service, performing a two-way trusted execution environment authentication with the client through a remote authentication protocol; after the environment authentication passes, establishing an encrypted secure channel with the client; receiving a key acquisition request sent by the client, parsing the key acquisition request, and obtaining a pass token and a trusted measurement value; performing security verification using the pass token and the trusted measurement value; after the security verification passes, feeding back the secret key of the target service to the client through an encrypted secure channel.
[0048] In order to provide all-round protection for the secret key, in terms of storing the secret key, the root key is protected based on the derived sealed key fixed in the secure trusted execution environment, the root key protects the service master key, and the service master key protects the secret key. That is, based on the secure trusted execution environment, layer-by-layer protection is performed to effectively protect the storage of the secret key. In terms of key acquisition and transmission, when the client of the key management needs the target service, first, the key management server performs a two-way trusted execution environment authentication with the client, and only after the environment authentication is passed, an encrypted secure channel is established with the client. Then, by receiving the key acquisition request sent by the client, and performing security verification based on the pass token and trusted measurement value parsed from the request, the secret key of the target service is fed back to the client based on the encrypted secure channel only after the security verification is passed. In this way, the secret key can be effectively protected when acquiring and transmitting the secret key.
[0049] The technical effect of this application is: not only the storage of secret keys is effectively protected through TEE, but also the acquisition and transmission of secret keys are effectively protected, thereby achieving all-round protection of secret keys and significantly improving the security of secret keys.
[0050] Correspondingly, the embodiments of the present application also provide a key management server, a device and a readable storage medium corresponding to the above-mentioned key protection method, which have the above-mentioned technical effects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. 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 paying creative work.
[0052] Figure 1 This is a flowchart of an implementation method of a secret key protection method in an embodiment of the present application;
[0053] Figure 2 This is a schematic diagram of a key management system in an embodiment of the present application;
[0054] Figure 3 This is a structural diagram of a key management server in an embodiment of the present application;
[0055] Figure 4 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application;
[0056] Figure 5 This is a schematic diagram of the specific structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0058] In order to facilitate those skilled in the art to better understand the technical solutions provided in the embodiments of the present application, the relevant technical terms are explained below.
[0059] TEE: Trusted Execution Environment, that is, trusted execution environment;
[0060] KMS: Key Management Service, that is, key management service;
[0061] RK: root key, i.e. root key;
[0062] SMK: service master key, that is, service master key;
[0063] SK: secret key.
[0064] Please refer to Figure 1 , Figure 1 This is a flowchart of a key protection method in an embodiment of the present application, which is applied to Figure 2 In the key management server (i.e., KMS service) shown, a sealed key fixedly derived from a trusted execution environment in the key management server protects a root key, the root key protects a service master key, and the service master key protects a secret key.
[0065] The method comprises the following steps:
[0066] S101. When a key management client needs to access a target service, a two-way trusted execution environment authentication is performed with the client through a remote authentication protocol.
[0067] When the key management client (hereinafter referred to as the client) needs to access the target service, the key management server can perform a two-way trusted execution environment authentication with the client based on the remote authentication protocol. It should be noted that the trusted execution environment authentication here can be specifically a two-way trusted execution environment authentication. That is to say, through the remote authentication protocol, the client must authenticate whether the key management server is running in a trusted execution environment, and the key management server will also authenticate whether the client is running in a trusted execution environment.
[0068] Among them, two-way authentication: both the KMS client and the KMS service need to verify the other party's trusted execution environment through the remote authentication protocol (RemoteAttestation). After the authentication is successful, the two parties can continue to communicate. In addition, the remote authentication of the KMS client TEE is service-granular. When the service is initialized, the measurement value of the TEE corresponding to the service will be registered, and in the secret key generation phase, the secret key is associated with the service through a token. This ensures that the secret key can only be obtained by the TEE trusted by the user, preventing attacks during the acquisition and transmission process.
[0069] After the bidirectional trusted execution environment authentication is passed, step S102 is executed; otherwise, the authentication failure is output, and the client is prohibited from accessing the target service.
[0070] S102. After the environment authentication is passed, an encrypted secure channel is established with the client.
[0071] After the environment authentication is passed, in order to ensure the security of data transmission between the client and the key management server, an encrypted secure channel needs to be established.
[0072] That is, after the environment authentication is completed, an encrypted secure channel is established between the KMS client and the KMS service for the transmission of secret keys to prevent data from being stolen or tampered with during transmission.
[0073] S103: Receive a secret key acquisition request sent by the client, parse the secret key acquisition request, and obtain a pass token and a trust measurement value.
[0074] In this embodiment, if the client wants to obtain the secret key, it needs to carry a pass token and a trust metric value in the secret key acquisition request.
[0075] When the key management server receives the key acquisition request, it can obtain the pass token and the trust measurement value by parsing the key acquisition request.
[0076] It should be noted that, when the key acquisition request is parsed and the pass token and the trust metric value are not obtained, the secret key for the target service may be refused to be provided. That is, step S104 is performed only after the key acquisition request is parsed and the pass token and the trust metric value are obtained.
[0077] S104: Perform security verification using the pass token and the trusted measurement value.
[0078] After obtaining the pass token and the trust metric value, security verification can be performed based on the pass token and the trust metric value.
[0079] Specifically, the pass token is verified, and the trust metric value is verified. When both are verified, it is determined that the security verification is passed. Otherwise, it is determined that the security verification is not passed.
[0080] In a specific implementation of the present application, before performing security verification using the pass token and the trust metric value, the following is also included:
[0081] Determine whether the pass token has expired;
[0082] If so, it is determined that the security verification has failed;
[0083] If not, a security verification is performed using a pass token and a trust metric value.
[0084] For ease of description, the above steps are combined for explanation below.
[0085] That is to say, in the present application, the pass token may be set with an expiration time, and when the pass token expires, it can be directly determined that the security verification has failed.
[0086] For example: In order to strengthen access control, all interface calls are verified using a token mechanism. The token contains the expiration time of the interface call, and the token that exceeds the expiration time cannot be used. Specifically, for token generation: when the client (including the KMS client in the TEE and the ordinary client) initializes the service, the KMS service generates a token, which contains the expiration time, and the token is associated with the service information. For token verification: Each time the interface is called, the KMS service verifies the token in the request to check its validity and whether it has expired. If the token is invalid or expired, the call request is rejected.
[0087] In a specific implementation of the present application, security verification is performed using a pass token and a trust metric value, including:
[0088] Determine whether the pass token matches the target service, and determine whether the trust metric matches the target service;
[0089] When both the pass token and the trust metric value match the target service, it is determined that the security verification is passed; otherwise, it is determined that the security verification is not passed.
[0090] For ease of description, the above steps are combined for explanation below.
[0091] That is, to perform security verification on the pass token is to verify whether the pass token matches the target service; and to verify the trust metric value is also to verify whether the trust metric value matches the target service.
[0092] When the trusted metric value and pass token are generated / registered, an association relationship is established between them and the target service. The matching verification may specifically verify whether the trusted metric value and pass token are the metric value and pass token with the previously established association relationship.
[0093] If both the pass token and the trust metric value match the target service, it is determined that the security verification has been passed; otherwise, it is determined that the security verification has not been passed. Only after the security verification has been passed, step S105 is executed.
[0094] S105: After the security verification is passed, the secret key of the target service is fed back to the client through an encrypted secure channel.
[0095] In a specific implementation of the present application, registering a trustworthy metric value includes:
[0096] Perform two-way trusted execution environment authentication with the client through remote authentication protocol;
[0097] After the environment authentication is passed, the trust measurement value corresponding to the registration client and the target service is registered.
[0098] For ease of description, the above steps are combined for explanation below.
[0099] That is, in the embodiment of the present application, TEE measurement registration: when SMK is initialized, the user registers the TEE measurement value corresponding to the service with the KMS service. This operation ensures that subsequent operations are only performed within the trusted TEE.
[0100] In a specific implementation of the present application, registering a target service includes:
[0101] Receive service registration information sent by the client;
[0102] Register the target service based on the service registration information;
[0103] After successful registration, the access token corresponding to the target service is fed back to the client;
[0104] Associate the target service with the pass token.
[0105] For ease of description, the above steps are combined for explanation below.
[0106] That is, in the embodiment of the present application, service registration: when SMK is initialized, the user needs to provide information related to the service (service registration information), such as service name, purpose, etc. After successful registration, the token corresponding to the service will be returned for KMS interface access authentication. At the same time, the TEE's measurement value, service information and other contents will be associated with the token.
[0107] In a specific implementation of the present application, the secret key generation includes:
[0108] Receive the key definition data sent by the client through an encrypted secure channel;
[0109] Create a secret key using the target service;
[0110] The secret key of the target service is associated with the trust metric value through the pass token.
[0111] For ease of description, the above steps are combined for explanation below.
[0112] Among them, the secret key can be a symmetric key or an asymmetric key. Both asymmetric and symmetric secret keys are generated in the KMS service, and the user-defined key data is encrypted and transmitted to the KMS service through an encrypted secure channel. The user needs to carry the initialized service token to request the KMS service to create a secret key, and the secret key is associated with the service measurement value registered by the user through the token.
[0113] In a specific implementation of the present application, the acquisition and transmission of the public key may not need to be protected, so as to quickly feedback the public key. The specific implementation process includes:
[0114] Receive the public key acquisition request sent by the client;
[0115] Parse the public key acquisition request and determine the designated service corresponding to the public key;
[0116] Feedback the public key of the specified service to the client.
[0117] For ease of description, the above steps are combined for explanation below.
[0118] That is, in order to ensure that the secret key is not tampered with, stolen, or used without authorization, this application strictly manages the entire life cycle of the secret key. Regarding the acquisition of the secret key, this application limits the confidential information of the secret key to flow only within the authenticated TEE, such as: private key, symmetric key, and user-defined data. As for the public key, it can be obtained by roles outside the TEE. Ordinary clients cannot obtain the confidential information of the secret key by calling the KMS service interface, ensuring the security of the confidential information.
[0119] The method provided by the embodiment of the present application is applied on the key management server side, and a sealed key fixedly derived from a trusted execution environment in the key management server side protects a root key, the root key protects a service master key, and the service master key protects a secret key; the method comprises: when a client of the key management needs to access a target service, performing a two-way trusted execution environment authentication with the client through a remote authentication protocol; after the environment authentication passes, establishing an encrypted secure channel with the client; receiving a key acquisition request sent by the client, parsing the key acquisition request, and obtaining a pass token and a trusted measurement value; performing security verification using the pass token and the trusted measurement value; after the security verification passes, feeding back the secret key of the target service to the client through an encrypted secure channel.
[0120] In order to provide all-round protection for the secret key, in terms of storing the secret key, the root key is protected based on the derived sealed key fixed in the secure trusted execution environment, the root key protects the service master key, and the service master key protects the secret key. That is, based on the secure trusted execution environment, layer-by-layer protection is performed to effectively protect the storage of the secret key. In terms of key acquisition and transmission, when the client of the key management needs the target service, first, the key management server performs a two-way trusted execution environment authentication with the client, and only after the environment authentication is passed, an encrypted secure channel is established with the client. Then, by receiving the key acquisition request sent by the client, and performing security verification based on the pass token and trusted measurement value parsed from the request, the secret key of the target service is fed back to the client based on the encrypted secure channel only after the security verification is passed. In this way, the secret key can be effectively protected when acquiring and transmitting the secret key.
[0121] The technical effect of this application is: not only the storage of secret keys is effectively protected through TEE, but also the acquisition and transmission of secret keys are effectively protected, thereby achieving all-round protection of secret keys and significantly improving the security of secret keys.
[0122] This application can significantly improve the security, usability and ease of operation of the key management system in privacy computing scenarios. It ensures that the key is not tampered with, stolen or used without authorization throughout its life cycle, and provides users with a highly secure and reliable key management solution. It can greatly improve the security of key acquisition and use.
[0123] Corresponding to the above method embodiment, the embodiment of the present application also provides a key management server. The key management server described below and the key protection method described above can refer to each other.
[0124] See also Figure 3 As shown, the server includes the following modules:
[0125] The key protection module 101 is used for protecting the root key of the sealed key fixedly derived from the trusted execution environment in the key management server, the root key protects the service master key, and the service master key protects the secret key;
[0126] The environment authentication module 102 is used to perform a two-way trusted execution environment authentication with the client through a remote authentication protocol when the client of the key management needs to access the target service;
[0127] The secure channel establishment module 103 is used to establish an encrypted secure channel with the client after the environment authentication is passed;
[0128] The request receiving and parsing module 104 is used to receive a key acquisition request sent by a client, and parse the key acquisition request to obtain a pass token and a trust metric value;
[0129] A security verification module 105, for performing security verification using a pass token and a trust metric value;
[0130] The secret key feedback module 106 is used to feedback the secret key of the target service to the client through an encrypted secure channel after the security verification is passed.
[0131] The key management server provided by the embodiment of the present application is applied, and a sealed key fixedly derived from a trusted execution environment in the key management server protects a root key, the root key protects a service master key, and the service master key protects a secret key; the method includes: when a key management client needs to access a target service, performing a two-way trusted execution environment authentication with the client through a remote authentication protocol; after the environment authentication passes, establishing an encrypted secure channel with the client; receiving a key acquisition request sent by the client, and parsing the key acquisition request to obtain a pass token and a trusted measurement value; performing security verification using the pass token and the trusted measurement value; after the security verification passes, feeding back the secret key of the target service to the client through an encrypted secure channel.
[0132] In order to provide all-round protection for the secret key, in terms of storing the secret key, the root key is protected based on the derived sealed key fixed in the secure trusted execution environment, the root key protects the service master key, and the service master key protects the secret key. That is, based on the secure trusted execution environment, layer-by-layer protection is performed to effectively protect the storage of the secret key. In terms of key acquisition and transmission, when the client of the key management needs the target service, first, the key management server performs a two-way trusted execution environment authentication with the client, and only after the environment authentication is passed, an encrypted secure channel is established with the client. Then, by receiving the key acquisition request sent by the client, and performing security verification based on the pass token and trusted measurement value parsed from the request, the secret key of the target service is fed back to the client based on the encrypted secure channel only after the security verification is passed. In this way, the secret key can be effectively protected when acquiring and transmitting the secret key.
[0133] The technical effect of this application is: not only the storage of secret keys is effectively protected through TEE, but also the acquisition and transmission of secret keys are effectively protected, thereby achieving all-round protection of secret keys and significantly improving the security of secret keys.
[0134] In a specific implementation of the present application, the security verification module is specifically used to determine whether the pass token is expired before performing security verification using the pass token and the trust metric value;
[0135] If so, it is determined that the security verification has failed;
[0136] If not, a security verification is performed using a pass token and a trust metric value.
[0137] In a specific implementation of the present application, the security verification module is specifically used to determine whether the pass token matches the target service, and whether the trust metric value matches the target service;
[0138] When both the pass token and the trust metric value match the target service, it is determined that the security verification is passed; otherwise, it is determined that the security verification is not passed.
[0139] In a specific implementation of the present application, the service registration module is used to receive service registration information sent by the client;
[0140] Register the target service based on the service registration information;
[0141] After successful registration, the access token corresponding to the target service is fed back to the client;
[0142] Associate the target service with the pass token.
[0143] In a specific implementation of the present application, the measurement value registration module is used to perform a two-way trusted execution environment authentication with the client through a remote authentication protocol;
[0144] After the environment authentication is passed, the trust measurement value corresponding to the registration client and the target service is registered.
[0145] In a specific implementation of the present application, the key generation module is used to receive key definition data sent by the client through an encrypted secure channel;
[0146] Create a secret key using the target service;
[0147] The secret key of the target service is associated with the trust metric value through the pass token.
[0148] In a specific implementation of the present application, the public key feedback module is used to receive a public key acquisition request sent by a client;
[0149] Parse the public key acquisition request and determine the designated service corresponding to the public key;
[0150] Feedback the public key of the specified service to the client.
[0151] Corresponding to the above method embodiment, an embodiment of the present application further provides an electronic device. The electronic device described below and the key protection method described above can refer to each other.
[0152] See also Figure 4 As shown, the electronic device includes:
[0153] A memory 332, for storing computer programs;
[0154] The processor 322 is used to implement the steps of the key protection method of the above method embodiment when executing the computer program.
[0155] For details, please refer to Figure 5 , Figure 5A schematic diagram of the specific structure of an electronic device provided for this embodiment, which may have relatively large differences due to different configurations or performances, may include one or more processors (central processing units, CPU) (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer programs 342 or data 344. Among them, the memory 332 can be a temporary storage or a permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device. Furthermore, the processor 322 can be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the electronic device 301.
[0156] The electronic device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and / or one or more operating systems 341 .
[0157] The steps in the key protection method described above can be implemented by the structure of an electronic device.
[0158] Corresponding to the above method embodiment, the embodiment of the present application further provides a readable storage medium. The readable storage medium described below and the key protection method described above can refer to each other.
[0159] A readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the key protection method of the above method embodiment.
[0160] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0161] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the key management server disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0162] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0163] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0164] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms include, include or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0165] 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 idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A key protection method, characterized in that: Applied to a key management server, in which a sealed key fixedly derived from a trusted execution environment protects a root key, the root key protects a service master key, and the service master key protects a secret key; the method comprises: When the key management client needs to access the target service, a two-way trusted execution environment authentication is performed with the client through a remote authentication protocol; After the environment authentication is passed, an encrypted secure channel is established with the client; Receiving a key acquisition request sent by the client, parsing the key acquisition request, and obtaining a pass token and a trust metric value; Perform security verification using the pass token and the trust metric value; After the security verification is passed, the secret key of the target service is fed back to the client through the encrypted secure channel.
2. The method according to claim 1, characterized in that Before performing security verification using the pass token and the trust metric value, the method further includes: Determining whether the access token is expired; If so, it is determined that the security verification has failed; If not, security verification is performed using the pass token and the trust metric value.
3. The method according to claim 1, characterized in that Using the pass token and the trust metric value, security verification is performed, including: Determine whether the pass token matches the target service, and determine whether the trust metric value matches the target service; In the case where both the pass token and the trust metric value match the target service, it is determined that the security verification is passed; otherwise, it is determined that the security verification is not passed.
4. The method according to claim 1, characterized in that: Register the target service, including: Receiving service registration information sent by the client; Registering a target service based on the service registration information; After successful registration, a pass token corresponding to the target service is fed back to the client; An association is established between the target service and the pass token.
5. The method according to claim 4, characterized in that Registering the trustworthy metric value comprises: Performing two-way trusted execution environment authentication with the client via a remote authentication protocol; After the environment authentication is passed, the trust metric value corresponding to the client and the target service is registered.
6. The method according to claim 5, characterized in that Secret key generation, including: Receiving the key definition data sent by the client through the encrypted secure channel; creating a secret key using the target service; An association relationship is established between the secret key of the target service and the trust metric value through the pass token.
7. The method according to any one of claims 1 to 6, characterized in that: include: Receiving a public key acquisition request sent by the client; Parsing the public key acquisition request to determine the designated service corresponding to the public key; Feedback the public key of the specified service to the client.
8. A key management server, characterized in that: include: A secret key protection module, used for the sealed key fixedly derived from the trusted execution environment in the key management server to protect the root key, the root key to protect the service master key, and the service master key to protect the secret key; An environment authentication module, used to perform a two-way trusted execution environment authentication with the client through a remote authentication protocol when the client of the key management needs to access the target service; A secure channel establishment module, used to establish an encrypted secure channel with the client after the environment authentication is passed; A request receiving and parsing module, used for receiving a secret key acquisition request sent by the client, and parsing the secret key acquisition request to obtain a pass token and a trust metric value; A security verification module, used for performing security verification using the pass token and the trust metric value; The secret key feedback module is used to feedback the secret key of the target service to the client through the encrypted secure channel after the security verification is passed.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the key protection method according to any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the key protection method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Information transmission method and system based on MCP protocol, equipment and medium
CN121309106A
Key management method and device for large model service, medium, equipment and product
CN121309226A
