Privacy-Preserving Collective Learning With Homomorphic Encryption