Trait concrete_core::specification::engines::LweCiphertextVectorDiscardingAffineTransformationEngine
source · [−]pub trait LweCiphertextVectorDiscardingAffineTransformationEngine<CiphertextVector, CleartextVector, Plaintext, OutputCiphertext>: AbstractEnginewhere
OutputCiphertext: LweCiphertextEntity,
CiphertextVector: LweCiphertextVectorEntity,
CleartextVector: CleartextVectorEntity,
Plaintext: PlaintextEntity,{
fn discard_affine_transform_lwe_ciphertext_vector(
&mut self,
output: &mut OutputCiphertext,
inputs: &CiphertextVector,
weights: &CleartextVector,
bias: &Plaintext
) -> Result<(), LweCiphertextVectorDiscardingAffineTransformationError<Self::EngineError>>;
unsafe fn discard_affine_transform_lwe_ciphertext_vector_unchecked(
&mut self,
output: &mut OutputCiphertext,
inputs: &CiphertextVector,
weights: &CleartextVector,
bias: &Plaintext
);
}
Expand description
A trait for engines performing (discarding) affine transformation of LWE ciphertexts.
Semantics
This discarding operation fills the output
LWE ciphertext with
the result of the affine tranform of the inputs
LWE ciphertext vector, with the weights
cleartext vector and the bias
plaintext.
Formal Definition
Required Methods
sourcefn discard_affine_transform_lwe_ciphertext_vector(
&mut self,
output: &mut OutputCiphertext,
inputs: &CiphertextVector,
weights: &CleartextVector,
bias: &Plaintext
) -> Result<(), LweCiphertextVectorDiscardingAffineTransformationError<Self::EngineError>>
fn discard_affine_transform_lwe_ciphertext_vector(
&mut self,
output: &mut OutputCiphertext,
inputs: &CiphertextVector,
weights: &CleartextVector,
bias: &Plaintext
) -> Result<(), LweCiphertextVectorDiscardingAffineTransformationError<Self::EngineError>>
Performs the affine transform of an LWE ciphertext vector.
sourceunsafe fn discard_affine_transform_lwe_ciphertext_vector_unchecked(
&mut self,
output: &mut OutputCiphertext,
inputs: &CiphertextVector,
weights: &CleartextVector,
bias: &Plaintext
)
unsafe fn discard_affine_transform_lwe_ciphertext_vector_unchecked(
&mut self,
output: &mut OutputCiphertext,
inputs: &CiphertextVector,
weights: &CleartextVector,
bias: &Plaintext
)
Unsafely performs the affine transform of an LWE ciphertext vector.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextVectorDiscardingAffineTransformationError
. For safety concerns
specific to an engine, refer to the implementer safety section.
Implementors
impl LweCiphertextVectorDiscardingAffineTransformationEngine<LweCiphertextVector32, CleartextVector32, Plaintext32, LweCiphertext32> for DefaultEngine
Description:
Implementation of LweCiphertextVectorDiscardingAffineTransformationEngine
for
DefaultEngine
that operates on 32 bits integers.
impl LweCiphertextVectorDiscardingAffineTransformationEngine<LweCiphertextVector64, CleartextVector64, Plaintext64, LweCiphertext64> for DefaultEngine
Description:
Implementation of LweCiphertextVectorDiscardingAffineTransformationEngine
for
DefaultEngine
that operates on 64 bits integers.