pub trait LweCiphertextVectorDiscardingKeyswitchEngine<KeyswitchKey, InputCiphertextVector, OutputCiphertextVector>: AbstractEnginewhere
KeyswitchKey: LweKeyswitchKeyEntity,
InputCiphertextVector: LweCiphertextVectorEntity,
OutputCiphertextVector: LweCiphertextVectorEntity,{
// Required methods
fn discard_keyswitch_lwe_ciphertext_vector(
&mut self,
output: &mut OutputCiphertextVector,
input: &InputCiphertextVector,
ksk: &KeyswitchKey,
) -> Result<(), LweCiphertextVectorDiscardingKeyswitchError<Self::EngineError>>;
unsafe fn discard_keyswitch_lwe_ciphertext_vector_unchecked(
&mut self,
output: &mut OutputCiphertextVector,
input: &InputCiphertextVector,
ksk: &KeyswitchKey,
);
}Expand description
A trait for engines keyswitching (discarding) LWE ciphertext vectors.
§Semantics
This discarding operation fills the output LWE ciphertext vector
with the element-wise keyswitch of the input LWE ciphertext vector, under the ksk lwe
keyswitch key.
§Formal Definition
cf here
Required Methods§
Sourcefn discard_keyswitch_lwe_ciphertext_vector(
&mut self,
output: &mut OutputCiphertextVector,
input: &InputCiphertextVector,
ksk: &KeyswitchKey,
) -> Result<(), LweCiphertextVectorDiscardingKeyswitchError<Self::EngineError>>
fn discard_keyswitch_lwe_ciphertext_vector( &mut self, output: &mut OutputCiphertextVector, input: &InputCiphertextVector, ksk: &KeyswitchKey, ) -> Result<(), LweCiphertextVectorDiscardingKeyswitchError<Self::EngineError>>
Keyswitch an LWE ciphertext vector.
Sourceunsafe fn discard_keyswitch_lwe_ciphertext_vector_unchecked(
&mut self,
output: &mut OutputCiphertextVector,
input: &InputCiphertextVector,
ksk: &KeyswitchKey,
)
unsafe fn discard_keyswitch_lwe_ciphertext_vector_unchecked( &mut self, output: &mut OutputCiphertextVector, input: &InputCiphertextVector, ksk: &KeyswitchKey, )
Unsafely keyswitch an LWE ciphertext vector.
§Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextVectorDiscardingKeyswitchError. For safety concerns specific to an
engine, refer to the implementer safety section.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".