Data processing method and device, electronic equipment and storage medium
By generating and saving the initial ciphertext header in the blockchain network, and generating the first attribute key of the first device using the second attribute set and the system public key, the risk of illegal access by public cloud servers when ciphertext update is solved. , improves the security of data sharing.
Patent Information
- Application Number
- CN202411223517.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-09-02
AI Technical Summary
In the industrial Internet scenario, public cloud servers are easily corrupted when performing ciphertext updates, resulting in illegal access to data security risks. Especially in device attribute revocation events, the relationship between old ciphertext and old keys may be exploited for illegal access. data.
By generating and saving the initial ciphertext header in the blockchain network, and generating the first attribute key of the first device according to the second attribute set and the system public key, the first device obtains the ciphertext header share from the blockchain network. To decrypt data, reduce dependence on cloud servers and improve the security of data sharing.
Even if the cloud server backs up the encrypted data in advance, the first device cannot be decrypted, which reduces the dependence on the trustworthiness of the cloud server, and improves the security of data sharing between devices and prevents unauthorized access.
Smart Images

Figure CN119172127A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data encryption, and in particular to a data processing method and device, electronic equipment, and storage medium. Background Art
[0002] In the industrial Internet scenario, a large number of industrial devices generate massive amounts of data. Due to the storage and computing limitations of industrial equipment, it is difficult to store and process massive amounts of data in a timely manner. Therefore, industrial equipment often shares massive amounts of data through public cloud servers with powerful storage and computing capabilities.
[0003] The Ciphertext-Policy Attribute-based Encryption (CP-ABE) technology can effectively meet the data security sharing needs of a large number of industrial devices. In CP-ABE, the access rights of industrial devices to data resources are completely related to the attributes, and different industrial devices may have the same attributes. If a device no longer has a certain attribute, it should not have the access rights corresponding to the attribute. Therefore, by revoking the attributes of the device, unauthorized access can be prevented.
[0004] In the related art, the ciphertext encrypted by CP-ABE is stored in the public cloud server. When an attribute revocation event occurs, the public cloud server needs to perform an update of the ciphertext so that the device with the revoked attribute no longer has the authority to access the ciphertext. However, if a corrupted public cloud server backs up the ciphertext to be updated before executing the ciphertext update, it is easy to collude with the revoked device to achieve the purpose of illegal access, which will have a very bad impact on data security. Summary of the invention
[0005] In view of the above problems, a data processing method and device, electronic device, and storage medium are proposed to overcome the above problems or at least partially solve the above problems, including:
[0006] A method for data processing, the method comprising:
[0007] In response to a request from a first device to obtain target data of a second device, a system public key, a master key, and a first attribute set and multiple authorization sets corresponding to the target data are obtained; wherein the first attribute set is a set of first attributes corresponding to all devices allowed to access the target data, and the authorization set is a set consisting of multiple first attributes;
[0008] Encrypting the target data according to the system public key and the first attribute set to obtain encrypted data, and saving the encrypted data to a cloud server;
[0009] Generate an initial ciphertext header according to the multiple authorization sets, and save the initial ciphertext header to the blockchain network; the initial ciphertext header is used for multiple target nodes in the blockchain network to generate multiple ciphertext header shares corresponding to the initial ciphertext header;
[0010] Acquire a second attribute set corresponding to the first device, and generate a first attribute key corresponding to the first device according to the second attribute set, the system public key, and the master key;
[0011] The system public key and the first attribute key are sent to the first device, so that the first device obtains the multiple ciphertext header shares from the blockchain network according to the first attribute key, and obtains the encrypted data from the cloud server, and decrypts the encrypted data according to the first attribute key, the system public key, and the multiple ciphertext header shares to obtain the target data.
[0012] Optionally, before obtaining the system public key, the master key, and the first attribute set and multiple authorization sets corresponding to the target data in response to the request of the first device to obtain the target data of the second device, the method further includes:
[0013] Obtaining the number of the multiple target nodes;
[0014] Acquire a third attribute set corresponding to all devices, and determine a first attribute version number corresponding to each attribute in the third attribute set; wherein the third attribute set includes the first attribute set;
[0015] The system public key and the master key are generated according to the third attribute set, the number of the multiple target nodes and the first attribute version number.
[0016] Optionally, the method further comprises:
[0017] In response to a revocation event of a target attribute in the second attribute set, determining a second attribute version number corresponding to the target attribute in the first attribute version number and updating the second attribute version number to obtain a target attribute version number;
[0018] The system public key is updated according to the target attribute version number to obtain the target system public key;
[0019] Generate a ciphertext update key and an attribute update key according to the second attribute version number, the target attribute version number and the target system public key, and update the initial ciphertext header;
[0020] Sending the ciphertext update key to the cloud server so that the cloud server updates the encrypted data according to the ciphertext update key;
[0021] The attribute update key is sent to a third device that has not revoked the target attribute, so that the third device updates a second attribute key corresponding to the third device according to the attribute update key.
[0022] Optionally, it is characterized in that enabling the first device to obtain the multiple ciphertext header shares from the blockchain network according to the first attribute key includes:
[0023] Generating a secret share for the master key for each of the plurality of target nodes, and sending the secret share to the blockchain network;
[0024] Generate a ciphertext header request according to the first attribute key through the first device, and send the ciphertext header request to the blockchain network;
[0025] The ciphertext header request is received through the blockchain network, the multiple ciphertext header shares are generated according to the secret share, the initial ciphertext header, and the ciphertext header request, and the multiple ciphertext header shares are sent to the first device.
[0026] Optionally, the generating, by the first device, a ciphertext header request according to the first attribute key includes:
[0027] Determine an attribute key version number corresponding to the first attribute key according to the second attribute set and the system public key;
[0028] The ciphertext header request is generated by the first device according to the attribute key version number and the first attribute key.
[0029] Optionally, receiving the ciphertext header request through the blockchain network, and generating the multiple ciphertext header shares according to the secret share, the initial ciphertext header, and the ciphertext header request, includes:
[0030] receiving a ciphertext header request from the first device through the blockchain network, and extracting the attribute key version number from the ciphertext header request;
[0031] Determine the public key version number corresponding to the system public key, and compare the public key version number with the attribute key version number;
[0032] If the public key version number is consistent with the attribute key version number, the multiple ciphertext header shares are generated according to the secret share, the initial ciphertext header, and the ciphertext header request.
[0033] Optionally, the multiple target nodes include a leader node and multiple candidate nodes corresponding to the leader node; wherein the leader node is used to manage nodes in the blockchain network except the leader node.
[0034] A data processing device, comprising:
[0035] a request response module, configured to obtain, in response to a request from a first device to obtain target data of a second device, a system public key, a master key, and a first attribute set and multiple authorization sets corresponding to the target data; wherein the first attribute set is a set of first attributes corresponding to all devices allowed to access the target data, and the authorization set is a set consisting of multiple first attributes;
[0036] an encryption module, used to encrypt the target data according to the system public key and the first attribute set to obtain encrypted data, and save the encrypted data to a cloud server;
[0037] A ciphertext header share generation module, used to generate an initial ciphertext header according to the multiple authorization sets, and save the initial ciphertext header in the blockchain network; the initial ciphertext header is used for multiple target nodes in the blockchain network to generate multiple ciphertext header shares corresponding to the initial ciphertext header;
[0038] a first attribute key generation module, which obtains a second attribute set corresponding to the first device, and generates a first attribute key corresponding to the first device according to the second attribute set, the system public key, and the master key;
[0039] The first attribute key sending module sends the system public key and the first attribute key to the first device, so that the first device obtains the multiple ciphertext header shares from the blockchain network according to the first attribute key, and obtains the encrypted data from the cloud server, and decrypts the encrypted data according to the first attribute key, the system public key, and the multiple ciphertext header shares to obtain the target data.
[0040] Optionally, the device further comprises:
[0041] A target node quantity acquisition module, used to acquire the quantity of the plurality of target nodes;
[0042] A first attribute version number determination module, configured to obtain a third attribute set corresponding to all devices, and determine a first attribute version number corresponding to each attribute in the third attribute set; wherein the third attribute set includes the first attribute set;
[0043] The system public key and master key generation module is used to generate the system public key and the master key according to the third attribute set, the number of the multiple target nodes and the first attribute version number.
[0044] Optionally, the device further comprises:
[0045] a target attribute version number determination module, configured to, in response to a revocation event of a target attribute in the second attribute set, determine a second attribute version number corresponding to the target attribute in the first attribute version number and update the second attribute version number to obtain a target attribute version number;
[0046] A target system public key determination module, used to update the system public key according to the target attribute version number to obtain a target system public key;
[0047] An update key module, configured to generate a ciphertext update key and an attribute update key according to the second attribute version number, the target attribute version number and the target system public key, and to update the initial ciphertext header;
[0048] A ciphertext update key sending module, used to send the ciphertext update key to the cloud server, so that the cloud server updates the encrypted data according to the ciphertext update key;
[0049] The attribute update key sending module is used to send the attribute update key to a third device whose target attribute has not been revoked, so that the third device updates a second attribute key corresponding to the third device according to the attribute update key.
[0050] Optionally, the first attribute key sending module further includes:
[0051] A secret share generation submodule, configured to generate a secret share for the master key for each of the plurality of target nodes, and send the secret share to the blockchain network;
[0052] A ciphertext header request processing submodule, configured to generate a ciphertext header request according to the first attribute key through the first device, and send the ciphertext header request to the blockchain network;
[0053] The ciphertext header share processing submodule is used to receive the ciphertext header request through the blockchain network, generate the multiple ciphertext header shares according to the secret share, the initial ciphertext header, and the ciphertext header request, and send the multiple ciphertext header shares to the first device.
[0054] Optionally, the ciphertext header request processing submodule includes:
[0055] an attribute key version number determining unit, configured to determine an attribute key version number corresponding to the first attribute key according to the second attribute set and the system public key;
[0056] The ciphertext header request generating unit is configured to generate the ciphertext header request according to the attribute key version number and the first attribute key through the first device.
[0057] Optionally, the ciphertext header share processing submodule includes:
[0058] an attribute key version number extraction unit, configured to receive a ciphertext header request from the first device through the blockchain network, and extract the attribute key version number from the ciphertext header request;
[0059] A key version number comparison unit, used to determine the public key version number corresponding to the system public key, and compare the public key version number with the attribute key version number;
[0060] The ciphertext header share generating unit is used to generate the multiple ciphertext header shares according to the secret share, the initial ciphertext header and the ciphertext header request if the public key version number is consistent with the attribute key version number.
[0061] An electronic device comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the data processing method as described above when executed by the processor.
[0062] A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the data processing method as described above
[0063] The embodiments of the present invention have the following advantages: by generating an initial ciphertext header according to multiple authorization sets corresponding to the target data, and saving the initial ciphertext header to the blockchain network, the initial ciphertext header is used for multiple target nodes in the blockchain network to generate multiple ciphertext header shares corresponding to the initial ciphertext header, and generating a first attribute key corresponding to the first device according to the second attribute set, the system public key, and the master key, so that the first device needs to obtain multiple ciphertext header shares from the blockchain network through the first attribute key to decrypt the encrypted data. When the first device does not have access rights to the target data, even if the cloud server backs up the encrypted data in advance, the first device cannot decrypt the encrypted data to obtain the target data, thereby reducing the dependence on the credibility of the cloud server and effectively improving the security of data sharing between devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0065] Figure 1 It is a schematic diagram of a collusion attack between a public cloud server and a device with revoked attributes in the related art;
[0066] Figure 2 is a flowchart of a data processing method provided by an embodiment of the present invention;
[0067] Figure 3 is a schematic diagram of a data processing system architecture provided by an embodiment of the present invention;
[0068] Figure 4 It is a structural block diagram of a data processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0069] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0070] CP-ABE is a public key encryption technology based on device attributes that supports "one-to-many" encryption and decryption mode and fine-grained access control. The system can manage the corresponding attributes of all registered industrial devices and assign different encrypted data access rights to industrial devices based on different attributes or attribute combinations. However, industrial equipment security measures are relatively simple and can easily become targets of attackers. In addition, a large number of industrial equipment often frequently join or exit due to failures or environmental reasons, resulting in changes in their own attributes. Therefore, attribute revocation needs to be performed for exiting industrial equipment to prevent unauthorized access.
[0071] However, if you simply delete the attribute from the system, not only will the purpose of revoking permissions fail to be achieved, but it will also lead to two abnormal situations. First, the revoked device still has the attribute key before revocation and can decrypt the ciphertext. Second, the device newly added to the system cannot obtain the key corresponding to the attribute and thus cannot decrypt the ciphertext published before revocation.
[0072] Therefore, in order to achieve effective permission revocation, the ciphertext stored on the public cloud server and the attribute keys of the unrevoked devices must be updated. Since the revoked device cannot obtain the updated attribute key, it is difficult to decrypt the updated ciphertext. It can be seen that the update of ciphertext is very necessary in permission revocation. Assuming that in a revoked CP-ABE scheme, the cloud server is the only provider of ciphertext, and the device must download the ciphertext from the cloud server every time it accesses data, then the scheme contains the following two types of ciphertext:
[0073] Type A: ciphertext uploaded to the public cloud server before the revocation event occurs;
[0074] Type B: Ciphertext uploaded to the public cloud server after a revocation event occurs.
[0075] Among them, the ciphertext of type A is encrypted with the system public key before the revocation event occurs, and an update operation must be performed after the revocation event occurs; the ciphertext of type B is encrypted with the updated system public key, and can be correctly decrypted if the attribute set of the newly added industrial device and the industrial device with updated attribute key meets the access policy. For the revoked device, even if the original attribute set before revocation meets the access policy, the device cannot correctly decrypt the above two types of ciphertext because the attribute key cannot be updated.
[0076] In the related art, the update of ciphertext is performed by public cloud servers, so public cloud servers have greater power in revoking permissions. If a corrupted public cloud server backs up the ciphertext to be updated before performing the ciphertext update, it is easy to collude with the revoked device to achieve the purpose of illegal access. Figure 1 As shown in the figure, after the attribute revocation event occurs, although the revoked device no longer has the revoked attribute, it still has the key corresponding to the attribute and can correctly decrypt the old ciphertext before the update, that is, there is a correspondence between "old ciphertext-old key". In the CP-ABE scheme, the public cloud server is generally assumed to be "honest and curious", that is, the public cloud server can honestly perform the ciphertext update task, but is curious about the plaintext information in the ciphertext. For an "honest and curious" public cloud server, updating the ciphertext and backing up the old ciphertext before the update do not conflict, satisfying the "honest and curious" security assumption. It can update "honestly", but it can collude with the revoked device to obtain its "curious" plaintext message, thereby endangering data security.
[0077] Based on this, the present invention proposes a data processing method and device, an electronic device, and a storage medium to overcome or partially overcome the above-mentioned defects in the related art. The embodiments provided by the present invention will be described in detail below.
[0078] Reference Figure 2 , shows a flowchart of a data processing method provided by an embodiment of the present invention, which may specifically include the following steps:
[0079] Step 201, in response to a request from a first device to obtain target data of a second device, obtain a system public key, a master key, and a first attribute set and multiple authorization sets corresponding to the target data; wherein the first attribute set is a set of first attributes corresponding to all devices allowed to access the target data, and the authorization set is a set consisting of multiple first attributes;
[0080] In step 201, the second device is the data owner, the target data is the data held by the data owner, that is, the plaintext to be encrypted, and the first device is the data user. For the need of secure data sharing, especially the need of secure data sharing in the scenario of data transmission between devices under the industrial Internet, the plaintext needs to be encrypted to obtain ciphertext during the target data transmission process, and then the data user decrypts and restores it to plaintext after receiving the ciphertext, so as to realize end-to-end secure data transmission.
[0081] The system public key is public and can be freely distributed to any entity that needs to communicate securely with the system or organization. It is used to verify the entities involved in encryption and decryption. The master key is a non-public key used to generate or derive other keys for ciphertext. In practical applications, the system public key and master key can be generated in advance and stored in the corresponding server or blockchain network.
[0082] The first attribute set is a set of first attributes corresponding to all devices that are allowed to access the target data. The first attribute can be the device model, device ID, device type and other information. Only when the device has the corresponding attribute can it access the ciphertext and decrypt the plaintext. The authorization set is a set of multiple first attributes, that is, in addition to the corresponding attributes, the device must also meet the first attribute combination defined by the authorization set to access and decrypt the ciphertext. For example, a device has two attributes a and b. The access policy "a∧(b∨c)" for ciphertext data contains two authorization sets: A1 = {a, b}, A2 = {a, c}. The attributes of the device meet the authorization set A1, and the device has access rights to the ciphertext data.
[0083] In practical applications, the first attribute set and authorization set for the target data can be defined by the access structure. For example, in the access structure (M, ρ), M represents the set of first attributes corresponding to all devices allowed to access the target data, that is, the first attribute set, which can be specifically represented by a matrix. ρ is a function that maps a subset of M to a Boolean value, and different authorization sets can be defined by the function.
[0084] In some embodiments of the present invention, before obtaining the system public key, the master key, and the first attribute set and multiple authorization sets corresponding to the target data in response to the request of the first device to obtain the target data of the second device, the method further includes:
[0085] Obtaining the number of the multiple target nodes;
[0086] Acquire a third attribute set corresponding to all devices, and determine a first attribute version number corresponding to each attribute in the third attribute set; wherein the third attribute set includes the first attribute set;
[0087] The system public key and the master key are generated according to the third attribute set, the number of the multiple target nodes and the first attribute version number.
[0088] In this embodiment, the target node is the target node in the blockchain network used to store the initial ciphertext header in the subsequent steps. The third attribute set is the attributes corresponding to all devices registered in the system, which are managed by the system, wherein the third attribute set includes the first attribute set corresponding to the device that is allowed to access the target data, that is, the first attribute set is a subset of the third attribute set.
[0089] In the specific implementation, the system public key and master key can be generated during system initialization in the following ways:
[0090] First, choose a group of order p p>N, where The generator of is g, and N is the number of target nodes.
[0091] Then, select a prime number q such that (q-1) mod p = 0; select and is a p-order element, is a finite field of order q; for each attribute i in the third attribute set, randomly select h i :h1, And the version number v corresponding to each attribute i i :v1,v2,v3...v U ∈ Where U is the total number of attributes i, is a finite field of order p.
[0092] Furthermore, we randomly select α,a, The final public key PK is:
[0093]
[0094] Among them, e is represented as a bilinear mapping function.
[0095] Furthermore, the master key MSK generated by the above determined parameters is: MSK = {g α , a, β}.
[0096] In some embodiments of the present invention, the multiple target nodes include a leader node and multiple candidate nodes corresponding to the leader node; wherein the leader node is used to manage nodes in the blockchain network other than the leader node.
[0097] In the specific implementation, all nodes in the blockchain network can be divided into: a leader node, which is used to control and manage other nodes in the blockchain network; multiple candidate nodes, which are candidates for the leader node. When most candidate nodes believe that the leader node is untrustworthy, or the leader node is down or offline, a backup node can be upgraded to the leader node through re-election; follower nodes, which are other nodes used to maintain the blockchain network. Among them, the committee node composed of a leader node and corresponding multiple candidate nodes is the target node.
[0098] Step 202: encrypt the target data according to the system public key and the first attribute set to obtain encrypted data, and save the encrypted data to a cloud server;
[0099] In step 202, in order to associate the attribute corresponding to the device that can access the encrypted data with the target data, the target data may be encrypted by combining the system public key and the first attribute set to obtain the encrypted data.
[0100] In the specific implementation, the target data can be encrypted in the following ways:
[0101] First, let the target data be The first attribute set and the authorization set are defined by an access structure (M, ρ), wherein the first attribute set M is represented by a linear secret sharing scheme (LSSS) matrix, and ρ is a function defining the authorization set.
[0102] Further, select as a secret shared for the first set of attributes, and then construct a random vector Then randomly select And let s=s1+s2.
[0103] Furthermore, the obtained system public key PK is:
[0104]
[0105] Furthermore, let λ i =M i v T , where i∈[1,l], l is the number of rows in the matrix M, M i is the i-th row vector of matrix M, v T Represents a row vector v The transpose of ρ(i) is used to select a random number r for each function ρ(i). i , combined with the system public key PK to convert the target data The encrypted data CT obtained after encryption is:
[0106]
[0107] Among them, C, E, B i , C i , D i They are all components of the encrypted data CT, i.e., components.
[0108] After the target data is encrypted through the above steps to obtain encrypted data, the encrypted data is sent to a cloud server and saved. In actual applications, the cloud server may be a public cloud server.
[0109] Step 203: Generate an initial ciphertext header according to the multiple authorization sets, and save the initial ciphertext header to the blockchain network; the initial ciphertext header is used by multiple target nodes in the blockchain network to generate multiple ciphertext header shares corresponding to the initial ciphertext header;
[0110] In step 203, the initial ciphertext header is stored in the blockchain network and serves as a participant in encrypting the target data. When decrypting the data, the device requesting access to the target data can be authenticated based on the multiple ciphertext header shares generated by the multiple target nodes in the blockchain for the initial ciphertext header. This can avoid excessive reliance on cloud servers, especially public cloud servers, thereby improving the security of encrypted data.
[0111] In the specific implementation, the initial ciphertext header can be generated in the following way:
[0112] Assume that P authorization sets A are defined in the access structure i , where i∈[1,P], then the initial ciphertext header for:
[0113]
[0114] Step 204: Acquire a second attribute set corresponding to the first device, and generate a first attribute key corresponding to the first device according to the second attribute set, the system public key, and the master key;
[0115] In step 204, the first attribute key is used to associate with the second attribute set. When the first device requests to access and decrypt target data with the attribute key, the first attribute key can be used to determine whether the first device has the corresponding attribute and whether the attribute is valid.
[0116] In the specific implementation, let the second attribute set be S, and randomly select The first attribute key SK is calculated and generated by the following formula:
[0117]
[0118] Among them, K, L, K xThey all represent components of the first attribute key SK, that is, components.
[0119] Step 205: Send the system public key and the first attribute key to the first device, so that the first device obtains the multiple ciphertext header shares from the blockchain network according to the first attribute key, and obtains the encrypted data from the cloud server, and decrypts the encrypted data according to the first attribute key, the system public key, and the multiple ciphertext header shares to obtain the target data.
[0120] In step 205, the first device uses the first attribute key as a credential to request the blockchain network to obtain multiple ciphertext header shares corresponding to the initial ciphertext headers generated by multiple target nodes, and obtains encrypted data from the cloud server. Finally, the encrypted data is decrypted according to the first attribute key, the system public key, and the multiple ciphertext header shares to obtain the target data.
[0121] In the specific implementation, the encrypted data can be decrypted to obtain the target data in the following way:
[0122] First, assume that the obtained system public key PK is:
[0123]
[0124] The first attribute key SK is:
[0125]
[0126] The multiple ciphertext header shares obtained from k+1 target nodes in the blockchain network are: in is the secret share of each target node in the blockchain network for the initial ciphertext header, and N is the number of target nodes.
[0127] Then, the ciphertext header Hdr is reconstructed by the Lagrange polynomial interpolation method, specifically:
[0128] make but
[0129] When the first device has access rights to the target data, that is, the second attribute set satisfies at least one authorization set, the first device can certainly find a set of constants Make Established, of which For the authorization set.
[0130] Furthermore, define Then use the following formula to decrypt the encrypted data to get the target data
[0131]
[0132] In some embodiments of the present invention, enabling the first device to obtain the multiple ciphertext header shares from the blockchain network according to the first attribute key includes:
[0133] Generating a secret share for the master key for each of the plurality of target nodes, and sending the secret share to the blockchain network;
[0134] In a specific implementation, a secret share for the master key may be generated for each of the multiple target nodes in the following manner:
[0135] Each target node is Extract the master key MSK = {g α ,a,β}, and randomly select As the coefficients of the polynomial f(x), where the threshold is k+1, let f(0)=a, then the polynomial f(x) is:
[0136] f(x)=a+a1x+a2x 2 +…+a k x k modp
[0137] Then calculate the target node The secret share of the master key
[0138] Generate a ciphertext header request according to the first attribute key through the first device, and send the ciphertext header request to the blockchain network;
[0139] In a specific implementation, the blockchain network needs to verify whether the attributes of the first device are valid and distribute a ciphertext header share to the first device. Therefore, the first device needs to generate a ciphertext header request based on its first attribute key and then send the ciphertext header request to the blockchain network.
[0140] The ciphertext header request is received through the blockchain network, the multiple ciphertext header shares are generated according to the secret share, the initial ciphertext header, and the ciphertext header request, and the multiple ciphertext header shares are sent to the first device.
[0141] In a specific implementation, the ciphertext header share of the target node for the initial ciphertext header can be generated in the following way:
[0142] First, the initial ciphertext header is: The ciphertext header request is: in is the version number corresponding to the first attribute key, L is the first attribute key The component L in γ corresponds to the authorization set A satisfied by the second attribute set γ .
[0143] Then, each target node Combined with the secret share for the initial ciphertext header Generate ciphertext header share
[0144] In some embodiments of the present invention, generating a ciphertext header request according to the first attribute key by the first device further includes:
[0145] Determine an attribute key version number corresponding to the first attribute key according to the second attribute set and the system public key;
[0146] In a specific implementation, the attribute key version number can be generated in the following ways:
[0147] The system public key PK is:
[0148]
[0149] The first attribute key SK is:
[0150]
[0151] Let the authorization set satisfied by the second attribute set be A γ , let the set The attribute key version number
[0152] The ciphertext header request is generated by the first device according to the attribute key version number and the first attribute key.
[0153] In the specific implementation, the ciphertext header request can be generated in the following ways:
[0154] The first attribute key SK is Combined with the above attribute key version number Authorization Set A γ , construct the ciphertext header request as:
[0155] In some embodiments of the present invention, the receiving the ciphertext header request through the blockchain network, and generating the multiple ciphertext header shares according to the secret share, the initial ciphertext header, and the ciphertext header request, includes:
[0156] receiving a ciphertext header request from the first device through the blockchain network, and extracting the attribute key version number from the ciphertext header request;
[0157] In the specific implementation, let the ciphertext header request be The attribute key version number is extracted from
[0158] Determine the public key version number corresponding to the system public key, and compare the public key version number with the attribute key version number;
[0159] In the specific implementation, the public key version number corresponding to the system public key can be determined in the following ways:
[0160] The system public key is:
[0161]
[0162] The public key version number corresponding to the system public key in
[0163] If the public key version number is consistent with the attribute key version number, the multiple ciphertext header shares are generated according to the secret share, the initial ciphertext header, and the ciphertext header request.
[0164] In the specific implementation, the attribute key version number can be verified by the following formula and the public key version number V s Is it consistent?
[0165]
[0166] When the above formula is established, the public key version number is considered to be consistent with the attribute key version number, and in response to the ciphertext header request of the first device, multiple ciphertext header shares are generated according to the secret share, the initial ciphertext header, and the ciphertext header request.
[0167] In some embodiments of the present invention, the method further comprises:
[0168] In response to a revocation event of a target attribute in the second attribute set, determining a second attribute version number corresponding to the target attribute in the first attribute version number and updating the second attribute version number to obtain a target attribute version number;
[0169] In this embodiment, when the first device exits the secure sharing of encrypted data due to factors such as failure or environmental changes, it is necessary to perform attribute revocation on it, that is, to revoke the mapping relationship between the first device and the target attribute. When a revocation event occurs to the target attribute in the second attribute set of the first device, for other third devices that also have the target attribute and whose target attribute has not been revoked, it is necessary to update the system public key, initial ciphertext header, second attribute key corresponding to the third device, and encrypted data involved in decrypting the encrypted data to ensure the normal access of the third device to the target data. Therefore, the target attribute can be first determined in the third attribute set corresponding to all devices managed by the system, and then the second attribute version number corresponding to the target attribute can be determined, the second attribute version number can be updated to obtain the target attribute version number, and then the system public key, initial ciphertext header, second attribute key, and encrypted data can be updated based on the target attribute version number.
[0170] In a specific implementation, the second attribute version number can be updated in the following way:
[0171] Let the target attribute be x and the second attribute version number be v χ , then randomly select As the target attribute version number.
[0172] The system public key is updated according to the target attribute version number to obtain the target system public key;
[0173] Generate a ciphertext update key and an attribute update key according to the second attribute version number, the target attribute version number and the target system public key, and update the initial ciphertext header;
[0174] In the specific implementation, the target attribute version number v′ can be used in the following way χ Update the system public key PK:
[0175] The system public key PK before updating is:
[0176]
[0177] Then the updated system public key PK' is:
[0178]
[0179] Furthermore, randomly select According to the second attribute version number v χ , target attribute version number v′ χ , the ciphertext update key UK generated by the system public key PK' ct for:
[0180]
[0181] Property Update Key UK sk for:
[0182]
[0183] Furthermore, for the initial ciphertext header Update, the updated initial ciphertext header for:
[0184]
[0185] Furthermore, the updated initial ciphertext header can be sent to the blockchain network for storage.
[0186] Sending the ciphertext update key to the cloud server so that the cloud server updates the encrypted data according to the ciphertext update key;
[0187] In the specific implementation, the encrypted data can be updated in the following ways:
[0188] Assume that the encrypted data before the update is CT, and the encrypted data CT' after the ciphertext update key is:
[0189]
[0190]
[0191] The attribute update key is sent to a third device that has not revoked the target attribute, so that the third device updates a second attribute key corresponding to the third device according to the attribute update key.
[0192] In a specific implementation, assuming that the second attribute key corresponding to the third device whose target attribute has not been revoked is SK, the updated second attribute key SK' is:
[0193]
[0194] Through the above steps, the third device whose target attribute has not been revoked can obtain multiple updated ciphertext header shares generated by the target node for the updated initial ciphertext header from the blockchain network according to the updated second attribute key, obtain the updated encrypted data from the cloud server, and decrypt the encrypted data according to the updated second attribute key, the target system public key, and the updated ciphertext header share to obtain the target data. As for the first device whose target attribute has been revoked, since the first attribute key it holds is generated based on the system public key and the master key before the update, and the system public key and the master key before the update are generated based on the second attribute version number corresponding to the target attribute (i.e., the attribute version number before the update), when the second attribute version number is updated to the target attribute version number, the first attribute key becomes invalid, resulting in the first device being unable to normally obtain multiple ciphertext header shares from the blockchain network according to the first attribute key, and then decrypt the encrypted data. Therefore, even if the first device and the cloud server conspire to obtain the encrypted data before the update, it is difficult to achieve unauthorized access to the encrypted data due to the lack of ciphertext header shares, thereby improving the security of target data sharing after the device attribute is revoked.
[0195] The embodiments of the present invention have the following advantages: by generating an initial ciphertext header according to multiple authorization sets corresponding to the target data, and saving the initial ciphertext header to the blockchain network, the initial ciphertext header is used for multiple target nodes in the blockchain network to generate multiple ciphertext header shares corresponding to the initial ciphertext header, and generating a first attribute key corresponding to the first device according to the second attribute set, the system public key, and the master key, so that the first device needs to obtain multiple ciphertext header shares from the blockchain network through the first attribute key to decrypt the encrypted data. When the first device does not have access rights to the target data, even if the cloud server backs up the encrypted data in advance, the first device cannot decrypt the encrypted data to obtain the target data, thereby reducing the dependence on the credibility of the cloud server and effectively improving the security of data sharing between devices.
[0196] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0197] Reference Figure 3 , shows a system architecture diagram of data processing provided by an embodiment of the present invention, the system may include the following entities:
[0198] Public cloud server: used to receive and save the ciphertext (i.e. encrypted data) sent by the data owner, and receive the CT update key (i.e. ciphertext update key) generated by the attribute authorization agency to update the ciphertext. When the data user initiates an access request for the ciphertext, the public cloud server sends the ciphertext to the data user. In the data security system of this system, the public cloud server is considered to be "honest and curious", that is, it can update the ciphertext honestly, but it may back up the ciphertext before updating, and collude with the first device whose target attribute is revoked to obtain the plaintext in the ciphertext (i.e. target data).
[0199] Data owner: the second device holding the plaintext, which can be an industrial device or other device holding the target data. After generating the corresponding initial ciphertext header for the ciphertext, the second device sends the initial ciphertext header to the blockchain network for storage.
[0200] Data user: the first device and / or the third device that requests access to the plaintext, which can be an industrial device or other device that requests access to the plaintext. The first device and / or the third device that has not had its target attribute revoked can request multiple ciphertext header shares from the blockchain network through their respective first attribute key and second attribute key (ie, SK), and restore the multiple ciphertext header shares to the ciphertext header, and then decrypt the obtained ciphertext and restore it to plaintext. When the target attribute of the first device is revoked, the third device whose target attribute has not been revoked receives the attribute update key (ie, SK update key) distributed by the attribute authorization agency, and updates the second attribute key it holds. The third device can decrypt the ciphertext normally to obtain the plaintext, while the first device that holds the first attribute key that has not been updated cannot decrypt the ciphertext.
[0201] Attribute Authorization Agency: It is used to distribute secret shares to committee nodes in the blockchain network, and when the target attribute of the first device is revoked, it sends the updated initial ciphertext header to the blockchain account book for storage, and distributes CT update keys to the public cloud server and SK update keys to data users whose target attributes have not been revoked. In the data security system of this system, the attribute authorization agency is considered to be completely trustworthy.
[0202] Blockchain network: It is composed of leader nodes, committee nodes composed of candidate nodes, and follower nodes. The leader node is selected from the candidate nodes and maintains the blockchain ledger together with the remaining candidate nodes, while the follower nodes are used to replace down or broken candidate nodes and jointly maintain the blockchain ledger.
[0203] Reference Figure 4 , shows a schematic diagram of the structure of a data processing device provided by an embodiment of the present invention, which may specifically include the following modules:
[0204] The request response module 401 is used to obtain the system public key, the master key, and the first attribute set and multiple authorization sets corresponding to the target data in response to the request of the first device to obtain the target data of the second device; wherein the first attribute set is a set of first attributes corresponding to all devices allowed to access the target data, and the authorization set is a set consisting of multiple first attributes;
[0205] An encryption module 402, configured to encrypt the target data according to the system public key and the first attribute set to obtain encrypted data, and save the encrypted data to a cloud server;
[0206] A ciphertext header share generation module 403 is used to generate an initial ciphertext header according to the multiple authorization sets, and store the initial ciphertext header in the blockchain network; the initial ciphertext header is used for multiple target nodes in the blockchain network to generate multiple ciphertext header shares corresponding to the initial ciphertext header;
[0207] A first attribute key generation module 404 is used to obtain a second attribute set corresponding to the first device, and generate a first attribute key corresponding to the first device according to the second attribute set, the system public key, and the master key;
[0208] The first attribute key sending module 405 is used to send the system public key and the first attribute key to the first device, so that the first device obtains the multiple ciphertext header shares from the blockchain network according to the first attribute key, and obtains the encrypted data from the cloud server, and decrypts the encrypted data according to the first attribute key, the system public key, and the multiple ciphertext header shares to obtain the target data.
[0209] In some embodiments of the present invention, the device further comprises:
[0210] A target node quantity acquisition module, used to acquire the quantity of the plurality of target nodes;
[0211] A first attribute version number determination module, configured to obtain a third attribute set corresponding to all devices, and determine a first attribute version number corresponding to each attribute in the third attribute set; wherein the third attribute set includes the first attribute set;
[0212] The system public key and master key generation module is used to generate the system public key and the master key according to the third attribute set, the number of the multiple target nodes and the first attribute version number.
[0213] In some embodiments of the present invention, the device further comprises:
[0214] a target attribute version number determination module, configured to, in response to a revocation event of a target attribute in the second attribute set, determine a second attribute version number corresponding to the target attribute in the first attribute version number and update the second attribute version number to obtain a target attribute version number;
[0215] A target system public key determination module, used to update the system public key according to the target attribute version number to obtain a target system public key;
[0216] An update key module, configured to generate a ciphertext update key and an attribute update key according to the second attribute version number, the target attribute version number and the target system public key, and to update the initial ciphertext header;
[0217] A ciphertext update key sending module, used to send the ciphertext update key to the cloud server, so that the cloud server updates the encrypted data according to the ciphertext update key;
[0218] The attribute update key sending module is used to send the attribute update key to a third device whose target attribute has not been revoked, so that the third device updates a second attribute key corresponding to the third device according to the attribute update key.
[0219] In some embodiments of the present invention, the first attribute key sending module 405 further includes:
[0220] A secret share generation submodule, configured to generate a secret share for the master key for each of the plurality of target nodes, and send the secret share to the blockchain network;
[0221] A ciphertext header request processing submodule, configured to generate a ciphertext header request according to the first attribute key through the first device, and send the ciphertext header request to the blockchain network;
[0222] The ciphertext header share processing submodule is used to receive the ciphertext header request through the blockchain network, generate the multiple ciphertext header shares according to the secret share, the initial ciphertext header, and the ciphertext header request, and send the multiple ciphertext header shares to the first device.
[0223] In some embodiments of the present invention, the ciphertext header request processing submodule includes:
[0224] an attribute key version number determining unit, configured to determine an attribute key version number corresponding to the first attribute key according to the second attribute set and the system public key;
[0225] The ciphertext header request generating unit is configured to generate the ciphertext header request according to the attribute key version number and the first attribute key through the first device.
[0226] In some embodiments of the present invention, the ciphertext header share processing submodule includes:
[0227] an attribute key version number extraction unit, configured to receive a ciphertext header request from the first device through the blockchain network, and extract the attribute key version number from the ciphertext header request;
[0228] A key version number comparison unit, used to determine the public key version number corresponding to the system public key, and compare the public key version number with the attribute key version number;
[0229] The ciphertext header share generating unit is used to generate the multiple ciphertext header shares according to the secret share, the initial ciphertext header and the ciphertext header request if the public key version number is consistent with the attribute key version number.
[0230] In some embodiments of the present invention, the multiple target nodes include a leader node and multiple candidate nodes corresponding to the leader node; wherein the leader node is used to manage nodes in the blockchain network other than the leader node.
[0231] Some embodiments of the present invention further provide an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and the computer program implements the above data processing method when executed by the processor.
[0232] Some embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above data processing method is implemented.
[0233] Some embodiments of the present invention further provide a computer program product, including a computer program, which implements the above data processing method when executed by a processor.
[0234] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0235] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0236] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0237] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0238] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks 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, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0239] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0240] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0241] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0242] Finally, 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 terminal 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 terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the above elements.
[0243] The above provides a detailed introduction to a data processing method and device, electronic device, and storage medium. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for data processing, characterized in that: The method comprises: In response to a request from a first device to obtain target data of a second device, a system public key, a master key, and a first attribute set and multiple authorization sets corresponding to the target data are obtained; wherein the first attribute set is a set of first attributes corresponding to all devices allowed to access the target data, and the authorization set is a set consisting of multiple first attributes; Encrypting the target data according to the system public key and the first attribute set to obtain encrypted data, and saving the encrypted data to a cloud server; Generate an initial ciphertext header according to the multiple authorization sets, and save the initial ciphertext header to the blockchain network; the initial ciphertext header is used for multiple target nodes in the blockchain network to generate multiple ciphertext header shares corresponding to the initial ciphertext header; Acquire a second attribute set corresponding to the first device, and generate a first attribute key corresponding to the first device according to the second attribute set, the system public key, and the master key; The system public key and the first attribute key are sent to the first device, so that the first device obtains the multiple ciphertext header shares from the blockchain network according to the first attribute key, and obtains the encrypted data from the cloud server, and decrypts the encrypted data according to the first attribute key, the system public key, and the multiple ciphertext header shares to obtain the target data.
2. The method according to claim 1, characterized in that Before obtaining the system public key, the master key, and the first attribute set and multiple authorization sets corresponding to the target data in response to the request of the first device to obtain the target data of the second device, the method further includes: Obtaining the number of the multiple target nodes; Acquire a third attribute set corresponding to all devices, and determine a first attribute version number corresponding to each attribute in the third attribute set; wherein the third attribute set includes the first attribute set; The system public key and the master key are generated according to the third attribute set, the number of the multiple target nodes and the first attribute version number.
3. The method according to claim 2, characterized in that The method further comprises: In response to a revocation event of a target attribute in the second attribute set, determining a second attribute version number corresponding to the target attribute in the first attribute version number and updating the second attribute version number to obtain a target attribute version number; The system public key is updated according to the target attribute version number to obtain the target system public key; Generate a ciphertext update key and an attribute update key according to the second attribute version number, the target attribute version number and the target system public key, and update the initial ciphertext header; Sending the ciphertext update key to the cloud server so that the cloud server updates the encrypted data according to the ciphertext update key; The attribute update key is sent to a third device that has not revoked the target attribute, so that the third device updates a second attribute key corresponding to the third device according to the attribute update key.
4. The method according to claim 2 or 3, characterized in that: The method of enabling the first device to obtain the multiple ciphertext header shares from the blockchain network according to the first attribute key includes: Generating a secret share for the master key for each of the plurality of target nodes, and sending the secret share to the blockchain network; Generate a ciphertext header request according to the first attribute key through the first device, and send the ciphertext header request to the blockchain network; The ciphertext header request is received through the blockchain network, the multiple ciphertext header shares are generated according to the secret share, the initial ciphertext header, and the ciphertext header request, and the multiple ciphertext header shares are sent to the first device.
5. The method according to claim 4, characterized in that The generating, by the first device, a ciphertext header request according to the first attribute key includes: Determine an attribute key version number corresponding to the first attribute key according to the second attribute set and the system public key; The ciphertext header request is generated by the first device according to the attribute key version number and the first attribute key.
6. The method according to claim 5, characterized in that The receiving the ciphertext header request through the blockchain network, and generating the plurality of ciphertext header shares according to the secret share, the initial ciphertext header, and the ciphertext header request, comprises: receiving a ciphertext header request from the first device through the blockchain network, and extracting the attribute key version number from the ciphertext header request; Determine the public key version number corresponding to the system public key, and compare the public key version number with the attribute key version number; If the public key version number is consistent with the attribute key version number, the multiple ciphertext header shares are generated according to the secret share, the initial ciphertext header, and the ciphertext header request.
7. The method according to any one of claims 1 to 3, characterized in that: The multiple target nodes include a leader node and multiple candidate nodes corresponding to the leader node; wherein the leader node is used to manage nodes in the blockchain network except the leader node.
8. A data processing device, characterized in that: The device comprises: a request response module, configured to obtain, in response to a request from a first device to obtain target data of a second device, a system public key, a master key, and a first attribute set and multiple authorization sets corresponding to the target data; wherein the first attribute set is a set of first attributes corresponding to all devices allowed to access the target data, and the authorization set is a set consisting of multiple first attributes; an encryption module, used to encrypt the target data according to the system public key and the first attribute set to obtain encrypted data, and save the encrypted data to a cloud server; A ciphertext header share generation module, used to generate an initial ciphertext header according to the multiple authorization sets, and save the initial ciphertext header in the blockchain network; the initial ciphertext header is used for multiple target nodes in the blockchain network to generate multiple ciphertext header shares corresponding to the initial ciphertext header; a first attribute key generation module, configured to obtain a second attribute set corresponding to the first device, and generate a first attribute key corresponding to the first device according to the second attribute set, the system public key, and the master key; The first attribute key sending module is used to send the system public key and the first attribute key to the first device, so that the first device obtains the multiple ciphertext header shares from the blockchain network according to the first attribute key, and obtains the encrypted data from the cloud server, and decrypts the encrypted data according to the first attribute key, the system public key, and the multiple ciphertext header shares to obtain the target data.
9. The device according to claim 8, further comprising: A target node quantity acquisition module, used to acquire the quantity of the plurality of target nodes; A first attribute version number determination module, configured to obtain a third attribute set corresponding to all devices, and determine a first attribute version number corresponding to each attribute in the third attribute set; wherein the third attribute set includes the first attribute set; The system public key and master key generation module is used to generate the system public key and the master key according to the third attribute set, the number of the multiple target nodes and the first attribute version number.
10. The device according to claim 9, further comprising: a target attribute version number determination module, configured to, in response to a revocation event of a target attribute in the second attribute set, determine a second attribute version number corresponding to the target attribute in the first attribute version number and update the second attribute version number to obtain a target attribute version number; A target system public key determination module, used to update the system public key according to the target attribute version number to obtain a target system public key; An update key module, configured to generate a ciphertext update key and an attribute update key according to the second attribute version number, the target attribute version number and the target system public key, and to update the initial ciphertext header; A ciphertext update key sending module, used to send the ciphertext update key to the cloud server, so that the cloud server updates the encrypted data according to the ciphertext update key; The attribute update key sending module is used to send the attribute update key to a third device whose target attribute has not been revoked, so that the third device updates a second attribute key corresponding to the third device according to the attribute update key.
11. The device according to claim 9 or 10, wherein the first attribute key sending module further comprises: A secret share generation submodule, configured to generate a secret share for the master key for each of the plurality of target nodes, and send the secret share to the blockchain network; A ciphertext header request processing submodule, configured to generate a ciphertext header request according to the first attribute key through the first device, and send the ciphertext header request to the blockchain network; The ciphertext header share processing submodule is used to receive the ciphertext header request through the blockchain network, generate the multiple ciphertext header shares according to the secret share, the initial ciphertext header, and the ciphertext header request, and send the multiple ciphertext header shares to the first device.
12. The device according to claim 11, wherein the ciphertext header request processing submodule comprises: an attribute key version number determining unit, configured to determine an attribute key version number corresponding to the first attribute key according to the second attribute set and the system public key; The ciphertext header request generating unit is configured to generate the ciphertext header request according to the attribute key version number and the first attribute key through the first device.
13. The device according to claim 12, wherein the ciphertext header share processing submodule comprises: an attribute key version number extraction unit, configured to receive a ciphertext header request from the first device through the blockchain network, and extract the attribute key version number from the ciphertext header request; A key version number comparison unit, used to determine the public key version number corresponding to the system public key, and compare the public key version number with the attribute key version number; The ciphertext header share generating unit is used to generate the multiple ciphertext header shares according to the secret share, the initial ciphertext header and the ciphertext header request if the public key version number is consistent with the attribute key version number.
14. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method for data processing according to any one of claims 1 to 7 is implemented.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for data processing according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Data security sharing method and system in blockchain and cloud storage environment
CN111914269A
Multi-authority attribute-based encryption method based on blockchain
CN113193953A
Fine-grained cloud storage security access control method based on blockchain
CN114039790A
Ciphertext attribute-based proxy re-encryption method and computer readable storage medium containing program
CN116707969A
Methods and systems for blockchain-implemented event-lock encryption
IN202047006675A
