A computer-implemented method including: receiving a list of ciphertexts, wherein a majority of ciphertexts in the list homomorphically-encrypt zero values and a minority of ciphertexts in the list homomorphically-encrypt non-zero values; and compressing the list of ciphertexts to remove the ciphertexts which homomorphically-encrypt zero values, wherein: the compression is performed without knowledge on what each of the ciphertexts in the list encrypts, and the compression is based on homomorphic comparison of each of the ciphertexts in the list with a homomorphically-encrypted zero value, to determine which of the ciphertexts in the list to remove.