As briefly mentioned in the previous article on the broad overview of secure multiparty computation, homomorphic encryption is one way to achieve secure Multiparty Computation (MPC). It is widely used to implement various MPC algorithms.
Homomorphic Encryption Definition
Let
where is a function to be computed and are the inputs.
is a homomorphic encryption function if:
In other words, homomorphic encryption functions allow one to perform computations on encrypted data. However, computation on the encrypted data gives you encrypted outputs, which are not useful unless they can be decrypted to produce sensible values. Therefore, homomorphic encryption functions need to come with a corresponding decryption function that can be used to recover the final encrypted results.
Let's denote the decryption function as , we should have the following relation:
Finding a pair of encryption and decryption functions () that would work perfectly regardless of what function is can be challenging. However, it is possible to create homomorphic encryption functions when restrictions are added to the form of function .
For example, suppose function can only consist of multiplications. The following set of homomorphic encryption-decryption functions might just work:
Where , and are some carefully chosen numbers so that for any given . For the curious readers, please refer to this WikiPedia page to learn about how these numbers are generated to satisfy the above equation.
To illustrate how this works, let's consider a simple function that only consists of multiplications. It is clear that: