Trait concrete_core::specification::engines::LweCiphertextPlaintextDiscardingAdditionEngine
source · [−]pub trait LweCiphertextPlaintextDiscardingAdditionEngine<InputCiphertext, Plaintext, OutputCiphertext>: AbstractEnginewhere
Plaintext: PlaintextEntity,
InputCiphertext: LweCiphertextEntity,
OutputCiphertext: LweCiphertextEntity,{
fn discard_add_lwe_ciphertext_plaintext(
&mut self,
output: &mut OutputCiphertext,
input_1: &InputCiphertext,
input_2: &Plaintext
) -> Result<(), LweCiphertextPlaintextDiscardingAdditionError<Self::EngineError>>;
unsafe fn discard_add_lwe_ciphertext_plaintext_unchecked(
&mut self,
output: &mut OutputCiphertext,
input_1: &InputCiphertext,
input_2: &Plaintext
);
}
Expand description
A trait for engines adding (discarding) plaintext to LWE ciphertexts.
Semantics
This discarding operation fills the output
LWE ciphertext with
the addition of the input_1
LWE ciphertext with the input_2
plaintext.
Formal Definition
Required Methods
sourcefn discard_add_lwe_ciphertext_plaintext(
&mut self,
output: &mut OutputCiphertext,
input_1: &InputCiphertext,
input_2: &Plaintext
) -> Result<(), LweCiphertextPlaintextDiscardingAdditionError<Self::EngineError>>
fn discard_add_lwe_ciphertext_plaintext(
&mut self,
output: &mut OutputCiphertext,
input_1: &InputCiphertext,
input_2: &Plaintext
) -> Result<(), LweCiphertextPlaintextDiscardingAdditionError<Self::EngineError>>
Adds a plaintext to an LWE ciphertext.
sourceunsafe fn discard_add_lwe_ciphertext_plaintext_unchecked(
&mut self,
output: &mut OutputCiphertext,
input_1: &InputCiphertext,
input_2: &Plaintext
)
unsafe fn discard_add_lwe_ciphertext_plaintext_unchecked(
&mut self,
output: &mut OutputCiphertext,
input_1: &InputCiphertext,
input_2: &Plaintext
)
Unsafely adds a plaintext to an LWE ciphertext.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextPlaintextDiscardingAdditionError
. For safety concerns specific to an
engine, refer to the implementer safety section.
Implementors
impl LweCiphertextPlaintextDiscardingAdditionEngine<LweCiphertext32, Plaintext32, LweCiphertext32> for DefaultEngine
Description:
Implementation of LweCiphertextPlaintextDiscardingAdditionEngine
for DefaultEngine
that
operates on 32 bits integers.
impl LweCiphertextPlaintextDiscardingAdditionEngine<LweCiphertext64, Plaintext64, LweCiphertext64> for DefaultEngine
Description:
Implementation of LweCiphertextPlaintextDiscardingAdditionEngine
for DefaultEngine
that
operates on 64 bits integers.
impl LweCiphertextPlaintextDiscardingAdditionEngine<LweCiphertextView32<'_>, Plaintext32, LweCiphertextMutView32<'_>> for DefaultEngine
Description:
Implementation of LweCiphertextPlaintextDiscardingAdditionEngine
for DefaultEngine
that
operates on views containing 32 bits integers.
impl LweCiphertextPlaintextDiscardingAdditionEngine<LweCiphertextView64<'_>, Plaintext64, LweCiphertextMutView64<'_>> for DefaultEngine
Description:
Implementation of LweCiphertextPlaintextDiscardingAdditionEngine
for DefaultEngine
that
operates on views containing 64 bits integers.