With the explosive growth of traditional Chinese medicine data and the widespread use of cloud computing, medical institutions have gradually moved the storage and analysis of medical data from the local to the cloud. Because medical data has extremely high economic and medical value, and contains a large amount of patients’ privacy information, most medical institutions must encrypt data before storing it in the cloud. However, we cannot directly operate the encrypted data by using the traditional encryption method, and the data must be decrypted to obtain the plain text before analysis and operation, which cannot guarantee the security and privacy of the data. This paper proposes a method for storing Chinese medicine data based on homomorphic encryption, including encryption, decryption and retrieval algorithms, using plaintext slots to merge after packet encryption, merge after packet decryption and perform ciphertext search on packets, based on the Client / Server mode, you can directly operate the ciphertext, while ensuring the effectiveness of users’ operations, and the security of user data. Experimental results show that the scheme has good security and good practicability in the storage and operation of Chinese medicine data.