I am trying to understand how to optimize the use of bootstrapping and its parameters. After playing with different values, I noticed that after the first bootstrap, the ciphertext levels will always be limited. For instance, I usually find this situation:
Fresh ciphertext: 20 available multiplications
1st bootstrap: 8 available multiplications
2nd bootstrap: 8 available multiplications
and so on.
Can you confirm me that this is the “normal” behavior? Is there any way to “close” this gap between the starting 20 and the next 8?
I’d say partially; I got that that value is the approximate number of levels bootstrapping will consume. But how would I know that? Is that a function of some other parameters?
The approximate bootstrap depth is set experimentally by observing how many levels bootstrapping consumes. The total bootstrap depth is given by this function:
where R, the number of double-angle iterations, is set to 6.
For example, if you use a level budget of {4, 4} with the UNIFORM_TERNARY secret key distribution, and you experimentally observe that bootstrapping consumes 21 levels, then you would set approxBootstrapDepth to 21 - 4 - 4 - (6 - 1) = 8.