Trait concrete_core::specification::engines::LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchEngine
source · [−]pub trait LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchEngine<LwePackingKeyswitchKey, InputCiphertextVector, OutputCiphertext>: AbstractEnginewhere
LwePackingKeyswitchKey: LwePackingKeyswitchKeyEntity,
InputCiphertextVector: LweCiphertextVectorEntity,
OutputCiphertext: GlweCiphertextEntity,{
fn discard_packing_keyswitch_lwe_ciphertext_vector(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertextVector,
pksk: &LwePackingKeyswitchKey
) -> Result<(), LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<Self::EngineError>>;
unsafe fn discard_packing_keyswitch_lwe_ciphertext_vector_unchecked(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertextVector,
pksk: &LwePackingKeyswitchKey
);
}
Expand description
A trait for engines packing keyswitching (discarding) LWE ciphertext vectors into a GLWE ciphertext.
Semantics
This discarding operation fills the output
GLWE ciphertext
with the packing keyswitch of the input
LWE ciphertext vector, under the pksk
packing
keyswitch key.
Formal Definition
Required Methods
sourcefn discard_packing_keyswitch_lwe_ciphertext_vector(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertextVector,
pksk: &LwePackingKeyswitchKey
) -> Result<(), LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<Self::EngineError>>
fn discard_packing_keyswitch_lwe_ciphertext_vector(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertextVector,
pksk: &LwePackingKeyswitchKey
) -> Result<(), LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<Self::EngineError>>
Packing keyswitch an LWE ciphertext vector.
sourceunsafe fn discard_packing_keyswitch_lwe_ciphertext_vector_unchecked(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertextVector,
pksk: &LwePackingKeyswitchKey
)
unsafe fn discard_packing_keyswitch_lwe_ciphertext_vector_unchecked(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertextVector,
pksk: &LwePackingKeyswitchKey
)
Unsafely packing keyswitches an LWE ciphertext vector.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError
. For safety concerns
specific to an engine, refer to the implementer safety section.
Implementors
impl LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchEngine<LwePackingKeyswitchKey32, LweCiphertextVector32, GlweCiphertext32> for DefaultEngine
Description:
Implementation of LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchEngine
for
DefaultEngine
that operates on 32 bits integers.
impl LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchEngine<LwePackingKeyswitchKey64, LweCiphertextVector64, GlweCiphertext64> for DefaultEngine
Description:
Implementation of LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchEngine
for
DefaultEngine
that operates on 64 bits integers.