LweCiphertextVectorDiscardingCircuitBootstrapBooleanVerticalPackingEngine

Trait LweCiphertextVectorDiscardingCircuitBootstrapBooleanVerticalPackingEngine 

Source
pub trait LweCiphertextVectorDiscardingCircuitBootstrapBooleanVerticalPackingEngine<Input, Output, BootstrapKey, LUTs, CirctuiBootstrapFunctionalPackingKeyswitchKeys>: AbstractEngine{
    // Required methods
    fn discard_circuit_bootstrap_boolean_vertical_packing_lwe_ciphertext_vector(
        &mut self,
        output: &mut Output,
        input: &Input,
        bsk: &BootstrapKey,
        luts: &LUTs,
        cbs_level_count: DecompositionLevelCount,
        cbs_base_log: DecompositionBaseLog,
        cbs_pfpksk: &CirctuiBootstrapFunctionalPackingKeyswitchKeys,
    ) -> Result<(), LweCiphertextVectorDiscardingCircuitBootstrapBooleanVerticalPackingError<Self::EngineError>>;
    unsafe fn discard_circuit_bootstrap_boolean_vertical_packing_lwe_ciphertext_vector_unchecked(
        &mut self,
        output: &mut Output,
        input: &Input,
        bsk: &BootstrapKey,
        luts: &LUTs,
        cbs_level_count: DecompositionLevelCount,
        cbs_base_log: DecompositionBaseLog,
        cbs_pfpksk: &CirctuiBootstrapFunctionalPackingKeyswitchKeys,
    );
}
Expand description

A trait for engines performing a (discarding) boolean circuit bootstrapping followed by a vertical packing on LWE ciphertext vectors. The term “boolean” refers to the fact the input ciphertexts encrypt a single bit of message.

The provided “big” luts look-up table is expected to be divisible into the same number of chunks of polynomials as there are ciphertexts in the output LweCiphertextVector. Each chunk of polynomials is used as a look-up table to evaluate during the vertical packing operation to fill an output ciphertext.

Note that there should be enough polynomials provided in each chunk to perform the vertical packing given the number of boolean input ciphertexts. The number of boolean input ciphertexts is in fact a number of bits. For this example let’s say we have 16 input ciphertexts representing 16 bits and want to output 4 ciphertexts. The “big” luts will need to be divisible into 4 chunks of equal size. If the polynomial size used is $1024 = 2^{10}$ then each chunk must contain $2^6 = 64$ polynomials ($2^6 * 2^{10} = 2^{16}$) to match the amount of values representable by the 16 input ciphertexts each encrypting a bit. The “big” luts then has a layout looking as follows:

small lut for 1st output ciphertext|...|small lut for 4th output ciphertext
|[polynomial 1] ... [polynomial 64]|...|[polynomial 1] ... [polynomial 64]|

The polynomials in the above representation are not necessarily the same, this is just for illustration purposes.

It is also possible in the above example to have a single polynomial of size $2^{16} = 65 536$ for each chunk if the polynomial size is supported for computation (which is not the case for 65 536 at the moment for implemented backends). Chunks containing a single polynomial of size $2^{10} = 1024$ would work for example for 10 input ciphertexts as that polynomial size is supported for computations. The “big” luts layout would then look as follows for that 10 bits example (still with 4 output ciphertexts):

small lut for 1st output ciphertext|...|small lut for 4th output ciphertext
|[          polynomial 1          ]|...|[          polynomial 1          ]|

§Semantics

This discarding operation first performs the circuit bootstrapping on all boolean (i.e. containing only 1 bit of message) input LWE ciphertexts from the input vector. It then fills the output LWE ciphertext vector with the result of the vertical packing operation applied on the output of the circuit bootstrapping, using the provided look-up table.

§Formal Definition

Required Methods§

Source

fn discard_circuit_bootstrap_boolean_vertical_packing_lwe_ciphertext_vector( &mut self, output: &mut Output, input: &Input, bsk: &BootstrapKey, luts: &LUTs, cbs_level_count: DecompositionLevelCount, cbs_base_log: DecompositionBaseLog, cbs_pfpksk: &CirctuiBootstrapFunctionalPackingKeyswitchKeys, ) -> Result<(), LweCiphertextVectorDiscardingCircuitBootstrapBooleanVerticalPackingError<Self::EngineError>>

Performs the circuit bootstrapping on all boolean input LWE ciphertexts followed by vertical packing using the provided look-up table.

Source

unsafe fn discard_circuit_bootstrap_boolean_vertical_packing_lwe_ciphertext_vector_unchecked( &mut self, output: &mut Output, input: &Input, bsk: &BootstrapKey, luts: &LUTs, cbs_level_count: DecompositionLevelCount, cbs_base_log: DecompositionBaseLog, cbs_pfpksk: &CirctuiBootstrapFunctionalPackingKeyswitchKeys, )

Unsafely performs the circuit bootstrapping on all boolean input LWE ciphertexts followed by vertical packing using the provided look-up table.

§Safety

For the general safety concerns regarding this operation, refer to the different variants of LweCiphertextVectorDiscardingCircuitBootstrapBooleanVerticalPackingError. For safety concerns specific to an engine, refer to the implementer safety section.

Implementors§