| With the continuous development of Internet technology and economic society,various digital platforms and network applications generate a large amount of valuable data,which also promotes and drives the data sharing needs among different enterprises and organizations.In traditional data sharing scenarios,the realization of data sharing relies on centralized systems and access control mechanisms,which are prone to single point of failure problems.As an incompletely reliable third-party centralized system,the data stored in the system has the risk of information leakage and information tampering,and the data owner does not have complete ownership of the data,and data security is also lower.In view of the above background and practical problems,this thesis designs and implements a controlled data sharing system based on blockchain in combination with alliance chain and smart contract technology.The specific work content of this thesis is as follows:(1)Aiming at the problems that the centralized access control existing in data sharing is easy to cause single point of failure and incompletely reliable third parties,the access control method of attribute-based encryption is adopted,and the authorization center in the alliance chain is also used as the role of the attribute center to complete the work of user certificate issuance and attribute private key distribution.Aiming at the problem of low encryption and decryption efficiency caused by attribute-based encryption of shared data,an encryption method combining symmetric encryption and attribute-based encryption is used to improve the efficiency of data encryption and decryption.(2)Aiming at the problem that users do not have complete ownership of data and data information leakage,user attribute information and access history records are maintained in a separate blockchain,which reduces the visibility of data information and reduces the risk of data leakage.Smart contracts are used to realize access control of data sharing.Data owners set access policies for data,and smart contracts automatically perform access verification,which improves data security.(3)Aiming at the problems of frequent access and malicious access in data sharing,trust evaluation is introduced into access control,and users are given different system access rights based on the trust value obtained from the evaluation,realizing fine-grained access control of the system.In addition,the user trust value is updated according to the access verification result to distinguish normal users from malicious users more quickly.By detecting frequent access behaviors before access authorization verification,and setting prohibited access periods for frequent access users,the access load pressure on the system is reduced.(4)Based on the above three points of work,a blockchain-based data controlled sharing model is proposed,and on this basis,the system requirements analysis and architecture design are completed,and the system module division and function realization are completed according to the architecture design.Finally,a detailed function test and performance test are carried out on the system implemented in this thesis.The test results show that the functions of the modules in the system can be executed normally,and the operating performance of the system meets the application requirements of data sharing. |