A blockchain-based data security access control method

By combining blockchain and ciphertext policy attribute-based encryption algorithm, the trust problem of data access control in cloud environment and the computing efficiency problem of resource-constrained devices are solved, secure and efficient data sharing and fine-grained access control are achieved, the blockchain storage burden is reduced and data security is improved.

CN116827616BActive Publication Date: 2025-10-10INST OF SOFTWARE - CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310721424.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-16
Publication Date
2025-10-10
Estimated Expiration
2043-06-16

AI Technical Summary

Technical Problem

In an untrusted cloud environment, how to establish trust between nodes and achieve secure and efficient data access control, especially how to solve the computing challenges based on attribute encryption technology on resource-constrained terminal devices, while solving the problems of data confidentiality and secure sharing.

Method used

By combining blockchain with the secure and efficient Cipher Policy Attribute-Based Encryption (CPABE) algorithm, data owners encrypt plaintext data and upload it to the InterPlanetary File System (IPFS). The encryption server outsources the encryption of symmetric encryption keys and stores them on the blockchain. Data users decrypt and verify the integrity of the data through the decryption server. This constructs a storage model that combines IPFS and blockchain, and uses an improved CPABE algorithm to reduce the computing burden on the user side.

Benefits of technology

It implements lightweight and revocable data access control, reduces the blockchain storage burden, supports fine-grained user-level attribute revocation, reduces user-side computing overhead, and verifies decryption correctness through blockchain storage hash fingerprints to ensure data security and traceability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116827616B_ABST
    Figure CN116827616B_ABST
Patent Text Reader

Abstract

The application discloses a data security access control method based on a block chain. The method comprises the following steps: 1) an attribute authority AA assigns an attribute set S to a data user DU and generates a private key SK, and generates an outsourcing decryption key DSK for a decryption server DSP; 2) a data owner DO uploads a ciphertext SCT obtained by encrypting a plaintext by using a symmetric encryption key to an IPFS, and performs a chain operation on a ciphertext hash value corresponding to the ciphertext SCT returned by the IPFS; and a ciphertext CT is obtained by encrypting the symmetric encryption key; 3) an encryption server ESP performs outsourcing encryption on the ciphertext CT to obtain a ciphertext ECT and perform a chain operation; 4) when the DSP receives an access request of the DU, if the DU satisfies an access control strategy, a partial decryption result DCT is returned; 5) the DU uses the SK to perform secondary decryption on the DCT to obtain the symmetric encryption key; the DU requests the IPFS to obtain the SCT, and then decrypts the returned SCT to obtain the plaintext.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of information security technology and relates to a data security access control method based on blockchain. Background Art

[0002] With the deep integration of next-generation information and communication technologies and the digital economy, the construction of infrastructure and data resource management systems is steadily advancing, and the demand for data processing is growing. Cloud computing technology provides the ability to process and store large amounts of data. However, in untrusted cloud environments, problems such as data confidentiality and secure sharing are becoming increasingly difficult to ensure. To address these data security issues, scholars at home and abroad have recently conducted research and exploration on access control system models and technologies based on cryptographic algorithms. Attribute-based encryption (ABE) is considered the most promising solution. Attribute-based encryption not only provides fine-grained access control policies and one-to-many encryption and decryption models, but also offers a new technical theory for addressing data security issues in cloud environments. However, attribute-based encryption involves a large number of time-consuming operations, such as bilinear mapping, point multiplication, and modular exponentiation, making its application to resource-constrained end devices fraught with significant challenges.

[0003] The decentralized, verifiable, and tamper-proof nature of blockchain technology addresses the issue of third-party trust. Combining blockchain technology with attribute-based encryption (ABE) effectively addresses the practical challenges of ABE-based access control solutions. However, the decentralized nature of blockchain means that no single participant can be trusted, leading to potential issues such as malicious nodes and data divergence caused by conflicting interests. Resolving this issue of mutual trust between nodes and implementing secure data access control using secure and efficient ABE algorithms based on this trust remains a technical challenge. Summary of the Invention

[0004] The purpose of this invention is to propose a data security access control method based on blockchain, which solves the problem of data security sharing by combining blockchain with the designed secure and efficient ciphertext policy attribute-based encryption (CPABE) algorithm.

