Method, device and system for obtaining private data
By simply encrypting the private plaintext data and using the access attribute tag for authentication, the data access token and target key are generated, the problem of large data decryption calculation and high resource utilization in the existing technology is solved, and the privacy data is improved Get performance.
Patent Information
- Application Number
- CN202411336655.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-09-24
AI Technical Summary
In the prior art, due to the high complexity of data encryption, the data decryption has a large amount of calculation, high resource occupancy, and poor acquisition performance of private data, which is especially not suitable for the acquisition of low-sensitive data with low information density.
By simply encrypting private plaintext data and using access attribute tags for authentication, data access tokens and target keys are generated, allowing users to access and decrypt private plaintext data, avoiding complex encryption processes.
While ensuring the security of private data, it improves the acquisition performance of private data and reduces the computing and resource usage during data decryption.
Smart Images

Figure CN118869361B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing, and in particular to a method, device and system for obtaining private data. Background Art
[0002] In the era of big data, the value of data as a production factor has gradually become more significant. Privacy protection is no longer a restriction and constraint on the circulation of data elements, but has become a driving force for the industry to explore the value of data without leaking privacy, and computing using private data has flourished.
[0003] In existing methods, in order to ensure the security of private data computing, data security encryption methods such as homomorphic encryption technology are usually used to perform complex encryption on private data, so as to obtain encrypted private data to meet computing needs.
[0004] However, due to the high complexity of data encryption in this method, the amount of computation required for data decryption is large, the resource usage is high, and the performance of obtaining privacy data is poor. It is not suitable for obtaining low-sensitivity data with low information density. Summary of the invention
[0005] The embodiments of the present application provide a method, device and system for obtaining private data, which can ensure the security of private data while improving the performance of obtaining private data.
[0006] In one aspect of an embodiment of the present application, a method for obtaining private data is provided, which is applied to a trusted space. The method includes:
[0007] In response to the identity authentication request sent by the first user terminal, determine whether the access attribute tag carried in the identity authentication request satisfies the access control policy, where the access control policy is the attribute tag type determined by the second user terminal that can access the private ciphertext data, and the private ciphertext data is data obtained by simply encrypting the private plaintext data;
[0008] When the access attribute tag satisfies the access control policy, a data access token allowing access to the private ciphertext data and a target key for decrypting the private ciphertext data are generated and sent to the first user end;
[0009] In response to a data access request sent by the first user end using a data access token, a data upload request is sent to the second user end, so that the second user end uploads the private ciphertext data to the first storage space for the first user end to obtain the private ciphertext data using the target key.
[0010] In one aspect of an embodiment of the present application, a method for obtaining private data is provided, which is applied to a first user terminal, and the method includes:
[0011] Sending an identity authentication request to the trusted space, so that the trusted space determines whether the access attribute tag carried in the identity authentication request satisfies the access control policy, where the access control policy is the attribute tag type determined by the second user end that can access the private ciphertext data, and the private ciphertext data is data obtained by simply encrypting the private plaintext data;
[0012] When the access attribute tag satisfies the access control policy, a data access token allowing access to the private ciphertext data and a target key for decrypting the private ciphertext data are received from the trusted space;
[0013] Using the data access token, sending a data access request to the trusted space, so that the trusted space instructs the second user end to upload the private ciphertext data to the first storage space;
[0014] The target key is used to obtain the private ciphertext data in the first storage space.
[0015] In one aspect of an embodiment of the present application, a method for obtaining private data is provided, which is applied to a second user terminal, and the method includes:
[0016] Using the access attribute tag set, determine the access control policy corresponding to the access attribute tag set, the access control policy is the attribute tag type that can access the private ciphertext data, and the private ciphertext data is the data obtained by simply encrypting the private plaintext data;
[0017] Sending the access control policy to the trusted space so that the trusted space determines whether the access attribute tag carried in the identity authentication request of the first user terminal satisfies the access control policy;
[0018] In response to a data upload request sent by the trusted space, the private ciphertext data is uploaded to the first storage space, so that the first user terminal can obtain the private ciphertext data using the target key.
[0019] In one aspect of an embodiment of the present application, a device for obtaining private data is provided, which is applied to a trusted space. The device includes:
[0020] A request determination module, configured to respond to an identity verification request sent by a first user terminal and determine whether an access attribute tag carried in the identity verification request satisfies an access control policy, where the access control policy is an attribute tag type determined by a second user terminal that can access private ciphertext data, and the private ciphertext data is data obtained by simply encrypting the private plaintext data;
[0021] An information sending module, used to generate and send to the first user end a data access token that allows access to the private ciphertext data and a target key for decrypting the private ciphertext data when the access attribute tag satisfies the access control policy;
[0022] The first request sending module is used to send a data upload request to the second user end in response to the data access request sent by the first user end using the data access token, so that the second user end uploads the private ciphertext data to the first storage space for the first user end to obtain the private ciphertext data using the target key.
[0023] In one aspect of an embodiment of the present application, a device for obtaining private data is provided, which is applied to a first user terminal, and the device includes:
[0024] A second request sending module is used to send an identity authentication request to the trusted space, so that the trusted space determines whether the access attribute tag carried in the identity authentication request satisfies the access control policy, where the access control policy is the attribute tag type determined by the second user end that can access the private ciphertext data, and the private ciphertext data is the data obtained by simply encrypting the private plaintext data;
[0025] An information receiving module, used for receiving a data access token sent by a trusted space that allows access to private ciphertext data and a target key for decrypting the private ciphertext data when the access attribute tag satisfies the access control policy;
[0026] The second request sending module is further used to send a data access request to the trusted space using the data access token, so that the trusted space instructs the second user terminal to upload the private ciphertext data to the first storage space;
[0027] The data acquisition module is used to acquire the private ciphertext data in the first storage space by using the target key.
[0028] In one aspect of an embodiment of the present application, a device for obtaining private data is provided, which is applied to a second user terminal, and the device includes:
[0029] A policy determination module is used to determine an access control policy corresponding to the access attribute label set by using the access attribute label set, wherein the access control policy is an attribute label type capable of accessing the private ciphertext data, and the private ciphertext data is data obtained by simply encrypting the private plaintext data;
[0030] A policy sending module, used to send the access control policy to the trusted space, so that the trusted space determines whether the access attribute tag carried in the identity authentication request of the first user terminal satisfies the access control policy;
[0031] The data upload module is used to respond to the data upload request sent by the trusted space and upload the private ciphertext data to the first storage space so that the first user terminal can obtain the private ciphertext data using the target key.
[0032] In one aspect of an embodiment of the present application, a system for obtaining private data is provided, the system comprising:
[0033] A trusted space, used to implement the method for obtaining private data applied to the trusted space as described above when performing data calculations;
[0034] A first user terminal is electrically connected to the trusted space and is used to implement the method for obtaining private data applied to the first user terminal as described above when performing data calculation;
[0035] The second user terminal is electrically connected to the trusted space, and is used to implement the method for acquiring privacy data applied to the second user terminal as described above when performing data calculation.
[0036] In one aspect of an embodiment of the present application, an electronic device is provided, which includes: a memory and a program or instruction stored in the memory and executable on a processor, wherein when the program or instruction is executed by the processor, a method for obtaining privacy data as provided in any aspect of the above-mentioned embodiment of the present application is implemented.
[0037] In one aspect of an embodiment of the present application, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, a method for obtaining privacy data as provided in any aspect of the above-mentioned embodiment of the present application is implemented.
[0038] In one aspect of an embodiment of the present application, a computer program product is provided. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes a method for obtaining privacy data as provided in any aspect of the above-mentioned embodiment of the present application.
[0039] In the method for obtaining private data provided in the embodiment of the present application, by simply encrypting the private plaintext data, the large amount of calculation and high resource usage when decrypting the data caused by complex encryption are avoided. Then, when obtaining private data, the first user terminal needs to send an identity authentication request to the trusted space. The trusted space determines whether it meets the access control requirements of the private ciphertext data based on the access attribute label carried in the identity authentication request. If the access control requirements of the private ciphertext data are met, a data access token that allows access to the private ciphertext data and a target key for decrypting the private ciphertext data are generated and sent to the first user terminal. Then the second user terminal is notified to upload the private ciphertext data to the first storage space, so that the first user terminal can use the target key to obtain the private ciphertext data. In this way, the embodiment of the present application constructs a complete set of data security access control processes, which ensures the security of data calculation by using the unique access attribute label of the data user for identity authentication and simple data encryption, without the need for a complex security encryption process for the data, and can improve the acquisition performance of private data while ensuring the security of the private data. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0041] Figure 1 This is a flowchart of an embodiment of a method for obtaining privacy data provided by the present application;
[0042] Figure 2 It is a flowchart of another embodiment of a method for obtaining privacy data provided by the present application;
[0043] Figure 3 This is a flowchart of another embodiment of a method for obtaining privacy data provided by the present application;
[0044] Figure 4 It is a structural diagram of an embodiment of a device for obtaining privacy data provided by the present application;
[0045] Figure 5 is a structural schematic diagram of another embodiment of a device for obtaining privacy data provided by the present application;
[0046] Figure 6 It is a structural diagram of another embodiment of a device for obtaining privacy data provided by the present application;
[0047] Figure 7 It is a structural diagram of an embodiment of a privacy data acquisition device provided by the present application. DETAILED DESCRIPTION
[0048] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0049] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0050] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations.
[0051] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0052] In related technologies, in order to ensure the security of private data calculation, data security encryption methods such as homomorphic encryption technology are usually used to perform complex encryption on private data, so as to obtain encrypted private data to meet computing needs. However, due to the high complexity of data encryption, this method leads to large amount of calculation and high resource usage when decrypting data, and poor performance in obtaining private data, which is not suitable for obtaining low-sensitivity data with low information density.
[0053] The purpose of the present application is to provide a method, device and system for obtaining private data. In the method for obtaining private data provided in the embodiment of the present application, by simply encrypting the private plaintext data, the large amount of calculation and high resource usage when decrypting the data caused by complex encryption are avoided. Then, when obtaining private data, the first user terminal needs to send an identity authentication request to the trusted space, and the trusted space determines whether it meets the access control requirements of the private ciphertext data according to the access attribute label carried in the identity authentication request. If the access control requirements of the private ciphertext data are met, a data access token that allows access to the private ciphertext data and a target key for decrypting the private ciphertext data are generated and sent to the first user terminal. Then the second user terminal is notified to upload the private ciphertext data to the first storage space, so that the first user terminal can use the target key to obtain the private ciphertext data. In this way, the embodiment of the present application constructs a complete set of data security access control processes, which ensures the security of data calculation by using the unique access attribute label of the data user for identity authentication and simple data encryption, without the need to perform a complex security encryption process on the data, and can improve the acquisition performance of private data while ensuring the security of private data.
[0054] The following describes the specific embodiments of the method, device and system for obtaining private data provided by the embodiments of the present application. First, the method for obtaining private data is described.
[0055] Figure 1 A flowchart of a method for obtaining private data is provided. The method for obtaining private data is applied to a trusted space. The method may include the following steps S101 to S103.
[0056] S101, in response to the identity authentication request sent by the first user terminal, determines whether the access attribute tag carried in the identity authentication request satisfies the access control policy, the access control policy is the attribute tag type determined by the second user terminal that can access the private ciphertext data, and the private ciphertext data is the data obtained by simply encrypting the private plaintext data.
[0057] In this embodiment, the identity verification request is a request for identity verification initiated by a data user of the first user terminal when the data user needs to access private data. The identity verification request carries an access attribute tag of the data user.
[0058] The private data includes private plaintext data and private ciphertext data. The private plaintext data is the unencrypted private data, and the private ciphertext data is the encrypted private data.
[0059] The access attribute label is a label generated based on the access attribute of the data user. The access attribute may include at least one of the role, security level, access type, access period and business type of the data user.
[0060] The access control policy is an access attribute condition preset by the data owner of the second user terminal for accessing the private data.
[0061] As an example, when the first user sends an identity authentication request, the trusted space receives the identity authentication request sent by the first user, and then uses the smart contract to verify the legitimacy of the identity of the data user who requests to use the private data.
[0062] If the identity is legitimate, then determine whether the access attribute tag of the data user carried in the identity authentication request meets the access conditions of the access control policy.
[0063] S102, when the access attribute tag satisfies the access control policy, generating and sending to the first user a data access token that allows access to the private ciphertext data and a target key for decrypting the private ciphertext data.
[0064] In this embodiment, the data access token is used to indicate that the data user of the first client is allowed to access the private ciphertext data.
[0065] The target key is used by the data user of the first user end to decrypt the private ciphertext data to obtain readable private plaintext data.
[0066] As an example, when the access attribute tag does not satisfy the access condition of the access control policy, the access request of the first user terminal will be terminated.
[0067] When the access attribute tag meets the access conditions of the access control policy, the trusted space will generate a data access token that allows the data user to access the private ciphertext data and a target key for the data user to decrypt the private ciphertext data, and send the data access token and the target key to the first user end.
[0068] S103, in response to the data access request sent by the first user end using the data access token, sending a data upload request to the second user end, so that the second user end uploads the private ciphertext data to the first storage space for the first user end to obtain the private ciphertext data using the target key.
[0069] In this embodiment, the data access request is a request for accessing private data sent by a data user of the first client using a data access token.
[0070] The data upload request is a request for the trusted space to remind the data owner of the second user terminal to upload the private data to the preset first storage space.
[0071] As an example, when the first user sends a data access request using a data access token, the trusted space determines whether the data access token carried in the data access request corresponds to the public key of the private ciphertext data.
[0072] When the data access token carried in the data access request corresponds to the public key of the private ciphertext data, the first user terminal is granted the right to access the private ciphertext data. At the same time, a data upload request is sent to the second user terminal, reminding the second user terminal to upload the private ciphertext data to the first storage space for the first user terminal to obtain.
[0073] Through this embodiment, by simply encrypting the private plaintext data, the large amount of calculation and high resource usage when decrypting the data caused by complex encryption can be avoided. Then, when obtaining private data, the first user terminal needs to send an identity authentication request to the trusted space. The trusted space determines whether it meets the access control requirements of the private ciphertext data based on the access attribute label carried in the identity authentication request. If the access control requirements of the private ciphertext data are met, a data access token that allows access to the private ciphertext data and a target key for decrypting the private ciphertext data are generated and sent to the first user terminal. Then the second user terminal is notified to upload the private ciphertext data to the first storage space, so that the first user terminal can use the target key to obtain the private ciphertext data. In this way, the embodiment of the present application constructs a complete set of data security access control processes, which ensures the security of data calculation by using the unique access attribute label of the data user for identity authentication and simple data encryption, without the need for a complex security encryption process for the data, and can improve the acquisition performance of private data while ensuring the security of private data.
[0074] As an optional embodiment, after S103, the method for obtaining the private data may further include:
[0075] In response to the first user end's operation of obtaining private ciphertext data using the target key, storing the private plaintext data obtained by decrypting the private ciphertext data into the second storage space;
[0076] When the first user terminal completes the computing task or the preset access validity period of the private plaintext data expires, the private plaintext data in the second storage space is deleted.
[0077] In this embodiment, after obtaining access authorization to the trusted space, the first user terminal uses the target key to obtain private ciphertext data from the first storage space of the trusted space.
[0078] The trusted space then stores the private plaintext data obtained after the first user terminal uses the target key to decrypt the private ciphertext data in the second storage space, so that the first user terminal can use the private plaintext data in the second storage space to perform the agreed computing task.
[0079] Then, the trusted space will analyze the private plaintext data in the second storage space and calculate the remaining validity period of the private plaintext data. When the first user completes the computing task or the validity period of the private plaintext data preset by the second user expires, the trusted space will delete the private plaintext data in the second storage space. At the same time, the target key and data access token of the first user will become invalid, and the data access process ends.
[0080] Specifically, the trusted space obtains data information of the privacy plaintext data in the second storage space, and sets the data file attribute of the privacy plaintext data to a readable and writable state to prevent deletion failure caused when the data file is in an unreadable or unwritable state.
[0081] Then, create a byte type array with a length of 1024, randomly generate random numbers, and store the random numbers in the array. Finally, use a for loop to rewrite the data file 5 times, close the file after writing, and change the creation time and modification time of the data file of the privacy plaintext data to any time, and delete the data file to achieve the purpose of complete deletion.
[0082] Through this embodiment, when the first user terminal completes the computing task or the preset access validity period of the private plaintext data expires, the trusted space will delete the private plaintext data in the second storage space. In this way, the embodiment of the present application can avoid the leakage of private data by performing irreversible data destruction in a timely manner after the private data is used, and further improve the security of the private data.
[0083] As an optional embodiment, S102 may specifically include:
[0084] When the access attribute tag satisfies the access control policy, a data access token that allows access to the private ciphertext data is generated using the public key of the private ciphertext data;
[0085] Using the access attribute label and the master key of the private ciphertext data, a target key for decrypting the private ciphertext data is generated;
[0086] The data access token and the target key are sent to the first user.
[0087] In this embodiment, when the private plaintext data is encrypted to obtain the private ciphertext data, a public key and a master key corresponding to the private ciphertext data are generated.
[0088] Among them, the public key is used to generate a data access token that allows access to private ciphertext data, and the master key is used to generate and manage other target keys for specific decryption of private ciphertext data.
[0089] When the access attribute tag satisfies the access control policy, the trusted space uses the public key of the private ciphertext data to generate a data access token corresponding to the public key that allows the first user end to access the private ciphertext data.
[0090] At the same time, a target key corresponding to the first user terminal and used to decrypt the private ciphertext data is generated using the access attribute label of the first user terminal and the master key of the private ciphertext data.
[0091] Specifically, a first random element is first selected from the real number space, and then a second random element is respectively selected from the real number space for each access attribute tag of the first user terminal. Finally, the target key is calculated using the first random element, the second random element and the master key of the private ciphertext data.
[0092] Through this embodiment, the public key of the private ciphertext data, the master key of the private ciphertext data and the access attribute label are used to generate a data access token that allows access to the private ciphertext data and a target key for decrypting the private ciphertext data. This helps the first user end to read the private data using the data access token and the target key, thereby improving the security of the private data.
[0093] As an optional embodiment, Figure 2 A flowchart of a method for obtaining private data is provided. The method for obtaining private data is applied to a first user terminal. The method may include the following steps S201 to S204.
[0094] S201, sending an identity authentication request to the trusted space so that the trusted space determines whether the access attribute tag carried in the identity authentication request satisfies the access control policy. The access control policy is the attribute tag type determined by the second user end that can access the private ciphertext data. The private ciphertext data is the data obtained by simply encrypting the private plaintext data.
[0095] S202, when the access attribute tag satisfies the access control policy, receiving a data access token sent by the trusted space that allows access to the private ciphertext data and a target key for decrypting the private ciphertext data.
[0096] S203: Using the data access token, send a data access request to the trusted space, so that the trusted space instructs the second user terminal to upload the private ciphertext data to the first storage space.
[0097] S204: Using the target key, obtain the private ciphertext data in the first storage space.
[0098] In this embodiment, the identity verification request is a request for identity verification initiated by a data user of the first user terminal when the data user needs to access private data. The identity verification request carries an access attribute tag of the data user.
[0099] The private data includes private plaintext data and private ciphertext data. The private plaintext data is the unencrypted private data, and the private ciphertext data is the encrypted private data.
[0100] The access attribute label is a label generated based on the access attribute of the data user. The access attribute may include at least one of the role, security level, access type, access period and business type of the data user.
[0101] The access control policy is an access attribute condition preset by the data owner of the second user terminal for accessing the private data.
[0102] The data access token is used to indicate that the data user of the first user terminal is allowed to access the private ciphertext data.
[0103] The target key is used by the data user of the first user end to decrypt the private ciphertext data to obtain readable private plaintext data.
[0104] The data access request is a request for accessing private data sent by a data user of the first user end using a data access token.
[0105] As an example, when the first user terminal needs to access private data, it initiates an identity authentication request to the trusted space. The identity authentication request includes the access attribute tag of the data user, the identification information corresponding to the private data, and the public key corresponding to the private data, so that the trusted space can verify whether the access attribute tag carried by the first user terminal meets the access control policy.
[0106] When the access attribute tag satisfies the access control policy, it indicates that the first user terminal can access the private data. At this time, the first user terminal will receive the data access token and the target key sent by the trusted space.
[0107] Then, upon receiving the data access token and the target key sent by the trusted space, the first user terminal will further send a data access request to the trusted space based on the data access token, so that the trusted space instructs the second user terminal to upload the private ciphertext data to the first storage space.
[0108] Finally, the first user terminal uses the target key to decrypt the private ciphertext data in the first storage space to obtain the private plaintext data corresponding to the private ciphertext data, and calculates the private plaintext data according to the agreed calculation type.
[0109] Through this embodiment, by simply encrypting the private plaintext data, the large amount of calculation and high resource usage when decrypting the data caused by complex encryption can be avoided. Then, when obtaining private data, the first user terminal needs to send an identity authentication request to the trusted space. The trusted space determines whether it meets the access control requirements of the private ciphertext data based on the access attribute label carried in the identity authentication request. If the access control requirements of the private ciphertext data are met, a data access token that allows access to the private ciphertext data and a target key for decrypting the private ciphertext data are generated and sent to the first user terminal. Then the second user terminal is notified to upload the private ciphertext data to the first storage space, so that the first user terminal can use the target key to obtain the private ciphertext data. In this way, the embodiment of the present application constructs a complete set of data security access control processes, which ensures the security of data calculation by using the unique access attribute label of the data user for identity authentication and simple data encryption, without the need for a complex security encryption process for the data, and can improve the acquisition performance of private data while ensuring the security of private data.
[0110] As an optional embodiment, S204 may specifically include:
[0111] Decrypting the private ciphertext data in the first storage space using the target key to obtain a root node hidden secret value of the private ciphertext data;
[0112] The root node is used to hide the secret value and determine the private plaintext data corresponding to the private ciphertext data.
[0113] In this embodiment, the first user terminal uses the target key to decrypt the private ciphertext data to restore the root node hidden secret value of the private ciphertext data.
[0114] Specifically, the decryption process is a recursive calculation process, starting from the leaf node, using the decryption algorithm to perform iterative operations layer by layer until the root node polynomial of the private ciphertext data is calculated, and the hidden secret value of the root node can be obtained.
[0115] Finally, the root node is used to hide the secret value, and the private plaintext data corresponding to the private ciphertext data is determined by the following formula 1:
[0116] Formula 1
[0117] Among them, M represents the private plaintext data corresponding to the private ciphertext data, Represents private ciphertext data, represents a bilinear map, Represents a generator of Second power, Indicates that the root node hides the secret value, represents the generator of the bilinear group, and represents a randomly selected encryption index, Represents randomly generated element values from the real number space.
[0118] Through this embodiment, the target key is used to obtain the root node hidden secret value of the private ciphertext data, and then the root node hidden secret value is used to determine the private plaintext data corresponding to the private ciphertext data. In this way, the embodiment of the present application decrypts the private ciphertext data through the target key to obtain the private plaintext data, so that the private plaintext data can be read smoothly, and then the private plaintext data can be used to complete the computing task.
[0119] As an optional embodiment, Figure 3 A flowchart of a method for obtaining private data is provided. The method for obtaining private data is applied to a second user terminal. The method may include the following steps S301 to S303.
[0120] S301, using the access attribute tag set, determine the access control policy corresponding to the access attribute tag set, the access control policy is the attribute tag type that can access the private ciphertext data, and the private ciphertext data is the data obtained by simply encrypting the private plaintext data.
[0121] S302: Send the access control policy to the trusted space, so that the trusted space determines whether the access attribute tag carried in the identity authentication request of the first user terminal satisfies the access control policy.
[0122] S303, in response to the data upload request sent by the trusted space, uploading the private ciphertext data to the first storage space, so that the first user terminal can obtain the private ciphertext data using the target key.
[0123] In this embodiment, the private data includes private plaintext data and private ciphertext data, the private plaintext data is unencrypted private data, and the private ciphertext data is encrypted private data.
[0124] The access attribute label set includes all access attribute labels of each data user. The access attribute label is a label generated based on the access attribute of the data user. The access attribute may include at least one of the data user's role, security level, access type, access period and business type.
[0125] The access control policy is an access attribute condition preset by the data owner of the second user terminal for accessing the private data.
[0126] The data upload request is a request for the trusted space to remind the data owner of the second user terminal to upload the private data to the preset first storage space.
[0127] As an example, the second user terminal first obtains an access attribute tag set including all access attribute tags of each data user from the user information table of the trusted service environment. Then, the access attribute tag set is used to determine the access control policy corresponding to the access attribute, and the access control policy is sent to the trusted space, so that the trusted space determines whether to grant the first user terminal access rights to the private data according to the access control policy.
[0128] After the trusted space grants the first user end access rights to the private data, it will send a data upload request to the second user end. In response to the data upload request sent by the trusted space, the second user end uploads the private ciphertext data to the first storage space in the trusted space, and sets the access validity period of the private ciphertext data for the first user end to obtain the private ciphertext data using the target key.
[0129] Through this embodiment, by simply encrypting the private plaintext data, the large amount of calculation and high resource usage when decrypting the data caused by complex encryption can be avoided. Then, when obtaining private data, the first user terminal needs to send an identity authentication request to the trusted space. The trusted space determines whether it meets the access control requirements of the private ciphertext data based on the access attribute label carried in the identity authentication request. If the access control requirements of the private ciphertext data are met, a data access token that allows access to the private ciphertext data and a target key for decrypting the private ciphertext data are generated and sent to the first user terminal. Then the second user terminal is notified to upload the private ciphertext data to the first storage space, so that the first user terminal can use the target key to obtain the private ciphertext data. In this way, the embodiment of the present application constructs a complete set of data security access control processes, which ensures the security of data calculation by using the unique access attribute label of the data user for identity authentication and simple data encryption, without the need for a complex security encryption process for the data, and can improve the acquisition performance of private data while ensuring the security of private data.
[0130] As an optional embodiment, before S303, the method for obtaining private data may further include the following steps:
[0131] Use access control policies to build access control trees;
[0132] For each node in the access control tree, determine the corresponding node polynomial;
[0133] The node polynomial and the private plaintext data are used to determine the private ciphertext data corresponding to the private plaintext data.
[0134] In this embodiment, as an example, the second user terminal first uses the access control policy to construct a corresponding access control tree, and then selects a polynomial for each node in the access control tree.
[0135] Specifically, these polynomials are selected from the root node from top to bottom, and for each node in the access control tree, the order of the polynomial is the threshold number of the node minus 1.
[0136] For example, when the threshold number of the root node is 2, the order of the polynomial is 2-1=1, so the polynomial corresponding to the root node can be preset as , where 5 is the hidden secret value of the root node.
[0137] After calculating the node polynomial corresponding to each node in turn, the node polynomial and the private plaintext data are used to generate the private ciphertext data through an encryption algorithm.
[0138] Specifically, the private ciphertext data corresponding to the private plaintext data can be determined by the following formula 2:
[0139] Formula 2
[0140] in, Represents private ciphertext data, Represents the access control tree, Represents private plaintext data, represents a bilinear map, represents the generator of the bilinear group, Indicates that the root node hides the secret value, represents a randomly selected encryption index, Represents the operation on each leaf node, where Representation and Access the preset function corresponding to the attribute, Represents the hidden secret value corresponding to the leaf node, and h represents the γth power of the generator g.
[0141] As another example, for private plaintext data, the second user terminal can use the SHA-256 hash function to generate a first identification hash code corresponding to the private plaintext data; for private ciphertext data, the second user terminal can use the SHA-256 hash function to generate a second identification hash code corresponding to the private ciphertext data. This helps the first user terminal to directly determine the corresponding private plaintext data and private ciphertext data using the first identification hash code and the second identification hash code.
[0142] Through this embodiment, an access control tree is constructed using an access control policy, and then the corresponding private ciphertext data is generated according to the node polynomial corresponding to each node in the access control tree and the private plaintext data. In this way, the embodiment of the present application can further improve the security of private data by encrypting the private plaintext data to generate the private ciphertext data.
[0143] As an optional embodiment, using the access control policy to construct an access control tree may specifically include:
[0144] Using the access control policy and the access attribute label set, determine the number of child nodes of the non-leaf node, the node threshold of the non-leaf node, and the attribute expression of the leaf node;
[0145] An access control tree is constructed according to the number of child nodes of non-leaf nodes, the node threshold of non-leaf nodes, and the attribute expression of leaf nodes.
[0146] In this embodiment, the leaf nodes of the access control tree represent attribute expressions of access attributes, and the non-leaf nodes represent threshold nodes of child nodes.
[0147] Among them, non-leaf nodes are available ( , ) to indicate, Indicates the number of child nodes. Indicates the threshold value of the node. =1 indicates that the threshold node is regarded as an OR operation. When , it indicates that the threshold node is regarded as an AND operation.
[0148] As an example, the second user terminal determines the number of child nodes of each non-leaf node in the access control tree, the node threshold of each non-leaf node, and the attribute expression of each leaf node according to the access control policy preset by the data owner and the access attribute label set obtained from the trusted space. Finally, according to the number of child nodes of each non-leaf node, the node threshold of each non-leaf node, and the attribute expression of each leaf node, an access control tree corresponding to the access control policy is constructed.
[0149] Through this embodiment, the second user terminal constructs an access control tree corresponding to the access control policy, which helps to subsequently use the access control tree to encrypt the private plaintext data to generate private ciphertext data, thereby further improving the security of the private data.
[0150] Based on the method for obtaining private data, the present application also provides a specific embodiment of a device for obtaining private data.
[0151] like Figure 4 As shown, an embodiment of the present application provides a device for obtaining privacy data, which is applied to a trusted space and specifically includes a request judgment module 410 , an information sending module 420 and a first request sending module 430 .
[0152] The request judgment module 410 is used to respond to the identity authentication request sent by the first user terminal, and judge whether the access attribute tag carried in the identity authentication request satisfies the access control policy. The access control policy is the attribute tag type determined by the second user terminal that can access the private ciphertext data. The private ciphertext data is the data obtained by simply encrypting the private plaintext data.
[0153] The information sending module 420 is used to generate and send to the first user terminal a data access token that allows access to the private ciphertext data and a target key for decrypting the private ciphertext data when the access attribute tag satisfies the access control policy.
[0154] The first request sending module 430 is used to send a data upload request to the second user end in response to the data access request sent by the first user end using the data access token, so that the second user end uploads the private ciphertext data to the first storage space for the first user end to obtain the private ciphertext data using the target key.
[0155] As an optional embodiment, the device for obtaining private data may further include the following modules:
[0156] A data storage module, configured to store the private plaintext data obtained by decrypting the private ciphertext data into the second storage space in response to the operation of the first user end using the target key to obtain the private ciphertext data;
[0157] The data deletion module is used to delete the private plaintext data in the second storage space when the first user terminal completes the computing task or the preset access validity period of the private plaintext data expires.
[0158] As an optional embodiment, the information sending module 420 specifically includes the following units:
[0159] A token generation unit, used to generate a data access token allowing access to the private ciphertext data by using the public key of the private ciphertext data when the access attribute tag satisfies the access control policy;
[0160] A key generation unit, used to generate a target key for decrypting the private ciphertext data by using the access attribute tag and the master key of the private ciphertext data;
[0161] The information sending unit is used to send the data access token and the target key to the first user terminal.
[0162] As an optional embodiment, Figure 5 As shown, the embodiment of the present application also provides a device for obtaining privacy data, which is applied to a first user terminal and specifically includes a second request sending module 510, an information receiving module 520 and a data calculation module 530.
[0163] The second request sending module 510 is used to send an identity authentication request to the trusted space so that the trusted space can determine whether the access attribute tag carried in the identity authentication request satisfies the access control policy. The access control policy is the attribute tag type determined by the second user end that can access the private ciphertext data. The private ciphertext data is the data obtained by simply encrypting the private plaintext data.
[0164] The information receiving module 520 is used to receive a data access token that allows access to the private ciphertext data and a target key for decrypting the private ciphertext data sent by the trusted space when the access attribute tag satisfies the access control policy.
[0165] The second request sending module 510 is further used to send a data access request to the trusted space using the data access token, so that the trusted space instructs the second user terminal to upload the private ciphertext data to the first storage space.
[0166] The data acquisition module 530 is used to acquire the private ciphertext data in the first storage space using the target key.
[0167] As an optional embodiment, the data acquisition module 530 specifically includes the following units:
[0168] A secret value determination unit, configured to decrypt the private ciphertext data in the first storage space using the target key to obtain a root node hidden secret value of the private ciphertext data;
[0169] The data determination unit is used to use the root node to hide the secret value and determine the private plaintext data corresponding to the private ciphertext data.
[0170] As an optional embodiment, Figure 6 As shown, the embodiment of the present application further provides a device for obtaining privacy data, which is applied to a second user terminal and specifically includes a policy determination module 610 , a policy sending module 620 and a data upload module 630 .
[0171] The policy determination module 610 is used to use the access attribute label set to determine the access control policy corresponding to the access attribute label set. The access control policy is the attribute label type that can access the private ciphertext data. The private ciphertext data is the data obtained by simply encrypting the private plaintext data.
[0172] The policy sending module 620 is used to send the access control policy to the trusted space, so that the trusted space determines whether the access attribute tag carried in the identity authentication request of the first user terminal satisfies the access control policy.
[0173] The data upload module 630 is used to upload the private ciphertext data to the first storage space in response to the data upload request sent by the trusted space, so that the first user terminal can obtain the private ciphertext data using the target key.
[0174] As an optional embodiment, the device for obtaining private data may further include the following modules:
[0175] A control tree construction module is used to construct an access control tree using an access control policy;
[0176] A polynomial determination module, used to determine a corresponding node polynomial for each node in the access control tree;
[0177] The data encryption module is used to determine the private ciphertext data corresponding to the private plaintext data by using the node polynomial and the private plaintext data.
[0178] As an optional embodiment, the control tree construction module specifically includes the following units:
[0179] A node determination unit, used to determine the number of child nodes of a non-leaf node, a node threshold of a non-leaf node, and an attribute expression of a leaf node by using an access control policy and an access attribute tag set;
[0180] The control tree construction unit is used to construct an access control tree according to the number of child nodes of the non-leaf node, the node threshold of the non-leaf node and the attribute expression of the leaf node.
[0181] Based on the method for obtaining private data, the present application also provides a specific embodiment of a device for obtaining private data.
[0182] Figure 7 A schematic diagram of the hardware structure of a device for acquiring privacy data provided in an embodiment of the present application is shown.
[0183] The device for acquiring privacy data may include a processor 701 and a memory 702 storing computer program instructions.
[0184] Specifically, the processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0185] The memory 702 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 702 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 702 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 702 is a non-volatile solid-state memory.
[0186] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0187] The processor 701 implements any one of the privacy data acquisition methods in the above embodiments by reading and executing computer program instructions stored in the memory 702 .
[0188] In one example, the device for acquiring private data may further include a communication interface 703 and a bus 710. Figure 7 As shown, the processor 701, the memory 702, and the communication interface 703 are connected via a bus 710 and communicate with each other.
[0189] The communication interface 703 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0190] The bus 710 includes hardware, software, or both, coupling the components of the acquisition device of the privacy data to each other. By way of example and not limitation, the bus may include an accelerated graphics port (AGP) or other graphics bus, an enhanced industry standard architecture (EISA) bus, a front-side bus (FSB), a hypertransport (HT) interconnect, an industry standard architecture (ISA) bus, an infinite bandwidth interconnect, a low pin count (LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 710 may include one or more buses. Although the embodiments of the present application describe and illustrate a specific bus, the present application considers any suitable bus or interconnect.
[0191] In addition, in combination with the method for obtaining private data in the above embodiment, the embodiment of the present application also provides a system for obtaining private data. The system may include:
[0192] A trusted space, used to implement the method for obtaining private data applied to the trusted space as described above when performing data calculations;
[0193] A first user terminal is electrically connected to the trusted space and is used to implement the method for obtaining private data applied to the first user terminal as described above when performing data calculation;
[0194] The second user terminal is electrically connected to the trusted space, and is used to implement the method for acquiring privacy data applied to the second user terminal as described above when performing data calculation.
[0195] In addition, in combination with the method for obtaining private data in the above embodiments, the present application embodiment may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any of the methods for obtaining private data in the above embodiments is implemented.
[0196] In addition, in combination with the method for obtaining private data in the above embodiments, the present application embodiment may provide a computer program product for implementation. When the instructions in the computer program product are executed by a processor of an electronic device, any method for obtaining private data in the above embodiments is implemented.
[0197] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0198] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0199] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0200] Aspects of the present disclosure are described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the functions / actions specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0201] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A method for obtaining private data, It is characterized in that Applied to a trusted space, the method comprises: In response to the identity authentication request sent by the first user terminal, determine whether the access attribute tag carried in the identity authentication request satisfies the access control policy, where the access control policy is the attribute tag type determined by the second user terminal that can access the private ciphertext data, and the private ciphertext data is data obtained by simply encrypting the private plaintext data; In the case where the access attribute tag satisfies the access control policy, generating and sending to the first user end a data access token that allows access to the private ciphertext data and a target key for decrypting the private ciphertext data; In response to the data access request sent by the first user end using the data access token, a data upload request is sent to the second user end, so that the second user end uploads the private ciphertext data to the first storage space for the first user end to obtain the private ciphertext data using the target key.
2. The method according to claim 1, It is characterized in that After sending a data upload request to the second user terminal in response to the data access request sent by the first user terminal using the data access token, the method further includes: In response to the operation of the first user end using the target key to obtain the private ciphertext data, storing the private plaintext data obtained by decrypting the private ciphertext data into the second storage space; When the first user terminal completes the computing task or the preset access validity period of the private plaintext data expires, the private plaintext data in the second storage space is deleted.
3. The method according to claim 1, It is characterized in that The step of generating and sending to the first user a data access token that allows access to the private ciphertext data and a target key for decrypting the private ciphertext data when the access attribute tag satisfies the access control policy comprises: In the case where the access attribute tag satisfies the access control policy, using the public key of the private ciphertext data to generate a data access token that allows access to the private ciphertext data; Generate a target key for decrypting the private ciphertext data by using the access attribute tag and the master key of the private ciphertext data; The data access token and the target key are sent to the first client.
4. A method for obtaining private data, It is characterized in that Applied to a first user terminal, the method includes: Sending an identity authentication request to a trusted space, so that the trusted space determines whether the access attribute tag carried in the identity authentication request satisfies an access control policy, wherein the access control policy is an attribute tag type determined by the second user end that can access the private ciphertext data, and the private ciphertext data is data obtained by simply encrypting the private plaintext data; In the case where the access attribute tag satisfies the access control policy, receiving a data access token sent by the trusted space that allows access to the private ciphertext data and a target key for decrypting the private ciphertext data; Using the data access token, sending a data access request to the trusted space, so that the trusted space instructs the second user end to upload the private ciphertext data to the first storage space; The target key is used to obtain the private ciphertext data in the first storage space.
5. The method according to claim 4, It is characterized in that The using the target key to obtain the private ciphertext data in the first storage space includes: Decrypting the private ciphertext data in the first storage space using the target key to obtain a root node hidden secret value of the private ciphertext data; The root node is used to hide the secret value, and the private plaintext data corresponding to the private ciphertext data is determined.
6. A method for obtaining private data, It is characterized in that Applied to a second user terminal, the method includes: Using the access attribute tag set, determining an access control policy corresponding to the access attribute tag set, wherein the access control policy is an attribute tag type capable of accessing the private ciphertext data, and the private ciphertext data is data obtained by simply encrypting the private plaintext data; Sending the access control policy to the trusted space so that the trusted space determines whether the access attribute tag carried in the identity authentication request of the first user terminal satisfies the access control policy; In response to the data upload request sent by the trusted space, the private ciphertext data is uploaded to the first storage space, so that the first user terminal can obtain the private ciphertext data by using the target key.
7. The method according to claim 6, It is characterized in that Before uploading the private ciphertext data to the first storage space in response to the data upload request sent by the trusted space, the method further includes: Using the access control policy, construct an access control tree; For each node in the access control tree, determining a corresponding node polynomial; The node polynomial and the private plaintext data are used to determine the private ciphertext data corresponding to the private plaintext data.
8. The method according to claim 7, It is characterized in that The step of constructing an access control tree by using the access control policy includes: Determine the number of child nodes of non-leaf nodes, the node threshold of non-leaf nodes, and the attribute expression of leaf nodes by using the access control policy and the access attribute label set; The access control tree is constructed according to the number of child nodes of the non-leaf node, the node threshold of the non-leaf node, and the attribute expression of the leaf node.
9. A device for obtaining private data, It is characterized in that Applied in a trusted space, the device comprises: A request judgment module, used to respond to the identity authentication request sent by the first user end, and judge whether the access attribute tag carried in the identity authentication request satisfies the access control policy, wherein the access control policy is the attribute tag type determined by the second user end to be able to access the private ciphertext data, and the private ciphertext data is the data obtained by simply encrypting the private plaintext data; An information sending module, configured to generate and send to the first user terminal a data access token allowing access to the private ciphertext data and a target key for decrypting the private ciphertext data if the access attribute tag satisfies the access control policy; The first request sending module is used to send a data upload request to the second user end in response to the data access request sent by the first user end using the data access token, so that the second user end uploads the private ciphertext data to the first storage space for the first user end to obtain the private ciphertext data using the target key.
10. A device for obtaining private data, It is characterized in that Applied to a first user terminal, the device comprises: A second request sending module is used to send an identity authentication request to a trusted space, so that the trusted space determines whether the access attribute tag carried in the identity authentication request satisfies an access control policy, wherein the access control policy is an attribute tag type determined by the second user end that can access the private ciphertext data, and the private ciphertext data is data obtained by simply encrypting the private plaintext data; An information receiving module, configured to receive a data access token sent by the trusted space that allows access to the private ciphertext data and a target key for decrypting the private ciphertext data if the access attribute tag satisfies the access control policy; The second request sending module is further used to use the data access token to send a data access request to the trusted space, so that the trusted space instructs the second user terminal to upload the private ciphertext data to the first storage space; A data acquisition module is used to use the target key to acquire the private ciphertext data in the first storage space.
11. A device for obtaining private data, It is characterized in that Applied to a second user terminal, the device comprises: A policy determination module, used to determine an access control policy corresponding to an access attribute label set by using the access attribute label set, wherein the access control policy is an attribute label type capable of accessing private ciphertext data, and the private ciphertext data is data obtained by simply encrypting the private plaintext data; A policy sending module, used to send the access control policy to the trusted space, so that the trusted space determines whether the access attribute tag carried in the identity authentication request of the first user terminal satisfies the access control policy; The data uploading module is used to upload the private ciphertext data to the first storage space in response to the data uploading request sent by the trusted space, so that the first user terminal can obtain the private ciphertext data by using the target key.
12. A system for obtaining private data, It is characterized in that The system comprises: A trusted space, used to implement the method for obtaining private data as described in any one of claims 1 to 3 when performing data calculation; A first user terminal, electrically connected to the trusted space, and configured to implement the method for obtaining private data as described in any one of claims 4 to 5 when performing data calculation; The second user terminal is electrically connected to the trusted space, and is used to implement the method for obtaining privacy data as described in any one of claims 6 to 8 when performing data calculation.
