Encryption and decryption method, cloud server, device and medium for user outsourced data

Symmetric key exposure and key management are solved by using the receiving user's public and private key to generate materials during the encryption and decryption process of user outsourcing data, and using the reverse firewall and multiple key servers to generate keys in collaboration, symmetric key exposure and key management are solved Complex problems achieve the effects of data security and resource conservation.

CN118646602BActive Publication Date: 2024-11-01ZHONGNAN UNIVERSITY OF ECONOMICS AND LAW
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411110134.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-11-01
Estimated Expiration
2044-08-14

AI Technical Summary

Technical Problem

In the prior art, the symmetric keys of the user's outsourcing data are easily leaked during transmission, resulting in damage to data security and complex key management, which increases the burden on users.

Method used

By encrypting the symmetric keys in the receiving user's public key pair, and decrypting the symmetric keys after authentication by the receiver, ensuring that the symmetric keys are not exposed, using reverse firewalls and multiple key servers to collaborate with multiple key servers Generate public-private key pairs to enhance security.

Benefits of technology

Effectively prevent symmetric key leakage, ensure data security, while reducing the burden on users in key management and saving storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118646602B_ABST
    Figure CN118646602B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data management technology and discloses a method for encrypting and decrypting user outsourced data, a cloud server, a device and a medium. The above-mentioned method for encrypting and decrypting user outsourced data is applied to a cloud server and includes the following steps: obtaining the encrypted outsourced data sent by the first user and encrypted with the first user's symmetric key and the symmetric key generation material used to generate the first user's symmetric key, the symmetric key generation material is encrypted with the public key in the public-private key pair of the second user; after receiving the request message sent by the second user and encrypted with the private key in the public-private key pair of the second user, sending the encrypted outsourced data and the encrypted symmetric key generation material to the second user, so as to decrypt the symmetric key generation material by the private key in the public-private key pair of the second user, and determine the symmetric key by the symmetric key generation material, and decrypt the encrypted outsourced data by the symmetric key.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data management technology, and in particular to an encryption and decryption method, cloud server, device and medium for user outsourced data. Background Art

[0002] In the era of rapid development of Internet technology, many cloud service providers have emerged. The cloud storage services provided by cloud service providers are designed to help users manage data efficiently. This not only reduces the need for users to store data locally and reduces related costs, but also provides users with a robust, convenient and flexible method for processing data. However, if the user's outsourced data is stored in plain text on the cloud service provider's server (i.e., cloud server), once the cloud server encounters a security vulnerability, there is a risk of data leakage or even permanent loss. Such incidents will cause irreparable losses to users and affect the reputation of cloud service providers. In order to reduce these risks, users always encrypt data before outsourcing, which is considered to be the most effective way to ensure data confidentiality and has therefore become a standard paradigm in data outsourcing practices.

[0003] The traditional method of protecting outsourced data is to randomly select a symmetric key and then use the key to encrypt the data. For different outsourced data, each user tends to select a different symmetric key to protect the data, which means that each user needs to carefully maintain their multiple symmetric keys, which inevitably leads to key management problems for users.

[0004] A common approach to managing symmetric keys is the wrap-unwrap approach, which has been widely used in some large cloud-based applications. In this approach, when users want to encrypt their outsourced data, When she / he chooses a symmetric key , and encrypt it with the key Next, the user will pass the key Transmitted to a key server, which uses the user's unique key right The package is then sent back to the user. Finally, the user outsources the package and encrypted data to the cloud server. When the user needs to access the outsourced data, the user first obtains the corresponding ciphertext from the cloud server and sends the package to the key server. Decrypt it and pass the key Sent back to the user to decrypt the data. In the wrap-unwrap method, the key server helps the user recover the symmetric key, thereby eliminating the need for the user to manage any keys locally, which effectively relieves the user of the heavy challenges of key management.

[0005] However, the symmetric key in the above method In plaintext form, an adversary who intercepts communications on the Internet or impersonates the intended recipient to interact with the cloud server and the key server can obtain the symmetric key and decrypt the outsourced data. Summary of the invention

[0006] The purpose of this application is to provide an encryption and decryption method, cloud server, device and medium for user outsourced data, which can ensure that the symmetric key is not exposed, thereby ensuring the security of user outsourced data.

[0007] In order to solve the above technical problems, an embodiment of the present application provides an encryption and decryption method for user outsourced data, which is applied to a cloud server and includes the following steps:

[0008] Acquire the encrypted outsourced data sent by the first user and encrypted with the first user's symmetric key and symmetric key generation material used to generate the first user's symmetric key, wherein the symmetric key generation material is encrypted with the public key in the public-private key pair of the second user;

[0009] After receiving a request message sent by a second user that is encrypted using a private key in the second user's public-private key pair, the encrypted outsourced data and the encrypted symmetric key generation material are sent to the second user, so that the symmetric key generation material is decrypted using the private key in the second user's public-private key pair, the symmetric key is determined using the symmetric key generation material, and the encrypted outsourced data is decrypted using the symmetric key.

[0010] In some optional embodiments, the steps of generating the public-private key pair are as follows:

[0011] The user end uses a preset random number to blind the user's identity and preset password, generates a blinded value, and sends it to the key server;

[0012] The key server generates the user's blinded signature based on the blinded value and returns it to the user;

[0013] The user end uses a preset random number to deblind the user's blinded signature and generates the user's public-private key pair through a preset random function.

[0014] In some optional embodiments, the user terminal includes a user's device and a reverse firewall, and the steps of generating the public-private key pair are as follows:

[0015] The device uses a first preset random number to blind the user's identity and preset password, generates a first blinded value, and sends it to the reverse firewall;

[0016] The reverse firewall uses a second preset random number to blind the first blind value, generates a second blind value, and sends it to the key server;

[0017] The key server generates a blinded signature of the user according to the second blinded value, and returns it to the reverse firewall;

[0018] The reverse firewall uses the second preset random number to deblind the blinded signature of the user, generates a first deblinding value, and returns it to the device;

[0019] The device uses a first preset random number to de-blind the first de-blinding value, generates a second de-blinding value, and generates a public-private key pair according to a preset random function and the second de-blinding value.

[0020] In this application, a reverse firewall is deployed between the user's device and the external key server. The device and the reverse firewall work together to interact with the key server. This design ensures that even if the device is leaked, no secrets can be leaked to the outside, thereby enhancing the security of the solution.

[0021] In some optional embodiments, there are multiple key servers, each of which generates a blinded signature of the user based on the blinded value sent by the user terminal, so that the user terminal generates the user's public-private key pair based on multiple blinded signatures.

[0022] In this application, multiple key servers are used. The user and these multiple key servers jointly generate the user's public-private key pair, so that the public-private key pair is associated with multiple key servers. Even if the adversary breaks into one of the key servers, it cannot obtain the correct public-private key pair, thereby further ensuring the security of the symmetric key generation material.

[0023] In some optional embodiments, the step of the second user determining the symmetric key by using the symmetric key generation material is as follows:

[0024] The device of the second user blinds the symmetric key generation material using a third preset random number to generate a third blinding value, and sends the third blinding value to the reverse firewall of the second user;

[0025] The reverse firewall of the second user blinds the third blinded value using a fourth preset random number to generate a fourth blinded value, and sends the fourth blinded value to each key server;

[0026] Each key server generates a blinded signature of the second user according to the fourth blinded value, and returns the signature to the reverse firewall of the second user;

[0027] The reverse firewall of the second user uses a fourth preset random number to deblind the blinded signatures of the plurality of second users, generates a third deblinding value, and returns the third deblinding value to the device of the second user;

[0028] The device of the second user uses a third preset random number to de-blind the third de-blind value to generate a fourth de-blind value as a symmetric key.

[0029] In some optional embodiments, each of the first user and the second user corresponds to a public-private key pair, and the public key of the public-private key pair of the first user and the second user is made public, and the private key is stored separately.

[0030] In the present application, the public key in the public-private key pair used to encrypt the symmetric key generation material is made public, which is conducive to the first user using the public key of the second user to encrypt the symmetric key generation material. In addition, although the public key is public, each user keeps their own private key. Even if the adversary obtains the public key used for encryption, it cannot know the private key saved by each user, and cannot decrypt the symmetric key generation material, which further ensures the security of the symmetric key. Furthermore, each user only needs to save their own private key, which can also save storage resources on the user side.

[0031] In some optional embodiments, the encrypted outsourced data also includes a message authentication code generated based on a hash function, so that the second user can verify whether the encrypted outsourced data is complete according to the message authentication code after decrypting the encrypted outsourced data.

[0032] The embodiment of the present application further provides a cloud server, including:

[0033] A data encryption module, used to obtain the encrypted outsourced data sent by the first user and encrypted using the first user's symmetric key, and a symmetric key generation material for generating the first user's symmetric key, wherein the symmetric key generation material is encrypted using the public key in the public-private key pair of the second user;

[0034] A data decryption module is used to send encrypted outsourced data and encrypted symmetric key generation materials to the second user after receiving a request message sent by the second user and encrypted using the private key in the second user's public-private key pair, so as to obtain the symmetric key generation materials by decrypting them using the private key in the second user's public-private key pair, determine the symmetric key through the symmetric key generation materials, and decrypt the encrypted outsourced data through the symmetric key.