[0005] The technical concept of this invention is as follows: the data owner encrypts the plaintext data using a symmetric encryption algorithm and uploads the data ciphertext (SCT) to the InterPlanetary File System (IPFS). The IPFS system returns the hash value (file_hash) of the ciphertext (SCT) according to the operating protocol. The data owner then encrypts the symmetric encryption key using the CPABE encryption algorithm proposed in this invention and sends the ciphertext hash value, key ciphertext result, and access policy to the encryption server (ESP). ESP performs the outsourced encryption operation and stores the outsourced encrypted ciphertext result (ECT) on the blockchain.

[0006] When the data user DU accesses the data, it queries the corresponding ciphertext hash value from the blockchain and sends it to the decryption server DSP. The DSP retrieves the corresponding outsourced encrypted ciphertext ECT on the blockchain, performs outsourced decryption on it and returns the outsourced decryption result to DU. The data user DU uses its own private key to decrypt the outsourced decryption result to obtain the symmetric encryption key, uses the hash fingerprint path file_hash to obtain the data ciphertext SCT from IPFS, and then uses the decrypted symmetric encryption key to decrypt the obtained data ciphertext SCT to obtain the corresponding plaintext data.

[0007] In addition, the attribute authority AA revokes user attributes by updating attribute values.

[0008] According to the above ideas, the implementation steps of the present invention include the following:

[0009] 1) Build a storage model that combines IPFS and blockchain:

[0010] Storage is achieved by combining on-chain key information with IPFS data ciphertext. This on-chain key information, including the hash index returned by IPFS, public system parameters, and access control information, is stored as an index block on the blockchain. This index block maps the queried information to the storage address value, occupying only a small amount of storage space on the chain. IPFS stores encrypted data files uploaded by the data owner, ensuring data security.

[0011] During the encryption and decryption process, the file hash fingerprint path and the cloud server encryption and decryption log are stored on the chain. After decryption, the user can compare it with the on-chain hash fingerprint path to verify the correctness of the outsourced decryption. If the decryption result is incorrect, the encryption and decryption process can be traced through the on-chain log.

[0012] 2) Build a secure and efficient data sharing mechanism:

[0013] 2a) System initialization algorithm Setup(κ)→(Params,MSK): Input security parameter κ and system global attribute set U, output system public parameter Params and system master key MSK.

[0014] 2b) Key Generation Algorithm KeyGen(Params,MSK,S)→(SK,DSK): Inputs Params, MSK, and user attribute set S, and outputs the user private key SK and the outsourced decryption key DSK.

[0015] 2c) Symmetric Encryption Algorithm SymEncrypt(key,m)→SCT: DO symmetrically encrypts the original data m using the key key and outputs the symmetrically encrypted ciphertext SCT.

[0016] 2d) Initial encryption algorithm DoEncrypt(Params,(A,ρ,F),M)→CT: Input Params and the access control policy (A,ρ,F) defined by DO to perform initial encryption on the plaintext M and output the initial ciphertext CT.

[0017] 2e) Outsourced Encryption Algorithm EspEncrypt(Params,CT)→ECT: ESP performs outsourced encryption on the initial ciphertext CT and outputs the complete encrypted ciphertext ECT.

[0018] 2f) Outsourced decryption algorithm DspDecrypt(Params,ECT,DSK)→DCT: Input Params and outsourced decryption key DSK, DSP partially decrypts the outsourced encrypted ciphertext ECT, and outputs the outsourced decrypted ciphertext DCT.

[0019] 2g) User decryption algorithm DuDecrypt(DCT,SK)→M: DU uses the private key SK to decrypt the outsourced decryption ciphertext DCT and outputs the plaintext M.

[0020] 2h) Symmetric decryption algorithm SymDecrypt(SCT, key) → m: DU uses the symmetric key key to decrypt the original data ciphertext SCT and output the original data m.

[0021] 3) Build a fine-grained attribute revocation mechanism:

[0022] 3a) Update the attribute value by attribute index.

[0023] 3b) Only the attribute key component of the relevant users whose attribute has not been revoked is updated, and the ciphertext component related to the attribute is updated at the same time.

[0024] The technical solution of the present invention is:

[0025] A data security access control method based on blockchain, comprising the following steps:

