pub trait GgswCiphertextScalarEncryptionEngine<SecretKey, Plaintext, Ciphertext>: AbstractEnginewhere
    SecretKey: GlweSecretKeyEntity,
    Plaintext: PlaintextEntity,
    Ciphertext: GgswCiphertextEntity,
{ fn encrypt_scalar_ggsw_ciphertext(
        &mut self,
        key: &SecretKey,
        input: &Plaintext,
        noise: Variance,
        decomposition_level_count: DecompositionLevelCount,
        decomposition_base_log: DecompositionBaseLog
    ) -> Result<Ciphertext, GgswCiphertextScalarEncryptionError<Self::EngineError>>; unsafe fn encrypt_scalar_ggsw_ciphertext_unchecked(
        &mut self,
        key: &SecretKey,
        input: &Plaintext,
        noise: Variance,
        decomposition_level_count: DecompositionLevelCount,
        decomposition_base_log: DecompositionBaseLog
    ) -> Ciphertext; }
Expand description

A trait for engines encrypting GGSW ciphertexts containing a single plaintext.

Semantics

This pure operation generates a GGSW ciphertext containing the encryption of the input plaintext, under the key secret key.

Formal Definition

Required Methods

Encrypts a plaintext into a GGSW ciphertext.

Unsafely encrypts a plaintext vector into a GGSW ciphertext.

Safety

For the general safety concerns regarding this operation, refer to the different variants of GgswCiphertextScalarEncryptionError. For safety concerns specific to an engine, refer to the implementer safety section.

Implementors