[0035] An embodiment of the present application also provides a computer device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned encryption and decryption method of user outsourced data.

[0036] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which implements the above-mentioned method for encrypting and decrypting user outsourced data when executed by a processor.

[0037] The encryption and decryption method of user outsourced data provided by this application has at least the following beneficial effects:

[0038] In this application, in order to protect the symmetric key used to encrypt the outsourced data of the user (the first user), the symmetric key generation material used to generate the symmetric key will be encrypted, and the symmetric key generation material will be encrypted using the public key in the public-private key pair of the user receiving the outsourced data (i.e., the second user). Therefore, the encrypted outsourced data of the first user and the encrypted symmetric key generation material will be sent to the second user only when a request message encrypted using the private key in the public-private key pair of the second user is received. Because the private key of the second user and the public key used by the symmetric key generation material are a pair, it is equivalent to performing an identity authentication, confirming that the second user who sent the request message is the user designated by the first user to receive the outsourced data. This not only ensures the security of the user's outsourced data, but also ensures the security of the symmetric key generation material (i.e., the symmetric key), so that it will not be eavesdropped or impersonated by an adversary. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.

[0040] Figure 1 is a flow chart of a method for encrypting and decrypting user outsourced data provided according to an embodiment of the present application;

[0041] Figure 2 is a schematic diagram of a cloud server provided according to an embodiment of the present application;

[0042] Figure 3 It is a structural diagram of a computer device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0043] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be limited in any way, and the various embodiments can be combined and referenced with each other without contradiction.

[0044] An embodiment of the present application relates to a method for encrypting and decrypting user outsourced data, which is applied to a cloud server. The implementation details of the method for encrypting and decrypting user outsourced data of this embodiment are described in detail below. The following content is only for the convenience of understanding the implementation details provided, and is not necessary for implementing this solution.

[0045] The specific process of the method for encrypting and decrypting user outsourced data provided in this embodiment can be as follows: Figure 1 As shown, including:

[0046] Step 101, obtaining encrypted outsourced data sent by a first user and encrypted using the first user's symmetric key and symmetric key generation material for generating the first user's symmetric key, wherein the symmetric key generation material is encrypted using the public key in the public-private key pair of a second user.

[0047] First, it should be noted that the first user in this embodiment refers to any user that sends outsourced data, and the second user refers to any user that receives outsourced data.

[0048] In step 101, first, how the first user encrypts the outsourced data to be sent is specifically described: the outsourced data is encrypted using a symmetric key, and this embodiment uses the encrypted outsourced data as the encrypted outsourced data. Then, the encryption method (i.e., the symmetric key) for encrypting the outsourced data is specifically described: the symmetric key generation material used to generate the symmetric key is also encrypted, and it is encrypted using the public key in the public-private key pair of the second user.

[0049] Among them, the first user and the second user each correspond to a public-private key pair, and the public key in the public-private key pair of the first user and the second user is public, so that the first user can directly obtain the public key in the public-private key pair of the second user, and use the public key to encrypt the symmetric key generation material.

[0050] The following is an introduction to the public-private key pair of each user. The steps for generating the public-private key pair are as follows (the user mentioned below can be either the first user or the second user):

[0051] The user end uses a preset random number to blind the identity of the user (i.e., the first user or the second user) and the preset password, generates a blinding value, and sends it to the key server; the key server generates a blinded signature of the user based on the blinding value, and returns it to the user end; the user end uses a preset random number to deblind the blinded signature of the user, and generates the user's public-private key pair through a preset random function.

[0052] In one example, the user end includes the user's device and the reverse firewall, and the steps for generating the public-private key pair are as follows:

[0053] The device of the user (i.e., the first user or the second user) first uses the first preset random number to blind the user's identity and preset password to generate a first blinded value, and then the user's reverse firewall uses the second preset random number to blind the first blinded value to generate a second blinded value, and sends it to the key server, so that the key server generates the user's blinded signature according to the second blinded value and returns it to the reverse firewall of the user end. At this time, the reverse firewall of the user end uses the second preset random number to deblind the first blinded signature, generate a first deblinding value, and return it to the device of the user end, and then the device uses the first preset random number to deblind the first deblinding value to generate a second deblinding value, and generates a public-private key pair according to the random function and the second deblinding value.

[0054] In this embodiment, a reverse firewall is deployed between the user's device and the external key server. In the process of generating randomness (i.e. generating blinded values), the device and the reverse firewall jointly execute a fast collaborative key generation protocol to generate unbiased randomness. In this way, attackers can be prevented from directly deriving the user's secret from this fair randomness. At the same time, the reverse firewall re-randomizes (de-blinds) the received message and then sends the re-randomized message to the designated recipient. This design ensures that even if the device is leaked, no secrets can be leaked to the outside, thereby enhancing the security of the solution.

