Secure data transaction system based on block chain and attribute-based encryption

The secure data transaction system addresses data transaction security and privacy issues by employing blockchain and attribute-based encryption for decentralized data transactions, ensuring secure and transparent data circulation.

CN119067662APending Publication Date: 2024-12-03JIANGSU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410998197.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

Current data transactions face significant security risks, privacy leakage challenges, and complex digital risks due to the non-exclusive and traceable nature of data, which are exacerbated by centralized platforms lacking transparency and control over data operations.

Method used

A secure data transaction system utilizing blockchain and attribute-based encryption, comprising data providers, consumers, a transaction platform, an attribute authority center, and storage operators, with mechanisms for identity verification, trust management, and encryption to ensure secure data transactions and privacy.

Benefits of technology

The system provides decentralized data transactions with enhanced security, traceability, and privacy protection through smart contracts, attribute-based encryption, and trust models, ensuring secure data circulation and user privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119067662A_ABST
    Figure CN119067662A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of data sharing and transaction, and particularly relates to a security data transaction system based on block chain and attribute-based encryption, and the data transaction system relates to multiple roles of a data provider, a storage operator, a data transaction platform, an attribute authority center and a data consumer. And a block chain is deployed on the data transaction platform to facilitate transaction auditing. According to the method, one-to-many fine-grained data access control is realized by utilizing a block chain technology and revocable attribute-based encryption, the data transaction efficiency is improved, and data privacy security and transaction traceability in a data circulation process are guaranteed; the data integrity is checked by using Pedersen commitment, and the validity of data transaction is ensured. According to the system, the data security problem in the data transaction and sharing process can be solved, and the user privacy and the data privacy security problem can be protected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of data sharing and transaction, and specifically is a secure data transaction system based on blockchain and attribute-based encryption to ensure secure data transactions. Background Art

[0002] As data continues to be generated, some source data companies or organizations such as Internet companies, mobile device operators, and smart factories have hoarded a large amount of data, but a large part of them do not have the ability to explore the full value of the data. Therefore, building a data trading platform to achieve data sharing has become an important means to break data silos and create a good data circulation ecology.

[0003] Data transactions have received enough attention today, but because it is an emerging type of transaction, and the circulation of this data brings huge value while also bringing great security risks, and data has the characteristics of being easy to replicate, non-exclusive, and difficult to trace, as data circulates, its security and control capabilities will inevitably gradually weaken.

[0004] In a centralized data trading platform, many of its operations are not public and are opaque to data owners and data demanders. The platform has complete control over the data, and data tampering, data misappropriation, and other behaviors in the data trading process are unknown, and will also endanger user privacy.

[0005] The application environment for the circulation of data elements is complex, involving multiple subjects, and data has obvious interdependence. The digital risks faced by enterprises depend not only on their own security status, but also on the status of other links and subjects to which they are connected. Once data is leaked in a certain link, it will affect the privacy issues of multiple subjects involved in the data circulation.

[0006] These all make data circulation face security risks, privacy leakage challenges and other problems. Summary of the invention

[0007] In response to the data security issues in current data transactions, the present invention proposes a secure data transaction system based on blockchain and attribute-based encryption, which is used to solve the data transaction party security, transaction data security and transaction process security issues in the process of data transaction and sharing, and to achieve data privacy security and user privacy security in the process of data circulation.

[0008] To achieve the above-mentioned invention purpose, the present invention adopts the following technical scheme: a secure data transaction system based on blockchain and attribute-based encryption, comprising: a data provider, a data consumer, a data transaction platform, an attribute authority center, and a storage operator; wherein the data transaction platform is a medium for transactions between data providers and data consumers, including a data agent and a data computing node, and a blockchain is also deployed on the data transaction platform; the data agent is used to update the trust value of the data provider and the attribute revocation of malicious data consumers; the data computing node is used for data calculation and encryption; the blockchain is used to automatically complete the upload and acquisition of data through smart contracts, and record user identity information, request records, and the trust value of the data provider on the blockchain account book; the data provider is the data owner, who is an individual or large institution that trades data as a new type of commodity and is responsible for data encryption and uploading; the data consumer is an individual or organization that is willing to pay a certain amount of money to obtain data commodities to break the data island; the data provider and the data consumer need to register before using the data transaction system; the attribute authority center is responsible for establishing and initializing the entire attribute-based encryption system; the storage operator is a distributed cluster composed of a number of peer nodes, responsible for storing and hosting the encrypted data uploaded by the data provider, and monitoring all communications between each entity and them.