[0026] 1) The attribute authority AA generates public parameters and a system master key, and then uploads the public parameters to the blockchain; defines a global attribute set U; assigns an attribute set S to the data user DU and generates a private key SK; and generates an outsourced decryption key DSK for the decryption server DSP;

[0027] 2) The data owner DO uses the symmetric encryption key to encrypt the plaintext and upload the resulting ciphertext SCT to the InterPlanetary File System (IPFS). The data owner then performs an on-chain operation on the ciphertext hash value corresponding to the ciphertext SCT returned by IPFS. The data owner DO formulates an access control policy for the ciphertext SCT and encrypts the symmetric encryption key to obtain the ciphertext CT.

[0028] 3) The encryption server ESP uses a policy-based attribute encryption algorithm to outsource encryption of the ciphertext CT to obtain the ciphertext ECT, and then uploads the ciphertext ECT to the blockchain;

[0029] 4) When the decryption server DSP receives the ciphertext hash value submitted by the data user DU and requests access to the ciphertext ECT, it determines whether the attribute set S of the DU satisfies the access control policy. If so, it uses the outsourced decryption key DSK to outsource decrypt the ciphertext ECT and returns the partial decryption result DCT to the DU;

[0030] 5) DU uses its own private key SK to decrypt DCT twice to obtain the symmetric encryption key; DU sends the ciphertext hash value to IPFS to request the symmetric encrypted ciphertext SCT, and then uses the symmetric encryption key to decrypt the symmetric encrypted ciphertext SCT returned by IPFS to obtain the plaintext information.

[0031] Furthermore, the InterPlanetary File System (IPFS) forms index blocks for the ciphertext SCT, stores the ciphertext SCT on the blockchain and generates the corresponding ciphertext hash value.

[0032] Furthermore, the ciphertext hash value is the file hash fingerprint path file hash .

[0033] Furthermore, the attribute authority AA generates public parameters and system master keys by first selecting two multiplication cyclic groups G and G with order p being a large prime number. T , g is a generator of G, bilinear mapping e:G×G→G T , define the attribute name set N = {att1,att2,…,att n}, where the i-th attribute name is att i There is a J below i attributes Define a set of global properties Then randomly select elements Calculate h = gβ , choose a collision-resistant hash function Select a random value for each attribute in the global attribute set U and calculate Where ind is the attribute index value; output public parameters and the system master key

[0034] Furthermore, the method for generating the private key SK and the outsourced decryption key DSK is as follows: first, randomly select an element Satisfying α1+α2=αmod p, calculate Then according to the attribute value set corresponding to the attribute set S Calculate for each attribute in the attribute set S Represents the hash of the j-th attribute value; output private key and outsourced decryption keys

[0035] Furthermore, the method for obtaining the ciphertext CT is as follows: first, randomly select a vector v=(s,y2,...,y n ), is the shared secret value, is a randomly selected blinding factor; the access strategy (A, ρ, F), A is a l×n matrix, and the single mapping function ρ maps the i-th row of the matrix A to an attribute index is the set of attribute values ​​corresponding to the attributes of (A,ρ); then calculate C = M·e(g,g) αs ,C′=g s ,λ i =A i v, where M is the plain text, A i Represents the i-th row in matrix A; output ciphertext file_hash is the ciphertext hash value.

[0036] Furthermore, ESP is for each attribute att in U i,ind Pick a random value calculate Then output the outsourced encrypted ciphertext

[0037] Furthermore, if the attribute set S and the corresponding attribute index value satisfy the policy (A, ρ), then for I = {i|ρ(i)∈S}, where I is the minimum authorized attribute index set that satisfies the access policy, the DSP calculates the partial decryption result

[0038] Furthermore, when it is necessary to revoke the attribute att of the data user DU, where the index value of the attribute att is ind and the attribute value is ratt,ind ; First, randomly select a new attribute value for the attribute att and calculate Update the att attribute value in Params and expose the new parameter Params * ; then calculate Update the outsourced decryption key DSK of other users whose attribute att has not been revoked to Then ESP selects a random value for the attribute att and calculate and , update ECT to

[0039] A data security access control system based on blockchain, characterized by comprising an attribute authority AA, an encryption server ESP, a decryption server DSP and an interplanetary file system IPFS; wherein

[0040] The attribute authority AA is used to generate public parameters and system master keys, and then upload the public parameters to the chain; define a global attribute set U; assign an attribute set S to the data user DU and generate a private key SK, and generate an outsourced decryption key DSK for the decryption server DSP;

