A revocable fair outsourcing attribute encryption method and system based on blockchain

Through the blockchain-based revocable and fair outsourcing attribute encryption method, the problem of user access rights revocation and fairness of outsourced decryption services is solved, the decentralization of ciphertext revocation and decryption is achieved, the overhead is reduced, and data privacy and security are guaranteed. Fairness.

CN118413342BActive Publication Date: 2024-09-24CHONGQING UNIV
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202410195683.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-21
Publication Date
2024-09-24
Estimated Expiration
2044-02-21

AI Technical Summary

Technical Problem

In the existing technology, when user access rights are revoked, the data owner needs to be online in real time, and it fails to effectively solve the fairness problem of the outsourced decryption service provider and the compensation mechanism for deceptive behavior.

Method used

Adopting a blockchain-based revocable fair outsourcing attribute encryption method, through the collaborative work of regional management agencies, attribute management agencies, user entities, servers and blockchain systems, the ciphertext revocation and decryption process is decentralized and reduces communication overhead, and ensure the fairness and compensation mechanism of decryption results through the blockchain.

Benefits of technology

It realizes the completion of ciphertext revocation when the data owner is not online, reduces computing and communication overhead, and ensures fairness between data users and outsourcing service providers through the blockchain, avoiding the leakage of sensitive information of the data owner. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118413342B
    Figure CN118413342B
Patent Text Reader

Abstract

The present invention provides a revocable fair outsourcing attribute encryption method and system based on blockchain. The method includes: obtaining and broadcasting system public parameters; determining the public key and private key of the attribute management agency; the user entity obtains the identity key; the data user obtains the attribute key; the data user obtains the user key; the data user generates the outsourcing key; the data owner encrypts the data based on the initial access control matrix to obtain the ciphertext and uploads it to the server; when the ciphertext revocation condition is met: the server obtains the revocation ciphertext based on the current ciphertext and the revocation access control matrix, and updates the current ciphertext to the revocation ciphertext; the data user uploads the outsourcing key and token to the blockchain; the outsourcing computing service provider uses the obtained outsourcing key and ciphertext to decrypt and obtain a partially decrypted ciphertext and sends it to the data user to obtain the token. The present invention does not require the data owner to revoke the ciphertext online in real time, thereby reducing the computing overhead and communication overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data encryption technology, and in particular to a revocable fair outsourcing attribute encryption method and system based on blockchain. Background Art

[0002] Data owners usually need to formulate specific access control policies to determine which users (i.e., data users) can access the data they own. Attribute encryption is a public key encryption algorithm that can meet one-to-many encryption and is regarded as an ideal encryption primitive for implementing fine-grained access control. In scenarios involving data access control, the commonly used scheme is ciphertext policy attribute encryption. In this type of scheme, the user entity is marked by a set of "attributes" and the corresponding secret key is constructed based on the user's attributes. When encrypting data, the encryption party formulates the corresponding "policy" (a set of Boolean expressions composed of attributes, such as {"student" and "Chongqing University"}) in advance to determine which user groups can access the data. In this process, the data owner does not need to know the specific identity of the user who wants to access the data. As long as the user's attributes can meet the requirements of the policy, access to the data can be achieved.

[0003] The applicant's prior patent with publication number CN11 5361126A discloses a verifiable outsourced partial strategy hidden attribute encryption method, which sets up multiple attribute management agencies to partially replace a single trusted central agency, solves the security risks and efficiency bottlenecks caused by centralization, and improves the privacy security of data users. However, the prior patent does not solve the technical problem that the data owner needs to be online in real time when the user's access rights are revoked.

[0004] The so-called revocation of user access rights means that, as time goes by, the constraints on the accessors of the same ciphertext data may change. At this time, it is necessary to "revoke" the access rights of users (data users) who do not meet the current requirements but meet the previous requirements. A feasible idea in the prior art is that the data owner downloads the data stored in the cloud, decrypts it, re-encrypts it using a new strategy, and then uploads it again. However, this not only requires the data owner to be online all the time, but also generates a lot of communication overhead. In addition, the prior patent only considered the user's (data user's) verification of the correctness of some decryption results, and did not consider the compensation mechanism for users when the outsourced decryption service provider engages in fraudulent behavior, and how to ensure the service provider's benefits when the calculation results are correct. In other words, the fairness issue for both users and outsourced service providers is not involved. Summary of the invention

[0005] The present invention aims to solve the technical problems existing in the prior art and provide a revocable fair outsourcing attribute encryption method and system based on blockchain.

