Trait concrete_core::specification::engines::LweCiphertextPlaintextDiscardingSubtractionEngine
source · [−]pub trait LweCiphertextPlaintextDiscardingSubtractionEngine<InputCiphertext, Plaintext, OutputCiphertext>: AbstractEnginewhere
Plaintext: PlaintextEntity,
InputCiphertext: LweCiphertextEntity,
OutputCiphertext: LweCiphertextEntity,{
fn discard_sub_lwe_ciphertext_plaintext(
&mut self,
output: &mut OutputCiphertext,
input_1: &InputCiphertext,
input_2: &Plaintext
) -> Result<(), LweCiphertextPlaintextDiscardingSubtractionError<Self::EngineError>>;
unsafe fn discard_sub_lwe_ciphertext_plaintext_unchecked(
&mut self,
output: &mut OutputCiphertext,
input_1: &InputCiphertext,
input_2: &Plaintext
);
}
Expand description
A trait for engines subtracting (discarding) plaintext to LWE ciphertexts.
Semantics
This discarding operation fills the output
LWE ciphertext with
the supbtraction of the input_2
plaintext to the input_1
LWE ciphertext.
Formal Definition
Required Methods
sourcefn discard_sub_lwe_ciphertext_plaintext(
&mut self,
output: &mut OutputCiphertext,
input_1: &InputCiphertext,
input_2: &Plaintext
) -> Result<(), LweCiphertextPlaintextDiscardingSubtractionError<Self::EngineError>>
fn discard_sub_lwe_ciphertext_plaintext(
&mut self,
output: &mut OutputCiphertext,
input_1: &InputCiphertext,
input_2: &Plaintext
) -> Result<(), LweCiphertextPlaintextDiscardingSubtractionError<Self::EngineError>>
Subtracts a plaintext to an LWE ciphertext.
sourceunsafe fn discard_sub_lwe_ciphertext_plaintext_unchecked(
&mut self,
output: &mut OutputCiphertext,
input_1: &InputCiphertext,
input_2: &Plaintext
)
unsafe fn discard_sub_lwe_ciphertext_plaintext_unchecked(
&mut self,
output: &mut OutputCiphertext,
input_1: &InputCiphertext,
input_2: &Plaintext
)
Unsafely subtracts a plaintext to an LWE ciphertext.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextPlaintextDiscardingSubtractionError
. For safety concerns specific to
an engine, refer to the implementer safety section.
Implementors
impl LweCiphertextPlaintextDiscardingSubtractionEngine<LweCiphertext32, Plaintext32, LweCiphertext32> for DefaultEngine
Description:
Implementation of LweCiphertextPlaintextDiscardingSubtractionEngine
for DefaultEngine
that operates on 32 bits integers.
impl LweCiphertextPlaintextDiscardingSubtractionEngine<LweCiphertext64, Plaintext64, LweCiphertext64> for DefaultEngine
Description:
Implementation of LweCiphertextPlaintextDiscardingSubtractionEngine
for DefaultEngine
that operates on 64 bits integers.