[0009] Furthermore, the above data provider and data consumer registration process includes the following steps:

[0010] A1) Users submit their identity information and select roles on the data trading platform; roles are divided into two types: data provider and data consumer;

[0011] A2) The data trading platform uses asymmetric encryption to generate and assign a key pair (sk, pk) to each user;

[0012] A3) The data trading platform calculates the user's decentralized identifier DID. The calculation formula is as follows:

[0013] DID = H (identity information || sk);

[0014] A4) The data trading platform forwards the DID to the blockchain for storage;

[0015] A5) The data trading platform creates an account for the user. If the account is a data provider, the trust value information is also added to the data trading platform. The initial value is 0.

[0016] Furthermore, the attribute authority center initializes the attribute-based encryption system including the following steps:

[0017] B1) The attribute authority inputs the security parameter λ and randomly selects two p-order (p>2 λ )Multiplicative cyclic groups G, GT Construct the parameters of the prime-order group bilinear mapping (p,g,g * ,G,G T ,e), cyclic groups G, G T Satisfies the bilinear mapping e:G×G→G T ,g and g * are two generators of G;

[0018] B2) The attribute authority defines the attribute set U = {attr1, attr2, ..., attr n}, the i-th attribute attr i With n i value, denoted as The data consumer attribute list is recorded as L = {L1, L2, ..., L n}, where L i =A i,ti ∈S i And t i ∈{1,2,...,n i}; the access policy of the data provider is denoted as W = {W1, W2, …, W n}, where W i ∈S i .L i ∈S i This means that the attribute list L satisfies the access policy W;

[0019] B3) The attribute authority selects a collision-resistant hash function H: {0,1} * →Z p , where Z p is the set of all remainder classes modulo p;

[0020] B4) The attribute authority generates the master key MSK = (α, x, y), the public key

[0021] PK=((p,g,g * ,G,G T ,e),u,h,w,v,g x ,g y ,H),

[0022] where u,h,w,v∈G,α∈Z p .

[0023] Furthermore, the data provider provides data to the data trading platform, including the following steps:

[0024] C1) The data provider sends a data upload request req to the data trading platform p , upload request req p Contains data metadatad , user information, expected price, timestamp, where meta d = <dataID, subject, product description, data size>;

[0025] C2) The data trading platform forwards the request req to the blockchain p , and the blockchain calls the smart contract to verify the identity of the data provider. If the verification passes, go to step C3); otherwise, stop the data upload;

[0026] C3) The blockchain sends a token ω to the data provider, and the data provider marks ω with its private key sk to generate a signed token

[0027] C4) The data provider uses the signed token to authenticate with the storage operator and saves the ciphertext CT to the storage operator;

[0028] C5) The data trading platform displays the data element information meta d and trust value of the data provider;

[0029] C6) The blockchain records the data upload request on the blockchain ledger.

[0030] Further, the above data consumer obtains data from the data trading platform, including the following steps:

[0031] D1) The data consumer submits a data download request req to the data trading platform according to the demand c , and the download request req c includes the data identifier dataID, user information, payment amount, timestamp;

[0032] D2) The data trading platform uploads the request req c to the blockchain, and the blockchain calls the smart contract to verify the identity information DID of the data consumer according to the request. If the verification passes, go to step D3), otherwise add the data consumer to the list of malicious consumers and go to step D11);

[0033] D3) The blockchain calls the smart contract to conduct a transaction payment. After the transaction payment is successful, it sends an exchange token δ to the data consumer, otherwise jump to step D11);

[0034] D4) The data consumer signs δ with its own private key sk to generate a signed token

[0035] D5) The data consumer uses the signed token to access the storage operator to obtain the data ciphertext CT;

[0036] D6) Blockchain records the data consumer’s request on the blockchain ledger;

[0037] D7) The attribute authority calculates the attribute private key SK and sends the attribute private key SK to the data consumer; where the attribute private key SK = (L, K0, K1, K2, K3, T1, T2, {K i,2 ,K i,3} i∈[n] ); L is the attribute list of the attribute consumer, K0, K1, K2, K3, T1, T2, {K i,2 ,K i,3} i∈[n] , the calculation formula is as follows:

[0038] K0=g α / (x+DID+y*t) w r ;

[0039] K1=g r ;

[0040] K2=g x*r ;

[0041] K3=g y*r ; T1 = DID; T2 = t;

[0042]

[0043] where t,r,r1,r2,...,r n ∈Z p ;

