Abstract:Oyster agricultural products may carry transmissible viruses, bacteria, and other biological risk factors during their market circulation, which has caused frequent biosecurity incidents in many countries and seriously threatened people’s health. The privacy characteristics of biological risk detection data are significant, and the improper disclosure of biological risk detection information can pose a threat to public health security. A privacy-preserving data encryption and sharing method for oyster supply chain biological risk factors was proposed based on blockchain technology. By encrypting and storing biological risk factor detection data from various links in the supply chain on the blockchain, data security and sharing were ensured, and the source of the risk can be traced back. The method used attribute-based searchable encryption algorithms to perform access control and privacy protection on biological risk factor detection data, and an encrypted inverted index for query efficiency optimization was constructed. By combining searchable encryption algorithms and inverted indices, rapid location of relevant risk batch goods’ detailed data was achieved. The experimental test results showed that the average encryption time of biological risk detection data keyword was 31ms, the average trapdoor generation time was 32ms, and the average matching time of searchable ciphertext and trapdoor was 16ms. The average time for regulators to query risk oyster agricultural product-related data through encrypted inverted index was 385ms, and a prototype system was built on the Ethereum blockchain platform to realize the functions of biological risk factor encrypted privacy data storage and traceability query. The results showed that the method can meet the demand of privacy data sharing scenarios in oyster supply chain and provide technical support for oyster biological risk regulation.