pub trait LweCiphertextVectorDiscardingEncryptionEngine<SecretKey, PlaintextVector, CiphertextVector>: AbstractEnginewhere
SecretKey: LweSecretKeyEntity,
PlaintextVector: PlaintextVectorEntity,
CiphertextVector: LweCiphertextVectorEntity,{
// Required methods
fn discard_encrypt_lwe_ciphertext_vector(
&mut self,
key: &SecretKey,
output: &mut CiphertextVector,
input: &PlaintextVector,
noise: Variance,
) -> Result<(), LweCiphertextVectorDiscardingEncryptionError<Self::EngineError>>;
unsafe fn discard_encrypt_lwe_ciphertext_vector_unchecked(
&mut self,
key: &SecretKey,
output: &mut CiphertextVector,
input: &PlaintextVector,
noise: Variance,
);
}Expand description
A trait for engines encrypting (discarding) LWE ciphertext vectors.
§Semantics
This discarding operation fills the output LWE ciphertext vector
with the element-wise encryption of the input plaintext vector under the key LWE secret key.
§Formal Definition
cf here
Required Methods§
Sourcefn discard_encrypt_lwe_ciphertext_vector(
&mut self,
key: &SecretKey,
output: &mut CiphertextVector,
input: &PlaintextVector,
noise: Variance,
) -> Result<(), LweCiphertextVectorDiscardingEncryptionError<Self::EngineError>>
fn discard_encrypt_lwe_ciphertext_vector( &mut self, key: &SecretKey, output: &mut CiphertextVector, input: &PlaintextVector, noise: Variance, ) -> Result<(), LweCiphertextVectorDiscardingEncryptionError<Self::EngineError>>
Encrypts an LWE ciphertext vector.
Sourceunsafe fn discard_encrypt_lwe_ciphertext_vector_unchecked(
&mut self,
key: &SecretKey,
output: &mut CiphertextVector,
input: &PlaintextVector,
noise: Variance,
)
unsafe fn discard_encrypt_lwe_ciphertext_vector_unchecked( &mut self, key: &SecretKey, output: &mut CiphertextVector, input: &PlaintextVector, noise: Variance, )
Unsafely encryprs an LWE ciphertext vector.
§Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextVectorDiscardingEncryptionError. For safety concerns specific to an
engine, refer to the implementer safety section.
Implementors§
impl LweCiphertextVectorDiscardingEncryptionEngine<LweSecretKey32, PlaintextVector32, LweCiphertextVector32> for DefaultEngine
§Description:
Implementation of LweCiphertextVectorDiscardingEncryptionEngine for DefaultEngine that
operates on 32 bits integers.
impl LweCiphertextVectorDiscardingEncryptionEngine<LweSecretKey32, PlaintextVector32, LweCiphertextVectorMutView32<'_>> for DefaultEngine
§Description:
Implementation of LweCiphertextVectorDiscardingEncryptionEngine for DefaultEngine that
operates on 32 bits integers.
impl LweCiphertextVectorDiscardingEncryptionEngine<LweSecretKey64, PlaintextVector64, LweCiphertextVector64> for DefaultEngine
§Description:
Implementation of LweCiphertextVectorDiscardingEncryptionEngine for DefaultEngine that
operates on 64 bits integers.
impl LweCiphertextVectorDiscardingEncryptionEngine<LweSecretKey64, PlaintextVector64, LweCiphertextVectorMutView64<'_>> for DefaultEngine
§Description:
Implementation of LweCiphertextVectorDiscardingEncryptionEngine for DefaultEngine that
operates on 64 bits integers.