摘要:To establish a sound traceability system of agricultural products, guarantee security of agricultural products, an algorithm is proposed to encrypt trace code of agricultural products. Original trace code consists of 34 digits indicating such information as place of origin, name of product, date of production and authentication. Area code is used to indicate enterprise information, the encrypted algorithm is designed because of the increasing code length, such coding algorithms as system conversion and section division are applied for the encrypted conversion of code of origin place and production date code, moreover, section identification code and authentication code are permutated and combined to produce check code. Through the multiple encryption and code length compression, 34 digits are compressed to 20 on the basis of ensuring complete coding information, shorter code length and better encryption enable the public to know information about agricultural products without consulting professional database.