[0044] D8) The data provider commits to reveal the data and calculates Comm1 and β * , γ * , and (Comm1,β * ,γ * ) is sent to the data consumer, where Comm1, β * , γ * The calculation formula is as follows:

[0045] Comm1=β*g+γ*g * (β,γ∈Z p );

[0046] β * =γ+H * *d;

[0047] γ * =γ+H * *θ;

[0048] D9) The data consumer determines the data integrity of the data ciphertext CT. If the data is complete, proceed to step D10). Otherwise, the data trading platform calls the blockchain to refund the data consumer and proceed to step D11). The method for determining data integrity is: if Comm1+H * *Comm and β * *g+γ * *g * , if they are equal, the data is complete, otherwise the data is incomplete;

[0049] D10) Calculate the data plaintext d, the calculation formula is as follows:

[0050]

[0051] Where L = {A 1,a1 ,A 2,a2 ,…,A n,an} each attribute value A i,ai , let C i,ai,2 =C i,2 ,

[0052] D11) The data consumer obtains data and the process is completed.

[0053] Furthermore, the above data proxy revokes the attributes of malicious data consumers by the following steps:

[0054] E1) The data provider defines the access structure W′={W1′,W2′,…,W n ′} and sent to the data agent;

[0055] E2) The data agent calculates the new secret share s′, and the calculation formula is as follows: where s1′,s2′,...,s n ′∈Z p ;

[0056] E3) Calculate the new ciphertext components C', C1', C2', C3', C i,1 ′、C i,3 '、 The calculation formulas for each part are as follows:

[0057] C′=Ce(g,g) αs′ ;

[0058] C1′=C1g s′

[0059] C2′=g xs ,

[0060] C3′=C1g ys′ ,

[0061]

[0062] E4) Generate a partial new ciphertext CT1′ as follows:

[0063]

[0064] E5) The data agent calculates the commitment Comm′ and hash value H for the new ciphertext component C′ * ', the calculation formula is as follows:

[0065] Comm′=C′*g+θ′*g * (θ′∈Z p )

[0066] H * ′=h(C′);

[0067] E6) Generate new ciphertext CT′=(CT1, Comm′, H * ′);

[0068] E7) The data agent updates the ciphertext at the storage operator.

[0069] Furthermore, the data trading platform periodically updates the trust value of the data provider, including the following steps:

[0070] F1) The data agent calls the computing node to obtain all data consumers who have conducted transactions with data provider i and participated in the evaluation;

[0071] F2) Arrange the evaluations initiated by data consumers in chronological order. The evaluation sequence obtained by the jth data consumer on the data transaction of data provider i is recorded as L j*i ;

[0072] F3) The evaluation sequence L j*i Divide into n groups and calculate the evaluation benefit P of each group ji , the calculation formula is as follows:

[0073] P ji (k)=α|E+|+|E0|-β|E-|(1≤k≤n),

[0074] Where k is the group number, α is the incentive coefficient (1<α<2), β is the penalty coefficient (0<β<2), E+ is the number of positive reviews, E0 is the number of neutral reviews, and E- is the number of negative reviews;

[0075] F4) Data agent calculation evaluation sequence benefit I ji , the calculation formula is as follows:

[0076]

[0077] Where f is the sequence L j*i frequency;

[0078] F5) The data agent calculates the satisfaction rate S of the jth data consumer with the data provider i ji , the calculation formula is as follows:

[0079]

[0080] Where T(k) represents the number of evaluations in the kth group, Represents the evaluation sequence L j*i All are favorable comments;

[0081] F6) The data agent generates the trust value R of all data providers i by calculating the evaluation sequence benefits and satisfaction rate of the jth data consumer. i , the calculation formula is as follows:

[0082]

[0083] Where M is the number of data consumers participating in the evaluation;

[0084] F7) The data agent updates the trust value on the data trading platform and writes it into the blockchain ledger.

[0085] Furthermore, the method for generating the ciphertext CT comprises the following steps:

[0086] C4.1) The data provider calculates the secret share s, and the calculation formula is as follows:

[0087]

[0088] C4.2) The data provider encrypts the data d and calculates the ciphertext components C, C1, C2, C3, and C i,1 , C i,ai,2 , C i,3 , the calculation formulas of each component are as follows:

[0089] C=d*e(g,g) αs ;

[0090] C1=g s ;

[0091] C2=g x*s ;

[0092] C3=g y*s ;

[0093] where t1, t2, ..., t n ∈Z p ;

[0094] where t1, t2, ..., t n ∈Z p