[0055] In one example, there are multiple key servers, each of which generates a blinded signature of the user based on the blinded value generated by the user terminal, and then returns it to the user terminal, so that the user terminal receives multiple blinded signatures and generates the user's public-private key pair based on these multiple blinded signatures. In a specific implementation, after the user terminal receives these multiple blinded signatures, it first randomly selects several valid blinded signatures, and then generates the user's public-private key pair based on these valid blinded signatures.

[0056] In this embodiment, by adopting a group of key servers (including multiple key servers), the user and this group of key servers jointly collaborate to generate the user's public-private key pair, so that the public-private key pair is associated with multiple key servers. Even if the adversary breaks into one of the key servers, it is impossible to obtain the correct public-private key pair, thereby further ensuring the security of the symmetric key generation material.

[0057] In one example, this embodiment limits the number of queries that each user can initiate to the key server within a period of time, and the key server can also prohibit abnormal access by the user to resist online password guessing attacks.

[0058] In a specific example, the generation process of the public-private key pair of each user of the present application can be described as follows:

[0059] First, the user selects a first preset random number, uses the first preset random number to blind the preset password and identity, generates a first blind value, and sends the first blind value to the reverse firewall; after receiving the first blind value, the reverse firewall selects a second preset random number, uses the second preset random number to blind the first blind value, generates a second blind value, and sends the second blind value to n key servers, n≥1; after receiving the second blind value, each key server generates a blind signature, and returns the blind signature to the reverse firewall of the first user; After receiving blinded signatures from multiple key servers, the firewall randomly selects t valid signatures, t≥1 and t≤n, uses a second preset random number to deblind the t valid signatures, generates a first deblinding value, and sends the second deblinding value to the user; after receiving the deblinding value, the user uses the first preset random number to deblind the first deblinding value to generate a second deblinding value, that is, a random seed based on a preset password, and then uses the random seed based on the preset password to execute a verifiable preset random function to generate a public-private key pair derived from the preset password. , and then publish the public key , and delete all information of local calculations, only remembering your own preset password.

[0060] The above is a description of the public-private key pair. After the first user generates the public-private key pair, the first user can send outsourced data to the second user. The following is a specific example of the data sent by the first user to the second user:

[0061] First User Perform a fast collaborative key generation protocol with your own reverse firewall to generate unbiased random numbers and calculate their corresponding public values (i.e., symmetric key generation material), the first user Use your own public key , using a public encryption algorithm to generate symmetric key materials Encrypt and generate ; First user Using your own public key and unbiased random numbers , generate a symmetric key , and use symmetric encryption algorithms to encrypt outsourced data ,get At the same time, the first user Generate message authentication codes using hash functions . First user Ciphertext Together with the sender (i.e. ) and the receiver (i.e. ) is transmitted to the reverse firewall After receiving, Select a random number, re-randomize the ciphertext, and output the re-randomized ciphertext , and finally form the ciphertext .

[0062] It is understandable that the ciphertext It will be sent to the cloud server for the second user to obtain the ciphertext from the cloud server.

[0063] Step 102, after receiving a request message sent by the second user for encryption using the private key in the second user's public-private key pair, send the encrypted outsourced data and the encrypted symmetric key generation material to the second user, so as to decrypt the symmetric key generation material using the private key in the second user's public-private key pair, determine the symmetric key using the symmetric key generation material, and decrypt the encrypted outsourced data using the symmetric key.

[0064] Specifically, this embodiment specifically describes how the second user obtains the encrypted outsourced data and the encrypted symmetric key generation material, and how to decrypt the encrypted outsourced data and the encrypted symmetric key generation material. Since the first user sends the data to the cloud server, the second user will request the data from the cloud server. First, the second user sends a request message to the cloud server using the private key in the public-private key pair of the second user. The request message is the user signature of the second user, so that the cloud server authenticates the second user through the user signature, that is, determines whether the second user is the data recipient of the first user. Since the first user uses the public key of the second user to encrypt the symmetric key generation material, if the private key of the second user and the public key used by the second user are a pair, the identity authentication is confirmed to be successful. At this time, the cloud server returns the encrypted outsourced data and the encrypted symmetric key generation material to the second user. Therefore, the second user can decrypt the symmetric key generation material encrypted by its public key through the private key in its public-private key pair, so as to determine the symmetric key of the first user's encrypted outsourced material through the symmetric key generation material, and then decrypt the encrypted outsourced data through the symmetric key.