[0006] In order to achieve the above-mentioned purpose of the present invention, according to the first aspect of the present invention, the present invention provides a revocable fair outsourcing attribute encryption method based on blockchain, including: the regional management agency obtains and broadcasts the system public parameters; the attribute management agency in the region determines the attribute management agency public key and the attribute management agency private key based on the system public parameters; the user entity obtains the identity key through registration, and the user entity includes the data owner and the data user; the data user obtains the attribute key from the attribute management agency that manages its attributes in the region; the data user combines its own identity key and the attribute keys of all its attributes to obtain the user key; the data user obtains the attribute key based on its own identity key and the attribute keys of all its attributes; the data user obtains the attribute key based on its own identity key and the attribute keys of all its attributes. The data owner encrypts the data based on the initial access control matrix to obtain the ciphertext, and uploads the ciphertext to the server; when the ciphertext revocation condition is met: the server obtains the revoked ciphertext based on the current ciphertext and the revoked access control matrix, and updates the current ciphertext to the revoked ciphertext; when the data user requests outsourced decryption: the data user uploads the outsourced key and token to the blockchain; the outsourced computing service provider obtains the data user's outsourced key from the blockchain, obtains the ciphertext from the server, decrypts the data using the obtained outsourced key and ciphertext to obtain partially decrypted ciphertext, sends the partially decrypted ciphertext to the data user, and then obtains the token from the blockchain.

[0007] In order to achieve the above-mentioned purpose of the present invention, according to the second aspect of the present invention, the present invention provides a system based on the blockchain-based revocable fair outsourced attribute encryption method described in the first aspect of the present invention, including a regional management agency, a user entity, multiple attribute management agencies, an outsourced verification service provider, a server and a blockchain system; multiple attribute management agencies are in charge of different attributes, and the user entity, the attribute management agency, the regional management agency, the outsourced verification service provider and the blockchain system are respectively connected to the server.

[0008] The present invention does not require the data owner to revoke the ciphertext online in real time. When the ciphertext revocation condition is met, the server only needs to obtain the revoked ciphertext according to the revocation access matrix and update the current ciphertext with the revoked ciphertext. The ciphertext revocation condition can be achieved by prior agreement or timing. The ciphertext is revoked when the data owner is not online, and there is no need to decrypt the ciphertext data and then re-encrypt it, which reduces the computing overhead and communication overhead. Based on the blockchain, an outsourced decryption solution that is fair to both the data user and the outsourced decryption service provider is constructed. For the data user, the verification of the decryption result and the compensation mechanism when the erroneous result is obtained are realized. For the outsourced service provider, it is guaranteed that it can obtain the deserved reward when providing the correct service. In addition, the present invention partially hides the policy and implicitly embeds the attribute value that may contain the sensitive information of the data owner in the ciphertext, so that the sensitive information of the data owner is invisible to the data user who does not meet the access policy requirements, so as to avoid the privacy leakage of the data owner caused by the access policy and avoid the privacy leakage of the user caused by the policy. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 It is a flowchart of a revocable fair outsourcing attribute encryption method based on blockchain in a preferred embodiment of the present invention;

[0010] Figure 2 This is a system framework diagram in a preferred embodiment of the present invention;

[0011] Figure 3 This is a schematic diagram of fair outsourcing calculation in a preferred embodiment of the present invention;

[0012] Figure 4 This is a schematic diagram of a system initialization process in a preferred embodiment of the present invention;

[0013] Figure 5 It is a schematic diagram of the initialization process of the attribute management mechanism in a preferred embodiment of the present invention;

[0014] Figure 6 is a flowchart of user entity registration in a preferred embodiment of the present invention;

[0015] Figure 7 This is a schematic diagram of the attribute key generation process in a preferred embodiment of the present invention;

[0016] Figure 8 It is a schematic diagram of the outsourced key generation process in a preferred embodiment of the present invention;

[0017] Fig. 9 This is a schematic diagram of a data encryption process in a preferred embodiment of the present invention;

[0018] Fig.10It is a schematic diagram of a ciphertext revocation process in a preferred embodiment of the present invention;

[0019] Fig.11 It is a schematic diagram of the outsourcing decryption process in a preferred embodiment of the present invention;

[0020] Fig.12 It is a schematic diagram of the outsourced decryption result verification process in a preferred implementation manner of the present invention. DETAILED DESCRIPTION

[0021] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0022] In the description of the present invention, it is necessary to understand that the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0023] In the description of the present invention, unless otherwise specified and limited, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the internal connection between two components. It can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to the specific circumstances.