[0095]

[0096] C4.3) Generate partial ciphertext CT1. The generation method is as follows:

[0097]

[0098] C4.4) The data provider calculates the commitment Comm and hash value H of data d * , the calculation formula is as follows:

[0099] Comm=d*g+θ*g * (θ∈Z p )

[0100] H * =H(d);

[0101] C4.5) The data provider generates the ciphertext CT = (CT1, Comm, H * ).

[0102] A secure data transaction system based on blockchain and attribute-based encryption proposed in the present invention implements a secure data transaction method based on blockchain and attribute-based encryption, solves data security issues from three perspectives: security of data transaction participants, security of transaction data, and security of data transaction process. Blockchain technology, attribute-based encryption technology, homomorphic Pedersen commitment, and trust model are used to realize decentralized data transactions and circulation processes, such as automatic decision-making on the credibility of identity information and access control rules, and anti-tampering, traceability, and user trust of data and transaction records. BRIEF DESCRIPTION OF THE DRAWINGS

[0103] Figure 1 This is a structural diagram of a secure data transaction system based on blockchain and attribute-based encryption;

[0104] Figure 2 Flowchart for revoking malicious data consumer attributes for data brokers;

[0105] Figure 3 Update the data provider trust value flow chart for the data broker;

[0106] Figure 4 Flowchart for user registration;

[0107] Figure 5 Provide data flow diagrams for data providers;

[0108] Figure 6 Get data flow diagram for data consumers. DETAILED DESCRIPTION

[0109] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. It should be pointed out that the technical solution and design principle of the present invention are described in detail below only with a preferred technical solution, but the protection scope of the present invention is not limited thereto.

[0110] The embodiments are preferred implementations of the present invention, but the present invention is not limited to the above-mentioned implementations. Any obvious improvements, substitutions or modifications that can be made by those skilled in the art without departing from the essential content of the present invention belong to the protection scope of the present invention.

[0111] The present invention is a secure data transaction system based on blockchain and attribute-based encryption. Figure 1 As shown, it includes data providers, data consumers, data trading platforms, attribute authority centers, and storage operators; among them:

[0112] The data trading platform is a medium for transactions between data providers and data consumers, including data agents and data computing nodes. Blockchain is also deployed on the data trading platform; the data agent is used to update the trust value of the data provider and revoke the attributes of malicious data consumers; the data computing node is used for data calculation and encryption; the blockchain is used to automatically upload and obtain data through smart contracts, and record user identity information, request records, and the trust value of the data provider on the blockchain account book;

[0113] Data providers are data owners, and are individuals or large institutions that trade data as a new type of commodity and are responsible for data encryption and uploading; data consumers are individuals or organizations that are willing to pay a certain amount of money to obtain data commodities in order to break data silos; data providers and data consumers need to register before using the data trading system.

[0114] As a preferred embodiment of the present invention, the user registration process includes the following steps:

[0115] A1) Users submit their identity information and select roles on the data trading platform; roles are divided into two types: data provider and data consumer;

[0116] A2) The data trading platform uses asymmetric encryption to generate and assign a key pair (sk, pk) to each user;

[0117] A3) The data trading platform calculates the user's decentralized identifier DID. The calculation formula is as follows:

[0118] DID = H (identity information || sk);

[0119] A4) The data trading platform forwards the DID to the blockchain for storage;

[0120] A5) The data trading platform creates an account for the user. If the account is a data provider, the trust value information is also added to the data trading platform. The initial value is 0.

[0121] The attribute authority center is responsible for establishing and initializing the entire attribute-based encryption system. As a preferred embodiment of the present invention, the attribute-based encryption system initialization includes the following steps:

[0122] B1) The attribute authority inputs the security parameter λ and randomly selects two p-order (p>2 λ )Multiplicative cyclic groups G, G T Construct the parameters of the prime-order group bilinear mapping (p,g,g * ,G,G T ,e), cyclic groups G, G T Satisfies the bilinear mapping e:G×G→G T ,g and g * are two generators of G;

[0123] B2) The attribute authority defines the attribute set U = {attr1, attr2, ..., attr n}, the i-th attribute attr i With n i value, denoted as The data consumer attribute list is recorded as L = {L1, L2, ..., L n}, where L i =A i,ti ∈S i And t i ∈{1,2,...,n i}; the access policy of the data provider is denoted as W = {W1, W2, …, W n}, where W i ∈S i .L i ∈S i This means that the attribute list L satisfies the access policy W;