[0041] The InterPlanetary File System (IPFS) is used to receive the ciphertext SCT obtained by the data owner DO using the symmetric encryption key to encrypt the plaintext, and return the ciphertext hash value corresponding to the ciphertext SCT to the data owner DO for on-chain operation; and when receiving the ciphertext hash value sent by the DU to request the symmetric encrypted ciphertext SCT, it returns the symmetric encrypted ciphertext SCT as the DU;

[0042] The encryption server ESP is used to receive the ciphertext CT and the access control policy of the ciphertext SCT obtained by encrypting the symmetric encryption key by the data owner DO; outsource the encryption of the ciphertext CT using the policy-based attribute encryption algorithm to obtain the ciphertext ECT, and upload the ciphertext ECT to the blockchain;

[0043] The decryption server DSP is used to determine whether the attribute set S of the DU satisfies the access control policy when receiving the ciphertext hash value submitted by the data user DU for access to the ciphertext ECT. If so, it uses the outsourced decryption key DSK to outsource decryption of the ciphertext ECT and returns the partial decryption result DCT to the DU; the DU uses its own private key SK to perform secondary decryption on the DCT to obtain the symmetric encryption key; and uses the symmetric encryption key to decrypt the symmetric encrypted ciphertext SCT returned by IPFS to obtain the plaintext information.

[0044] Compared with the prior art, the present invention has the following advantages:

[0045] This paper combines the distributed storage system IPFS and blockchain technology to construct a data security storage model for a specific scenario. The user's data is encrypted and stored in the distributed storage system IPFS, and its hash value can prevent the data ciphertext from being tampered with. Only the system's public parameters, file hash fingerprint path, and cloud server encryption and decryption logs are stored on the blockchain, reducing the storage burden of the blockchain.

[0046] This paper implements a lightweight, revocable data access control scheme using an improved CPABE encryption algorithm. This scheme supports fine-grained user-level attribute revocation and outsources most encryption and decryption computations to a third-party server, reducing computational overhead on the user side. The scheme is proven secure against chosen-plaintext attacks under the standard model based on the DBDH assumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a system model diagram of the present invention.

[0048] Figure 2 This is a flow chart of data storage and secure sharing in the present invention. DETAILED DESCRIPTION

[0049] The present invention will be described in further detail below with reference to the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.

[0050] The implementation steps of the present invention are as follows:

[0051] Step 1: Build a storage model that combines IPFS and blockchain

[0052] The system model proposed by the present invention is as follows Figure 1 As shown in the figure, it mainly consists of seven entities: attribute authority AA (Attribute Authority), data owner DO (Data Owner), data user DU (Data User), encryption server ESP (Encrypt Service Provider), decryption server DSP (Decrypt Service Provider), blockchain BC (Block Chain) and interplanetary file system IPFS (InterPlanetary File System)

[0053] 1a) AA: Responsible for generating system public parameters and system master keys and uploading public parameters to the blockchain; defining the global attribute set U; assigning an attribute set S to the DU and generating the private key SK; generating the outsourced decryption key DSK for the DSP.

[0054] 1b) DO: Responsible for uploading the ciphertext SCT obtained by encrypting the original plaintext using the symmetric encryption key to IPFS, and performing on-chain operations on the file hash value file_hash returned by IPFS; formulating access control policies and initially encrypting the symmetric encryption key to obtain the ciphertext CT.

[0055] 1c) ESP: Use a policy-based attribute encryption algorithm (i.e., set an access control policy to encrypt the content that needs to be encrypted and embed the access control policy in the ciphertext) to outsource the encryption of the initial encrypted ciphertext CT to obtain the ciphertext ECT, and then upload the ciphertext ECT to the chain.

[0056] 1d) DSP: When the DU submits the file hash value file_hash for access request, if the DU's attribute set S meets the access control policy, the ECT is outsourced decrypted using the DSK and the decryption result DCT is returned to the DU.

[0057] 1e) DU: Uses its own private key SK to perform a secondary decryption on the partial decryption result DCT returned by DSP to obtain the symmetric encryption key. At the same time, DU sends the file hash value file_hash to IPFS to request the symmetric encrypted ciphertext SCT, and uses the symmetric encryption key to decrypt the symmetric encrypted ciphertext SCT returned by IPFS to obtain the plaintext information.