[0065] Among them, although the public key in the public-private key pair of the first user and the second user is public, the first user can directly obtain the public key in the public-private key pair of the second user and use the public key to encrypt the symmetric key generation material, but the private keys of the two are saved separately. In this way, even if the adversary obtains the public key used to encrypt the symmetric key generation material, it cannot know the private key saved by the user, and cannot request the outsourced data and symmetric key generation material sent by the first user from the cloud server, let alone decrypt it, thereby further ensuring the security of the symmetric key and outsourced data. Furthermore, each user only needs to save their own private key, which can also save storage resources on the user side.

[0066] In a specific implementation, the specific steps for the second user to determine the symmetric key through the symmetric key generation material are: the second user's device uses a third preset random number to blind the symmetric key generation material, generate a third blinded value, and send it to the second user's reverse firewall; the second user's reverse firewall uses a fourth preset random number to blind the third blinded value, generate a fourth blinded value, and send the fourth blinded value to each key server; each key server generates a blinded signature of the second user according to the fourth blinded value, and returns it to the second user's reverse firewall; the second user's reverse firewall uses the fourth preset random number to de-blind the blinded signatures of multiple second users, generate a third de-blind value, and return it to the second user's device; the second user's device uses the third preset random number to de-blind the third de-blind value, generate a fourth de-blind value, and use it as the symmetric key.

[0067] After obtaining the symmetric key, the second user decrypts the encrypted outsourced data using the symmetric key to obtain the outsourced data that the first user actually wants to send to the second user. In a specific implementation, the encrypted outsourced data sent by the first user to the second user also includes a message authentication code generated based on a hash function. Based on the message authentication code, the second user can determine whether the encrypted outsourced data is complete after decrypting the encrypted outsourced data.

[0068] The following is a specific example to illustrate how the second user obtains the data sent by the first user:

[0069] Second User Perform a fast collaborative key generation protocol with your own reverse firewall to generate unbiased random numbers , using your own private key and Generate a user signature and send it to the cloud server for identity authentication. After successful authentication, the cloud server sends a ciphertext To the second user , the second user Use your own private key Decryption Get the symmetric key generation material . And using , the second user Perform the following steps to generate a symmetric key: : The second user selects a third preset random number ,use Symmetric key generation material Perform blinding and generate the third blinding value , and the third blind value Sent to its own reverse firewall; the reverse firewall receives the third blinded value Then select the fourth preset random number ,use right Perform blinding to generate the fourth blinding value , and the fourth blinding value Send to key servers; each key server receives the blinded value After that, a second blinded signature is generated and returned to the reverse firewall of the second user; after the reverse firewall receives the second blinded signatures from multiple key servers, it randomly selects A valid second blinded signature, using right The valid second blind signature is deblinded to generate the third deblinded value , and Send to the second user; after the second user receives it, use right Unblind, generate unblinded value , that is, the symmetric key Second user use Decryption Get outsourced data Second user By the fourth blinding value , outsourcing data And message authentication code to verify the integrity of the outsourced data. If the verification is successful, the second user Accept from first user of Otherwise, the second user reject.

[0070] In this embodiment, in order to protect the symmetric key used to encrypt the outsourced data of the user (the first user), the symmetric key generation material used to generate the symmetric key will be encrypted, and the symmetric key generation material is encrypted using the public key in the public-private key pair of the user receiving the outsourced data (i.e., the second user). Therefore, the encrypted outsourced data of the first user and the encrypted symmetric key generation material will be sent to the second user only when a request message encrypted using the private key in the public-private key pair of the second user is received. Because the private key of the second user and the public key used by the symmetric key generation material are a pair, it is equivalent to performing an identity authentication, confirming that the second user who sent the request message is the user designated by the first user to receive the outsourced data. This not only ensures the security of the user's outsourced data, but also ensures the security of the symmetric key generation material (i.e., the symmetric key), so that it will not be eavesdropped or impersonated by an adversary.

[0071] In one embodiment, the specific implementation steps of the method for encrypting and decrypting user outsourced data of the present application are as follows:

[0072] 1. Initialization phase

[0073] Given security parameter l and public parameter PP, the security parameter determines the security level of the system. The public parameter PP includes the following parameters:

[0074]

[0075] Where p is a large prime number whose length is determined by the security parameter l, P is a generator of an additive cyclic group G, and p is the order of G. is a multiplicative cyclic group, the group G and A bilinear pairing map can be defined , represents a finite field with zero elements removed, Indicates from Map to The hash function of Indicates from Map to The hash function of is from Map to The hash function of and They are respectively Map to The hash function of represents a secure symmetric encryption algorithm, represents a secure symmetric decryption algorithm, represents a secure public key encryption algorithm, In this embodiment, the time is divided into multiple periods, and each key server maintains a list that records the number of queries required by each user. This list is called , starting from 0 at the beginning of each new epoch, and the constraints of each epoch are determined by express.

