Interface

EncryptionParameters

EncryptionParameters

Members

BigUint64Array

# readonly coeffModulus

Returns the currently set coefficient modulus parameter.

View Source encryption-parameters.ts, line 134

Modulus

# readonly plainModulus

Returns the currently set PlainText modulus parameter.

View Source encryption-parameters.ts, line 150

number

# readonly polyModulusDegree

The degree of the polynomial modulus parameter.

View Source encryption-parameters.ts, line 124

SchemeType.none | SchemeType.BFV | SchemeType.CKKS

# readonly scheme

The encryption scheme type.

View Source encryption-parameters.ts, line 114

Methods

# delete()

Delete the underlying WASM instance. Should be called before dereferencing this object to prevent the WASM heap from growing indefinitely.

View Source encryption-parameters.ts, line 38

# load(encoded)

Load the Encryption Parameters from a base64 string
Parameters:
Name Type Description
encoded string base64 encoded string

View Source encryption-parameters.ts, line 191

# loadArray(array)

Load the Encryption Parameters from an Uint8Array holding binary data
Parameters:
Name Type Description
array Uint8Array TypedArray containing binary data

View Source encryption-parameters.ts, line 206

# save(compressionopt) → {string}

Save the Encryption Parameters to a base64 string
Parameters:
Name Type Attributes Default Description
compression ComprModeType <optional>
ComprModeType.deflate The compression mode to use

View Source encryption-parameters.ts, line 163

base64 encoded string
string

# saveArray(compressionopt) → {Uint8Array}

Save the Encryption Parameters as a binary Uint8Array
Parameters:
Name Type Attributes Default Description
compression ComprModeType <optional>
ComprModeType.deflate The compression mode to use

View Source encryption-parameters.ts, line 174

A byte array containing the CipherText in binary form
Uint8Array

# setCoeffModulus(coeffModulus)

Sets the coefficient modulus parameter. The coefficient modulus consists of a list of distinct prime numbers, and is represented by a vector of Modulus objects. The coefficient modulus directly affects the size of CipherText elements, the amount of computation that the scheme can perform (bigger is better), and the security level (bigger is worse). In Microsoft SEAL each of the prime numbers in the coefficient modulus must be at most 60 bits, and must be congruent to 1 modulo 2*degree(poly_modulus).
Parameters:
Name Type Description
coeffModulus Vector Vector of Modulus primes

View Source encryption-parameters.ts, line 72

# setPlainModulus(plainModulus)

Sets the PlainText modulus parameter. The PlainText modulus is an integer modulus represented by the Modulus class. The PlainText modulus determines the largest coefficient that PlainText polynomials can represent. It also affects the amount of computation that the scheme can perform (bigger is worse). In Microsoft SEAL the PlainText modulus can be at most 60 bits long, but can otherwise be any integer. Note, however, that some features (e.g. batching) require the PlainText modulus to be of a particular form.
Parameters:
Name Type Description
plainModulus Modulus PlainText modulus parameter

View Source encryption-parameters.ts, line 93

# setPolyModulusDegree(polyModulusDegree)

Sets the degree of the polynomial modulus parameter to the specified value. The polynomial modulus directly affects the number of coefficients in PlainText polynomials, the size of CipherText elements, the computational performance of the scheme (bigger is worse), and the security level (bigger is better). In Microsoft SEAL the degree of the polynomial modulus must be a power of 2 (e.g. 1024, 2048, 4096, 8192, 16384, or 32768).
Parameters:
Name Type Description
polyModulusDegree number The degree of the polynomial modulus

View Source encryption-parameters.ts, line 52