[0024] The present invention discloses a revocable fair outsourcing attribute encryption method based on blockchain. In a preferred implementation, the flow chart is as follows: Figure 1 shown. Figure 2 The system block diagram of the system implementing the above method is shown, which includes a regional management agency, a user entity, multiple attribute management agencies, an outsourced verification service provider, a server and a blockchain system. The user entity includes a data owner and a data user. In the specific implementation, the data owner, the data user, and the outsourced verification service provider can be respectively an electronic device of the data owner, an electronic device of the data user, and an electronic device of the outsourced verification service provider. The electronic device is preferably, but not limited to, a desktop personal computer, a smart terminal, a tablet computer and other network-connected devices. The server is preferably, but not limited to, a cloud server.

[0025] Multiple attribute management agencies are set up within the jurisdiction of the regional management agency. Each attribute management agency manages more than one attribute, but each attribute is managed by a unique attribute management agency, that is, for a client with multiple attributes, the number of attribute management agencies that manage the client is less than or equal to the number of attributes of the client. This application splits the key generation center (KGC) that needs to be centralized in the traditional attribute encryption scheme, solving the security and constraint problems caused by centralization. The specific meaning of the attribute can be determined according to the access policy defined by the data owner. The access policy is a set of Boolean expressions composed of attributes, such as {"student" and "A University"}, "student" and "A University" are each an attribute.

[0026] like Figure 1 As shown, the blockchain-based revocable fair outsourcing attribute encryption method disclosed in the present invention specifically includes:

[0027] Step S1: The regional management agency obtains and broadcasts system public parameters. Figure 4 As shown, step S1 specifically includes:

[0028] Step 101, the Regional Management Agency (RMA) determines the security parameters based on the security parameters 1. κ Constructing a bilinear elliptic curve group and The order of is N = P1P2P3P4, where P1, P2, P3 and P4 are all large prime numbers.

[0029] Step 102, from Randomly select the first integer α from The first subgroup The second subgroup The third subgroup The fourth subgroup The first subgroup The generator is g1, the second subgroup The generator of is g2, the third subgroup The generator of is g3, the fourth subgroup The generator of is g4;

[0030] Step 103, calculate e(g1, g1) α , publish system public parameters PK RMA =(N, g1, g2, g3, g a , e(g1, g1) α ), which is also the public key of the regional management agency, generates the regional management agency private key MK RMA =(a, α, g3), a represents the The second integer randomly selected from the The elements in are mapped to An element in the matrix has a higher priority than the exponential operation.

[0031] Step S2, the attribute management agency in the region determines the attribute management agency public key and the attribute management agency private key based on the system public parameters. There are generally multiple attribute management agencies (AMAs) in a region, which are responsible for different attributes. All AMAs need to be initialized to generate relevant parameters, including the attribute management agency public key and the attribute management agency private key. Figure 5 The kth attribute management agency AMA is shown k The specific process of executing step S2 is as follows: Figure 5 As shown, the k-th attribute management mechanism performs:

[0032] Step 201: The kth attribute management agency AMA k Request system public parameters PK from the regional management agency RMA ;

[0033] Step 202: The regional management agency sends a report to the attribute management agency AMA. k Return PK RMA :

[0034] Step 203: The kth attribute management agency AMA k Based on g1 Randomly select an element A from the first group k , And based on g2 from Randomly select an element B from the second group k ,

[0035] Step 204: Generate the kth attribute management agency public key Among them, H k =A k B k ; kth attribute management agency AMA k Publish the public key of its attribute management authority Generate the kth attribute management agency private key

[0036] Step S3: The user entity obtains an identity key by registering. The user entity includes the data owner and the data user. Figure 6 A schematic diagram of a user entity registration process is shown. Preferably, step S3 includes:

[0037] Step 301: The user entity sends the identity identifier UID to the regional management agency. Specifically, the user entity sends its own identity identifier UID in the region to the regional management agency.

[0038] Step 302: The regional management agency records the identity UID sent by the user entity and generates a user ID f bound to the identity UID. Randomly select an element D from the third group and an element D′ from the fourth group, Calculate the identity key first item and the identity key second item.

[0039] Step 303: The regional management agency generates the user entity's identity key SK UID,RMA ={K, K′} and sent to the user entity, where K represents the first item of the identity key, K′ represents the second item of the identity key,

