pub struct EncryptionParameters { /* private fields */ }
Expand description

An immutable collection of parameters that defines an encryption scheme. Use either the CKKSBuilder or BFVBuilder to create one of these. Once created, these objects are effectively immutable.

Picking appropriate encryption parameters is essential to enable a particular application while balancing performance and security. Some encryption settings will not allow some inputs (e.g. attempting to encrypt a polynomial with more coefficients than PolyModulus or larger coefficients than PlainModulus) or support the desired computations (with noise growing too fast due to too large PlainModulus and too small CoeffModulus).

The EncryptionParameters class maintains at all times a 256-bit hash of the currently set encryption parameters called the ParmsId. This hash acts as a unique identifier of the encryption parameters and is used by all further objects created for these encryption parameters. The ParmsId is not intended to be directly modified by the user but is used internally for pre-computation data lookup and input validity checks. In modulus switching the user can use the ParmsId to keep track of the chain of encryption parameters. The ParmsId is not exposed in the public API of EncryptionParameters, but can be accessed through the class once the SEALContext has been created.

Choosing inappropriate encryption parameters may lead to an encryption scheme that is not secure, does not perform well, and/or does not support the input and computation of the desired application. We highly recommend consulting an expert in RLWE-based encryption when selecting parameters, as this is where inexperienced users seem to most often make critical mistakes.

Implementations

Returns the handle to the underlying SEAL object.

Returns the polynomial degree of the underlying CKKS or BFV scheme.

Get the underlying scheme.

Returns the plain text modulus for the encryption scheme.

Returns the coefficient modulus for the encryption scheme.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.