[0124] B3) The attribute authority selects a collision-resistant hash function H: {0,1} * →Z p , where Z p is the set of all remainder classes modulo p;

[0125] B4) The attribute authority generates the master key MSK = (α, x, y), the public key

[0126] PK=((p,g,g * ,G,GT , e), u, h, w, v, g x , g y , H), where

[0127] u, h, w, v ∈ G, α ∈ Z p ;

[0128] The storage operator is a distributed cluster composed of several peer nodes, responsible for storing and hosting the encrypted data uploaded by the data provider, and monitoring all communications between each entity and them.

[0129] As a preferred embodiment of the present invention, the data provider provides data to the data trading platform, including the following steps:

[0130] C1) The data provider sends a data upload request req p , to the data trading platform. The upload request req p contains data meta-information meta d , user information, expected price, timestamp, where meta d = <dataID, subject, commodity description, data size>;

[0131] C2) The data trading platform forwards the request req p to the blockchain. The blockchain calls the smart contract to verify the identity of the data provider. If the verification passes, go to step C3); otherwise, stop the data upload;

[0132] C3) The blockchain sends a token ω to the data provider. The data provider marks ω with its private key sk to generate a signed token

[0133] C4) The data provider uses the signed token to authenticate with the storage operator and saves the ciphertext CT to the storage operator;

[0134] As a preferred embodiment of the present invention, the method for generating the ciphertext CT includes the following steps:

[0135] C4.1) The data provider calculates the secret sharing s, and the calculation formula is as follows:

[0136]

[0137] C4.2) The data provider encrypts the data d and calculates the ciphertext components C, C1, C2, C3, C i,1 , C i,3 , and the calculation formula for each component is as follows:

[0138] C = d * e(g, g)αs ;

[0139] C1=g s ;

[0140] C2=g x*s ;

[0141] C3=g y*s ;

[0142] where t1, t2, ..., t n ∈Z p ;

[0143] where t1, t2, ..., t n ∈Z p

[0144]

[0145] C4.3) Generate partial ciphertext CT1. The generation method is as follows:

[0146]

[0147] C4.4) The data provider calculates the commitment Comm and hash value H of data d * , the calculation formula is as follows:

[0148] Comm=d*g+θ*g * (θ∈Z p )

[0149] H * =H(d);

[0150] C4.5) The data provider generates the ciphertext CT = (CT1, Comm, H * );

[0151] C5) The data trading platform displays the data metadata of the data provider d and trust value;

[0152] C6) Blockchain records the data upload request in the blockchain ledger.

[0153] The data consumer obtains data from the data trading platform, which, as a preferred embodiment of the present invention, includes the following steps:

[0154] D1) Data consumers submit data download requests to the data trading platform based on their needs c , download request req c Contains data identifier dataID, user information, payment amount, and timestamp;

[0155] D2) The data trading platform will request req c Upload to the blockchain, the blockchain calls the smart contract according to the request to verify the identity information DID of the data consumer. If the verification passes, go to step D3), otherwise the data consumer is included in the list of malicious consumers and go to step D11);

[0156] D3) The blockchain calls the smart contract to make transaction payment. After the transaction payment is successful, an exchange token δ is sent to the data consumer, otherwise jump to step D11);

[0157] D4) The data consumer signs δ with his own private key sk to generate a signature token

[0158] D5) Data consumers use signed tokens Visit the storage operator to obtain the data ciphertext CT;

[0159] D6) Blockchain records the data consumer’s request on the blockchain ledger;

[0160] D7) The attribute authority calculates the attribute private key SK and sends the attribute private key SK to the data consumer; where the attribute private key SK = (L, K0, K1, K2, K3, T1, T2, {K i,2 ,K i,3} i∈[n] ); L is the attribute list of the attribute consumer, K0, K1, K2, K3, T1, T2, {K i,2 ,K i,3} i∈[n] , the calculation formula is as follows:

[0161] K0=g α / (x+DID+y*t) w r ;

[0162] K1=g r ;

[0163] K2=g x*r ;

[0164] K3=g y*r ; T1 = DID; T2 = t;

[0165]

[0166]

[0167] where t,r,r1,r2,...,r n ∈Z p ;

[0168] D8) The data provider commits to reveal the data and calculates Comm1 and β * , γ * , and (Comm1,β * ,γ * ) is sent to the data consumer, where Comm1, β * , γ * The calculation formula is as follows:

[0169] Comm1=β*g+γ*g * (β,γ∈Z p );

[0170] β * =γ+H * *d;