[0058] 1f) BC: Storage system public parameters, file hash value file_hash and outsourced encrypted ciphertext ECT.

[0059] 1g) IPFS: Stores the original data ciphertext and returns the file hash fingerprint path to DO; uses the file hash value file_hash to find and return the original data ciphertext to DU.

[0060] Step 2: Build a secure and efficient data sharing mechanism

[0061] The safe and efficient data sharing process constructed by the present invention is as follows Figure 2 As shown in the figure, the data owner first encrypts the plaintext data using a symmetric encryption algorithm and uploads the ciphertext (SCT) to the IPFS system. The IPFS system returns the ciphertext SCT hash fingerprint path (file_hash). Next, the data owner encrypts the symmetric encryption key using the CPABE encryption algorithm proposed in this paper and sends the result and access policy to the encryption server ESP. ESP performs the outsourced encryption operation and stores the result (ECT) and hash fingerprint path on the blockchain.

[0062] When the data user DU accesses the data, the DSP first retrieves the ciphertext ECT on the blockchain for outsourced decryption and returns the result to DU. The data user DU uses its own private key to decrypt and obtain the symmetric encryption key, and uses the hash fingerprint path file_hash to obtain the data ciphertext SCT from IPFS for decryption.

[0063] 2a) System initialization phase

[0064] Setup(κ)→(Params,MSK): Input the system security parameter κ and select two multiplicative cyclic groups G and G with order p being a large prime number. T , g is a generator of G, constructing a bilinear mapping e:G×G→G T , AA defines the system attribute name set N = {att1,att2,...,att n}, where the attribute name is att i There is a J below i properties, Define a set of global properties Randomly select elements in Represent the nonnegative complete residue system modulo p, namely {1,2,...,p-1}, and calculate h=g β , choose a collision-resistant hash function Next, select a random value for each attribute in U Computed property public parameters Where ind is the attribute index value. Finally, the system public parameters are output. and the system master key Upload the public parameters Params to the blockchain.

[0065] 2b) Key Generation Phase

[0066] KeyGen(Params,MSK,S)→(SK,DSK): Input public parameters Params, system master key MSK and user attribute set The user attribute value set is Randomly select elements Satisfying α1+α2=αmod p, calculate For each attribute in S, calculate in Represents the hash of the attribute value. Finally, the user's private key is output and outsourced decryption keys

[0067] 2c) Data encryption stage

[0068] 2c1) Symmetric encryption

[0069] SymEncrypt(key,m)→SCT: First randomly select a symmetric key k∈G T Encrypt the original data m, then store the symmetric encrypted ciphertext SCT in IPFS, and finally IPFS returns the hash fingerprint path file_hash to DO.

[0070] 2c2) Initial encryption

[0071] DoEncrypt(Params,(A,ρ,F),M)→CT:DO obtains the public parameters Params from BC, inputs the access policy (A,ρ,F) and the symmetric key plaintext k. Randomly select vector v=(s,y2,...,y n ),in is the shared secret value, is a randomly selected blinding factor. Where A is a l×n matrix, and the single mapping function ρ maps each row of the A matrix to an attribute index is the set of attribute values ​​corresponding to the attributes of (A,ρ). Calculate C = k·e(g,g) αs ,C′=g s ,λ r =A r v, where A r Represents a row in matrix A. Finally, the initial ciphertext is output

[0072] 2c3) Outsourced encryption

[0073] EspEncrypt(Params,CT)→ECT: ESP is for each attribute att in U i,ind Pick a random value calculate Finally output the outsourced encrypted ciphertext

[0074] 2d) Data decryption stage

[0075] 2d1) Outsourcing Decryption

[0076] DspDecrypt(Params,ECT,DSK)→DCT: DSP obtains the public parameters Params and the outsourced encrypted ciphertext ECT from BC, and inputs the outsourced encrypted ciphertext ECT and the outsourced decryption key DSK. If the user attribute set S and the attribute index value ind satisfy the policy (A,ρ), then for I = {x|ρ(x)∈S}, where I is the minimum authorized attribute index set that satisfies the access policy, there exists an algorithm that can calculate the coefficients of the generator matrix A in polynomial time. Make Therefore, the DSP can calculate:

[0077]