[0040] Step S4, the attribute management agency that manages the attributes in the data usage direction area obtains the attribute key. Each user entity is identified by a set of attributes. A collection of attributes representing a user entity with an identity identifier UID, where S UN is the user entity attribute set S UID The set of attribute names in , replaced by integer numbers, It is a set of attribute values ​​corresponding to each attribute name, where i represents the set S UN Since each attribute is managed by a unique attribute management authority, assuming S represents the set of attributes owned by the user entity with the identity UID and managed by AMAk. UNK Represents a collection of attributes The set of attribute names managed by AMAk in S UVK Indicates S UNK The user entity reports the attribute value set corresponding to each attribute in the attribute authority AMA k Get S UNK The process of the attribute key of the i′th attribute in is as follows Figure 7 As shown, therefore, preferably, step S4 includes:

[0041] Step 401: The user entity (which may be a data user) sends its regional identity identifier UID to the attribute management agency AMA that manages the attributes of the user entity k .

[0042] Step 402: Attribute Management Authority AMA k Based on the UID, request the regional management agency for the user identifier f corresponding to the user entity.

[0043] Step 403: The regional management agency sends a request to the attribute management agency AMA kReturns the user ID corresponding to UID f.

[0044] Step 404: The regional management agency obtains the Randomly select an element C from the fifth group i′ , i′ represents S UNK The index of where s i′ Yes and S UNK The attribute value corresponding to the i′th attribute name in A k It is the Property Management Agency (AMA) k The part of the private key held, K i′ The user entity is represented by the attribute management authority AMA k The attribute key of the i′th attribute managed.

[0045] Step 405: Attribute Management Authority AMA k The user entity is in S UNK The attribute key of the i′th attribute in Sent to the user entity.

[0046] For each attribute of the user entity, steps 401 to 405 are repeatedly executed to obtain the attribute key of the attribute from the attribute management agency that manages the attribute.

[0047] Step S5: The data user combines its own identity key and the attribute keys of all its attributes to obtain a user key. After the data user actually obtains the attribute keys from all attribute management agencies related to its attributes (i.e., all attribute management agencies that manage its attributes), the data user obtains a complete user key by combining its identity key and all attribute keys. The complete user key can be expressed as:

[0048] S UN It is the attribute set S of the data user entity UID A collection of attribute names in .

[0049] The user key generation scheme in step S5 above adopts distributed key generation to avoid key leakage and key loss caused by single point failure; it avoids the performance bottleneck caused by a single central agency in the traditional attribute encryption scheme using a centralized key generation center; the distributed architecture is compatible with systems with central authority, but the centralized architecture is not compatible with the distributed system. Therefore, in terms of application, the application scenarios of the distributed architecture are more extensive.

[0050] Step S6: The data user generates an outsourcing key based on its own user key. After obtaining the complete user key, the data user generates an outsourcing key based on it. The process is as follows: Figure 7 As shown, preferably, step S6 includes:

[0051] Step 601: The data user randomly selects a third integer z, and

[0052] Step 602: The data user uses its complete user private key SK UID,RMA The outsourcing key is calculated as:

[0053]

[0054] Step S7: The data owner encrypts the data based on the initial access control matrix to obtain ciphertext, and uploads the ciphertext to the server. The data owner formulates a corresponding initial access control policy, which is a Boolean expression composed of attributes, and encrypts the data based on the initial access control matrix corresponding to the initial access control policy to determine which data users can access the data. The process is as follows: Fig. 9 As shown, preferably, including:

[0055] Step 701: The data owner formulates an initial access policy and converts it into an initial access control matrix. Where M represents the initial attribute matrix with l rows and n columns, l represents the number of initial attributes, n represents the complexity of the access strategy; ρ represents the number of columns from [l] to S N The mapping of S N represents the attribute name set of l initial attributes in the initial access control matrix, [l] is an integer set from 1 to l; Represents a set of attribute values ​​of length l corresponding to the attribute name; Indicates S N The attribute value of the first attribute name in Indicates S N The attribute value of the second attribute name in Indicates S N The attribute value of the lth attribute name in .

[0056] Step 702: The data owner Randomly select n elements from the first calculation vector v = (s, a2, ..., a n ), represents the set of integers from 1 to the integer N;

[0057] Calculate the middle value μ of row x x =m x1 ·s+m x2 ·a2+...+mx n ·a n , x∈[l], mxj Represents the element in the xth row and jth column of the initial attribute matrix M, j∈[1,n].

[0058] Based on safety parameter 1 κ Constructing a bilinear elliptic curve group and from The second subgroup Randomly select element B and element set κ represents the algorithm security level. The larger the κ, the more secure the algorithm is, but the computational complexity is also higher. It can be set as needed. Calculate the first item of the ciphertext M0 represents the data to be encrypted, α represents the The first integer randomly selected in the equation, e represents the bilinear elliptic curve group The two elements are mapped to the bilinear elliptic curve group A bilinear map of an element in ;

[0059] Calculate the second ciphertext g1 is The first subgroup The generator of

[0060] Calculate the third item of the ciphertext {C x} x∈[l] : H k Indicates the public key of the attribute management agency that manages the xth attribute, B x Represents an element set {B x}, a represents the xth element from A second integer randomly selected from ;

[0061] Then, the data owner constructs the ciphertext of the initial access control matrix as

[0062] Step 703: The data owner uploads the encrypted data to the server.

[0063] In the process of encrypting the data to generate ciphertext in the above step S7, the attribute value containing sensitive information in the access policy is embedded in the ciphertext in exponential form, so that this part is available but invisible to other users in the system, so as to protect user privacy and avoid user privacy leakage caused by access policy.

[0064] When the ciphertext revocation condition is met, step S8 may be executed, where the server obtains the revoked ciphertext based on the current ciphertext and the revoked access control matrix, and updates the current ciphertext to the revoked ciphertext.

[0065] Preferably, the ciphertext revocation conditions include: the data owner actively requests the ciphertext revocation, and / or the pre-agreed conditions between the data owner and the server are met. The pre-agreed conditions preferably include but are not limited to time conditions, that is, the ciphertext is revoked at a preset time after the previous ciphertext is generated. The pre-agreed conditions may also be other conditions, such as executing the ciphertext revocation after the number of data users reaches a preset number.

[0066] Further preferably, when the ciphertext revocation condition is met, the ciphertext revocation process is as follows: Fig.10 As shown, including:

[0067] Step 801: The server obtains the revocation access control matrix M Re Indicates l Re Line n Re The revocation attribute matrix of the column, l Re Represents the number of attributes in the revoked attribute matrix, n Re represents the complexity of revoking the access control policy, ρ Re Indicates that from [l Re ]arrive The mapping of Indicates the revocation of the access control matrix l Re The attribute name set of attributes, [l Re ] is from 1 to l Re The set of integers, Indicates the length is l Re A set of attribute values ​​corresponding to the attribute names; here, express The attribute value of the first attribute name in express The attribute value of the second attribute name in express No.1 Re The revocation access control matrix can be pre-stored on the server side, or read from the data owner when the ciphertext needs to be revoked.

[0068] Step 802, calculate the first intermediate value n′=n+n Re , the second intermediate value l′=l+l Re ;from Randomly select n' elements from the vector to form a second calculation vector v'=(s', a'2, ..., a') with a length of n' n′ );

[0069] Calculate the updated intermediate value μ of the x″th row x″ ′:

[0070] m x″jRepresents the element in the x″th row and jth column of the initial attribute matrix, j∈[1,n]; n x″j′ Represents the element in the x″-lth row and j′th column of the revocation attribute matrix, j′∈[1, n Re ];

[0071] From the second subgroup Randomly select an element B′ and an element set B′ x″ Represents the element set {B′ x″}, calculate the first item of the revocation ciphertext

[0072] Calculate the second item of the revocation ciphertext

[0073] Calculate the third item of the revocation ciphertext in, Represents a collection of attribute names The attribute value of the attribute with index (x″-l) in ;

[0074] Constructing revocation ciphertext

[0075] Step 803: The server updates the current ciphertext to the revocation ciphertext CT s′ .

[0076] The ciphertext revocation scheme adopted in the above step S8 has the following technical advantages: the ciphertext generated by the ciphertext revocation operation is the same as the data encryption step S7, which is also a ciphertext that hides sensitive attribute values ​​and is invisible to other users in the system to protect user privacy. In most existing schemes, the ciphertext revocation operation requires the participation of the data owner, which requires that the data owner must be online when the ciphertext revocation occurs, and there is data exchange between the data owner and the server. However, in the above scheme, the ciphertext revocation operation is completed by the server without the participation of the data owner, which reduces the communication overhead and storage cost caused by data exchange between the data owner and the server; since the data owner does not need to be online in real time, it is more flexible in the application scenario; the data owner does not need to participate in the calculation, avoiding the reduction of computing efficiency and performance bottleneck caused by the computing resource limitation of the data owner.

[0077] Preferably, when the data user requests outsourced decryption, step S9 is executed: the data user uploads the outsourcing key and token to the blockchain; the outsourced computing service provider obtains the data user's outsourcing key from the blockchain, obtains the ciphertext from the server, uses the obtained outsourcing key and ciphertext to decrypt to obtain a partial decrypted ciphertext, sends the partial decrypted ciphertext to the data user, and then obtains the token from the blockchain.

[0078] like Fig.11 As shown, step S9 includes:

[0079] Step 901: The data user sends the outsourcing key OutK UID And the tokens used to pay outsourced computing services are uploaded to the blockchain.

[0080] Step 902: The outsourced computing service provider obtains the data user's outsourcing key OutK from the blockchain. UID .

[0081] Step 903: The outsourced computing service provider obtains the ciphertext CT to be calculated from the server. s .

[0082] Step 904: The outsourced computing service provider uses the obtained outsourcing key and ciphertext to decrypt and obtain a partially decrypted ciphertext CT s -P The partial decrypted ciphertext obtained is expressed as:

[0083] Among them, S′ represents the minimum authorized attribute set of the current access control policy, ω x′ To satisfy A vector, where M x′ represents the x′th row of the current access control matrix M′ corresponding to the current access control policy; as mentioned above, C x′ It is the ciphertext CT s part of; Indicates the partial key corresponding to the attribute in the x′th row of the current access control matrix M′ in the user key.

[0084] Step 905: The outsourced computing service provider uses the computing result CT as the partial decryption ciphertext. s -P is recorded on the blockchain.

[0085] Step 906: The outsourced computing service provider sends the partially decrypted ciphertext to the data user.

[0086] Step 907: The outsourced computing service provider obtains tokens from the blockchain as compensation.

[0087] In the above step S9, all data are recorded in the outsourced decryption stage, thus avoiding unfairness caused by false data.

[0088] In a preferred embodiment, when the data user believes that part of the decrypted ciphertext provided by the outsourced computing service provider is incorrect, a verification request can be made to the blockchain. Therefore, the above encryption method also includes an outsourced verification step. The flow chart of this step is as follows: Fig.12 As shown, including:

[0089] Step 1001: The data user initiates a verification request to the blockchain. The blockchain is preferably a Fabric consortium chain. Compared with public and private chains, the consortium chain is more in line with the requirements for nodes to have different identities in terms of architecture, and meets the characteristics of being open to the outside world and being tamper-proof.

[0090] Step 1002: The blockchain selects multiple verification nodes. Compute and verify the decrypted ciphertext.

[0091] Step 1003, compare the verification decryption ciphertext of each verification node with the partial decryption ciphertext, and each verification node votes according to the comparison result. If the verification decryption ciphertext of the verification node is the same as the partial decryption ciphertext, then the verification node votes to pass the verification, otherwise, the verification node votes to fail the verification. The verification result is obtained according to the voting information, and the verification result includes verification pass and verification fail, and the one with the most votes is the verification result.

[0092] Step 1004: When the verification result is that the verification fails, the blockchain deducts the corresponding tokens from the outsourced computing service provider and returns them to the data user. The verification result is returned to the data user. If the verification result shows that the outsourced computing service provider has cheated, the blockchain deducts the corresponding tokens from the outsourced computing service provider and returns them to the data user, and deducts the remuneration given to the outsourced computing service provider. Otherwise, there is no extra operation.

[0093] In the above decryption result verification step, fairness is fully reflected, and relevant data is recorded when outsourcing decryption. In the verification stage, relevant content is directly searched instead of the user uploading data, which ensures the credibility and correctness of the verification result and can detect the fraudulent behavior of the outsourced computing service provider.

[0094] In a preferred embodiment, the attribute encryption method provided by the present invention further includes a local decryption step, specifically: when the attribute of the data user meets the access control policy requirements, the data user calculates To obtain data M. When the attributes of the data user do not meet the requirements of the access control policy, meaningless garbled code is calculated.

[0095] The present invention also discloses a system based on the above attribute encryption method, such as Figure 2As shown, it includes a regional management agency, a user entity, multiple attribute management agencies, an outsourced verification service provider, a server and a blockchain system; multiple attribute management agencies are in charge of different attributes, and the user entity, the attribute management agency, the regional management agency, the outsourced verification service provider and the blockchain system are respectively connected to the server.

[0096] The blockchain-based revocable fair outsourcing attribute encryption method and system provided by the present invention has the following technical advantages:

[0097] (1) Ciphertext revocation without the need for the data owner to be online in real time: Ciphertext revocation can be completed by prior agreement or scheduled execution when the data owner is not online. Since there is no need to decrypt and re-encrypt the ciphertext data, the computational and communication overheads are reduced.

[0098] (2) Outsourced computing that is fair to both data users and outsourced service providers: Based on blockchain, outsourcing is fair to both data users and outsourced decryption service providers. For data users, it enables them to verify the decryption results and obtain compensation when erroneous results are obtained; for outsourced service providers, it ensures that they can obtain the deserved compensation when they provide correct services.

