Abstract:Blockchain traceability plays a crucial role in ensuring the safety of agricultural products and coordinating production in each link. In response to the privacy data sharing and security protection requirements in the blockchain traceability of fruits and vegetables, a privacy data trusted sharing method based on content extraction signature was proposed. Firstly, the data of each link in the fruit and vegetable supply chain was analyzed to design the classification method of traceability data. Secondly, the content extraction signature (CES) technology was combined with the ciphertext-policy attribute-based encryption (CP-ABE) technology. The CES technology was used to hide the sensitive data in the traceability information, achieving flexible and secure sharing of traceability data. The CP-ABE technology was used to implement different access control policies for different roles to achieve data encryption and privacy protection. A blockchain based on Ethereum was built for simulation experiments. The system test results showed that in the diffusion test, the average change rate of ciphertext was 90.2%, and in the correlation test, the average change rate of ciphertext reached 75.7%, demonstrating excellent security performance. When the number of plaintext sub-messages was 10 and 20 respectively, the average verification time was 0.102ms and 0.159ms, which was 80.1% and 84.3% faster than that of the traditional scheme. The verification time did not increase linearly with the increase in the number of sub-messages. In terms of storage efficiency, the required storage space was reduced by 70.6% and 85.3% when the number of sub-messages was 5 and 10 respectively. This method not only ensured the privacy of data in the fruit and vegetable supply chain but also realized an efficient and trusted data sharing mechanism, providing a beneficial technical reference and practical basis for improving the level of agricultural product safety supervision.