awslabs/homomorphic-implementors-toolkit

De-duplicate evaluation keys

Closed this issue · 0 comments

With Lattigo v2.1.1, the Lattigo BootstrappingKey struct is opaque, yet it contains many of the evaluation keys needed by most circuits. The result is that we have to generate keys twice, serialize them twice, store them in memory twice, and transmit them to the server twice, all of which is very expensive. See tuneinsight/lattigo#137.

It appears this may get fixed in the next release of Lattigo, in which case I propose the following:
If parameters support bootstrapping, only generate bootstrapping keys. Add in additional rotation keys as needed, using the SEAL-branch API for accepting rotations. Add a latticpp API to extract relinearization and rotation keys from the bootstrapping keys to avoid duplicating them.