CN117972775A - Blockchain data privacy protection method supporting hierarchical authorization sharing and key updating - Google Patents

Blockchain data privacy protection method supporting hierarchical authorization sharing and key updating Download PDF

Info

Publication number
CN117972775A
CN117972775A CN202410039503.3A CN202410039503A CN117972775A CN 117972775 A CN117972775 A CN 117972775A CN 202410039503 A CN202410039503 A CN 202410039503A CN 117972775 A CN117972775 A CN 117972775A
Authority
CN
China
Prior art keywords
data
ciphertext
key
transaction data
blockchain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410039503.3A
Other languages
Chinese (zh)
Inventor
高莹
郭庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beihang University filed Critical Beihang University
Priority to CN202410039503.3A priority Critical patent/CN117972775A/en
Publication of CN117972775A publication Critical patent/CN117972775A/en
Pending legal-status Critical Current

Links

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application relates to the technical field of blockchains, in particular to a blockchain data privacy protection method supporting hierarchical authorization sharing and key updating, wherein the method comprises the following steps: acquiring an access request of transaction data sent by a data user terminal; acquiring a transaction data ciphertext uploaded by a data owner terminal, and encrypting the transaction data ciphertext by using a re-encryption key acquired from an authorization management server to obtain a re-encryption ciphertext; and responding to the access request, and sending the re-encrypted ciphertext to the data user terminal, wherein the data user terminal decrypts the re-encrypted ciphertext by using the encryption key, the current puncture key and the preset tag embedded in the ciphertext, which are acquired from the authorization management server, so as to obtain transaction data. Therefore, the problems that the cryptography technology in the related technology is low in applicability, the safety of transaction data cannot be guaranteed and the like are solved.

Description