[0076] For each user , Key server execution -Threshold secret sharing protocol shares a master private key , and publish its corresponding master public key ,in is the minimum number of key servers required to recover the master private key, i.e. the threshold value, is the number of key servers. The specific steps are as follows:

[0077] (1) Each key server from Randomly select a random number And define a polynomial , the highest number of which is ,in .

[0078] (2) Send to all other key servers , and secretly send the other key servers ,in .

[0079] (3) Upon receiving the of back, By inspection Is it equal to to verify the validity of the message. If the verification fails, Reject it; otherwise, Accept it.

[0080] (4) Generate secret shares , the corresponding public share is The master secret key is The master public key is and was published.

[0081] (5) For each user , Maintain a list to record the number of queries in each period, recorded as , and is set to 0 at the beginning of each epoch. Each user Through its equipment Enter password and identity , and interact with the key server through the reverse firewall Generate a public-private key pair derived from a password .

[0082] The specific steps of step (5) are as follows:

[0083] ①User Utilize equipment And perform the following steps to generate a password-based random seed , the specific steps are as follows:

[0084] equipment from Randomly select a random number , the blinded value of the password is equal to , and sent to the reverse firewall .

[0085] After receiving the blinded value of the password, from Randomly select a random number , calculate a new blinding value , and sends it to the key server group.

[0086] For each key server , upon receiving Then, calculate a blind signature , and Send to .

[0087] Upon receiving back, By inspection Is it equal to To verify its effectiveness. valid blind signatures (for simplicity, assume that a valid blind signature is , respectively, from )back, Calculate the unblinded value ,in .

[0088] By inspection Is it equal to To verify If the verification is successful, Send it to ;otherwise, Reject it.

[0089] Upon receiving back, Using the random number selected previously The inverse element , calculate the new unblinding value And by checking Is it equal to to remove blindness and verify its effectiveness.

[0090] ②Equipment Compute some intermediate values ​​to generate subsequent password-derived public and private keys, , , , And generate the corresponding proof .

[0091] ③Equipment The private key derived from the password is calculated as , and the corresponding password-derived public key is .

[0092] ④User Announcement , and delete it from its local storage .

[0093] 2. Encryption phase

[0094] user The data After encryption, outsource storage to the cloud server and specify the user To decrypt it, the specific steps are as follows:

[0095] (1) Equipment used ,user Generate a random value , the specific steps are as follows:

[0096] i. User Using its equipment from Randomly select an element from , and Sent to the corresponding reverse firewall .

[0097] ii. Choose a random value , generate commitment , and Send the promised value to the device .

[0098] iii. Will Send to device ,equipment Calculating random values .

[0099] (2) Equipment calculate , and use the user The password-derived public key right Public key encryption is performed, and the encryption algorithm used is ElGamal. Encoded as a point on an elliptic curve , .user Random Selection , calculate the partial ciphertext , , and generate ciphertext .

[0100] (3) User Calculate a symmetric encryption key .here yes Key server execution -Threshold secret sharing protocol for users The shared master public key. Then the user Encrypt messages using symmetric encryption algorithms Get the ciphertext .user Calculate ciphertext , and the complete ciphertext Send to its reverse firewall .

[0101] (4) Upon receiving back, choose , the ciphertext Parses as , calculate the new partial ciphertext , generate a new ciphertext , and Send to cloud server .

[0102] 3. Decryption stage

[0103] user Generate a public-private key pair derived from its password with the key server group, and use its private key to generate a signature to complete identity authentication with the cloud server. After successful identity authentication, obtain the user's The ciphertext sent to itself interacts with the key server group to recover the corresponding plaintext. The specific steps are as follows:

[0104] (1) Cloud Server To users Send application ID and a challenge value Upon receiving After that, the user Enter their password and use their device Perform the following steps to generate :

[0105] i. Equipment Select a random , calculate the blinded value of the password , and sent to the reverse firewall . Is a user The password, Is a user identity identification.

[0106] ii. Upon receiving back, Select a random , calculate the blinded value of a new password , and sends it to the key server group.

[0107] iii. For each key server , upon receiving Then, calculate a blind signature and will Send to .

[0108] iv. Upon receiving back, By inspection Is it equal to To verify its effectiveness. valid blind signatures (for simplicity, assume that a valid blind signature is , respectively, from )back, Calculate the unblinded value ,in .

[0109] v. By inspection Is it equal to To verify If the verification is successful, Send it to ;otherwise, Reject it.

[0110] vi. Upon receiving back, Using the random number selected previously The inverse element By calculation And by checking Is it equal to to remove blindness and verify its effectiveness.