[0099] (3) Avoiding privacy leakage of data owners due to policies: By partially hiding the policies, attribute values ​​that may contain sensitive information of the data owner are implicitly embedded in the ciphertext, making the sensitive information of the data owner invisible to data users who do not meet the access policy requirements, thereby avoiding privacy leakage of data owners due to access policies.

[0100] (4) By splitting the centralized KGC (key generation center), on the one hand, the system constraints are reduced from the complete trust of the centralized KGC to the honest but curious nature of multiple institutions. On the other hand, the performance bottleneck and single point failure problems caused by centralization are avoided, while expanding the application scenarios of the solution.

[0101] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0102] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

Claims

1. A revocable fair outsourcing attribute encryption method based on blockchain, characterized in that: include: The regional management agency obtains and broadcasts the system's public parameters; The attribute management agency in the area determines the attribute management agency public key and the attribute management agency private key based on the system public parameters; The user entity obtains the identity key by registering, and the user entity includes the data owner and the data user; The attribute management agency that manages the attributes of the data in the data usage area obtains the attribute key; The data user combines its own identity key and the attribute keys of all its attributes to obtain the user key; The data user generates an outsourcing key based on its own user key; The data owner encrypts the data based on the initial access control matrix to obtain a ciphertext, and uploads the ciphertext to the server; When the ciphertext revocation condition is met: the server obtains the revoked ciphertext based on the current ciphertext and the revoked access control matrix, and updates the current ciphertext to the revoked ciphertext; When the data user requests outsourcing decryption: the data user uploads the outsourcing key and token to the blockchain; The outsourced computing service provider obtains the outsourced secret key of the data user from the blockchain, obtains the ciphertext from the server, decrypts the ciphertext using the obtained outsourced secret key and the ciphertext to obtain a partial decrypted ciphertext, sends the partial decrypted ciphertext to the data user, and then obtains the token from the blockchain; The data owner encrypts the data based on the initial access control matrix to obtain ciphertext, including: The data owner formulates the initial access policy and converts it into the initial access control matrix Where M represents the initial attribute matrix with l rows and n columns, l represents the number of initial attributes, n represents the complexity of the access strategy; ρ represents the number of columns from [l] to S N The mapping of S N represents the attribute name set of l initial attributes in the initial access control matrix, [l] is an integer set from 1 to l; Represents a set of attribute values ​​of length l corresponding to the attribute name; from Randomly select n elements from the first calculation vector V = (s, a2, ..., a n ), represents the set of integers from 1 to the integer N; Calculate the middle value μ of row x x =m x1 ·s+m x2 ·a2+...+m xn ·a n , x∈[l], m xj Represents the element in the xth row and jth column of the initial attribute matrix M, j∈[1,n]; Based on safety parameter 1 κ Constructing a bilinear elliptic curve group and from The second subgroup Randomly select element B and element set Calculate the first ciphertext item M0 represents the data to be encrypted, α represents the The first integer randomly selected in , e represents the mapping of two elements in the bilinear elliptic curve group G to the bilinear elliptic curve group A bilinear map of an element in ; Calculate the second ciphertext g1 is The first subgroup The generator of Calculate the third item of the ciphertext {C x } x∈[l] : H k Indicates the public key of the attribute management agency that manages the xth attribute, B x Represents an element set {B x }, a represents the xth element from A second integer randomly selected from ; Constructing ciphertext When the ciphertext revocation condition is met, the server obtains the revoked ciphertext based on the current ciphertext and the revoked access control matrix, and updates the current ciphertext to the revoked ciphertext, including: Server obtains the revocation access control matrix M Re Indicates l Re Line n Re The revocation attribute matrix of the column, l Re Represents the number of attributes in the revoked attribute matrix, n Re represents the complexity of revoking the access control policy, ρ Re Indicates that from [l Re ]arrive The mapping of Indicates the revocation of the access control matrix l Re The attribute name set of attributes, [l Re ] is from 1 to l Re The set of integers, Indicates the length is l Re The set of attribute values ​​corresponding to the attribute names; Calculate the first intermediate value n′=n+n Re , the second intermediate value l′=l+l Re ,from Randomly select n' elements from the vector to form a second calculation vector v'=(s', a'2, ..., a') with a length of n' n′ ); Calculate the updated intermediate value μ of the x″th row x″ ′: m x″j Represents the element in the x″th row and jth column of the initial attribute matrix, j∈[1,n]; n x″j′ Represents the element in the x"-lth row and j'th column of the revocation attribute matrix, j'∈[1, n Re ]; From the second subgroup Randomly select an element B′ and an element set B′ x″ Represents the element set {B′ x″ }, calculate the first item of the revoked ciphertext Calculate the second item of the revocation ciphertext Calculate the third item of the revocation ciphertext {C x″ ′} x″∈[l′] ,in, Represents a collection of attribute names The attribute value of the attribute with index (x″-l) in ; Constructing revocation ciphertext Update the current ciphertext to the revocation ciphertext 2. The blockchain-based revocable fair outsourcing attribute encryption method according to claim 1, characterized in that: The ciphertext revocation conditions include: the data owner actively requests the ciphertext to be revoked, and / or the conditions agreed upon in advance between the data owner and the server are met.