[0171] γ * =γ+H * *θ;

[0172] D9) The data consumer determines the data integrity of the data ciphertext CT. If the data is complete, proceed to step D10). Otherwise, the data trading platform calls the blockchain to refund the data consumer and proceed to step D11). The method for determining data integrity is: if Comm1+H * *Comm and β * *g+γ * *g * , if they are equal, the data is complete, otherwise the data is incomplete;

[0173] D10) Calculate the data plaintext d, the calculation formula is as follows:

[0174]

[0175] Where L = {A 1,a1 ,A 2,a2 ,…,A n,an} each attribute value A i,ai ,make

[0176] D11) The data consumer obtains data and the process is completed.

[0177] As a preferred embodiment of the present invention, the data proxy revokes the attributes of a malicious data consumer including the following steps:

[0178] E1) The data provider defines the access structure W′={W1′,W2′,…,W n ′} and sent to the data agent;

[0179] E2) The data agent calculates the new secret share s′, and the calculation formula is as follows: where s1′,s2′,...,s n ′∈Z p ;

[0180] E3) Calculate the new ciphertext components C', C1', C2', C3', C i,1 ′、C i,3 '、 The calculation formulas for each part are as follows:

[0181] C′=Ce(g,g) αs′ ;

[0182] C1′=C1g s′

[0183] C2′=g xs ,

[0184] C3′=C1g ys′ ,

[0185]

[0186] E4) Generate a partial new ciphertext CT1′ as follows:

[0187]

[0188] E5) The data agent calculates the commitment Comm′ and hash value H for the new ciphertext component C′ * ', the calculation formula is as follows:

[0189] Comm′=C′*g+θ′*g * (θ′∈Z p )

[0190] H *′ =h(C′);

[0191] E6) Generate new ciphertext CT′=(CT1, Comm′, H * ′);

[0192] E7) The data agent updates the ciphertext at the storage operator;

[0193] The data trading platform regularly updates the trust value of the data provider. As a preferred embodiment of the present invention, updating the trust value of the data consumer includes the following steps:

[0194] F1) The data agent calls the computing node to obtain all data consumers who have conducted transactions with data provider i and participated in the evaluation;

[0195] F2) Arrange the evaluations initiated by data consumers in chronological order. The evaluation sequence obtained by the jth data consumer on the data transaction of data provider i is recorded as Lj*i ;

[0196] F3) The evaluation sequence L j*i Divide into n groups and calculate the evaluation benefit P of each group ji , the calculation formula is as follows:

[0197] P ji (k)=α|E+|+|E0|-β|E-|(1≤k≤n),

[0198] Where k is the group number, α is the incentive coefficient (1<α<2), β is the penalty coefficient (0<β<2), E+ is the number of positive reviews, E0 is the number of neutral reviews, and E- is the number of negative reviews;

[0199] F4) Data agent calculation evaluation sequence benefit I ji , the calculation formula is as follows:

[0200]

[0201] Where f is the sequence L j*i frequency;

[0202] F5) The data agent calculates the satisfaction rate S of the jth data consumer with the data provider i ji , the calculation formula is as follows:

[0203]

[0204] Where T(k) represents the number of evaluations in the kth group, Represents the evaluation sequence L j*i All are favorable comments;

[0205] F6) The data agent generates the trust value R of all data providers i by calculating the evaluation sequence benefits and satisfaction rate of the jth data consumer. i , the calculation formula is as follows:

[0206]

[0207] Where M is the number of data consumers participating in the evaluation;

[0208] F7) The data agent updates the trust value on the data trading platform and writes it into the blockchain ledger.

Claims

1. A secure data transaction system based on blockchain and attribute-based encryption, characterized in that: include: Data providers, data consumers, data trading platforms, attribute authority centers, and storage operators; the data trading platform is the medium for transactions between data providers and data consumers, including data agents and data computing nodes, and blockchain is also deployed on the data trading platform; the data agent is used to update the trust value of the data provider and revoke the attributes of malicious data consumers; the data computing node is used for data calculation and encryption; the blockchain is used to automatically upload and obtain data through smart contracts, and record user identity information, request records, and the trust value of the data provider on the blockchain account book; the data provider is the data owner, who is an individual or large institution that trades data as a new type of commodity and is responsible for data encryption and uploading; the data consumer is an individual or organization willing to pay a certain amount of money to obtain data commodities in order to break the data island; data providers and data consumers need to register before using the data trading system; the attribute authority center is responsible for establishing and initializing the entire attribute-based encryption system; the storage operator is a distributed cluster composed of several peer nodes, responsible for storing and hosting the encrypted data uploaded by the data provider, and monitoring all communications between each entity and them.