[0111] (2) Equipment Compute some intermediate values ​​to generate subsequent password-derived public and private keys, , , And generate the corresponding proof .equipment Generate a private key derived from a passphrase .

[0112] (3) Equipment used ,user Generate a random value , the specific steps are as follows:

[0113] i.User Using its equipment from Randomly select an element from , and Sent to the corresponding reverse firewall .

[0114] ii. Choose a random value , generate commitment , and Send the promised value to the device .

[0115] iii. Will Send to device ,equipment Calculating random values .

[0116] (4) User use and Identify the application appID and a challenge value Generate a signature, recorded as a signature ,in It is used when using the signature algorithm. The signature algorithm is not instantiated here, so the specific usage process is omitted. Will Send to cloud server .

[0117] (5) Upon receiving back, pass Verify its identity, expressed as ,in is the signature verification algorithm. If the verification passes, Allow users Visit and For Users ;otherwise, Reject User of visits.

[0118] (6) User Ciphertext Parses as , and calculate .user use Decode as key . use ,user Generate symmetric encryption keys , the specific steps are as follows:

[0119] i.User Random Selection ,calculate , and Send to reverse firewall .

[0120] ii. Received After that, reverse firewall Random Selection , and calculate , then Sent to all key servers.

[0121] iii. For , each key server With its secret share Compute blind signature , and Send to user .

[0122] iv. Received After that, reverse firewall Verify the equation To verify The effectiveness of For simplicity, assume that a valid blind signature is , respectively from back, calculate ,in .

[0123] v. By equation Is it established to verify If the verification is successful, Send it to the device ;otherwise, Reject it.

[0124] vi. received After that, the equipment calculate , and by the formula Verify its effectiveness.

[0125] vii. Equipment The symmetric encryption key is calculated as .

[0126] (7) User use calculate To recover outsourced data .

[0127] (8) User By inspection To verify the integrity of the outsourced data. If the verification passes, accept ;otherwise, reject .

[0128] 4. Key update phase

[0129] The key server group periodically updates the subkey for each user. The specific steps are as follows:

[0130] Each key server Select a polynomial , the coefficients of this polynomial are And the highest degree of the polynomial is .

[0131] Will and Sent secretly to all other key servers ,in .

[0132] receive back, By equation Is it established to verify effectiveness.

[0133] Calculate a new secret key share = . Represents the associated public secret share.

[0134] The step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this application.

[0135] Another embodiment of the present application relates to a cloud server. The implementation details of the cloud server of this embodiment are described in detail below. The following content is only for the convenience of understanding the implementation details provided, and is not necessary for the implementation of this solution. The schematic diagram of the cloud server of this embodiment can be as follows Figure 2 As shown, it includes: a data encryption module 201 and a data decryption module 202.

[0136] Specifically, the data encryption module 201 is used to obtain the encrypted outsourced data sent by the first user and encrypted using the first user's symmetric key, as well as the symmetric key generation material used to generate the first user's symmetric key, and the symmetric key generation material is encrypted using the public key in the public-private key pair of the second user.

[0137] The data decryption module 202 is used to send the encrypted outsourced data and the encrypted symmetric key generation material to the second user after receiving a request message sent by the second user that is encrypted using the private key in the second user's public-private key pair, so as to decrypt the symmetric key generation material using the private key in the second user's public-private key pair, determine the symmetric key using the symmetric key generation material, and decrypt the encrypted outsourced data using the symmetric key.

[0138] It is not difficult to find that this embodiment is a cloud server embodiment corresponding to the above method embodiment, and this embodiment can be implemented in conjunction with the above method embodiment. The relevant technical details and technical effects mentioned in the above embodiment are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the above embodiment.

[0139] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.

[0140] Another embodiment of the present application relates to a computer device, such as Figure 3 As shown, it includes: at least one processor 301; and a memory 302 that is communicatively connected to the at least one processor 301; wherein the memory 302 stores instructions that can be executed by the at least one processor 301, and the instructions are executed by the at least one processor 301 so that the at least one processor 301 can execute the encryption and decryption methods of user outsourced data in the above-mentioned embodiments.

[0141] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.

[0142] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.

[0143] Another embodiment of the present application relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.

[0144] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as: ROM), random access memory (Random Access Memory, referred to as: RAM), disk or optical disk and other media that can store program codes.

[0145] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.

Claims

