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