Trait concrete_core::specification::engines::GlweSeededCiphertextVectorToGlweCiphertextVectorTransformationEngine
source · [−]pub trait GlweSeededCiphertextVectorToGlweCiphertextVectorTransformationEngine<InputCiphertextVector, OutputCiphertextVector>: AbstractEnginewhere
InputCiphertextVector: GlweSeededCiphertextVectorEntity,
OutputCiphertextVector: GlweCiphertextVectorEntity,{
fn transform_glwe_seeded_ciphertext_vector_to_glwe_ciphertext_vector(
&mut self,
glwe_seeded_ciphertext_vector: InputCiphertextVector
) -> Result<OutputCiphertextVector, GlweSeededCiphertextVectorToGlweCiphertextVectorTransformationError<Self::EngineError>>;
unsafe fn transform_glwe_seeded_ciphertext_vector_to_glwe_ciphertext_vector_unchecked(
&mut self,
glwe_seeded_ciphertext_vector: InputCiphertextVector
) -> OutputCiphertextVector;
}
Expand description
A trait for engines transforming GLWE seeded ciphertexts vectors into GLWE ciphertexts vectors.
Semantics
This pure operation moves the existing GLWE seeded ciphertext vector into a GLWE ciphertext vector.
Formal Definition
GLWE seeded ciphertext vector to GLWE ciphertext vector transformation
inputs:
- $G$: a CSPRNG working with seeds from $\mathcal{S}$
- $\vec{\tilde{\mathsf{CT}}} = \left( \mathsf{seed} , \vec{\tilde{B}} \right) \in \mathsf{SeededGLWEVector}^{k,t}_{\vec{S}, G}( \vec{\mathsf{PT}} )\subseteq \mathcal{S}\times \mathcal{R}_q^t$: a seeded GLWE ciphertext vector
outputs:
- $\vec{\mathsf{CT}} = \vec{\left( \vec{A} , B \right)} \in \mathsf{GLWEVector}^{k,t}_{\vec{S}} (\vec{\mathsf{PT}} )\subseteq {\mathcal{R}_q^{k+1}}^t$: a GLWE ciphertext vector
algorithm:
- let $\vec{\mathsf{CT}} = \vec{\left( \vec{A} , B \right)} \in \mathsf{GLWEVector}^{k,t}_{\vec{S}} (\vec{\mathsf{PT}} )\subseteq {\mathcal{R}_q^{k+1}}^t$
- Seed $G$ with the seed $\mathsf{seed}\in\mathcal{S}$
- for each $(\left( \vec{A_i}, B_i\right) , \tilde{B_i})$ in $(\vec{\left( \vec{A} ,
B\right)}, \vec{\tilde{B}})$
- uniformly sample each coefficient of the polynomial vector $\vec{A_i}\in\mathcal{R}^k_q$ from $G$
- set $B_i = \tilde{B_i}$
- output $\vec{\left( \vec{A} , B\right)}$
Required Methods
sourcefn transform_glwe_seeded_ciphertext_vector_to_glwe_ciphertext_vector(
&mut self,
glwe_seeded_ciphertext_vector: InputCiphertextVector
) -> Result<OutputCiphertextVector, GlweSeededCiphertextVectorToGlweCiphertextVectorTransformationError<Self::EngineError>>
fn transform_glwe_seeded_ciphertext_vector_to_glwe_ciphertext_vector(
&mut self,
glwe_seeded_ciphertext_vector: InputCiphertextVector
) -> Result<OutputCiphertextVector, GlweSeededCiphertextVectorToGlweCiphertextVectorTransformationError<Self::EngineError>>
Does the transformation of the GLWE seeded ciphertext vector into a GLWE ciphertext vector
sourceunsafe fn transform_glwe_seeded_ciphertext_vector_to_glwe_ciphertext_vector_unchecked(
&mut self,
glwe_seeded_ciphertext_vector: InputCiphertextVector
) -> OutputCiphertextVector
unsafe fn transform_glwe_seeded_ciphertext_vector_to_glwe_ciphertext_vector_unchecked(
&mut self,
glwe_seeded_ciphertext_vector: InputCiphertextVector
) -> OutputCiphertextVector
Unsafely transforms a GLWE seeded ciphertext vector into a GLWE ciphertext vector
Safety
For the general safety concerns regarding this operation, refer to the different variants
of GlweSeededCiphertextVectorToGlweCiphertextVectorTransformationError
.
For safety concerns specific to an engine, refer to the implementer safety section.
Implementors
impl GlweSeededCiphertextVectorToGlweCiphertextVectorTransformationEngine<GlweSeededCiphertextVector32, GlweCiphertextVector32> for DefaultEngine
Description:
Implementation of GlweSeededCiphertextVectorToGlweCiphertextVectorTransformationEngine
for
DefaultEngine
that operates on 32 bits integers.
impl GlweSeededCiphertextVectorToGlweCiphertextVectorTransformationEngine<GlweSeededCiphertextVector64, GlweCiphertextVector64> for DefaultEngine
Description:
Implementation of GlweSeededCiphertextVectorToGlweCiphertextVectorTransformationEngine
for
DefaultEngine
that operates on 64 bits integers.