Configuration parameter processing method, electronic equipment and storage medium
By encrypting the configuration parameters on the application server side and decrypting the keys in the trusted execution environment of the configuration center, the security vulnerability of attackers obtaining the plaintext of the configuration parameters is resolved, and high-security storage of the configuration parameters is achieved.
Patent Information
- Application Number
- CN202511018731.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2025-09-05
AI Technical Summary
The existing configuration center's configuration parameter storage method has a security flaw that allows attackers to obtain the plaintext configuration parameters by lurking in the server, causing the distributed system to face serious security threats.
The configuration parameters are encrypted on the application server side, and the keys are decapsulated and decrypted in the trusted execution environment of the configuration center. The ciphertext of the configuration parameters is stored only after verification, ensuring that attackers cannot obtain the plaintext.
It improves the storage security of configuration parameters, reduces the possibility of configuration parameter leakage, and provides reliable data security for distributed systems.
Smart Images

Figure CN120602325A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of distributed technology, and in particular to a configuration parameter processing method, an electronic device, and a storage medium. Background Art
[0002] In distributed systems, the configuration center plays a crucial role, responsible for securely managing the configuration parameters of multiple applications across different environments and clusters. This is crucial for ensuring data security, confidentiality, and stable operation of the entire distributed system.
[0003] Conventional technology typically encrypts configuration parameters stored in the configuration center to prevent attackers from directly accessing these important configuration parameters after compromising the configuration center server. This approach enhances the security of the configuration parameters to a certain extent. By using an encryption algorithm to convert the original configuration parameters into ciphertext for storage, even if an attacker obtains the ciphertext of the configuration parameters, it is difficult to directly decipher the contents without the correct decryption key.
[0004] However, the existing storage method of configuration parameters in the configuration center allows attackers to obtain the plain text of configuration parameters by lurking in the server of the configuration center, which has certain security flaws. Summary of the Invention
[0005] The present application provides a configuration parameter processing method, electronic device and storage medium, which are used to perform the configuration parameter encryption process on the application server side, making it impossible for attackers to obtain the plaintext of the configuration parameters from the configuration center, thereby improving the storage security of the configuration parameters.
[0006] In a first aspect, the present application provides a configuration parameter processing method, which is applied to a configuration center. The method includes:
[0007] Receive key encapsulation information, configuration parameter ciphertext, and storage request information sent by the application server, where the key encapsulation information is generated by the application server based on the first pre-stored initial public key, the configuration parameter ciphertext is obtained by the application server through concatenating and encrypting the hash value data and the configuration parameters to be stored, and the hash value data is obtained by the application server through hash calculation based on the storage key and the configuration parameters to be stored;
[0008] Randomly selecting an unused target unique identifier based on the storage request information, and inputting the target unique identifier, key encapsulation information, and configuration parameter ciphertext into the trusted execution environment, so as to decapsulate the key encapsulation information using the first pre-stored initial private key in the trusted execution environment to obtain a decapsulation result;
[0009] According to the decryption result, the storage key is determined, and the configuration parameter ciphertext is decrypted according to the storage key to obtain the hash value to be verified;
[0010] The hash value to be verified and the encrypted hash value are verified. When it is detected that the hash value to be verified and the encrypted hash value are equal, an identification ciphertext and a backup ciphertext of the target unique identifier are calculated, and the identification ciphertext and the backup ciphertext are returned to the open environment. The identification ciphertext is sent to the application server, so that the application server decrypts the identification ciphertext to obtain the target unique identifier and saves it;
[0011] The identification hash value and the configuration parameter ciphertext are stored in the parameter database, and the backup ciphertext and the pre-stored application identification code are stored in the backup database, wherein the identification hash value is obtained by the configuration center performing hash value calculation on the target unique identifier.
[0012] In a second aspect, the present application provides a configuration parameter processing method, applied to an application server, the method comprising:
[0013] Generate key encapsulation information according to the first pre-stored initial public key;
[0014] Perform hash calculation based on the storage key and the configuration parameters to be stored to obtain hash value data, and perform splicing encryption processing based on the hash value data and the configuration parameters to be stored to obtain the configuration parameter ciphertext;
[0015] The key encapsulation information, the configuration parameter ciphertext and the storage request information are sent to the configuration center, so that the configuration center randomly selects an unused target unique identifier according to the storage request information, and inputs the target unique identifier, the key encapsulation information and the configuration parameter ciphertext into the trusted execution environment, so as to use the first pre-stored initial private key to decapsulate the key encapsulation information in the trusted execution environment to obtain a decapsulation result, determine the storage key according to the decapsulation result, decrypt the configuration parameter ciphertext according to the storage key to obtain a hash value to be verified, verify the hash value to be verified and the encrypted hash value, and when it is detected that the hash value to be verified and the encrypted hash value are equal, calculate the identification ciphertext and the backup ciphertext of the target unique identifier, return the identification ciphertext and the backup ciphertext to the open environment, store the identification hash value and the configuration parameter ciphertext in the parameter database, and store the backup ciphertext and the pre-stored application identification code in the backup database, wherein the identification hash value is obtained by the configuration center by performing hash value calculation on the target unique identifier;
[0016] Receive the identification ciphertext sent by the configuration center, decrypt it according to the identification ciphertext, obtain the target unique identifier and save it.
[0017] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0018] Memory stores computer-executable instructions;
[0019] The processor executes the computer-executable instructions stored in the memory to implement a configuration parameter processing method of the first aspect of the invention or the second aspect of the invention.
[0020] In a fourth aspect, the present application provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, they are used to implement a configuration parameter processing method of the first aspect of the invention or the second aspect of the invention.
[0021] In a fifth aspect, the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it is used to implement a configuration parameter processing method of the first aspect of the invention or the second aspect of the invention.
[0022] The present application provides a configuration parameter processing method, electronic device and storage medium, comprising: first, receiving key encapsulation information, configuration parameter ciphertext and storage request information sent by an application server, wherein the key encapsulation information is generated by the application server according to a first pre-stored initial public key, the configuration parameter ciphertext is obtained by the application server according to hash value data and the configuration parameters to be stored, and the hash value data is obtained by the application server according to the storage key and the configuration parameters to be stored by hash calculation; then, according to the storage request information, an unused target unique identifier is randomly selected, and the target unique identifier, key encapsulation information and configuration parameter ciphertext are input into a trusted execution environment, so as to decapsulate the key encapsulation information using the first pre-stored initial private key in the trusted execution environment. The unpacking process obtains the unpacking result; then, according to the unpacking result, the storage key is determined, and the configuration parameter ciphertext is decrypted according to the storage key to obtain the hash value to be verified; the hash value to be verified and the encrypted hash value are verified, so that when it is detected that the hash value to be verified and the encrypted hash value are equal, the identification ciphertext and the backup ciphertext of the target unique identifier are calculated, and the identification ciphertext and the backup ciphertext are returned to the open environment, and the identification ciphertext is sent to the application server side, so that the application server side decrypts according to the identification ciphertext, obtains the target unique identifier and saves it; finally, the identification hash value and the configuration parameter ciphertext are stored in the parameter database, and the backup ciphertext and the pre-stored application identification code are stored in the backup database, wherein the identification hash value is obtained by the configuration center performing hash value calculation on the target unique identifier. The following technical effects are achieved: the encryption process of the configuration parameter plaintext is carried out on the application server side, and the configuration center stores the configuration parameter ciphertext in the parameter database only after verification. In addition, the decryption process of the key encapsulation information and the configuration parameter ciphertext by the configuration center is only carried out in a trusted execution environment, so that attackers cannot obtain the configuration parameters by lurking in the server of the configuration center; by verifying the hash value to be verified, it is ensured that the source of the configuration parameters to be stored is reliable and has not been tampered with during the transmission process, further improving the storage security of the configuration parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0024] Figure 1 A schematic diagram of an application scenario of a configuration parameter processing method provided in an embodiment of the present application.
[0025] Figure 2 A flow chart of a configuration parameter processing method provided in an embodiment of the present application Figure 1 .
[0026] Figure 3A flow chart of a configuration parameter processing method provided in an embodiment of the present application Figure 2 .
[0027] Figure 4 A flow chart of a configuration parameter processing method provided in an embodiment of the present application Figure 3 .
[0028] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0029] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0030] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0031] In the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit differences. It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described in this application as "exemplary" or "for example" should not be interpreted as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more.
[0032] It should be noted that the term "at the time of" in the embodiments of the present application can refer to the instant a certain situation occurs or a period of time after the situation occurs, and the embodiments of the present application do not specifically limit this. In addition, the configuration parameter processing method provided in the embodiments of the present application is merely an example, and a configuration parameter processing method may include more or less content.
[0033] It should be noted that the configuration parameter processing method, electronic device and storage medium provided in this application can be used in the field of distributed technology, and can also be used in any field other than the field of distributed technology. The application field of the configuration parameter processing method, electronic device and storage medium in this application is not limited.
[0034] In a distributed system, the configuration center is a core component that centrally manages the configuration parameters of each application in different environments (such as development, test, and production) and clusters (e.g., multi-region, multi-tenant). Its security is directly related to the data security and confidentiality of the entire distributed system. Configuration parameters managed by the configuration center include critical information such as database connection information, Application Programming Interface (API) keys, and cache server addresses. Leakage of these parameters can lead to serious security incidents.
[0035] In the prior art, to prevent unauthorized access to configuration parameters in the configuration center, the configuration parameters are typically encrypted before storage. For example, symmetric or asymmetric encryption mechanisms are used to encrypt the configuration parameters before writing them to storage and then decrypt them for use during application runtime.
[0036] While this approach can, to a certain extent, prevent attackers from directly obtaining plaintext configuration parameters after compromising the configuration center server, further analysis reveals that it still has certain security flaws. For example, if an attacker lurks in the configuration center server, they can still obtain the plaintext configuration parameters when the application server sends a request to the configuration center for storage, thus exposing the distributed system to serious security threats.
[0037] Based on this, the embodiments of the present application propose a configuration parameter processing method, electronic device, and storage medium that can be used in the field of distributed technology, aiming to solve the above technical problems of the prior art. By encrypting the plaintext configuration parameters on the application server side, the configuration center stores the ciphertext configuration parameters in the parameter database only after verification. This prevents attackers from lurking in the server of the configuration center to obtain the plaintext configuration parameters, thereby improving the storage security of the configuration parameters, reducing the possibility of configuration parameter leakage, and providing reliable protection for the data security of the distributed system.
[0038] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0039] In order to better understand the solution of the embodiment of the present application, an application scenario involved in the embodiment of the present application is first introduced below.
[0040] For specific application scenarios of this application, please refer to Figure 1 . Figure 1 This is a schematic diagram of an application scenario of a configuration parameter processing method provided in an embodiment of the present application. It should be noted that: Figure 1 What is shown are merely examples of application scenarios in which the embodiments of the present application can be applied, to help those skilled in the art understand the technical content of the present application, but it does not mean that the embodiments of the present application cannot be used in other devices, systems, environments or scenarios.
[0041] like Figure 1 As shown, this application scenario includes: an application server 110, multiple management client terminals 120, and a configuration center 130. The overall architecture of configuration center 130 may further include a parameter database 140 and a backup database 150. Parameter database 140 may be used to store data such as identification hash values and configuration parameter ciphertexts; backup database 150 may be used to back up and store data such as backup ciphertexts and pre-stored application identification codes, thereby achieving data redundancy and improving the reliability and security of configuration center 130.
[0042] It should be noted that parameter database 140 and backup database 150 can be installed as integrated components within configuration center 130, becoming part of configuration center 130; or they can be independent databases that establish a data connection with configuration center 130 via a communication interface, for example, through an external database such as a cloud database. The embodiments of this application do not specifically limit the deployment method of parameter database 140 and backup database 150, and can be selected based on actual needs and specific application scenarios.
[0043] The application server 110, multiple management user terminals 120 and the configuration center 130 can all be connected to each other in communication. The application server 110 can send key packaging information, configuration parameter ciphertext and storage request information and other data to the configuration center 130. The configuration center 130 is used to verify the data sent by the application server 110, and after the verification is passed, the identification hash value and configuration parameter ciphertext are stored in the parameter database 140, and the backup ciphertext and pre-stored application identification code are stored in the backup database 150.
[0044] When the application server 110 needs configuration parameters, it can send a request to multiple management clients 120 or the configuration center 130. After verification, the configuration center 130 sends the encrypted configuration parameters to the application server, which then decrypts the encrypted configuration parameters to obtain the plaintext configuration parameters. Each of the multiple management clients 120 can extract the corresponding backup ciphertext from the backup database 150, decrypt the backup ciphertext using their own private keys, and then send it to the application server 110. This improves the storage security of the configuration parameters and reduces the possibility of plaintext leakage. This prevents attackers from obtaining the plaintext configuration parameters from the configuration center, providing reliable protection for the data security of the distributed system.
[0045] Figure 2 A flow chart of a configuration parameter processing method provided in an embodiment of the present application Figure 1 .like Figure 2 As shown, the method is applied to the configuration center and includes:
[0046] S201: Receive key encapsulation information, configuration parameter ciphertext, and storage request information sent by an application server.
[0047] In an embodiment of the present application, a configuration parameter processing method is performed by a configuration center, which refers to a server in a distributed system for centrally managing and distributing configuration parameters. In addition, the configuration center may also be integrated with a parameter database and a backup database.
[0048] Specifically, during the configuration parameter storage process, the configuration center first receives key encapsulation information, configuration parameter ciphertext, and storage request information from the application server. The key encapsulation information is generated by the application server based on the first pre-stored initial public key. The configuration parameter ciphertext is obtained by the application server by concatenating and encrypting the hash value data and the configuration parameters to be stored. The hash value data is obtained by the application server by hashing the storage key and the configuration parameters to be stored.
[0049] That is to say, in order to prevent the information sent to the configuration center from being tampered with during transmission, the application server can first encrypt the configuration parameters to be stored using a preset symmetric encryption algorithm before sending them to the configuration center.
[0050] Specifically, the application server side can first connect the storage key and the configuration parameters to be stored, that is, simply merge the storage key and the configuration parameters to be stored together to form a first merged value; then, the application server side can calculate the hash value of the first merged value according to a pre-stored hash function, and use the hash value of the first merged value as the hash value data; then, the application server side can splice the hash value data with the configuration parameters to be stored to obtain a first spliced value, and can use a preset symmetric encryption algorithm to encrypt the first spliced value according to the storage key to obtain the configuration parameter ciphertext.
[0051] The storage key refers to the key used by the preset symmetric encryption algorithm. The preset symmetric encryption algorithm can be a symmetric encryption algorithm such as the Data Encryption Algorithm (DEA), the Triple Data Encryption Algorithm (TDEA), or the Advanced Encryption Standard (AES). There is no specific restriction here and it can be set according to actual needs.
[0052] The key encapsulation information is generated by encrypting the key-derivative material using the first pre-stored initial public key. Specifically, the application server uses a pre-stored first asymmetric encryption algorithm and, using the first pre-stored initial public key corresponding to the pre-stored first asymmetric encryption algorithm, encrypts the key-derivative material corresponding to the stored key to obtain the key encapsulation information.
[0053] The pre-stored first asymmetric encryption algorithm may be a public key encryption algorithm (Rivest-Shamir-Adleman, RSA) or an asymmetric encryption algorithm such as elliptic curve encryption, which is not specifically limited here and can be set according to actual needs.
[0054] S202. Randomly select an unused target unique identifier based on the storage request information, and input the target unique identifier, key encapsulation information, and configuration parameter ciphertext into the trusted execution environment, so as to decapsulate the key encapsulation information using the first pre-stored initial private key in the trusted execution environment to obtain a decapsulation result.
[0055] Specifically, to ensure the security of the configuration parameter ciphertext, the configuration center can store the configuration parameter ciphertext in the parameter database. Furthermore, to facilitate subsequent rapid retrieval of the configuration parameter ciphertext in the parameter database, upon receiving the storage request, the configuration center can randomly select an unused target unique identifier based on the storage request information and input the target unique identifier, key encapsulation information, and configuration parameter ciphertext into the trusted execution environment. In the trusted execution environment, the key encapsulation information is decrypted using the first pre-stored initial private key corresponding to the first pre-stored initial public key in the configuration center to obtain key derivation material corresponding to the stored key.
[0056] The trusted execution environment is an area in the configuration center where only authorized or trusted users can perform operations. The target unique identifier can be an unused token.
[0057] S203. Determine the storage key according to the decryption result, and decrypt the configuration parameter ciphertext according to the storage key to obtain the hash value to be verified.
[0058] Specifically, after determining the key derivation material corresponding to the storage key, the configuration center can derive the storage key according to the key derivation material corresponding to the storage key using a pre-stored key derivation algorithm.
[0059] Then, the configuration center can use a preset symmetric decryption algorithm to decrypt the configuration parameter ciphertext according to the storage key to obtain the hash value data and the first splicing value of the configuration parameter to be stored. Then, the configuration center can extract the hash value data from the first splicing value as the hash value to be verified.
[0060] S204. Verify the hash value to be verified and the encrypted hash value. When it is detected that the hash value to be verified and the encrypted hash value are equal, calculate the identification ciphertext and backup ciphertext of the target unique identifier, return the identification ciphertext and backup ciphertext to the open environment, and send the identification ciphertext to the application server side, so that the application server side decrypts it according to the identification ciphertext, obtains the target unique identifier and saves it.
[0061] Specifically, in order to verify the hash value to be verified to ensure that the source of the configuration parameters to be stored is reliable and has not been tampered with during transmission, the configuration center can first extract the configuration parameters to be stored from the first spliced value, and then connect the derived storage key with the extracted configuration parameters to be stored to merge them into a second merged value. Then, according to the pre-stored hash function, the hash value of the second merged value is calculated, and the hash value of the second merged value is used as the encrypted hash value to compare with the hash value to be verified to verify whether the hash value to be verified and the encrypted hash value are equal.
[0062] When it is detected that the hash value to be verified is not equal to the encrypted hash value, it is determined that the source of the configuration parameter to be stored is unreliable or has been tampered with during transmission, and processing is stopped and an error is reported.
[0063] When it is detected that the hash value to be verified and the encrypted hash value are equal, it is determined that the source of the configuration parameters to be stored is reliable and has not been tampered with during transmission. Then, a preset symmetric encryption algorithm is used to encrypt the target unique identifier according to the storage key to obtain the identification ciphertext of the target unique identifier; and a pre-stored second asymmetric encryption algorithm is used to encrypt the configuration parameters to be stored according to the second pre-stored initial public key corresponding to the pre-stored second asymmetric encryption algorithm to obtain the backup ciphertext of the configuration parameters to be stored. The pre-stored second asymmetric encryption algorithm can be the same as or different from the pre-stored first asymmetric encryption algorithm, and there is no specific limitation here.
[0064] The configuration center can then return the identification ciphertext and backup ciphertext to an open environment, where the open environment refers to a publicly accessible area within the configuration center. The identification ciphertext is then returned to the application server, which then uses a pre-set symmetric decryption algorithm and the stored key to decrypt the identification ciphertext, obtain the target unique identifier, and save it.
[0065] Furthermore, the application server can subsequently request the configuration center to return the corresponding configuration parameter ciphertext based on the target unique identifier, so as to further decrypt the configuration parameter ciphertext based on the storage key to obtain the corresponding configuration parameter to be stored for use.
[0066] S205: Store the identification hash value and the configuration parameter ciphertext into the parameter database, and store the backup ciphertext and the pre-stored application identification code into the backup database.
[0067] Specifically, the identification hash value is obtained by the configuration center calculating the hash value of the target unique identifier.
[0068] To ensure the security of the configuration parameter ciphertext, the configuration center can store the configuration parameter ciphertext in the parameter database. Furthermore, to facilitate subsequent rapid retrieval of the configuration parameter ciphertext in the parameter database, the configuration center can calculate a hash value of the target unique identifier based on a pre-stored hash function, use the hash value of the target unique identifier as the identification hash value, and combine it with the configuration parameter ciphertext to form a first data tuple, which is then stored in the parameter database.
[0069] Furthermore, the backup ciphertext and a pre-stored application identification code (Identifier, ID) may be combined into a second data tuple, and the second data tuple may be stored in the backup database.
[0070] Furthermore, after the above process is completed, the configuration center can delete the key encapsulation information, configuration parameter ciphertext, identification ciphertext, backup ciphertext and target unique identifier data in the memory.
[0071] By deleting key encapsulation information, configuration parameter ciphertext, identification ciphertext, backup ciphertext, and target unique identifier data in the memory, attackers are prevented from lurking in the configuration center's servers and obtaining the configuration parameter ciphertext. This improves the security of configuration parameters during the storage phase and prevents attackers from lurking in the configuration center's servers and obtaining the configuration parameters.
[0072] A configuration parameter processing method provided by this embodiment is applied to a configuration center. The method includes: first, receiving key encapsulation information, configuration parameter ciphertext and storage request information sent by an application server, wherein the key encapsulation information is generated by the application server according to a first pre-stored initial public key, the configuration parameter ciphertext is obtained by the application server according to hash value data and the configuration parameter to be stored, and the hash value data is obtained by the application server according to the storage key and the configuration parameter to be stored by hash calculation; then, according to the storage request information, an unused target unique identifier is randomly selected, and the target unique identifier, key encapsulation information and configuration parameter ciphertext are input into a trusted execution environment, so as to decrypt the key encapsulation information using the first pre-stored initial private key in the trusted execution environment. The encapsulation process obtains the unsealing result; then, the storage key is determined according to the unsealing result, and the configuration parameter ciphertext is decrypted according to the storage key to obtain the hash value to be verified; the hash value to be verified and the encrypted hash value are verified, so that when it is detected that the hash value to be verified and the encrypted hash value are equal, the identification ciphertext and backup ciphertext of the target unique identifier are calculated, and the identification ciphertext and backup ciphertext are returned to the open environment, and the identification ciphertext is sent to the application server side, so that the application server side decrypts according to the identification ciphertext, obtains the target unique identifier and saves it; finally, the identification hash value and the configuration parameter ciphertext are stored in the parameter database, and the backup ciphertext and the pre-stored application identification code are stored in the backup database, wherein the identification hash value is obtained by the configuration center performing hash value calculation on the target unique identifier.
[0073] The following technical effects are achieved: the encryption process of the configuration parameter plaintext is carried out on the application server side, and the configuration center stores the configuration parameter ciphertext in the parameter database only after verification. In addition, the decryption process of the key encapsulation information and the configuration parameter ciphertext by the configuration center is only carried out in a trusted execution environment, so that attackers cannot obtain the configuration parameters by lurking in the server of the configuration center; by verifying the hash value to be verified, it is ensured that the source of the configuration parameters to be stored is reliable and has not been tampered with during the transmission process, further improving the storage security of the configuration parameters.
[0074] Figure 3A flow chart of a configuration parameter processing method provided in an embodiment of the present application Figure 2 .like Figure 3 As shown, the above configuration parameter processing method may further include a process in which the configuration center returns the configuration parameter ciphertext to the application server when the application server requests the configuration parameter ciphertext from the configuration center according to the target unique identifier. Specifically, the following steps may be included:
[0075] S301: Receive a read request, hash identification ciphertext, and key encapsulation information sent by an application server.
[0076] Specifically, the hash identifier ciphertext is obtained by the application server side concatenating the stored target unique identifier with the storage key, performing hash value calculation, obtaining the key identifier hash value, and concatenating and encrypting the key identifier hash value and the target unique identifier.
[0077] That is, when the application server requests the configuration parameter ciphertext from the configuration center, it can first concatenate the storage key and the target unique identifier, that is, simply merge the storage key and the target unique identifier together to form a third merged value; then, the application server can calculate the hash value of the third merged value based on a pre-stored hash function, and use the hash value of the third merged value as the key identifier hash value; then, the application server can concatenate the key identifier hash value with the target unique identifier to obtain a second concatenation value, and can use a preset symmetric encryption algorithm to encrypt the second concatenation value according to the storage key to obtain the hash identifier ciphertext. Finally, the read request, hash identifier ciphertext, and key encapsulation information are sent to the configuration center.
[0078] The configuration center first receives the read request, hash identification ciphertext and key encapsulation information sent by the application server. Among them, the target unique identifier can be the token obtained by the application server after decrypting the identification ciphertext in the above embodiment.
[0079] S302: Input the hash identification ciphertext and the key encapsulation information into the trusted execution environment, decapsulate the key encapsulation information in the trusted execution environment according to the first pre-stored initial private key, obtain a decapsulation result, and determine the storage key according to the decapsulation result.
[0080] Specifically, the configuration center can input both the hash identification ciphertext and the key encapsulation information into the trusted execution environment. In the trusted execution environment, the configuration center can decrypt the key encapsulation information using the first pre-stored initial private key corresponding to the first pre-stored initial public key, obtaining key derivation material corresponding to the storage key. The storage key can then be derived from the key derivation material corresponding to the storage key using a pre-stored key derivation algorithm.
[0081] S303: Decrypt the hash identification ciphertext according to the storage key to obtain the identification hash value to be verified.
[0082] Specifically, the configuration center can use a preset symmetric decryption algorithm to decrypt the hash identification ciphertext according to the storage key to obtain a second concatenation value of the key identification hash value and the target unique identifier. Then, the configuration center can extract the key identification hash value from the second concatenation value as the identification hash value to be verified.
[0083] S304: Verify the identifier hash value to be verified and the key identifier hash value. When it is detected that the identifier hash value to be verified is equal to the key identifier hash value, extract the configuration parameter ciphertext from the parameter database according to the identifier hash value.
[0084] Specifically, in order to verify the hash value of the identifier to be verified to ensure that the source of the hash identifier ciphertext is reliable and has not been tampered with during transmission, the configuration center can first extract the target unique identifier from the second splicing value, and then connect the derived storage key with the extracted target unique identifier to merge into a fourth merged value. Then, according to the pre-stored hash function, the hash value of the fourth merged value is calculated, and the hash value of the fourth merged value is used as the key identifier hash value of the configuration center to compare with the identifier hash value to be verified to verify whether the identifier hash value to be verified and the key identifier hash value of the configuration center are equal.
[0085] When it is detected that the hash value of the identifier to be verified is not equal to the key identifier hash value of the configuration center, it is determined that the source of the hash identifier ciphertext is unreliable or has been tampered with during transmission, and processing is stopped and an error is reported.
[0086] When it is detected that the hash value of the identifier to be verified is equal to the key identifier hash value of the configuration center, it is determined that the source of the hash identifier ciphertext is reliable and has not been tampered with during transmission. The target unique identifier extracted from the second splicing value can be returned to the open environment, and the identifier hash value of the target unique identifier can be calculated. Based on the identifier hash value, the identifier hash value and the configuration parameter ciphertext are retrieved from the parameter database to form a first data tuple, and the configuration parameter ciphertext is extracted from the first data tuple.
[0087] S305. Send the configuration parameter ciphertext to the application server, so that the application server performs decryption processing based on the configuration parameter ciphertext to obtain the hash value to be verified and the configuration parameter plaintext, and performs verification processing based on the hash value to be verified and the encrypted hash value. When it is detected that the hash value to be verified and the encrypted hash value are equal, the configuration parameter plaintext is used, and the configuration parameter plaintext is erased after the use is completed.
[0088] Specifically, after extracting the configuration parameter ciphertext, the configuration center can send the configuration parameter ciphertext to the application server. The application server uses a preset symmetric decryption algorithm to decrypt the configuration parameter ciphertext based on the storage key to obtain a hash value to be verified and the configuration parameter plaintext. The configuration parameter plaintext corresponds to the configuration parameter to be stored in the above-mentioned embodiment. The application server can then merge the storage key with the configuration parameter plaintext and calculate an encrypted hash value of the merged value. If the hash value to be verified and the encrypted hash value are not equal, the source of the configuration parameter ciphertext is determined to be unreliable or tampered with during transmission. The processing stops and an error is reported. If the hash value to be verified and the encrypted hash value are equal, the source of the configuration parameter ciphertext is determined to be reliable and has not been tampered with during transmission. The decrypted configuration parameter plaintext can then be used. After the configuration parameter plaintext is used, it is erased from the application server's memory to prevent attackers from accessing the configuration parameter plaintext after compromising the application server.
[0089] Furthermore, after the above process is completed, the configuration center can also delete the key encapsulation information, configuration parameter ciphertext, hash identifier ciphertext, target unique identifier and other data in the memory to prevent attackers from obtaining configuration parameters by lurking in the server of the configuration center.
[0090] An embodiment of the present application provides a configuration parameter processing method, in which the configuration center inputs the hash identification ciphertext and key encapsulation information sent by the application server into a trusted execution environment, and only performs unsealing and verification in the trusted execution environment. After the verification is passed, the configuration parameter ciphertext is extracted from the parameter database according to the identification hash value and sent to the application server. This prevents attackers from lurking in the server of the configuration center from obtaining the configuration parameters, effectively improving the security of the configuration parameter ciphertext.
[0091] In a possible implementation, the above-mentioned configuration parameter processing method, before the configuration center stores the configuration parameter ciphertext, may further include an initialization stage, specifically including: receiving an application initialization request sent by the application server, wherein the application initialization request is generated by the application server in response to the user's initialization operation; generating a first pre-stored initial public key, a first pre-stored initial private key and key derivation material in the trusted execution environment according to the application initialization request, and storing the first pre-stored initial private key in the trusted execution environment; sending the first pre-stored initial public key and the key derivation material to the application server, so that the application server generates key encapsulation information according to the first pre-stored initial public key and the key derivation material and saves it, and determines the storage key according to the key derivation material and saves it.
[0092] Specifically, during the initialization process, the configuration center first receives an application initialization request sent by the application server or the management user. The application initialization request is used to request the configuration center to generate a first pre-stored initial public key, a first pre-stored initial private key, and key derivation material. The application server generates an application initialization request in response to the user's initialization operation. In response to the application initialization request, the configuration center can generate the first pre-stored initial public key, the first pre-stored initial private key, and key derivation material in a trusted execution environment, and can store the first pre-stored initial private key in the trusted execution environment. The configuration center also sends the first pre-stored initial public key and key derivation material to the application server, so that the application server encrypts the key derivation material using the first pre-stored initial public key to generate key encapsulation information and saves it. The configuration center also derives a storage key based on the key derivation material and saves it. The key derivation material can be a random number randomly selected by the configuration center based on the application initialization request sent by the application server.
[0093] A configuration parameter processing method provided in an embodiment of the present application generates a first pre-stored initial public key, a first pre-stored initial private key, and key derivation material in a trusted execution environment according to an application initialization request sent by an application server during the initialization stage of a configuration center, and stores the first pre-stored initial private key in the trusted execution environment. The first pre-stored initial private key is only stored in the trusted execution environment, so that an attacker cannot obtain the first pre-stored initial private key by lurking in the server of the configuration center, thereby effectively improving the security of the configuration parameter ciphertext.
[0094] In one possible implementation, the above-mentioned configuration parameter processing method further includes that after the application server loses the storage key, the configuration center can also encrypt the configuration parameters through a threshold encryption algorithm. The following describes the process of how the configuration center obtains the second pre-stored initial public key. Specifically, it includes: receiving and saving the second pre-stored initial public key sent by the management user terminal, wherein the second pre-stored initial public key is one of the second public-private key pairs generated by multiple management user terminals in response to the management user's key pair generation operation, and the second public-private key pair includes a second pre-stored initial public key and multiple second pre-stored initial private keys, wherein the number of the second pre-stored initial private keys is the same as the number of management user terminals.
[0095] Specifically, when a user generates a key pair, multiple management clients can generate a second public-private key pair in response to the user's key pair generation operation. The second public-private key pair includes a second pre-stored initial public key and multiple second pre-stored initial private keys. The management client can send the second pre-stored initial public key to the configuration center. The number of second pre-stored initial private keys is the same as the number of management clients, and each management client stores a corresponding second pre-stored initial private key.
[0096] By using a threshold encryption algorithm, multiple second pre-stored initial private keys are distributed and stored separately for different management clients. Only when multiple management clients collaborate can the complete second pre-stored initial private key be recovered to decrypt the ciphertext of the configuration parameters. This distributed key management approach improves the storage security of the configuration center, reduces the possibility of configuration parameter leakage, and provides reliable protection for the data security of the distributed system.
[0097] The present application provides a configuration parameter processing method. After the application server loses the storage key, the configuration center can encrypt the configuration parameters using a threshold encryption algorithm. This method stores a second pre-stored initial public key in the configuration center, and stores multiple second pre-stored initial private keys correspondingly to multiple management user terminals. The number of second pre-stored initial private keys is equal to the number of management user terminals, and each management user terminal stores a corresponding second pre-stored initial private key. By using the threshold encryption algorithm, even if part of the key is leaked, an attacker cannot easily crack the plaintext of the configuration parameters, thereby improving the storage security of the configuration parameters in the configuration center.
[0098] The embodiment of the present application also provides a configuration parameter processing method, which is applied to the application server side, the method comprising: generating key encapsulation information according to a first pre-stored initial public key; performing hash calculation according to the storage key and the configuration parameter to be stored to obtain hash value data, and performing splicing encryption processing according to the hash value data and the configuration parameter to be stored to obtain the configuration parameter ciphertext; sending the key encapsulation information, the configuration parameter ciphertext and the storage request information to the configuration center, so that the configuration center randomly selects an unused target unique identifier according to the storage request information, and inputs the target unique identifier, the key encapsulation information and the configuration parameter ciphertext into the trusted execution environment, so as to decapsulate the key encapsulation information in the trusted execution environment using the first pre-stored initial private key. Processing, obtain the unsealing result, determine the storage key according to the unsealing result, and decrypt the configuration parameter ciphertext according to the storage key to obtain the hash value to be verified, and verify the hash value to be verified and the encrypted hash value. When it is detected that the hash value to be verified and the encrypted hash value are equal, the identification ciphertext and backup ciphertext of the target unique identifier are calculated, and the identification ciphertext and backup ciphertext are returned to the open environment, the identification hash value and the configuration parameter ciphertext are stored in the parameter database, and the backup ciphertext and the pre-stored application identification code are stored in the backup database, wherein the identification hash value is obtained by the configuration center performing hash value calculation on the target unique identifier; receive the identification ciphertext sent by the configuration center, decrypt it according to the identification ciphertext, obtain the target unique identifier and save it.
[0099] Specifically, during the configuration parameter storage process, the application server first uses a pre-stored first asymmetric encryption algorithm and a first pre-stored initial public key to encrypt key-derivative material to obtain key encapsulation information. The storage key and the configuration parameters to be stored are then concatenated to form a first combined value. Next, a hash value of the first combined value is calculated using a pre-stored hash function. This hash value is then concatenated with the configuration parameters to be stored to obtain a first concatenated value. This concatenated value is then encrypted using a pre-set symmetric encryption algorithm and the storage key to obtain the configuration parameter ciphertext. The key encapsulation information, the configuration parameter ciphertext, and a storage request are then sent to the configuration center, requesting the configuration center to store the configuration parameter ciphertext. Finally, the application server receives the identification ciphertext sent by the configuration center, decrypts it based on the identification ciphertext, obtains the target unique identifier, and stores it. This allows the application server to subsequently request the corresponding configuration parameter ciphertext from the configuration center based on the target unique identifier.
[0100] In a possible implementation, the above configuration parameter processing method may also include a process in which the subsequent application server requests the configuration parameter ciphertext from the configuration center based on the target unique identifier. Specifically, the following steps may be included: after splicing the saved target unique identifier with the storage key, a hash value calculation is performed to obtain the key identifier hash value, and the key identifier hash value and the target unique identifier are spliced and encrypted to obtain the hash identifier ciphertext; the hash identifier ciphertext is sent to the configuration center so that the configuration center inputs the hash identifier ciphertext and the key encapsulation information into the trusted execution environment, so as to decrypt the key encapsulation information according to the first pre-stored initial private key in the trusted execution environment to obtain the decryption result, and according to the decryption result, the storage key is determined, and the hash identifier ciphertext is decrypted according to the storage key to obtain the identifier The hash value to be verified will be used to verify the hash value to be verified and the key identification hash value, so that when it is detected that the hash value to be verified is equal to the key identification hash value, the configuration parameter ciphertext is extracted from the parameter database according to the key identification hash value; the configuration parameter ciphertext sent by the configuration center is received, and decrypted according to the configuration parameter ciphertext to obtain the hash value to be verified and the configuration parameter plaintext, and the hash value to be verified and the encrypted hash value are used to verify the plaintext of the configuration parameter, and the plaintext of the configuration parameter is erased after the use is completed.
[0101] Specifically, when requesting configuration parameters, the application server first obtains the hashed identification ciphertext based on the target unique identifier and the storage key, and sends the hashed identification ciphertext to the configuration center for decryption and verification in the trusted execution environment. Once verification is successful, the configuration center extracts the configuration parameter ciphertext from the parameter database based on the identification hash value and returns it to the application server, effectively improving the security of the configuration parameter ciphertext.
[0102] In one possible implementation, the above-mentioned configuration parameter processing method may further include an initialization phase, specifically including: generating an application initialization request in response to a user's initialization operation; sending the application initialization request to a configuration center, so that the configuration center generates a first pre-stored initial public key, a first pre-stored initial private key, and key derivation material in a trusted execution environment according to the application initialization request, and stores the first pre-stored initial private key in the trusted execution environment; receiving the first pre-stored initial public key and key derivation material sent by the configuration center, and generating key encapsulation information based on the first pre-stored initial public key and the key derivation material and saving it; determining a storage key based on the key derivation material and saving it.
[0103] Specifically, during the initialization process, that is, when the configuration center is used for the first time, the application server side or the management user side can send an application initialization request to the configuration center in response to the user's initialization operation, so that the configuration center generates a first pre-stored initial public key and a first pre-stored initial private key in a trusted execution environment, and randomly selects a random number as the key derivation material, thereby improving the security of the configuration parameter ciphertext.
[0104] In one possible implementation, the configuration parameter processing method further includes a process for requesting configuration parameters from a management user terminal after the application server terminal loses a storage key, specifically including: when the storage key is detected to be lost, sending a backup recovery request and a pre-stored application identification code to multiple management user terminals, so that each management user terminal responds to the management user's review operation on the backup recovery request and obtains an audit result; when the audit result is detected to be approved, obtaining the second pre-stored initial private keys of the multiple management user terminals, extracting backup ciphertext from a backup database based on the pre-stored application identification code, performing a decryption operation based on the backup ciphertext and the second pre-stored initial private keys of the multiple management user terminals to obtain configuration parameter plaintext and evidence to be verified; performing a merge verification process based on the evidence to be verified, the second pre-stored initial public key, and the backup ciphertext, so that when the merge verification is detected to be approved, the configuration parameter plaintext is stored in a plaintext set; receiving the plaintext set sent by the management user terminal, and deleting the plaintext set after using the configuration parameter plaintext in the plaintext set.
[0105] Specifically, when the application server detects the loss of the initial key, it cannot generate the hash identification ciphertext and key encapsulation information, and therefore cannot send the pre-hashed identification ciphertext and key encapsulation information to the configuration center to obtain the corresponding configuration parameter ciphertext. Therefore, it can send a restore backup request and a pre-stored application identification code to multiple management user terminals. This allows each management user terminal to respond to the management user's review of the restore backup request. Specifically, after each management user terminal receives the restore backup request and the pre-stored application identification code, the corresponding management user can review the restore backup request. After the administrator's review is approved, the management user terminal can extract the corresponding pre-stored initial private key from storage and, based on the pre-stored application identification code, retrieve a second data tuple consisting of the backup ciphertext and the pre-stored application identification code from the backup database. The backup ciphertext is then decrypted using the backup ciphertext and the second pre-stored initial private keys of the multiple management user terminals to obtain the configuration parameter plaintext and the evidence to be verified. A combined verification process is then performed based on the evidence to be verified, the second pre-stored initial public key, and the backup ciphertext. The evidence to be verified can be the length of the configuration parameter plaintext or the hash value of the configuration parameter plaintext. When the decrypted configuration parameter plaintext matches the pre-stored preset hash value, the test result is that the combined verification has passed, confirming that the decrypted configuration parameter plaintext is complete and has not been tampered with. The configuration parameter plaintext can then be stored in a plaintext set and sent to the application server. After using the configuration parameter plaintext in the plaintext set, the application server can delete the plaintext set to prevent attackers from obtaining the configuration parameter plaintext after compromising the application server.
[0106] An embodiment of the present application provides a configuration parameter processing method. When an application server detects that an initial key is lost, it sends a recovery backup request and a pre-stored application identification code to multiple management user terminals, so that the management user terminals decrypt the configuration parameters using a decryption method corresponding to the threshold encryption algorithm to obtain the plaintext and then return it to the application server. Even if part of the key is leaked, an attacker cannot easily crack the plaintext of the configuration parameters, thereby improving the storage security of the configuration parameters in the configuration center.
[0107] Figure 4 A flow chart of a configuration parameter processing method provided in an embodiment of the present application Figure 3 .like Figure 4 As shown, the method includes:
[0108] S401: The application server generates key encapsulation information according to a first pre-stored initial public key.
[0109] S402: The application server performs hash calculation based on the storage key and the configuration parameters to be stored to obtain hash value data, and performs concatenation encryption processing based on the hash value data and the configuration parameters to be stored to obtain configuration parameter ciphertext.
[0110] S403: The application server sends the key encapsulation information, the configuration parameter ciphertext, and the storage request information to the configuration center.
[0111] S404: The configuration center randomly selects an unused target unique identifier according to the storage request information, and uses the first pre-stored initial private key in the trusted execution environment to decapsulate the key encapsulation information to obtain a decapsulation result.
[0112] S405: The configuration center determines the storage key based on the decryption result, and decrypts the configuration parameter ciphertext based on the storage key to obtain the hash value to be verified.
[0113] S406: When the configuration center detects that the hash value to be verified is equal to the encrypted hash value, it calculates the identification ciphertext and the backup ciphertext of the target unique identifier.
[0114] S407: The configuration center sends the identification ciphertext to the application server.
[0115] S408. The configuration center stores the identification hash value and the configuration parameter ciphertext into the parameter database, and stores the backup ciphertext and the pre-stored application identification code into the backup database.
[0116] Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present application. Figure 5 As shown, the electronic device includes: at least one processor 510 and a memory 520. The electronic device also includes a communication component 530. The processor 510, the memory 520 and the communication component 530 are connected via a bus 540.
[0117] In a specific implementation process, at least one processor 510 executes the computer-executable instructions stored in the memory 520, so that the at least one processor 510 executes a configuration parameter processing method executed by the electronic device side as described above.
[0118] The specific implementation process of the processor 510 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0119] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.
[0120] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.
[0121] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0122] The above-mentioned functions implemented by the electronic device and the main control device have introduced the solutions provided by the embodiments of the present invention. It can be understood that in order to implement the above-mentioned functions, the electronic device or the main control device includes hardware structures and / or software modules corresponding to the execution of each function. In combination with the units and algorithm steps of the various examples described in the embodiments disclosed in the embodiments of the present invention, the embodiments of the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiments of the present invention.
[0123] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the computer-readable storage medium is used to implement the above configuration parameter processing method.
[0124] The readable storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0125] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in an electronic device or a main control device.
[0126] The present application also provides a computer program product, which includes a computer program. The computer program is stored in a readable storage medium. At least one processor of an electronic device can read the computer program from the readable storage medium. At least one processor executes the computer program so that the electronic device executes the solution provided by the above embodiment.
[0127] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0128] So far, the technical solution of the present application has been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the scope of protection of the present application is obviously not limited to these specific embodiments. The above embodiments are only used to illustrate the technical solution of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solution to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A configuration parameter processing method, characterized in that: Applied to a configuration center, the method includes: Receiving key encapsulation information, configuration parameter ciphertext, and storage request information sent by the application server, wherein the key encapsulation information is generated by the application server according to the first pre-stored initial public key, the configuration parameter ciphertext is obtained by the application server through concatenating and encrypting hash value data and the configuration parameters to be stored, and the hash value data is obtained by the application server through hash calculation based on the storage key and the configuration parameters to be stored; randomly selecting an unused target unique identifier according to the storage request information, and inputting the target unique identifier, the key encapsulation information, and the configuration parameter ciphertext into a trusted execution environment, so as to decapsulate the key encapsulation information using a first pre-stored initial private key in the trusted execution environment to obtain a decapsulation result; Determine the storage key according to the decryption result, and decrypt the configuration parameter ciphertext according to the storage key to obtain a hash value to be verified; Verifying the hash value to be verified and the encrypted hash value, and when it is detected that the hash value to be verified and the encrypted hash value are equal, calculating an identification ciphertext and a backup ciphertext of the target unique identifier, returning the identification ciphertext and the backup ciphertext to the open environment, and sending the identification ciphertext to the application server, so that the application server decrypts the identification ciphertext to obtain the target unique identifier and saves it; The identification hash value and the configuration parameter ciphertext are stored in a parameter database, and the backup ciphertext and the pre-stored application identification code are stored in a backup database, wherein the identification hash value is obtained by the configuration center performing hash value calculation on the target unique identifier.
2. The method according to claim 1, characterized in that Also includes: Receiving a read request, a hash identifier ciphertext, and key encapsulation information sent by the application server, wherein the hash identifier ciphertext is obtained by the application server concatenating the stored target unique identifier with the storage key, performing a hash value calculation, and then concatenating and encrypting the key identifier hash value and the target unique identifier; Inputting the hash identification ciphertext and the key encapsulation information into a trusted execution environment, decapsulating the key encapsulation information in the trusted execution environment according to a second pre-stored initial private key to obtain a decapsulation result, and determining the storage key based on the decapsulation result; Decrypting the hash identification ciphertext according to the storage key to obtain a hash value to be verified; Verifying the identifier hash value to be verified and the key identifier hash value, so that when it is detected that the identifier hash value to be verified is equal to the key identifier hash value, the configuration parameter ciphertext is extracted from the parameter database according to the identifier hash value; The configuration parameter ciphertext is sent to the application server, so that the application server performs decryption processing based on the configuration parameter ciphertext to obtain the hash value to be verified and the configuration parameter plaintext, and performs verification processing based on the hash value to be verified and the encrypted hash value, so that when it is detected that the identification hash value to be verified and the encrypted hash value are equal, the configuration parameter plaintext is used, and the configuration parameter plaintext is erased after the use is completed.
3. The method according to claim 1, characterized in that Also includes: receiving an application initialization request sent by the application server, wherein the application initialization request is generated by the application server in response to an initialization operation of a user; generating a first pre-stored initial public key, a first pre-stored initial private key, and key derivation material in the trusted execution environment according to the application initialization request, and storing the first pre-stored initial private key in the trusted execution environment; The first pre-stored initial public key and key derivation material are both sent to the application server, so that the application server generates key encapsulation information according to the first pre-stored initial public key and key derivation material and saves it, and determines the storage key according to the key derivation material and saves it.
4. The method according to any one of claims 1 to 3, characterized in that Also includes: Receive and save the second pre-stored initial public key sent by the management user terminal, wherein the second pre-stored initial public key is one of the second public-private key pairs generated by multiple management user terminals in response to the key pair generation operation of the management user, and the second public-private key pair includes a second pre-stored initial public key and multiple second pre-stored initial private keys, wherein the number of the second pre-stored initial private keys is the same as the number of the management user terminals.
5. A configuration parameter processing method, characterized in that: Applied to the application server, the method includes: Generate key encapsulation information according to the first pre-stored initial public key; Performing hash calculation based on the storage key and the configuration parameters to be stored to obtain hash value data, and performing splicing encryption processing based on the hash value data and the configuration parameters to be stored to obtain configuration parameter ciphertext; The key encapsulation information, the configuration parameter ciphertext, and the storage request information are sent to the configuration center, so that the configuration center randomly selects an unused target unique identifier according to the storage request information, and inputs the target unique identifier, the key encapsulation information, and the configuration parameter ciphertext into a trusted execution environment, so as to decapsulate the key encapsulation information using a first pre-stored initial private key in the trusted execution environment to obtain a decapsulation result, determine the storage key based on the decapsulation result, decrypt the configuration parameter ciphertext based on the storage key to obtain a hash value to be verified, verify the hash value to be verified and the encrypted hash value, and calculate an identification ciphertext and a backup ciphertext of the target unique identifier when it is detected that the hash value to be verified and the encrypted hash value are equal, return the identification ciphertext and the backup ciphertext to the open environment, store the identification hash value and the configuration parameter ciphertext in a parameter database, and store the backup ciphertext and the pre-stored application identification code in a backup database, wherein the identification hash value is obtained by the configuration center by performing a hash value calculation on the target unique identifier; Receive the identification ciphertext sent by the configuration center, decrypt it according to the identification ciphertext, obtain the target unique identifier and save it.
6. The method according to claim 5, characterized in that Also includes: The stored target unique identifier is concatenated with the storage key and hashed to obtain a key identifier hash value, and the key identifier hash value and the target unique identifier are concatenated and encrypted to obtain a hash identifier ciphertext; Sending the hash identification ciphertext to the configuration center, so that the configuration center inputs the hash identification ciphertext and the key encapsulation information into a trusted execution environment, decrypting the key encapsulation information according to the first pre-stored initial private key in the trusted execution environment to obtain a decapsulation result, determining a storage key according to the decapsulation result, decrypting the hash identification ciphertext according to the storage key to obtain an identification hash value to be verified, and verifying the identification hash value to be verified and the key identification hash value, so that when it is detected that the identification hash value to be verified is equal to the key identification hash value, extracting the configuration parameter ciphertext from the parameter database according to the key identification hash value; Receive the configuration parameter ciphertext sent by the configuration center, and perform decryption processing according to the configuration parameter ciphertext to obtain the hash value to be verified and the configuration parameter plaintext, and perform verification processing according to the hash value to be verified and the encrypted hash value, so that when it is detected that the hash value to be verified and the encrypted hash value are equal, use the configuration parameter plaintext, and erase the configuration parameter plaintext after the use is completed.
7. The method according to claim 5, characterized in that Also includes: In response to a user's initialization operation, generating an application initialization request; Sending the application initialization request to a configuration center, so that the configuration center generates a first pre-stored initial public key and a first pre-stored initial private key in a trusted execution environment according to the application initialization request, and stores the first pre-stored initial private key in the trusted execution environment; Receive a first pre-stored initial public key sent by the configuration center, and generate key encapsulation information and key derivation material based on the first pre-stored initial public key and save them; The storage key is determined and saved based on the key derivation material.
8. The method according to any one of claims 5 to 7, characterized in that Also includes: When it is detected that the storage key is lost, a backup recovery request and a pre-stored application identification code are both sent to multiple management user terminals, so that each management user terminal responds to the management user's review operation on the backup recovery request to obtain a review result, and when it is detected that the review result is passed, the second pre-stored initial private keys of the multiple management user terminals are obtained, and backup ciphertexts are extracted from the backup database according to the pre-stored application identification code, and a decryption operation is performed according to the backup ciphertext and the second pre-stored initial private keys of the multiple management user terminals to obtain configuration parameter plaintexts and evidence to be verified, and a merge verification process is performed according to the evidence to be verified, the second pre-stored initial public key and the backup ciphertext, so that when it is detected that the merge verification is passed, the configuration parameter plaintexts are stored in a plaintext set; The plaintext set is received from the management client, and the plaintext set is deleted after the configuration parameter plaintext in the plaintext set is used.
9. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 4 or 5 to 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 4 or 5 to 8 when executed by a processor.
Citation Information
Cited By
Decryption method, device and equipment and computer readable storage medium
CN120811794A
Anti-skipping verification key packaging method and device based on identity binding confirmation code
CN121217342A
Railway freight data security encryption method based on distributed storage
CN121333803A