pub trait LweCiphertextDiscardingCircuitBootstrapBooleanEngine<Input, Output, BootstrapKey, CirctuiBootstrapFunctionalPackingKeyswitchKeys>: AbstractEnginewhere
    Input: LweCiphertextEntity,
    Output: GgswCiphertextEntity,
    BootstrapKey: LweBootstrapKeyEntity,
    CirctuiBootstrapFunctionalPackingKeyswitchKeys: LweCircuitBootstrapPrivateFunctionalPackingKeyswitchKeysEntity,
{ fn discard_circuit_bootstrap_boolean_lwe_ciphertext(
        &mut self,
        output: &mut Output,
        input: &Input,
        delta_log: DeltaLog,
        bsk: &BootstrapKey,
        cbs_pfpksk: &CirctuiBootstrapFunctionalPackingKeyswitchKeys
    ) -> Result<(), LweCiphertextDiscardingCircuitBootstrapBooleanError<Self::EngineError>>; unsafe fn discard_circuit_bootstrap_boolean_lwe_ciphertext_unchecked(
        &mut self,
        output: &mut Output,
        input: &Input,
        delta_log: DeltaLog,
        bsk: &BootstrapKey,
        cbs_pfpksk: &CirctuiBootstrapFunctionalPackingKeyswitchKeys
    ); }
Expand description

A trait for engines performing a (discarding) circuit bootstrap on an LWE ciphertext encrypting a boolean message (i.e. containing only 1 bit of information).

Semantics

This discarding operation fills the output GGSW ciphertext with the result of the circuit bootstrap of the input LWE ciphertext using the given bootstrap key bsk and vector of private functional packing keyswitch keys cbs_pfpksk.

Formal Definition

Circuit bootstrapping takes as input an [LWE ciphertext] (crate::specification::entities::LweCiphertextEntity) ct encrypting a boolean value $m \in {0,1}$, i.e. $$\mathsf{ct} = \left( \vec{a} , b\right) \in \mathsf{LWE}^n_{\vec{s}}( \mathsf{m} )$$ and an LWE Bootstrapping key BSK. The goal of circuit bootstrapping is to convert an LWE ciphertext into a GGSW ciphertext. Therefore, the output is a [GGSW ciphertext] (crate::specification::entities::GgswCiphertextEntity) which encrypts the boolean value $m \in {0,1}$. We also require usage of an [LWE private functional Packing keyswitch Key] (crate::specification::entities::LwePrivateFunctionalPackingKeyswitchKeyEntity) which enables a [Private functional packing keyswitch] (crate::specification::engines::LweCiphertextVectorGlweCiphertextDiscardingPrivateFunctionalPackingKeyswitchEngine) to be evaluated. The algorithm operates as follows:

  1. Perform several PBS’ to transform the input LWE ciphertext into LWE encryptions of $ m \cdot q / b^j$.
  2. Perform a [Private functional packing keyswitch] (crate::specification::engines::LweCiphertextVectorGlweCiphertextDiscardingPrivateFunctionalPackingKeyswitchEngine) in order to multiply the messages $ m \cdot q / b^j$ by the element of the secret key. This allows us to obtain the output [GGSW ciphertext] (crate::specification::entities::GgswCiphertextEntity).

Required Methods

Perfom the circuit bootstrap on the input LWE ciphertext.

Unsafely perfom the circuit bootstrap on the input LWE ciphertext.

Safety

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

Implementors