-
I am running some simple experiments. In BFV/BGV, I was trying to use as many levels as possible. It seems that loqQ can be formed by at most 32 sizes of primes. I'm conducting basic experiments with the BFV and BGV encryption schemes. My goal is to utilize as many levels as possible within these schemes. Nevertheless, I've encountered a limitation with loqQ, which seems to be restricted to a maximum of 32 prime sizes. For instance, the following parameters do not work. bgv.ParametersLiteral{ I can encrypt and decrypt, but when decoding the plaintext obtained as a result of the decryption, I get the runtime error "index out of range [32] with length 32" raised by ring.reconstructRNS. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Indeed there is a hard-coded If you really want, you can modify this hard-coded value to something larger and it should work. In theory over 32 primes should not be needed because the higher the level is the more expensive homomorphic operations are, especially key-switching, and it becomes more efficient to instead have a smaller starting level and use bootstrapping. Unfortunately Lattigo does not support bootstrapping for BFV/BGV, it only does for CKKS. |
Beta Was this translation helpful? Give feedback.
Indeed there is a hard-coded
[32]uint64
array in thering.BasisExtender
andring.Decomposer
. I think allocating parameters with more than 32 primes should return an error to avoid a panic at runtime, I encourage you to open an issue about it.If you really want, you can modify this hard-coded value to something larger and it should work.
In theory over 32 primes should not be needed because the higher the level is the more expensive homomorphic operations are, especially key-switching, and it becomes more efficient to instead have a smaller starting level and use bootstrapping. Unfortunately Lattigo does not support bootstrapping for BFV/BGV, it only does for CKKS.