2. The secure data transaction system based on blockchain and attribute-based encryption as claimed in claim 1, characterized in that: The data provider and data consumer registration process includes the following steps: A1) Users submit their identity information and select roles on the data trading platform; roles are divided into two types: data provider and data consumer; A2) The data trading platform uses asymmetric encryption to generate and assign a key pair (sk, pk) to each user; A3) The data trading platform calculates the user's decentralized identifier DID. The calculation formula is as follows: DID = H (identity information || sk); A4) The data trading platform forwards the DID to the blockchain for storage; A5) The data trading platform creates an account for the user. If the account is a data provider, the trust value information is also added to the data trading platform. The initial value is 0.

3. The secure data transaction system based on blockchain and attribute-based encryption as claimed in claim 1, characterized in that: The attribute authority center initializes the attribute-based encryption system including the following steps: B1) The attribute authority inputs the security parameter λ and randomly selects two p-order (p>2) λ )Multiplicative cyclic groups G, G T Construct the parameters of the prime-order group bilinear mapping (p, g, g * , G, G T , e), cyclic groups G, G T Satisfies the bilinear mapping e: G×G→G T , g and g* are two generators of G; B2) The attribute authority defines the attribute set U = {attr1, attr2, ..., attr n }, the i-th attribute attr i With n i value, denoted as The data consumer attribute list is recorded as L = {L1, L2, ..., L n }, where L i =A i,ti ∈S i And t i ∈{1, 2, ..., n i }; The access policy of the data provider is denoted as W = {W1, W2, ..., W n }, where W i ∈S i , L i ∈S i This means that the attribute list L satisfies the access policy W; B3) The attribute authority selects a collision-resistant hash function H: {0, 1} * →Z p , where Z p is the set of all remainder classes modulo p; B4) The attribute authority generates the master key MSK = (α, x, y) and the public key PK = ((p, g, g * , G, G T , e), u, h, w, v, g x , g y , H), where u, h, w, v ∈ G, α ∈ Z p .

4. The secure data transaction system based on blockchain and attribute-based encryption as claimed in claim 1, characterized in that: The data provider provides data to the data trading platform, including the following steps: C1) The data provider sends a data upload request req to the data trading platform p , upload request req p Contains data metadata d , user information, expected price, timestamp, where meta d =<dataID, subject, product description, data size>; C2) The data trading platform forwards the request req to the blockchain p , the blockchain calls the smart contract to verify the identity of the data provider. If the verification is successful, go to step C3); Otherwise, stop uploading data; C3) The blockchain sends a token ω to the data provider, who signs ω with his private key sk to generate a signed token C4) Data provider uses signed token Perform identity authentication with the storage operator and save the ciphertext CT to the storage operator; C5) The data trading platform displays the data metadata of the data provider d and trust value; C6) Blockchain records the data upload request in the blockchain ledger.

5. The secure data transaction system based on blockchain and attribute-based encryption as claimed in claim 1, characterized in that: The data consumer obtains data from the data trading platform, including the following steps: D1) Data consumers submit data download requests to the data trading platform based on their needs c , download request req c Contains data identifier dataID, user information, payment amount, and timestamp; D2) The data trading platform uploads the request reqc to the blockchain. The blockchain calls the smart contract to verify the identity information DID of the data consumer according to the request. If the verification passes, go to step D3). Otherwise, the data consumer is included in the list of malicious consumers and go to step D11); D3) The blockchain calls the smart contract to make transaction payment. After the transaction payment is successful, an exchange token δ is sent to the data consumer, otherwise jump to step D11); D4) The data consumer signs δ with his own private key sk to generate a signature token D5) Data consumers use signed tokens Visit the storage operator to obtain the data ciphertext CT; D6) Blockchain records the data consumer’s request on the blockchain ledger; D7) The attribute authority calculates the attribute private key SK and sends the attribute private key SK to the data consumer; Among them, the attribute private key SK=(L, K0, K1, K2, K3, T1, T2, {K i,2 , K i,3 } i∈[n ]); L is the attribute list of the attribute consumer, K0, K1, K2, K3, T1, T2, {K i,2 , K i,s } i∈[n] , the calculation formula is as follows: K0=g α / (x+DID+y*t) w r ; K1=g r ; K2=g x*r ; K3=g y*r ;T1=DID;T2=t; where t, r, r1, r2, …, r n ∈Z p ; D8) The data trading platform commits to reveal the data and calculates Comm1 and β * , γ * , and (Comm1, β * , γ * ) is sent to the data consumer, where Comm1, β * , γ * The calculation formula is as follows: Comm1=β*g+γ*g * (β,γ∈Z p ); b * =β+H * *d; c * =γ+H * *θ; D9) The data consumer determines the data integrity of the data ciphertext CT. If the data is complete, proceed to step D10). Otherwise, the data trading platform calls the blockchain to refund the data consumer and proceed to step D11). The method for determining data integrity is: if Comm1+H * *Comm and β * *g+γ * *g * , if they are equal, the data is complete, otherwise the data is incomplete; D10) Calculate the data plaintext d, the calculation formula is as follows: Where L = {A 1,a1 , A 2,a2 , …, A n,an } each attribute value A i,ai ,make D11) The data consumer obtains data and the process is completed.

