Research Article BCST-APTS: Blockchain and CP-ABE Empowered Data Supervision, Sharing, and Privacy Protection Scheme for Secure and Trusted Agricultural Product Traceability System Guofeng Zhang , 1 Xiao Chen , 2 Bin Feng , 1 Xuchao Guo , 3 Xia Hao , 4 Henggang Ren , 1 Chunyan Dong , 1 and Yanan Zhang 5 1 School of Information Science and Technology, Taishan University, Taian, Shandong 271000, China 2 School of Economics and Management, Taishan University, Taian, Shandong 271000, China 3 College of Information and Electrical Engineering, China Agricultural University, Beijing 100083, China 4 College of Information Science and Engineering, Shandong Agricultural University, Taian, Shandong 271000, China 5 School of Information Science and Engineering, University of Jinan, Jinan, Shandong 250022, China Correspondence should be addressed to Guofeng Zhang; zhangguofeng@tsu.edu.cn and Bin Feng; binfeng@tsu.edu.cn Received 23 October 2021; Revised 1 December 2021; Accepted 24 December 2021; Published 15 January 2022 Academic Editor: Yuling Chen Copyright © 2022 Guofeng Zhang et al. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Blockchain provides new technologies and ideas for the construction of agricultural product traceability system (APTS). However, if data is stored, supervised, and distributed on a multiparty equal blockchain, it will face major security risks, such as data privacy leakage, unauthorized access, and trust issues. How to protect the privacy of shared data has become a key factor restricting the implementation of this technology. We propose a secure and trusted agricultural product traceability system (BCST-APTS), which is supported by blockchain and CP-ABE encryption technology. It can set access control policies through data attributes and encrypt data on the blockchain. is can not only ensure the confidentiality of the data stored in the blockchain, but also set flexible access control policies for the data. In addition, a whole-chain attribute management infrastructure has been constructed, which can provide personalized attribute encryption services. Furthermore, a reencryption scheme based on ciphertext-policy attribute encryption (RE-CP-ABE) is proposed, which can meet the needs of efficient supervision and sharing of ciphertext data. Finally, the system architecture of the BCST-APTS is designed to successfully solve the problems of mutual trust, privacy protection, fine-grained, and personalized access control between all parties. 1. Introduction Food for the people: food safety is the first and most im- portant. From a global perspective, food safety incidents are typical public health emergencies. In order to solve those, countries around the world have successively studied and established a variety of APTSs relying on the agricultural product supply chain, mainly using the centralized technical architecture to realize the shared storage of traceability data. However, frequent privacy leaks in the data center and frequent food safety incidents have led consumers to lose trust in the traceability system. At the same time, considering many factors such as data ownership, data leakage, and their own commercial interests, agricultural production enterprises or organizations with a large amount of data are extremely cautious about opening their own internal data, especially core data. When food safety inci- dents break out, data are not available, tampered, or mali- ciously forged from time to time, resulting in the problems of less data and low reliability of agricultural product traceability system (APTS). e main reasons for the above problems are as follows. Firstly, the data privacy of the participants in the supply chain is not effectively protected, resulting in the difficulty of Hindawi Security and Communication Networks Volume 2022, Article ID 2958963, 11 pages https://doi.org/10.1155/2022/2958963