Abstract:A security algorithm based on trust is proposed to deal with the security threats of host and network communication in trading system of distributed agricultural products.First,mobile agents are used to conduct a comprehensive statistical calculation of the user transaction records to calculate the behavior trust value.Then,the user feedback is analyzed and selected to calculate the recommended trust value.Finally,a variety of trust value is analyzed and the comprehensive trust value is obtained.The trading system of distributed agricultural products established is running correctly and can ensure the security of network transactions.