3. The blockchain-based revocable fair outsourcing attribute encryption method according to claim 1 or 2, characterized in that: When the data user requests outsourcing of decryption: The data user uploads the outsourced key and token to the blockchain; The outsourced computing service provider obtains the data user's outsourcing key from the blockchain; The outsourced computing service provider obtains the ciphertext from the server; The outsourced computing service provider uses the obtained outsourcing key and ciphertext to perform decryption to obtain a partial decrypted ciphertext, and records the partial decrypted ciphertext on the blockchain; The outsourced computing service provider sends part of the decrypted ciphertext to the data user; Outsourced computing service providers obtain tokens from the blockchain.

4. The blockchain-based revocable fair outsourcing attribute encryption method according to claim 3, characterized in that: Also includes outsourcing verification steps: The data user initiates a verification request to the blockchain; The blockchain selects multiple verification nodes, and the multiple verification nodes calculate and verify the decrypted ciphertext respectively, and compare the verification and decrypted ciphertext of each verification node with the partial decrypted ciphertext. Each verification node votes according to the comparison results; Obtain verification results based on voting information, including verification passed and verification failed; When the verification result is failure, the blockchain deducts the corresponding tokens from the outsourced computing service provider and returns them to the data user.

5. The blockchain-based revocable fair outsourcing attribute encryption method according to claim 1, 2 or 4, characterized in that: The regional management agency obtains system public parameters, including: Based on safety parameter 1 κ Constructing a bilinear elliptic curve group and The order is N = P1P2P3P4, P1, P2, P3 and P4 are all large prime numbers; from Randomly select the first integer α from The first subgroup The second subgroup The third subgroup The fourth subgroup The first subgroup The generator is g1, the second subgroup The generator of is g2, the third subgroup The generator of is g3, the fourth subgroup The generator of is g4; Calculate e(g1, g1) α , publish system public parameters PK RMA =(N, g1, g2, g3, g a , e(g1, g1) α ), generate the regional management agency private key MK RMA =(a, α, g3), a represents the The second integer chosen randomly from .

6. The blockchain-based revocable fair outsourcing attribute encryption method according to claim 5, characterized in that: In the step of determining the attribute management agency public key and the attribute management agency private key based on the system public parameters, the kth attribute management agency performs: The kth attribute management agency requests the system public parameter PK from the regional management agency RMA ; The kth attribute management agency is based on g1 from Randomly select an element A from the first group k , And based on g2 from Randomly select an element from the second group Generate the kth attribute management authority public key Among them, H k =A k B k ; Generate the kth attribute management agency private key 7. The blockchain-based revocable fair outsourcing attribute encryption method according to claim 5, characterized in that: The user entity obtains the identity key through registration, including: The user entity sends the identity identifier UID to the regional management agency; The regional management agency records the identity UID sent by the user entity and generates a user ID f bound to the identity, based on g4 from Randomly select an element D from the third group and an element D′ from the fourth group, The regional management agency generates the identity key SK of the user entity UID,RMA = {K, K′} and sent to the user entity, where K represents the first item of the identity key, K = g1 α g1 af D, K′ represents the second item of the identity key, K′=g1 f D′.

8. A system based on the method according to any one of claims 1 to 7, characterized in that: It includes regional management agencies, user entities, multiple attribute management agencies, outsourced verification service providers, servers and blockchain systems; multiple attribute management agencies are in charge of different attributes, and user entities, attribute management agencies, regional management agencies, outsourced verification service providers and blockchain systems are respectively connected to the servers.

Citation Information

Patent Citations

  • Anonymous revocation ring signature based on public chain and generation and revocation method of anonymous revocation ring signature

    CN110190970A

  • Multi-authority attribute-based encryption method based on blockchain

    CN113193953A

  • Internet of Things revocable attribute encryption method based on block chain

    CN115174235A

  • Verifiable outsourcing partial policy hidden attribute encryption method and system

    CN115361126A

  • Block chain-based revocable distributed attribute-based encryption method

    CN116366320A