Documentation ¶
Overview ¶
Package main implements an example showcasing slim for bootstrapping for fixed-point approximate arithmetic over the reals/complexes numbers. This re-ordering of the bootstrapping steps was first proposed for the BFV/BGV schemes by Chen and Han in Homomorphic Lower Digits Removal and Improved FHE Bootstrapping (https://eprint.iacr.org/2018/067). It was also used by Kim and Guyot in Optimized Privacy-Preserving CNN Inference With Fully Homomorphic Encryption (https://ieeexplore.ieee.org/document/10089847) to efficiently perform the convolution in the coefficient domain.
This example assumes that the user is already familiar with the bootstrapping and its different steps. See the basic example `lattice/examples/he/hefloat/bootstrapping/basic` for an introduction into the bootstrapping.
The usual order of the bootstrapping operations is:
0) User defined circuit in the slots domain 1) ScaleDown: Scale the ciphertext to q0/|m| 2) ModUp: Raise modulus from q0 to qL 3) CoeffsToSlots: Homomorphic encoding 4) EvalMod: Homomorphic modular reduction 5) SlotsToCoeffs (and go back to 0): Homomorphic Decoding
This example instantiates a custom order of the circuit evaluating:
0) User defined circuit in the slots domain 1) SlotsToCoeffs: Homomorphic Decoding 2) User defined circuit in the coeffs domain 3) ScaleDown: Scale the ciphertext to q0/|m| 4) ModUp: Raise modulus from q0 to qL 5) CoeffsToSlots: Homomorphic encoding 6) EvalMod (and to back to 0): Homomorphic modular reduction
Use the flag -short to run the examples fast but with insecure parameters.