-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ciphertext packing in bootstrapping #506
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The solution works, but I think something could be better could be done. My intuition is that the ring packing package could be used to simplify the code and avoid code duplication. I'm not convinced that a packed ciphertext struct is needed, nor do I think it should be public. If it is chosen to be kept and be public, then it should be a ciphertext of the ring packing package.
This PR makes the following changes:
bootstrapping.Parameters.LogMaxSlots()
is not maximal.N1 != N2
and the ciphertexts are sparsed relative toN1
.N1
(resp.N2
) refers to the degree of the ring used outside (resp. inside) the bootstrapping.bootstrapping/evaluator.go
(to check).Regarding the last point, the following methods have been made private:
pack
unpack
switchRingDegreeN1ToN2New
switchRingDegreeN2ToN1New
The idea is that users could want to pack and unpack themselves (using
PackAndSwitchN1ToN2
andUnpackAndSwitchN2toN1
) to take advantage of the packing, but the lower level functions are not meant to be used outside of this context. Any feedback on that is much appreciated.