The embodiment of the invention provides a data
encryption and decryption method and device, equipment and a storage medium, and relates to the technical field of
data security. The method comprises the following steps: generating a corresponding
encryption public key, an
encryption private key and a
mask parameter according to a public parameter, encrypting target data by using the encryption public key to obtain encrypted data, sending the
mask parameter, the encryption public key and the encrypted data to
server equipment, expanding the encrypted data by using the encryption public key by the
server equipment to obtain an expanded
ciphertext, and sending the expanded
ciphertext to the
server equipment. And performing homomorphic addition calculation on the extended
ciphertext based on the encryption public key and the
mask parameter, sending an obtained addition ciphertext to the user side equipment, and performing partial decoding on the addition ciphertext by using the encryption private key to obtain a decoded
plaintext. According to the multi-key encryption method, each user side device generates a corresponding mask parameter, in the homomorphic addition process, the mask parameters are utilized to ensure that ciphertexts from different sources can be safely combined, a calculation result keeps semantic security, sensitive information is prevented from being leaked, and the security of a multi-key
encryption system is enhanced.