pub trait LwePublicKeyGenerationEngine<SecretKey, PublicKey>: AbstractEnginewhere
    SecretKey: LweSecretKeyEntity,
    PublicKey: LwePublicKeyEntity,
{ fn generate_new_lwe_public_key(
        &mut self,
        lwe_secret_key: &SecretKey,
        noise: Variance,
        lwe_public_key_zero_encryption_count: LwePublicKeyZeroEncryptionCount
    ) -> Result<PublicKey, LwePublicKeyGenerationError<Self::EngineError>>; unsafe fn generate_new_lwe_public_key_unchecked(
        &mut self,
        lwe_secret_key: &SecretKey,
        noise: Variance,
        lwe_public_key_zero_encryption_count: LwePublicKeyZeroEncryptionCount
    ) -> PublicKey; }
Expand description

A trait for engines generating new LWE public keys.

Semantics

This pure operation generates a new LWE public key.

Formal Definition

cf here

Required Methods

Generates a new LWE public key.

Unsafely generates a new LWE public key.

Safety

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

Implementors