pub trait LweCiphertextDiscardingExtractionEngine<GlweCiphertext, LweCiphertext>: AbstractEnginewhere
GlweCiphertext: GlweCiphertextEntity,
LweCiphertext: LweCiphertextEntity,{
fn discard_extract_lwe_ciphertext(
&mut self,
output: &mut LweCiphertext,
input: &GlweCiphertext,
nth: MonomialIndex
) -> Result<(), LweCiphertextDiscardingExtractionError<Self::EngineError>>;
unsafe fn discard_extract_lwe_ciphertext_unchecked(
&mut self,
output: &mut LweCiphertext,
input: &GlweCiphertext,
nth: MonomialIndex
);
}
Expand description
A trait for engines extracting (discarding) LWE ciphertext from GLWE ciphertexts.
Semantics
This discarding operation fills the output
LWE ciphertext with
the extraction of the nth
coefficient of the input
GLWE ciphertext.
Formal definition
This operation is usually referred to as a sample extract in the literature.
Required Methods
sourcefn discard_extract_lwe_ciphertext(
&mut self,
output: &mut LweCiphertext,
input: &GlweCiphertext,
nth: MonomialIndex
) -> Result<(), LweCiphertextDiscardingExtractionError<Self::EngineError>>
fn discard_extract_lwe_ciphertext(
&mut self,
output: &mut LweCiphertext,
input: &GlweCiphertext,
nth: MonomialIndex
) -> Result<(), LweCiphertextDiscardingExtractionError<Self::EngineError>>
Extracts an LWE ciphertext from a GLWE ciphertext.
sourceunsafe fn discard_extract_lwe_ciphertext_unchecked(
&mut self,
output: &mut LweCiphertext,
input: &GlweCiphertext,
nth: MonomialIndex
)
unsafe fn discard_extract_lwe_ciphertext_unchecked(
&mut self,
output: &mut LweCiphertext,
input: &GlweCiphertext,
nth: MonomialIndex
)
Unsafely extracts an LWE ciphertext from a GLWE ciphertext.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextDiscardingExtractionError
. For safety concerns specific to an engine,
refer to the implementer safety section.
Implementors
impl LweCiphertextDiscardingExtractionEngine<GlweCiphertext32, LweCiphertext32> for DefaultEngine
Description:
Implementation of LweCiphertextDiscardingExtractionEngine
for DefaultEngine
that
operates on 32 bits integers.
impl LweCiphertextDiscardingExtractionEngine<GlweCiphertext64, LweCiphertext64> for DefaultEngine
Description:
Implementation of LweCiphertextDiscardingExtractionEngine
for DefaultEngine
that
operates on 64 bits integers.