Resilient Homomorphic Encryption Scheme for Cyber-Physical Systems