A Blockchain and Zero Knowledge Proof Based Data Security Transaction Method in Distributed Computing
Abstract
:1. Introduction
- This paper presents the design of a blockchain-based smart contract based on the concept of atomic matching, which enables the fine-grained matching of data sellers and buyers according to detailed data attributes. Furthermore, the model incorporates off-chain storage and the separation of parameter preparation phases, thereby enhancing the system’s scalability in handling large volumes of data and increasing numbers of users.
- A fair end-to-end protection scheme is proposed, which employs lightweight cryptographic algorithms for dual encryption of transaction data prior to the completion of the transaction. Furthermore, zero-knowledge proofs are utilised to verify the nature of the transaction data, thereby safeguarding the privacy of sensitive information for transaction users.
2. Related Work
3. Scheme Analysis
3.1. System Model
- Authority: The generation of zero-knowledge proof public parameters for data sellers, particularly those operating in resource-constrained environments such as the Internet of Things (IoT), can help to alleviate pressure on limited resources. Similarly, for data buyers, the generation of public system parameters and the publication of the buyer’s public key can facilitate the transfer of data securely.
- IPFS: Relieves the storage pressure on the chain, saves the original data after double encryption of the seller, and provides a search function and encrypted data loading function for the buyer.
- Data Seller: The data seller is a user or agent who has data and wants to gain benefits from these data, but does not want to expose their original data information before the transaction is completed.
- Data buyer: A data buyer is a user or an agent who has a demand for these data; for example, a user under federated learning can obtain the demanded data through a data transaction to train his/her model.
- Smart contract: In the event that the pre-defined conditions are validated, the smart contract deployed on the blockchain will initiate its execution. Upon fulfilment of the stipulated conditions, the smart contract is capable of autonomously transferring funds, thereby ensuring the atomicity of the transaction.
3.2. Threat Model
3.3. Security Objectives
4. Scheme Design
4.1. Overview
- a.
- In the public system parameter generation and distribution stage, an authority generates an asymmetric key pair for each buyer and returns the generated public and private keys to the buyer. The buyer will then upload their public key to the blockchain for the seller’s use. Concurrently, the seller requests the system parameters necessary for zero-knowledge proofs from the authority based on their own parameters and receives a verification key. By ensuring that all key generation processes occur in a trusted environment and strictly controlling the distribution of keys, the buyer’s privacy is effectively safeguarded, preventing potential key leaks.
- b.
- In the registration and matching stage, both the seller group and the buyer group will register their information on the blockchain. This part involves the invocation of smart contracts, where both parties must fill in their data attribute information according to the provisions of the smart contract, without disclosing any raw data information. The smart contract will process the registration information and perform internal matching to identify suitable buyers and sellers. To further protect the seller’s privacy, the seller uses their symmetric key to encrypt the raw data and generate a hash digest. Subsequently, the seller performs a secondary encryption using the publicly published buyer’s public key and uploads the encrypted data to an off-chain storage IPFS center, returning a searchable hash digest for retrieval. This dual encryption mechanism and atomic attribute matching ensure that the seller’s raw data remains undisclosed during the matching process.
- c.
- In the transaction execution phase, the seller first generates the proof required for the buyer’s verification using the zero-knowledge proof key generated in the first stage, and both the generated proof and the IPFS hash digest are recorded on-chain. The buyer retrieves the seller’s uploaded data based on the on-chain IPFS index and uses their private key to perform the initial decryption of the data, obtaining the raw data and generating a hash value for subsequent integrity verification. The execution rules of the transaction contract are pre-negotiated, and the buyer confirms the validity of the transaction contract based on the verification results of the zero-knowledge proof contract. This contract ensures the correctness and completeness of the data. Upon confirmation of the transaction, the buyer returns the agreed-upon currency to the seller, while the seller returns the key to the buyer. Through this series of processes, data privacy is effectively safeguarded at every stage of the transaction.
4.2. Detailed Programs
4.2.1. Phase I
- Computational logic circuit definitions, C: For example, topological diagrams containing input wire definitions and logic operations.
- Input variables, …: These are the data attributes provided by the seller representing the values that need to be proven, such as data attributes collected by IoT sensor devices and case data from medical systems.
- Auxiliary information, …: These are the internal variables of the circuit, used to ensure the completeness of the computation.
4.2.2. Phase II
4.2.3. Phase III
5. Experimentation and Evaluation
5.1. Experimental Environment
5.2. Experimental Results
5.2.1. Matching Simulation
5.2.2. Zero-Knowledge Proof Simulation
Algorithm 1 Value Range Verification Process |
Input: Array , , Output: True or False
|
Algorithm 2 Dataset Size Verification Process |
Input: Array , Output: True or False
|
Algorithm 3 Hash Verification Process |
Input: Array , , Output: True or False
|
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Liu, J.; Zhang, J.; Song, S.H.; Letaief, K.B. Client-Edge-Cloud Hierarchical Federated Learning. In Proceedings of the ICC 2020—2020 IEEE International Conference on Communications (ICC), Dublin, Ireland, 7–11 June 2020; pp. 1–6. [Google Scholar]
- Farahani, B.; Tabibian, S.; Ebrahimi, H. Toward a Personalized Clustered Federated Learning: A Speech Recognition Case Study. IEEE Internet Things J. 2023, 10, 18553–18562. [Google Scholar] [CrossRef]
- Zhao, Y.; Zhao, J.; Jiang, L.; Tan, R.; Niyato, D.; Li, Z.; Lyu, L.; Liu, Y. Correction to “Privacy-Preserving Blockchain-Based Federated Learning for IoT Devices”. IEEE Internet Things J. 2023, 10, 973. [Google Scholar] [CrossRef]
- Fan, S.; Zhang, H.; Zeng, Y.; Cai, W. Hybrid Blockchain-Based Resource Trading System for Federated Learning in Edge Computing. IEEE Internet Things J. 2021, 8, 2252–2264. [Google Scholar] [CrossRef]
- Wang, X.; Hu, J.; Lin, H.; Liu, W.; Moon, H.; Piran, J. Federated Learning-Empowered Disease Diagnosis Mechanism in the Internet of Medical Things: From the Privacy-Preservation Perspective. IEEE Trans. Ind. Inform. 2022, 19, 7905–7913. [Google Scholar] [CrossRef]
- Chen, C.; Wu, J.; Lin, H.; Chen, W.; Zheng, Z. A Secure and Efficient Blockchain-Based Data Trading Approach for Internet of Vehicles. IEEE Trans. Veh. Technol. 2019, 68, 9110–9121. [Google Scholar] [CrossRef]
- Li, T.; Wang, H.; He, D.; Yu, J. Blockchain-Based Privacy-Preserving and Rewarding Private Data Sharing for IoT. IEEE Internet Things J. 2022, 9, 15138–15149. [Google Scholar] [CrossRef]
- Zhang, M.; Liu, J.; Feng, K.; Beltran, F.; Zhang, Z. SmartAuction: A blockchain-based secure implementation of private data queries. Future Gener. Comput. Syst. 2022, 138, 198–211. [Google Scholar] [CrossRef]
- Pop, C.D.; Antal, M.; Cioara, T.; Anghel, I.; Salomie, I. Blockchain and Demand Response: Zero-Knowledge Proofs for Energy Transactions Privacy. Sensors 2020, 20, 5678. [Google Scholar] [CrossRef]
- Xue, L.; Ni, J.; Liu, D.; Lin, X.; Shen, X. Blockchain-Based Fair and Fine-Grained Data Trading With Privacy Preservation. IEEE Trans. Comput. 2023, 72, 2440–2453. [Google Scholar] [CrossRef]
- Hopwood, D.; Bowe, S.; Hornby, T.; Wilcox, N. Zcash Protocol Specification; GitHub: San Francisco, CA, USA, 2016. [Google Scholar]
- Jiang, S.; Li, J.; Zhang, X.; Yue, H.; Wu, H.; Zhou, Y. Secure and Privacy-Preserving Energy Trading With Demand Response Assistance Based on Blockchain. IEEE Trans. Netw. Sci. Eng. 2023, 11, 1238–1250. [Google Scholar] [CrossRef]
- Aitzhan, N.Z.; Svetinovic, D. Security and Privacy in Decentralized Energy Trading Through Multi-Signatures, Blockchain and Anonymous Messaging Streams. IEEE Trans. Dependable Secur. Comput. 2018, 15, 840–852. [Google Scholar] [CrossRef]
- Son, Y.-B.; Im, J.-H.; Kwon, H.-Y.; Jeon, S.-Y.; Lee, M.-K. Privacy-Preserving Peer-to-Peer Energy Trading in Blockchain-Enabled Smart Grids Using Functional Encryption. Energies 2020, 13, 1321. [Google Scholar] [CrossRef]
- Daghmehchi Firoozjaei, M.; Ghorbani, A.; Kim, H.; Song, J. Hy-Bridge: A Hybrid Blockchain for Privacy-Preserving and Trustful Energy Transactions in Internet-of-Things Platforms. Sensors 2020, 20, 928. [Google Scholar] [CrossRef]
- Kumar, R.; Kumar, P.; Tripathi, R.; Gupta, G.P.; Islam, A.K.M.N.; Shorfuzzaman, M. Permissioned Blockchain and Deep Learning for Secure and Efficient Data Sharing in Industrial Healthcare Systems. IEEE Trans. Ind. Inform. 2022, 18, 8065–8073. [Google Scholar] [CrossRef]
- Zhang, X.; Li, X.; Miao, Y.; Luo, X.; Wang, Y.; Ma, S.; Weng, J. A Data Trading Scheme With Efficient Data Usage Control for Industrial IoT. IEEE Trans. Ind. Inform. 2021, 18, 4456–4465. [Google Scholar] [CrossRef]
- Dixit, A.; Singh, A.; Rahulamathavan, Y.; Rajarajan, M. FAST DATA: A Fair, Secure, and Trusted Decentralized IIoT Data Marketplace Enabled by Blockchain. IEEE Internet Things J. 2021, 10, 2934–2944. [Google Scholar] [CrossRef]
- Zhou, Z.; Tian, Y.; Xiong, J.; Ma, J.; Peng, C. Blockchain-Enabled Secure and Trusted Federated Data Sharing in IIoT. IEEE Trans. Ind. Inform. 2022, 19, 6669–6681. [Google Scholar] [CrossRef]
- Huang, C.; Liu, D.; Ni, J.; Lu, R.; Shen, X. Achieving Accountable and Efficient Data Sharing in Industrial Internet of Things. IEEE Trans. Ind. Inform. 2020, 17, 1416–1427. [Google Scholar] [CrossRef]
- Guan, Z.; Wan, Z.; Yang, Y.; Zhou, Y.; Huang, B. BlockMaze: An Efficient Privacy-Preserving Account-Model Blockchain Based on zk-SNARKs. IEEE Trans. Dependable Secur. Comput. 2020, 19, 1446–1463. [Google Scholar] [CrossRef]
- Singh, M.; Aujla, G.S.; Bali, R.S. A Deep Learning-Based Blockchain Mechanism for Secure Internet of Drones Environment. IEEE Trans. Intell. Transp. Syst. 2020, 22, 4404–4413. [Google Scholar] [CrossRef]
- Huang, H.; Zhu, P.; Xiao, F.; Sun, X.; Huang, Q. A blockchain-based scheme for privacy-preserving and secure sharing of medical data. Comput. Secur. 2020, 99, 102010. [Google Scholar] [CrossRef]
- Li, Y.; Tao, X.; Zhang, X.; Liu, J.; Xu, J. Privacy-Preserved Federated Learning for Autonomous Driving. IEEE Trans. Intell. Transp. Syst. 2021, 23, 8423–8434. [Google Scholar] [CrossRef]
- Sun, X.; Yu, F.R.; Zhang, P.; Sun, Z.; Xie, W.; Peng, X. A Survey on Zero-Knowledge Proof in Blockchain. IEEE Netw. 2021, 35, 198–205. [Google Scholar] [CrossRef]
- Li, Y.; Susilo, W.; Yang, G.; Yu, Y.; Liu, D.; Du, X.; Guizani, M. A Blockchain-Based Self-Tallying Voting Protocol in Decentralized IoT. IEEE Trans. Dependable Secur. Comput. 2020, 19, 119–130. [Google Scholar] [CrossRef]
- Yang, X.; Li, W. A zero-knowledge-proof-based digital identity management scheme in blockchain. Comput. Secur. 2020, 99, 102050. [Google Scholar] [CrossRef]
Characteristic 1 | Characteristic 2 | Characteristic 3 | Characteristic 4 | ⋯ | |
---|---|---|---|---|---|
DSL Code | 330 bytes | 324 bytes | 274 bytes | 285 bytes | ⋯ |
Verification Size | 10.3 kb | 10 kb | 9.63 kb | 9.82 kb | ⋯ |
Data (Bytes) | Gas Used | |
---|---|---|
zk-SNARKs | ||
BZDT | BZDIMS | |
100 | 149,675 | 153,859 |
200 | 187,924 | 195,061 |
300 | 208,967 | 215,663 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhang, B.; Pan, H.; Li, K.; Xing, Y.; Wang, J.; Fan, D.; Zhang, W. A Blockchain and Zero Knowledge Proof Based Data Security Transaction Method in Distributed Computing. Electronics 2024, 13, 4260. https://doi.org/10.3390/electronics13214260
Zhang B, Pan H, Li K, Xing Y, Wang J, Fan D, Zhang W. A Blockchain and Zero Knowledge Proof Based Data Security Transaction Method in Distributed Computing. Electronics. 2024; 13(21):4260. https://doi.org/10.3390/electronics13214260
Chicago/Turabian StyleZhang, Bowei, Heng Pan, Kunyang Li, Ying Xing, Jiaxiang Wang, Dongdong Fan, and Wenjie Zhang. 2024. "A Blockchain and Zero Knowledge Proof Based Data Security Transaction Method in Distributed Computing" Electronics 13, no. 21: 4260. https://doi.org/10.3390/electronics13214260
APA StyleZhang, B., Pan, H., Li, K., Xing, Y., Wang, J., Fan, D., & Zhang, W. (2024). A Blockchain and Zero Knowledge Proof Based Data Security Transaction Method in Distributed Computing. Electronics, 13(21), 4260. https://doi.org/10.3390/electronics13214260