[0078] DSP sends the outsourced decrypted ciphertext DCT to DU.

[0079] 2d2) User decryption

[0080] DuDecrypt(DCT,SK)→M: DU uses the private key SK and the outsourced decryption ciphertext DCT to calculate the plaintext k.

[0081]

[0082] 2d3) Symmetric decryption

[0083] SymDecrypt(SCT, k) → m: DU uses the ciphertext hash value file_hash to apply for the original ciphertext SCT from IPFS, and then uses the symmetric key k to decrypt the ciphertext to obtain the original data m.

[0084] Step 3: Build a fine-grained attribute revocation mechanism

[0085] Suppose the system needs to revoke an attribute att of a certain user.

[0086] 3a) Params Update

[0087] Setup(λ)→(Params*,MSK): Set the attribute att index value to ind and the original attribute value to r att,ind To ensure that other users with this attribute can still access it normally, a new attribute value is randomly selected. and calculate Update the att attribute value in Params and expose the new parameter Params * .

[0088] 3b)DSK Update

[0089] KeyGen(Params*,MSK,S)→(SK,DSK*): calculates att The outsourced decryption key DSK of other users whose attribute att has not been revoked is

[0090] 3c)ECT Update

[0091] EspEncrypt(Params*,CT)→ECT: ESP selects a random value for att and calculate and Update ECT to

[0092] The blockchain-based data security access control method designed by the application utilizes IPFS distributed storage of mass data ciphertext, the blockchain only stores a small amount of key information, and the improved CPABE cryptographic algorithm is adopted to realize the security access control of data, a full outsourcing model of encryption and decryption is constructed, the calculation efficiency problem of resource-restricted devices is solved, and meanwhile, the data hash fingerprints stored by the blockchain are used for verifying the correctness of outsourcing encryption and decryption.

[0093] The above-described embodiments are only used to illustrate the technical solutions of the present application, but not limit them; the embodiments have been specifically and concretely described for the present application, but should not be understood as limiting the scope of the application. It should be pointed out that, for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A data security access control method based on blockchain, comprising the following steps: 1) The attribute authority AA generates public parameters and the system master key, and then uploads the public parameters to the blockchain; Define the global attribute set U; Assign an attribute set S to the data user DU and generate a private key SK, and generate an outsourced decryption key DSK for the decryption server DSP; The method for the attribute authority AA to generate public parameters and system master keys is as follows: first, two multiplication cyclic groups G and G with order p being large prime numbers are selected. T , g is a generator of G, bilinear mapping e:G×G→G T , define the attribute name set N = {att1,att2,…,att n }, where the i-th attribute name is att i There is a J below i attributes n represents the number of system attribute names; Define a set of global properties Then randomly select elements Calculate h = g β , choose a collision-resistant hash function Select a random value for each attribute in the global attribute set U and calculate Where ind is the attribute index value; output public parameters and the system master key 2) The data owner DO uses the symmetric encryption key to encrypt the plaintext to obtain the ciphertext SCT and upload it to the Interstellar File System IPFS, and performs an on-chain operation on the ciphertext hash value corresponding to the ciphertext SCT returned by IPFS. The ciphertext hash value is the hash fingerprint path file_hash of the ciphertext SCT; formulate an access control policy for the ciphertext SCT and encrypt the symmetric encryption key to obtain the ciphertext CT; the method for obtaining the ciphertext CT is: first randomly select a vector v = (s, y2, ..., y θ ), is the shared secret value, is a randomly selected blinding factor, θ represents the dimension of the vector v; the access control policy (A, ρ, F), A is a matrix of l×θ, and the single mapping function ρ maps the i-th row of the matrix A to an attribute index ρ(i), is the set of attribute values ​​corresponding to the attributes of (A,ρ); then calculate C = M·e(g,g) αs ,C′=g s ,λ i =A i v, where M is the plain text, A i Represents the i-th row in matrix A; output ciphertext 3) The encryption server ESP uses a policy-based attribute encryption algorithm to outsource encryption of the ciphertext CT to obtain the ciphertext ECT, and then uploads the ciphertext ECT to the blockchain; 4) When the decryption server DSP receives the ciphertext hash value submitted by the data user DU and requests access to the ciphertext ECT, it determines whether the attribute set S of the DU satisfies the access control policy. If so, it uses the outsourced decryption key DSK to outsource decrypt the ciphertext ECT and returns the partial decryption result DCT to the DU; 5) DU uses its own private key SK to decrypt DCT twice to obtain the symmetric encryption key; DU sends the ciphertext hash value to IPFS to request the symmetric encrypted ciphertext SCT, and then uses the symmetric encryption key to decrypt the symmetric encrypted ciphertext SCT returned by IPFS to obtain the plaintext information.

2. The method according to claim 1, characterized in that The method of generating the private key SK and the outsourced decryption key DSK is as follows: first randomly select an element Satisfying α1+α2=αmod p, calculate Then according to the attribute value set corresponding to the attribute set S Calculate for each attribute in the attribute set S Represents the hash of the j-th attribute value; output private key and outsourced decryption keys 3. The method according to claim 2, characterized in that ESP is each attribute att in U i,ind Pick a random value calculate Then output the outsourced encrypted ciphertext 4. The method according to claim 3, characterized in that If the attribute set S and the corresponding attribute index value satisfy the policy (A, ρ), then for I = {i|ρ(i)∈S}, where I is the minimum authorized attribute index set that satisfies the access control policy, the DSP calculates the partial decryption result ω i is a set of coefficients such that 5. A data security access control system based on blockchain, characterized in that: Including attribute authority AA, encryption server ESP, decryption server DSP and interstellar file system IPFS; in The attribute authority AA is used to generate public parameters and system master keys, and then upload the public parameters to the chain; define a global attribute set U; assign an attribute set S to the data user DU and generate a private key SK, and generate an outsourced decryption key DSK for the decryption server DSP; The method for the attribute authority AA to generate public parameters and system master keys is as follows: first, two multiplication cyclic groups G and G with order p being large prime numbers are selected. T , g is a generator of G, bilinear mapping e:G×G→G T , define the attribute name set N = {att1,att2,…,att n }, where the i-th attribute name is att i There is a J below i attributes n represents the number of system attribute names; Define a set of global properties Then randomly select elements Calculate h = g β , choose a collision-resistant hash function Select a random value for each attribute in the global attribute set U and calculate Where ind is the attribute index value; output public parameters and the system master key The InterPlanetary File System (IPFS) is used to receive the ciphertext SCT obtained by encrypting the plaintext using the symmetric encryption key by the data owner DO, and return the ciphertext hash value corresponding to the ciphertext SCT to the data owner DO for on-chain operation. The ciphertext hash value is the hash fingerprint path file_hash of the ciphertext SCT. and when receiving a ciphertext hash value request from a DU to obtain a symmetric encrypted ciphertext SCT, returning the symmetric encrypted ciphertext SCT as a DU; The encryption server ESP is used to receive the ciphertext CT and the access control policy of the ciphertext SCT obtained by encrypting the symmetric encryption key by the data owner DO; outsource the encryption of the ciphertext CT using the policy-based attribute encryption algorithm to obtain the ciphertext ECT, and perform the chain operation on the ciphertext ECT; the method for obtaining the ciphertext CT is as follows: first randomly select a vector v = (s, y2, ..., y θ ), is the shared secret value, is a randomly selected blinding factor, θ represents the dimension of the vector v; the access control policy (A, ρ, F), A is a matrix of l×θ, and the single mapping function ρ maps the i-th row of the matrix A to an attribute index ρ(i), is the set of attribute values ​​corresponding to the attributes of (A,ρ); then calculate C = M·e(g,g) αs ,C′=g s ,λ i =A i v, where M is the plain text, A i Represents the i-th row in matrix A; output ciphertext The decryption server DSP is configured to, upon receiving a ciphertext hash value submitted by a data user DU for access to a ciphertext ECT, determine whether the DU's attribute set S satisfies the access control policy. If so, perform outsourced decryption on the ciphertext ECT using an outsourced decryption key DSK and return a partial decryption result DCT to the DU. The DU then uses its own private key SK to perform a secondary decryption on the DCT to obtain a symmetric encryption key. Use the symmetric encryption key to decrypt the symmetric encrypted ciphertext SCT returned by IPFS to obtain the plaintext information.

Citation Information

Patent Citations

  • Access control method based on LSSS and block chain

    CN116049853A

  • Ciphertext policy attribute encryption method supporting fine-grained attribute revocation

    CN116232685A