1. A method for encrypting and decrypting user outsourced data, characterized in that: Applied to a cloud server, the method comprises: Acquire the encrypted outsourced data sent by the first user and encrypted with the first user's symmetric key and symmetric key generation material used to generate the first user's symmetric key, wherein the symmetric key generation material is encrypted with the public key in the public-private key pair of the second user; After receiving a request message sent by the second user and encrypted using a private key in the second user's public-private key pair, sending the encrypted outsourced data and the encrypted symmetric key generation material to the second user, decrypting the symmetric key generation material using the private key in the second user's public-private key pair, determining the symmetric key using the symmetric key generation material, and decrypting the encrypted outsourced data using the symmetric key; The steps for generating the public-private key pair are as follows: The user end uses a preset random number to blind the user's identity and preset password, generates a blinded value, and sends it to the key server; The key server generates the user's blinded signature based on the blinded value and returns it to the user; The user end uses a preset random number to deblind the user's blinded signature and generates the user's public-private key pair through a preset random function; The user end includes the user's device and the reverse firewall, and the steps for generating the public-private key pair are as follows: The device uses a first preset random number to blind the user's identity and preset password, generates a first blinded value, and sends it to the reverse firewall; The reverse firewall uses a second preset random number to blind the first blind value, generates a second blind value, and sends it to the key server; The key server generates a blinded signature of the user according to the second blinded value, and returns it to the reverse firewall; The reverse firewall uses the second preset random number to deblind the blinded signature of the user, generates a first deblinding value, and returns it to the device; The device uses a first preset random number to de-blind the first de-blinding value, generates a second de-blinding value, and generates a public-private key pair according to a preset random function and the second de-blinding value.

2. The method for encrypting and decrypting user outsourced data according to claim 1, characterized in that: There are multiple key servers, and each key server generates a blinded signature of the user according to the blinded value sent by the user terminal, so that the user terminal generates the user's public-private key pair according to multiple blinded signatures.

3. The method for encrypting and decrypting user outsourced data according to claim 2, characterized in that: The steps for the second user to determine the symmetric key by using the symmetric key generation material are as follows: The device of the second user blinds the symmetric key generation material using a third preset random number to generate a third blinding value, and sends the third blinding value to the reverse firewall of the second user; The reverse firewall of the second user blinds the third blinded value using a fourth preset random number to generate a fourth blinded value, and sends the fourth blinded value to each key server; Each key server generates a blinded signature of the second user according to the fourth blinded value, and returns the signature to the reverse firewall of the second user; The reverse firewall of the second user uses a fourth preset random number to deblind the blinded signatures of the plurality of second users, generates a third deblinding value, and returns the value to the device of the second user; The device of the second user uses a third preset random number to de-blind the third de-blind value to generate a fourth de-blind value as a symmetric key.

4. The method for encrypting and decrypting user outsourced data according to any one of claims 1 to 3, characterized in that: The first user and the second user each correspond to a public-private key pair, and the public keys in the public-private key pairs of the first user and the second user are made public, while the private keys are separately stored.

5. The method for encrypting and decrypting user outsourced data according to claim 1, characterized in that: The encrypted outsourced data also includes a message authentication code generated based on a hash function, so that after the encrypted outsourced data is decrypted, the message authentication code is used to verify whether the encrypted outsourced data is complete.

6. A cloud server, characterized in that: include: A data encryption module, used to obtain the encrypted outsourced data sent by the first user and encrypted using the first user's symmetric key, and a symmetric key generation material for generating the first user's symmetric key, wherein the symmetric key generation material is encrypted using the public key in the public-private key pair of the second user; a data decryption module, configured to, after receiving a request message sent by a second user and encrypted using a private key in a public-private key pair of the second user, send the encrypted outsourced data and the encrypted symmetric key generation material to the second user, decrypt the symmetric key generation material using the private key in the public-private key pair of the second user, determine the symmetric key using the symmetric key generation material, and decrypt the encrypted outsourced data using the symmetric key; The steps for generating the public-private key pair are as follows: The user end uses a preset random number to blind the user's identity and preset password, generates a blinded value, and sends it to the key server; The key server generates the user's blinded signature based on the blinded value and returns it to the user; The user end uses a preset random number to deblind the user's blinded signature and generates the user's public-private key pair through a preset random function; The user end includes the user's device and the reverse firewall, and the steps for generating the public-private key pair are as follows: The device uses a first preset random number to blind the user's identity and preset password, generates a first blinded value, and sends it to the reverse firewall; The reverse firewall uses a second preset random number to blind the first blind value, generates a second blind value, and sends it to the key server; The key server generates a blinded signature of the user according to the second blinded value, and returns it to the reverse firewall; The reverse firewall uses the second preset random number to deblind the blinded signature of the user, generates a first deblinding value, and returns it to the device; The device uses a first preset random number to de-blind the first de-blinding value, generates a second de-blinding value, and generates a public-private key pair according to a preset random function and the second de-blinding value.

7. A computer device, characterized in that: include: at least one processor; And, a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the encryption and decryption method for user outsourced data as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for encrypting and decrypting user outsourced data according to any one of claims 1 to 5 is implemented.