Blockchain data privacy protection method supporting hierarchical authorization sharing and key updating
Technical Field
The application relates to the technical field of blockchains, in particular to a blockchain data privacy protection method supporting hierarchical authorization sharing and key updating.
Background
The blockchain is a distributed account book technology commonly maintained by multiple parties in a peer-to-peer network environment, has the characteristics of decentralization, traceability, non-falsification and the like, can provide an effective solution for safe storage, sharing and analysis of data, resource management and the like, and is widely applied to multiple fields of cryptocurrency, supply chains, internet of things, intelligent medical treatment and the like. However, in the open environment of a blockchain server, ledger information is stored on a plurality of untrusted nodes, all participating nodes can access transaction information, and an attacker extracts and analyzes transaction data by tracking the transaction flow, which constitutes a serious threat to user privacy.
In the related technology, the cryptographic technologies such as zero knowledge proof, ring signature and the like are utilized to provide higher privacy protection for the identity information and transaction data of the user, but the security of the transaction data cannot be ensured mainly aiming at anonymity and confidentiality of transactions on the decentralised cryptocurrency, high-efficiency expansion is difficult to realize, the availability is lower, and the method is not suitable for data security transmission sharing on a blockchain.
Disclosure of Invention
The application provides a blockchain data privacy protection method, a device and a storage medium supporting hierarchical authorization sharing and key updating, which are used for solving the problems that the cryptographic technology in the related technology has low applicability and the security of transaction data cannot be ensured.
An embodiment of a first aspect of the present application provides a blockchain data privacy protection method supporting hierarchical authorization sharing and key updating, the method being applied to a blockchain miner server, wherein the method includes the steps of: acquiring an access request of transaction data sent by a data user terminal; acquiring a transaction data ciphertext uploaded by a data owner terminal, and encrypting the transaction data ciphertext by using a re-encryption key acquired from an authorization management server to obtain a re-encryption ciphertext; and responding to the access request, and transmitting the re-encrypted ciphertext to the data user terminal, wherein the data user terminal decrypts the re-encrypted ciphertext by using the encryption key, the current puncture key and the preset tag embedded in the ciphertext acquired from the authorization management server to obtain the transaction data.
Optionally, the encrypting the transaction data ciphertext by using the re-encryption key acquired from the authorization management server obtains a re-encryption ciphertext, including: identifying an actual number of data users; obtaining a re-encryption key from an authorization management server according to the actual number, and expanding the transaction data ciphertext into a ciphertext in a target format according to the actual number; and encrypting the ciphertext in the target format by using the re-encryption key to obtain a re-encrypted ciphertext.
Optionally, the data owner terminal is further configured to: generating an autonomous delegation path with a target length by using the public key; generating a re-encryption key according to the autonomous delegation path and constructing a hierarchical authorization path table with a user authority priority order; and generating a transaction data ciphertext according to the preset label of the public key and the transaction data, uploading the transaction data ciphertext to the blockchain miner server, and uploading the re-encryption key and the hierarchical authorization path table to an authorization management server.
Optionally, the authorization management server is further configured to: acquiring a terminal identifier of a data user terminal; inquiring a hierarchical authorization path table in an authorization management server by taking a terminal identifier as an index to obtain the access right priority corresponding to the data user terminal; and determining a re-encryption key of the transaction data corresponding to the access request of the transaction data sent by the data user terminal based on the access right priority.
Optionally, the authorization management server is further configured to: acquiring a last level puncture key of the current access right priority; identifying a preset label in the transaction data secret; and obtaining the current puncture key based on the previous puncture key and a preset tag.
Optionally, after the access request for the transaction data sent by the acquired data user terminal, the method includes: acquiring a target account number in an access request; and verifying the legitimacy of the target account, if the target account legitimacy is that the encryption key, the current puncture key and the preset tag embedded in the secret are obtained from the authorization management server, otherwise, not responding to the operation.
An embodiment of the second aspect of the present application provides a blockchain data privacy protection method supporting hierarchical authorization sharing and key updating, the method being applied to a data user terminal, wherein the method comprises the following steps: sending an access request of transaction data to a blockchain miner server; receiving a re-encryption ciphertext of the transaction data ciphertext issued by the blockchain miner server; and decrypting the re-encrypted ciphertext by using the encryption key, the current puncture key and the preset tag embedded in the transaction data ciphertext which are acquired from the authorization management server to obtain the transaction data.
An embodiment of a third aspect of the present application provides a blockchain data privacy protection apparatus supporting hierarchical authorization sharing and key updating, the apparatus being applied to a blockchain miner server, wherein the apparatus includes: the first acquisition module is used for acquiring an access request of transaction data sent by the data user terminal; the second acquisition module is used for acquiring the transaction data ciphertext uploaded by the data owner terminal and encrypting the transaction data ciphertext by using the re-encryption key acquired from the authorization management server to obtain a re-encryption ciphertext; and the response module is used for responding to the access request and sending the re-encrypted ciphertext to the data user terminal, wherein the data user terminal decrypts the transaction data ciphertext by utilizing the encryption key, the current puncture key and the preset tag embedded in the ciphertext which are acquired from the authorization management server to obtain the transaction data.
An embodiment of a fourth aspect of the present application provides a blockchain data privacy protection apparatus supporting hierarchical authorization sharing and key updating, the apparatus being applied to a data user terminal, wherein the apparatus includes: the sending module is used for sending an access request of the transaction data to the blockchain miner server; the receiving module is used for receiving the re-encrypted ciphertext of the transaction data ciphertext issued by the blockchain miner server; and the decryption module is used for decrypting the re-encrypted ciphertext by utilizing the encryption key, the current puncture key and the preset tag embedded in the transaction data ciphertext which are acquired from the authorization management server to obtain the transaction data.
A fifth aspect of the embodiments of the present application provides a computer readable storage medium having stored thereon a computer program for execution by a processor for implementing a blockchain data privacy protection method supporting hierarchical authorization sharing and key updating as described in the above embodiments.
Therefore, the application has at least the following beneficial effects:
(1) The embodiment of the application constructs a puncturable autonomous path proxy re-encryption algorithm suitable for a blockchain. And a puncturable autonomous path agent re-encryption algorithm is constructed by combining an autonomous path agent re-encryption technology and a puncturable encryption technology, so that ciphertext access control is enhanced, and meanwhile, a secret key can be punctured and updated.
(2) The embodiment of the application designs a user hierarchical authorization data sharing mechanism. The data owner terminal divides the access authority priority of the data user, the authorization management server manages the access authority of the data user, and the user authorization hierarchical controllable blockchain data sharing is realized while the privacy of the blockchain data is protected.
(3) The embodiment of the application can realize the forward security of the block chain data sharing. The data user terminal can update the own secret key periodically without the assistance of a third party, and the decryption capability of the secret key to the past transaction data is withdrawn, so that forward security is realized, and the data security problem caused by the exposure of the secret key in the blockchain server is solved.
Additional aspects and advantages of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the application.
Drawings
The foregoing and/or additional aspects and advantages of the application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a flow chart of a blockchain data privacy protection method supporting hierarchical authorization sharing and key updating provided in accordance with an embodiment of the present application;
FIG. 2 is a flow chart of a blockchain data privacy protection method supporting hierarchical authorization sharing and key updating in accordance with another embodiment of the present application;
FIG. 3 is a system architecture diagram of a blockchain data privacy protection method supporting hierarchical authorization sharing and key updating provided in accordance with an embodiment of the present application;
FIG. 4 is a flow chart of a blockchain data privacy protection method supporting hierarchical authorization sharing and key updating provided in accordance with an embodiment of the present application;
FIG. 5 is a block diagram of a blockchain data privacy preserving apparatus supporting hierarchical authorization sharing and key updating provided in accordance with an embodiment of the present application;
Fig. 6 is a block diagram of a blockchain data privacy preserving apparatus supporting hierarchical authorization sharing and key updating in accordance with another embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present application and should not be construed as limiting the application.
The blockchain is a distributed account book technology commonly maintained by multiple parties in a peer-to-peer network environment, has the characteristics of decentralization, traceability, non-falsification and the like, can provide an effective solution for safe storage, sharing and analysis of data, resource management and the like, and is widely applied to multiple fields of cryptocurrency, supply chains, internet of things, intelligent medical treatment and the like. However, in the open environment of a blockchain server, ledger information is stored on a plurality of untrusted nodes, all participating nodes can access transaction information, and an attacker extracts and analyzes transaction data by tracking the transaction flow, which constitutes a serious threat to user privacy. Innovative applications based on blockchain technology are continuously developed, and the problem of privacy data leakage is widely focused by academia and industry.
Based on the deep study on the privacy protection of the blockchain transaction, the cryptographic technologies such as zero knowledge proof, homomorphic encryption, ring signature and the like are utilized to provide higher privacy protection for the identity information and the transaction data of the user, but the method is mainly aimed at anonymity and confidentiality of the transaction on the decentralised cryptocurrency, is difficult to realize efficient expansion, has low usability and is not suitable for safe transmission and sharing of the data on the blockchain.
The attribute encryption supports fine-grained access control, a data owner can define an access policy by himself, only data users meeting the attribute can access the data, and the attribute encryption and the blockchain technology are combined, so that the blockchain data can be safely shared. However, it is difficult to deploy when the user access rights are updated, flexibility is lacking, repeated encryption of data is required when the user's data access rights are added or removed in the blockchain system, and the private key of the data user must be updated with the updated attributes, increasing computational overhead and communication overhead.
The proxy re-encryption technology supports the transfer of decryption authority on the basis of public key encryption, data do not need to be repeatedly encrypted when the authorization is changed, a user only needs to calculate a new proxy re-encryption key and send the new proxy re-encryption key to a proxy, the dynamic update of the access authority can be realized, and the method has application value in the safe sharing of block chain data. However, once the proxy re-encryption key is broadcast into the blockchain server, the data owner will not have control over the access rights priority of the data user. In the related art, the encryption scheme of the autonomous path agent can control the agent to convert the ciphertext on a specific path, and the decryption authority priorities of all authorized users on the path are specified by a data owner, so that the controllable data sharing of the authorized path can be realized.
Furthermore, in blockchain systems, security of user keys is particularly important, and in particular mobile devices and low-priced accounts may be vulnerable to attacks without good key protection. When the secret state data is transmitted in the blockchain server, if the user key is lost and revealed, an attacker can directly decrypt the encrypted data shared before, and serious threat is caused to the privacy of the transaction data. In order to improve the security of the blockchain data, the data user should update the own secret key after acquiring the data so as to cancel the decryption capability of the data, thereby realizing the forward security.
The application realizes the privacy protection of the blockchain data based on the autonomous path agent re-encryption technology and the puncturable encryption technology, supports controllable user hierarchical authorization sharing, and simultaneously can update the secret key by the data user.
The block chain data privacy protection method, device and storage medium supporting hierarchical authorization sharing and key updating according to the embodiment of the application are described below with reference to the accompanying drawings. Specifically, fig. 1 is a schematic flow chart of a blockchain data privacy protection method supporting hierarchical authorization sharing and key updating according to an embodiment of the present application.
As shown in fig. 1, the blockchain data privacy protection method supporting hierarchical authorization sharing and key updating is applied to a blockchain miner server, wherein the method comprises the following steps:
In step S101, an access request for transaction data transmitted from a data user terminal is acquired.
It can be appreciated that the embodiment of the application can acquire the access request of the transaction data sent by the data user terminal, so as to facilitate the subsequent acquisition of the corresponding transaction data for the access request.
In the embodiment of the present application, after obtaining an access request of transaction data sent by a data user terminal, the method includes: acquiring a target account number in an access request; and verifying the legitimacy of the target account, and if the target account is legal, acquiring the encryption key, the current puncture key and the preset tag embedded in the password from the authorization management server, otherwise, not responding to the operation.
It can be understood that when verifying that the target account number of the data user terminal access request is legal, the embodiment of the application can acquire the encryption key, the current puncture key and the preset tag embedded in the secret from the authorization management server, so as to facilitate subsequent decryption of encrypted transaction data, puncture the key, cancel the decryption capability of the key on the designated message and realize forward security.
In step S102, the transaction data ciphertext uploaded by the data owner terminal is acquired, and the transaction data ciphertext is encrypted using the re-encryption key acquired from the authorization management server to obtain a re-encryption ciphertext.
It can be understood that the embodiment of the application can acquire the transaction data ciphertext uploaded by the data owner terminal, encrypt the transaction data ciphertext from the re-encryption key acquired by the authorization management server to obtain the re-encryption ciphertext, encrypt the transaction data to obtain the transaction data ciphertext, and re-encrypt the transaction data ciphertext, so that the security of the transaction data can be enhanced by multiple times of encryption.
In the embodiment of the present application, the data owner terminal is further configured to: generating an autonomous delegation path with a target length by using the public key; generating a re-encryption key according to the autonomous delegation path and constructing a hierarchical authorization path table with a user authority priority order; and generating a transaction data ciphertext according to the preset label of the public key and the transaction data, uploading the transaction data ciphertext to the blockchain miner server, and uploading the re-encryption key and the hierarchical authorization path table to the authorization management server.
The target length may be set according to actual requirements, and is not specifically limited.
It can be understood that the embodiment of the application generates the autonomous delegation path with the target length by using the public key, generates the re-encryption key based on the autonomous delegation path and constructs the hierarchical authorization path table with the user authority priority order, generates the transaction data ciphertext according to the preset label of the public key and the transaction data, uploads the transaction data ciphertext to the blockchain miner server, uploads the re-encryption key and the hierarchical authorization path table to the authorization management server so as to conveniently call the transaction data from the blockchain miner server subsequently, and calls the re-encryption key and the hierarchical authorization path table corresponding to the transaction data from the authorization management server, thereby realizing the sharing of the blockchain data with controllable user authorization hierarchy between the data owner and the data user.
Specifically, the transaction data is broadcast to the blockchain server after being initially encrypted, specifically as follows:
(1) CREATPATH (param, pk u)→(Pau, l): the data owner u outputs an autonomous delegation path of length l using the public key pk u,
(2)The data owner u generates a proxy re-encryption key and constructs a hierarchical authorization path table with user authority priority order, and the method is concretely realized as follows:
When v=1, …, l, the data owner u selects X v←G1,rv←Zp. For v=1, calculate For v=2, …, l, calculateGenerating proxy re-encryption key/>And constructing a corresponding hierarchical authorization path table and sending the hierarchical authorization path table to an authorization management node.
(3)The input data owner's public key pk u and a set of tags, and message m, generate an initial transaction data ciphertext. The specific calculation is as follows:
The data owner selects the random number s epsilon Z p to calculate C2=gs,C(3,1)=V(H1(t1))s,…,C(3,d)=V(H1(td))s, Initial ciphertext/>And broadcasts the initial transaction data ciphertext to the blockchain server.
In the embodiment of the application, encrypting the transaction data ciphertext by using the re-encryption key acquired from the authorization management server to obtain the re-encryption ciphertext comprises the following steps: identifying an actual number of data users; obtaining a re-encryption key from the authorization management server according to the actual number, and expanding the transaction data ciphertext into a ciphertext in a target format according to the actual number; and encrypting the ciphertext in the target format by using the encryption key to obtain a re-encrypted ciphertext.
It can be understood that the embodiment of the application can determine the access priority of the data user according to the actual number of the data user, acquire the re-encryption key from the authorization management server based on the access priority, and expand the ciphertext of the transaction data into the ciphertext of the target format according to the actual number, encrypt the ciphertext of the target format by using the re-encryption key to obtain the re-encryption ciphertext, thereby realizing re-encryption of the ciphertext of the transaction data and enhancing the security of the transaction data.
It should be noted that the ciphertext in the target format may beThe specific limitation is not particularly restricted.
Specifically, a proxy re-encryption key for the legal user with the highest access authority is firstly sent to a blockchain miner server, the miner server executes ReEnc algorithm, the proxy re-encryption key is used for re-encrypting the initial transaction ciphertext, and the converted re-encrypted transaction ciphertext is sent to a data user.
After the current user data sharing is completed, the authorization management node sends the proxy re-encryption key for the next-stage legal user to the miner server, the miner server executes ReEnc algorithm by using the proxy re-encryption key, performs ciphertext conversion again on the current re-encryption ciphertext, and sends the new re-encryption ciphertext to the next-stage legal user, and the rest data users on the hierarchical authorization path table and so on to complete data sharing, specifically: The miner server executing the algorithm will/> Ciphertext conversion under/>The following ciphertext is calculated specifically as follows:
When v=0, the mineworker server expands the initial ciphertext into Re-encryption key/>When v is more than or equal to 1, the miner server encrypts ciphertext/>Is unfolded intoThe re-encryption key is/> Miner server computation on blockchainGenerating re-encrypted ciphertext/>And sent to the corresponding data user.
In step S103, in response to the access request, the re-encrypted ciphertext is issued to the data user terminal, where the data user terminal decrypts the re-encrypted ciphertext using the encryption key, the current puncture key, and the preset tag embedded in the ciphertext obtained from the authorization management server to obtain the transaction data.
The preset label may be t e { t 1,t2,…,td }, which may be selected according to practical situations, and is not specifically limited.
It can be understood that the embodiment of the application can respond to the access request and send the re-encrypted ciphertext to the data user terminal, wherein the data user terminal decrypts the re-encrypted ciphertext by using the encryption key, the current puncture key and the preset tag embedded in the ciphertext obtained from the authorization management server to obtain transaction data, can cancel the decryption capability of the key on the past transaction data, realizes the forward security of the blockchain data sharing, and solves the data security problem caused by the exposure of the key in the blockchain server.
In an embodiment of the present application, the authorization management server is further configured to: acquiring a terminal identifier of a data user terminal; inquiring a hierarchical authorization path table in an authorization management server by taking a terminal identifier as an index to obtain an access right priority corresponding to a data user terminal; and determining a re-encryption key of the transaction data corresponding to the access request of the transaction data sent by the data user terminal based on the access right priority.
It can be understood that, in the embodiment of the application, the access authority priority corresponding to the data user terminal can be determined by inquiring the hierarchical authorization path table according to the terminal identification of the data user terminal, so as to determine the re-encryption key of the transaction data corresponding to the access request of the transaction data sent by the data user terminal, and the authorization management server manages the access authority of the data user, thereby realizing the sharing of the blockchain data with controllable user authorization hierarchy while protecting the privacy of the blockchain data.
In an embodiment of the present application, the authorization management server is further configured to: acquiring a previous level puncture key of the current access right priority; identifying a preset label in a transaction data secret; and obtaining the current puncture key based on the previous puncture key and the preset label.
It can be understood that the embodiment of the application can obtain the current puncture key according to the previous puncture key of the current access right priority and the preset label in the transaction data key.
Specifically, after the data user obtains the transaction data, in order to achieve the forward security of the transaction data sharing, the data user needs to revoke the decryption capability of the key for the specific transaction data, and then executes the puncturing algorithm Puncture by using the tag t e { t 1,t2,…,td } and the puncturing key PSK i-1 embedded in the transaction data secret, so as to obtain the updated current puncturing key PSK i.
Puncture (param, PSK i-1,t)→PSKi: the data user can execute the algorithm to puncture the puncture key to update it, and to revoke the decryption capability of the key to a specific message, as specifically calculated below:
Given an existing key PSK i-1, the data user first expands PSK i-1 to [ PSK 0,psk1,…,pski-1 ], and then expands PSK 0 to Next, randomly selecting λ, r', r t from Z p, calculating Finally, the puncture key PSK i=[psk0′,psk1,…,pski-1,pski is output.
According to the blockchain data privacy protection method supporting hierarchical authorization sharing and key updating, which is provided by the embodiment of the application, the access request of transaction data sent by the data user terminal and the transaction data ciphertext uploaded by the data owner terminal are obtained, the transaction data ciphertext is encrypted by using the re-encryption key obtained from the authorization management server to obtain the re-encryption ciphertext, the re-encryption ciphertext is sent to the data user terminal, the data user terminal decrypts the re-encryption ciphertext by using the encryption key obtained from the authorization management server, the current puncture key and the preset tag embedded in the ciphertext to obtain the transaction data, and a puncturable autonomous path proxy re-encryption algorithm is constructed by combining an autonomous path proxy re-encryption technology and a puncturable encryption technology, so that ciphertext access control is enhanced, meanwhile, the key can be punctured and updated, and the forward security of blockchain data sharing is realized.
Next, a blockchain data privacy protection method supporting hierarchical authorization sharing and key updating according to an embodiment of the present application will be described with reference to the accompanying drawings.
Fig. 2 is a flow chart of a blockchain data privacy protection method supporting hierarchical authorization sharing and key updating in accordance with an embodiment of the present application.
As shown in fig. 2, the blockchain data privacy protection method supporting hierarchical authorization sharing and key updating is applied to a data user terminal, wherein the method comprises the following steps:
in step S201, an access request for transaction data is sent to a blockchain miner server.
It can be appreciated that the embodiment of the application can send the access request of the transaction data to the blockchain miner server so as to obtain the transaction data later.
In step S202, the re-encrypted ciphertext of the transaction data ciphertext issued by the blockchain miner server is received.
It can be appreciated that the embodiment of the application can receive the re-encrypted ciphertext of the transaction data ciphertext issued by the blockchain miner server, thereby solving the data security problem caused by the exposure of the secret key in the blockchain server.
In step S203, the re-encrypted ciphertext is decrypted using the encryption key, the current puncture key, and a preset tag embedded in the transaction data ciphertext, which are acquired from the authorization management server, to obtain the transaction data.
It can be understood that the embodiment of the application can decrypt the re-encrypted ciphertext from the encryption key, the current puncture key and the preset tag embedded in the transaction data ciphertext acquired by the authorization management server to obtain the transaction data, thereby canceling the decryption capability of the key on the past transaction data and realizing the forward security of the blockchain data sharing.
According to the blockchain data privacy protection method supporting hierarchical authorization sharing and key updating, which is provided by the embodiment of the application, an access request of transaction data is sent to a blockchain miner server, a re-encryption ciphertext of transaction data ciphertext issued by the blockchain miner server is received, and the re-encryption ciphertext is decrypted by utilizing an encryption key acquired by an authorization management server, a current puncture key and a preset tag embedded in the transaction data ciphertext to obtain the transaction data, so that the decryption capability of the key on past transaction data is cancelled, the forward security of the blockchain data sharing is realized, and the data security problem caused by exposure of the key in the blockchain server is solved.
The following details of the blockchain data privacy protection method supporting hierarchical authorization sharing and key updating will be described with reference to fig. 3 and 4, and as shown in fig. 3, the following embodiments relate to a data owner terminal, a data user terminal, an authorization management server, and a miner server for maintaining blockchains, which are specifically as follows:
(1) A data owner terminal: encrypting the shared transaction data to generate an initial transaction data ciphertext, defining data user access rights priority, generating a proxy re-encryption key, and constructing a hierarchical authorization path table. The transaction with the initial ciphertext appended is broadcast to the blockchain network and the hierarchical authorization path table is transmitted to the authorization management node.
(2) Data user terminal: and requesting to access the transaction data on the blockchain, and obtaining the transaction data from the blockchain, and decrypting to obtain the transaction data after the transaction data is encrypted and encrypted again. The key can be punctured to revoke its ability to decrypt the specified message, enabling forward security, while the key's ability to decrypt other transaction data is unaffected. The data user terminal can be used as a light node in the block chain system for data sharing.
(3) The authorization management server: the authorization management server completes the registration of the user node and the distribution of the secret key. And managing the user access rights according to the rights priority of the data user terminal in the hierarchical authorization path table. And sending the corresponding proxy re-encryption key aiming at the legal data user terminal to the blockchain miner node to realize the safe sharing of the transaction data. The data owner terminal can trust and interact with the blockchain authorization management node to update the access authority of the data user, thereby realizing dynamic authorization.
(4) Miner servers maintaining blockchains: and acquiring a proxy re-encryption key of the corresponding legal data user from the authorization management server, re-encrypting the transaction data ciphertext by using the proxy re-encryption key, and after ciphertext conversion is completed, sending the re-encryption ciphertext of the transaction data to the data user terminal. Broadcasting the transaction record in a period of time, and adding the block which passes the common identification verification into the blockchain ledger.
In order to implement the above method, as shown in fig. 4, the present invention is mainly divided into 4 stages, namely, a system establishment stage, a transaction data uploading stage, a data access stage and a key updating stage.
1. In the system establishment stage, system parameters are initialized, and a public and private key pair and an initial puncture key are generated.
(1) Setup (1 λ, d) →param: the authorization management node executes a system initialization algorithm, inputs a security parameter lambda and the maximum tag number d embedded in the ciphertext, and outputs a system public parameter.
Specifically, the algorithm selects a group G, G 1, with order p, the generator of G is G, bilinear map e: gxg→g 1, defining a hash function: h 1:{0,1}*→Zp,H2:G1 →g, randomly selecting α, β e Z p, calculating G 1=gα,g2=gβ, the master key msk=α, selecting a d-degree polynomial q (x) to satisfy q (0) =β, and letting V (x) =g q(x). T 0 is selected as the initial label, which is no longer used in subsequent operations. Outputting system disclosure parameters param=(G,G1,e,p,g,g1,g2,H1,H2,gq(1),…,gq (d)). where parameter g 2,gq(1),…,gq(d) may allow either party to calculate V (x) by lagrangian interpolation.
(2) KeyGen (param, msk, u) → (pk u,sku,PSK0): the authorization management node executes a key generation algorithm, inputs a system public parameter param, a master key msk and a user index u. Randomly select x u∈Zp, user u's private key sk u=xu, public keyRandomly selecting r epsilon Z p, and corresponding initial puncture key/>, of user u
2. In the transaction data uploading stage, the data owner divides the access authority priority of the data user, generates a proxy re-encryption key, constructs a hierarchical authorization path table and sends the hierarchical authorization path table to an authorization management node of the blockchain system. And meanwhile, the data owner encrypts the transaction data to generate an initial transaction ciphertext and broadcasts the transaction with the initial ciphertext to the blockchain server.
(1) CREATPATH (param, pk u)→(Pau, 1): the data owner u outputs an autonomous delegation path of length l using the public key pk u,
(2)The data owner u generates a proxy re-encryption key and constructs a hierarchical authorization path table with user authority priority order, and the method is concretely realized as follows:
when v=1, …, l, the data owner u selects X v←G1,rv←Zp. For v=1, calculate For v=2, …, l, calculateGenerating proxy re-encryption key/>And constructing a corresponding hierarchical authorization path table and sending the hierarchical authorization path table to an authorization management node.
(3)The input data owner's public key pku and a set of tags, and message m, generate the initial transaction data ciphertext. The specific calculation is as follows:
the data owner selects the random number s epsilon z p to calculate C2=gs,C(3,1)=V(H1(t1))s,…,C(3,d)=V(H1(td))s, Initial ciphertext/>And broadcasting the initial transaction data ciphertext to the blockchain network.
3. And in the data access stage, the authorization management node verifies the access authority of the data user according to the hierarchical authorization path table, and then sends the proxy re-encryption key for the legal user to the blockchain miner node. The miner node uses the proxy re-encryption key to re-encrypt the initial transaction ciphertext and sends the converted re-encrypted transaction ciphertext to the data user. The data user decrypts the re-encrypted transaction ciphertext to obtain transaction data.
The data user sends a data access request to the blockchain, and the authorization management node verifies the access authority of the data user according to the hierarchical authorization path table, and firstly sends a proxy re-encryption key for the legal user with the highest access authority to the blockchain miner node. The miner node executes ReEnc an algorithm, re-encrypts the initial transaction ciphertext using the proxy re-encryption key, and sends the converted re-encrypted transaction ciphertext to the data user. The data user executes the Dec algorithm and can decrypt the re-encrypted transaction ciphertext to obtain transaction data. After the current user data sharing is completed, the authorization management node sends the proxy re-encryption key for the next-stage legal user to the miner node, the miner node executes ReEnc algorithm by using the proxy re-encryption key, carries out ciphertext conversion again on the current re-encryption ciphertext, and sends the new re-encryption ciphertext to the next-stage legal user, and the rest data users on the hierarchical authorization path table and so on to complete the data sharing. The data owner can interact with the block chain authorization management node to update the access authority of the data user, so as to realize dynamic authorization.
(1)The miner node executing the algorithm will/>Ciphertext conversion under/>The following ciphertext is calculated specifically as follows:
When v=0, the mineworker node expands the initial ciphertext into Re-encryption keyWhen v is greater than or equal to 1, the mineworker node encrypts ciphertext/>Is unfolded intoThe re-encryption key is/> Miner node computation on blockchainGenerating re-encrypted ciphertext/>And sent to the corresponding data user.
(2)The algorithm is executed by the data user and can utilize the private key/>Current puncture key PSK i, and tag t 1,…,td embedded in the ciphertext, re-encrypt ciphertext/>Decryption is performed, and the specific calculation is as follows:
For the received re-encrypted ciphertext, the data user v may expand the ciphertext into PSK i was then spread to [ PSK 0,psk1,…,pski ], and PSK j was spread to/>, for j=0, …, i, respectivelyCalculate a set of coefficients w 1,w2,…,wd,w* to satisfy/>RecalculatingRecalculating/>Finally outputTransaction data is obtained.
4. And in the key updating stage, the data user performs puncture updating on the current puncture key and removes the decryption capability of the key on specific transaction data.
After the data user obtains the transaction data, in order to realize the forward security of the transaction data sharing, the data user needs to cancel the decryption capability of the key for the specific transaction data, and then executes the puncturing algorithm Puncture by using the tag t e { t 1,t2,…,td } embedded in the transaction data secret and the current puncturing key PSK i-1 to obtain the updated key PSK i. The method comprises the following steps:
Puncture (param, PSK i-1,t)→PSKi: the data user can execute the algorithm to puncture the puncture key to update it, and to revoke the decryption capability of the key to a specific message, as specifically calculated below:
Given an existing key PSK i-1, the data user first expands PSK i-1 to [ PSK 0,psk1,…,pski-1 ], and then expands PSK 0 to Next, randomly selecting λ ', r', r t from Z p, and calculating Finally, the puncture key PSK i=[psk0′,psk1,…,pski-1,pski is output.
In summary, the embodiment of the application not only protects the privacy of transaction data, but also realizes controllable user grading authorization data sharing, and meanwhile, the data user can update the secret key by itself, thereby realizing the forward security of blockchain data sharing.
Next, a blockchain data privacy protection apparatus supporting hierarchical authorization sharing and key updating according to an embodiment of the present application will be described with reference to the accompanying drawings.
Fig. 5 is a block diagram of a blockchain data privacy preserving device supporting hierarchical authorization sharing and key updating in accordance with an embodiment of the present application.
As shown in fig. 5, the blockchain data privacy protection device 10 supporting hierarchical authorization sharing and key updating includes: a first acquisition module 110, a second acquisition module 120, and a response module 130.
The first acquiring module 110 is configured to acquire an access request of transaction data sent by the data user terminal; the second obtaining module 120 is configured to obtain a transaction data ciphertext uploaded by the data owner terminal, and encrypt the transaction data ciphertext with the re-encryption key obtained from the authorization management server to obtain a re-encryption ciphertext; the response module 130 is configured to respond to the access request, and send the re-encrypted ciphertext to the data user terminal, where the data user terminal decrypts the transaction data ciphertext using the encryption key, the current puncture key, and the preset tag embedded in the ciphertext obtained from the authorization management server to obtain the transaction data.
It should be noted that the foregoing explanation of the embodiment of the blockchain data privacy protection method supporting hierarchical authorization sharing and key updating is also applicable to the blockchain data privacy protection device supporting hierarchical authorization sharing and key updating of this embodiment, and will not be repeated here.
According to the blockchain data privacy protection device supporting hierarchical authorization sharing and key updating, which is provided by the embodiment of the application, the access request of transaction data sent by the data user terminal and the transaction data ciphertext uploaded by the data owner terminal are acquired, the transaction data ciphertext is encrypted by using the re-encryption key acquired from the authorization management server to obtain the re-encryption ciphertext, the re-encryption ciphertext is sent to the data user terminal, the data user terminal decrypts the re-encryption ciphertext by using the encryption key acquired from the authorization management server, the current puncture key and the preset tag embedded in the ciphertext to obtain the transaction data, and a puncturable autonomous path proxy re-encryption algorithm is constructed by combining an autonomous path proxy re-encryption technology and a puncturable encryption technology, so that ciphertext access control is enhanced, meanwhile, the key can be punctured and updated, and the forward security of blockchain data sharing is realized.
Next, a blockchain data privacy protection apparatus supporting hierarchical authorization sharing and key updating according to an embodiment of the present application will be described with reference to the accompanying drawings.
Fig. 6 is a block diagram of a blockchain data privacy preserving device supporting hierarchical authorization sharing and key updating in accordance with an embodiment of the present application.
As shown in fig. 6, the blockchain data privacy protection device 20 supporting hierarchical authorization sharing and key updating includes: the sending module 210, the receiving module 22 and the decrypting module 230.
The sending module 210 is configured to send an access request of the transaction data to the blockchain miner server; the receiving module 220 is configured to receive a re-encrypted ciphertext of the transaction data ciphertext sent by the blockchain miner server; the decryption module 230 is configured to decrypt the re-encrypted ciphertext using the encryption key, the current puncture key, and a preset tag embedded in the transaction data ciphertext obtained from the authorization management server, to obtain the transaction data.
It should be noted that the foregoing explanation of the embodiment of the blockchain data privacy protection method supporting hierarchical authorization sharing and key updating is also applicable to the blockchain data privacy protection device supporting hierarchical authorization sharing and key updating of this embodiment, and will not be repeated here.
According to the blockchain data privacy protection device supporting hierarchical authorization sharing and key updating, which is provided by the embodiment of the application, an access request of transaction data is sent to a blockchain miner server, a re-encryption ciphertext of transaction data ciphertext issued by the blockchain miner server is received, and the re-encryption ciphertext is decrypted by utilizing an encryption key acquired by an authorization management server, a current puncture key and a preset tag embedded in the transaction data ciphertext to obtain the transaction data, so that the decryption capability of the key on past transaction data is cancelled, the forward security of the blockchain data sharing is realized, and the data security problem caused by exposure of the key in the blockchain server is solved.
Embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a blockchain data privacy protection method supporting hierarchical authorization sharing and key updating as described above.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or N embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, "N" means at least two, for example, two, three, etc., unless specifically defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and additional implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order from that shown or discussed, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the N steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. As with another embodiment, if implemented in hardware, may be implemented with a combination of any one or more of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable gate arrays, field programmable gate arrays, and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.

Claims (10)

1. A blockchain data privacy protection method supporting hierarchical authorization sharing and key updating, the method being applied to a blockchain miner server, wherein the method comprises the steps of:
Acquiring an access request of transaction data sent by a data user terminal;
Acquiring a transaction data ciphertext uploaded by a data owner terminal, and encrypting the transaction data ciphertext by using a re-encryption key acquired from an authorization management server to obtain a re-encryption ciphertext;
And responding to the access request, and transmitting the re-encrypted ciphertext to the data user terminal, wherein the data user terminal decrypts the re-encrypted ciphertext by using the encryption key, the current puncture key and the preset tag embedded in the ciphertext acquired from the authorization management server to obtain the transaction data.
2. The blockchain data privacy protection method supporting hierarchical authorization sharing and key updating as in claim 1, wherein encrypting the transaction data ciphertext using a re-encryption key obtained from an authorization management server results in a re-encryption ciphertext comprising:
identifying an actual number of data users;
Obtaining a re-encryption key from an authorization management server according to the actual number, and expanding the transaction data ciphertext into a ciphertext in a target format according to the actual number;
and encrypting the ciphertext in the target format by using the re-encryption key to obtain a re-encrypted ciphertext.
3. The blockchain data privacy protection method supporting hierarchical authorization sharing and key updating of claim 1, wherein the data owner terminal is further configured to:
generating an autonomous delegation path with a target length by using the public key;
Generating a re-encryption key according to the autonomous delegation path and constructing a hierarchical authorization path table with a user authority priority order;
And generating a transaction data ciphertext according to the preset label of the public key and the transaction data, uploading the transaction data ciphertext to the blockchain miner server, and uploading the re-encryption key and the hierarchical authorization path table to an authorization management server.
4. The blockchain data privacy protection method supporting hierarchical authorization sharing and key updating as in claim 3, wherein the authorization management server is further configured to:
acquiring a terminal identifier of a data user terminal;
Inquiring a hierarchical authorization path table in an authorization management server by taking a terminal identifier as an index to obtain the access right priority corresponding to the data user terminal;
And determining a re-encryption key of the transaction data corresponding to the access request of the transaction data sent by the data user terminal based on the access right priority.
5. The blockchain data privacy protection method supporting hierarchical authorization sharing and key updating as in claim 1 or 2, wherein the authorization management server is further configured to:
acquiring a last level puncture key of the current access right priority;
Identifying a preset label in the transaction data secret;
and obtaining the current puncture key based on the previous puncture key and a preset tag.
6. The blockchain data privacy protection method supporting hierarchical authorization sharing and key updating as in claim 1, comprising, after the access request to the transaction data sent by the data acquisition user terminal:
Acquiring a target account number in an access request;
And verifying the legitimacy of the target account, if the target account legitimacy is that the encryption key, the current puncture key and the preset tag embedded in the secret are obtained from the authorization management server, otherwise, not responding to the operation.
7. A blockchain data privacy protection method supporting hierarchical authorization sharing and key updating, the method being applied to a data user terminal, wherein the method comprises the steps of:
Sending an access request of transaction data to a blockchain miner server;
Receiving a re-encryption ciphertext of the transaction data ciphertext issued by the blockchain miner server;
And decrypting the re-encrypted ciphertext by using the encryption key, the current puncture key and the preset tag embedded in the transaction data ciphertext which are acquired from the authorization management server to obtain the transaction data.
8. A blockchain data privacy protection apparatus supporting hierarchical authorization sharing and key updating, the apparatus being applied to a blockchain miner server, wherein the apparatus comprises:
The first acquisition module is used for acquiring an access request of transaction data sent by the data user terminal;
the second acquisition module is used for acquiring the transaction data ciphertext uploaded by the data owner terminal and encrypting the transaction data ciphertext by using the re-encryption key acquired from the authorization management server to obtain a re-encryption ciphertext;
And the response module is used for responding to the access request and sending the re-encrypted ciphertext to the data user terminal, wherein the data user terminal decrypts the transaction data ciphertext by utilizing the encryption key, the current puncture key and the preset tag embedded in the ciphertext which are acquired from the authorization management server to obtain the transaction data.
9. A blockchain data privacy protection apparatus supporting hierarchical authorization sharing and key updating, the apparatus being applied to a data user terminal, wherein the apparatus comprises:
The sending module is used for sending an access request of the transaction data to the blockchain miner server;
The receiving module is used for receiving the re-encrypted ciphertext of the transaction data ciphertext issued by the blockchain miner server;
And the decryption module is used for decrypting the re-encrypted ciphertext by utilizing the encryption key, the current puncture key and the preset tag embedded in the transaction data ciphertext which are acquired from the authorization management server to obtain the transaction data.
10. A computer readable storage medium having stored thereon a computer program, wherein the program is executable by a processor for implementing the blockchain data privacy protection method supporting hierarchical authorization sharing and key updating as claimed in any of claims 1-7.
CN202410039503.3A 2024-01-10 2024-01-10 Blockchain data privacy protection method supporting hierarchical authorization sharing and key updating Pending CN117972775A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410039503.3A CN117972775A (en) 2024-01-10 2024-01-10 Blockchain data privacy protection method supporting hierarchical authorization sharing and key updating

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410039503.3A CN117972775A (en) 2024-01-10 2024-01-10 Blockchain data privacy protection method supporting hierarchical authorization sharing and key updating

Publications (1)

Publication Number Publication Date
CN117972775A true CN117972775A (en) 2024-05-03

Family

ID=90858796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410039503.3A Pending CN117972775A (en) 2024-01-10 2024-01-10 Blockchain data privacy protection method supporting hierarchical authorization sharing and key updating

Country Status (1)

Country Link
CN (1) CN117972775A (en)

Similar Documents

Publication Publication Date Title
Jia et al. SDSM: a secure data service mechanism in mobile cloud computing
US9426131B2 (en) Server apparatus and program to re-encrypt ciphertext data
Salowey et al. Specification for the derivation of root keys from an extended master session key (EMSK)
Lin et al. A collaborative key management protocol in ciphertext policy attribute-based encryption for cloud data sharing
CN111600875B (en) Anonymous data sharing method and system based on data source and data master hiding
JP6363032B2 (en) Key change direction control system and key change direction control method
He et al. Lightweight attribute based encryption scheme for mobile cloud assisted cyber-physical systems
CN105577383A (en) Management of cryptographic keys
Wang et al. A pre-authentication approach to proxy re-encryption in big data context
Wang Leakage resilient ID-based proxy re-encryption scheme for access control in fog computing
Tu et al. A secure, efficient and verifiable multimedia data sharing scheme in fog networking system
Sammy et al. An Efficient Blockchain Based Data Access with Modified Hierarchical Attribute Access Structure with CP‐ABE Using ECC Scheme for Patient Health Record
Li et al. An efficient and anonymous attribute-based group setup scheme
KR101695361B1 (en) Terminology encryption method using paring calculation and secret key
Odelu et al. A secure and scalable group access control scheme for wireless sensor networks
CN116405320A (en) Data transmission method and device
Lara-Nino et al. Key-establishment protocols for constrained cyber-physical systems
KR101793528B1 (en) Certificateless public key encryption system and receiving terminal
KR101812311B1 (en) User terminal and data sharing method of user terminal based on attributed re-encryption
Jung et al. Key management scheme using dynamic identity-based broadcast encryption for social network services
CN117972775A (en) Blockchain data privacy protection method supporting hierarchical authorization sharing and key updating
Garg et al. Applications of identity-based cryptography in smart home and healthcare: A recent review
Weber Designing a hybrid attribute-based encryption scheme supporting dynamic attributes
Yu et al. Secure and differentiated fog-assisted data access for Internet of Things
Routray et al. Context-Aware Attribute Based Access Control for Cloud-based SCADA Systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination