Currently experimenting on homomorphic encryption using the PALISADE library.
I want to apply simple he operations like additions and multiplications on large encrypted inputs. For example input A[3200]
and input B[4096]
both vectors/arrays of int values get encrypted. With those two inputs Enc(A)
and Enc(B)
I want to apply an multiplication:
EvalMult(Enc(A[0]), Enc(B[42]))
*0 and 42 denoting the indexes of the corresponding inputs
** no SIMD needed
As far as I am concerned the he implementation of the above described requirenments could be solved in two different ways:
Pack the inputs in a single ciphertext (SIMD like) and for the he operations I could use
EvalIndexAt()
to get the right value out of the encrypted input.Encrypt each value from A and B separately.
I am not quite sure what of the described solutions would be the best in terms of efficiency. The first approach has this major advantage that only one encryption process for the whole input is needed but this comes with the disadvantage that I always have to access the correct element using the EvalAtIndex()
method and the bigger the inputs get the slower the computation of the EvalAtIndexKeyGen()
gets. (At least on my machine)
The second approach seems the fit better because EvalAtIndex()
is not needed but it comes with the cost of encrypting each value separately which takes quite some time.
Any thoughts recommendations?