6. The secure data transaction system based on blockchain and attribute-based encryption as claimed in claim 1, characterized in that: The data proxy revokes the attributes of malicious data consumers by the following steps: E1) The data provider defines the access structure W′={W1′,W2′,…,W n ′} and sent to the data agent; E2) The data agent calculates the new secret share s′, and the calculation formula is as follows: where s1′, s2′, ..., s n ′∈Z p ; E3) Calculate the new ciphertext components C', C1', C2', C3', C i,1 ′、C i,3 '、 The calculation formulas for each part are as follows: C′=Ce(g,g) αs′ ; C1′=C1g s′ C2′=g xs , C3′=C1g ys′ , E4) Generate a partial new ciphertext CT1′ as follows: E5) The data agent calculates the commitment Comm′ and hash value H for the new ciphertext component C′ * ′, the calculation formula is as follows: Comm′=C′*g+θ′*g * (θ′∈Z p ) H * ′=h(C′); E6) Generate new ciphertext CT′=(CT1, Comm′, H * ′); E7) The data agent updates the ciphertext at the storage operator.

7. The secure data transaction system based on blockchain and attribute-based encryption as claimed in claim 1, characterized in that: The data trading platform regularly updates the trust value of the data provider, including the following steps: F1) The data agent calls the computing node to obtain all data consumers who have conducted transactions with data provider i and participated in the evaluation; F2) Arrange the evaluations initiated by data consumers in chronological order. The evaluation sequence obtained by the jth data consumer on the data transaction of data provider i is recorded as L j*i ; F3) The evaluation sequence L j*i Divide into n groups and calculate the evaluation benefit P of each group ji , the calculation formula is as follows: P ji (k)=α|E+|+|E0|-β|E-|(1≤k≤n), Where k is the group number, α is the incentive coefficient (1<α<2), β is the penalty coefficient (0<β<2), E+ is the number of positive reviews, E0 is the number of neutral reviews, and E- is the number of negative reviews; F4) Data agent calculation evaluation sequence benefit I ji , the calculation formula is as follows: Where f is the sequence L j*i frequency; F5) The data agent calculates the satisfaction rate S of the jth data consumer with the data provider i ji , the calculation formula is as follows: Where T(k) represents the number of evaluations in the kth group, Represents the evaluation sequence L j*i All are favorable comments; F6) The data agent generates the trust value R of all data providers i by calculating the evaluation sequence benefits and satisfaction rate of the jth data consumer. i , the calculation formula is as follows: Where M is the number of data consumers participating in the evaluation; F7) The data agent updates the trust value on the data trading platform and writes it into the blockchain ledger.

8. The secure data transaction system based on blockchain and attribute-based encryption as claimed in claim 4, characterized in that: The method for generating the ciphertext CT comprises the following steps: C4.1) The data provider calculates the secret share s, and the calculation formula is as follows: C4.2) The data provider encrypts the data d and calculates the ciphertext components C, C1, C2, C3, and C i,1 , C i,3 , the calculation formulas of each component are as follows: C=d*e(g,g) αs ; C1=g s ; C2=g x*s ; C3=g y*s ; where t1, t2, ..., t n ∈Z p ; where t1, t2, ..., t n ∈Z p C4.3) Generate partial ciphertext CT1, the generation method is as follows: C4.4) The data provider calculates the commitment Comm and hash value H of the ciphertext component C * , the calculation formula is as follows: Comm=d*g+θ*g * (θ∈Z p ) H * =H(d); C4.5) The data provider generates a ciphertext CT = (CT1, Comm, H * ).