Homomorphic Encryption With CKKS and BFV For The Inner Product of Two Vectors
Encryption is one of the weakest implementations within cybersecurity, and where data which is not encrypted can be exposed to data breaches. And, so, data over the air and data at rest are fairly well covered with encryption, what happens to data in-process? Let’s say a central bank needs to determine the total income and expenditure from all its banks and without any of the banks giving away their sensitive data. Well, one way is to get each bank (Bob, Alice and Peggy) to encrypt their data in a homomorphic public key and then compute the totals for income and expenditure using a homomorphic computing method for adding. Then the result can be decrypted by the central bank (Wendy) with the associated private key:
So, let’s take an example of a maths function that we use when we have vectors: the inner product, and implement it with the two main homomorphic encryption methods: CKKS and BFV.
CCKS
The CCKS method allows us to encrypt floating point values, and the operate on these in a homomorphic way. For our example, the inner product of two vectors of a and b is represented by ⟨a,b⟩. It is the…