estimator.ntru_parameters.NTRUParameters

estimator.ntru_parameters.NTRUParameters#

class estimator.ntru_parameters.NTRUParameters(n: int, q: int, Xs: ~estimator.nd.NoiseDistribution, Xe: ~estimator.nd.NoiseDistribution, m: int = <MagicMock id='139897253308832'>, tag: str | None = None, ntru_type: str = 'matrix')[source]#

The parameters for an NTRU problem instance. The estimator treats regular NTRU parameters as similar to LWE, but requires different estimation methodology for overstrethed parameters.

Parameters:

ntru_type – Specifies the type of NTRU instance the parameters represent. Currently supported types are, “matrix” for general matrix NTRU, “circulant” for circulant NTRU, “fixed” for circulant NTRU with a fixed geometry.

__call__(**kwargs)#

Call self as a function.

Methods

__init__(n, q, Xs, Xe[, m, tag, ntru_type])

amplify_m(m)

Return an NTRU instance parameters with m samples produced from the samples in this instance.

normalize()

EXAMPLES:

switch_modulus()

Apply modulus switching and return new instance.

updated(**kwds)

Return a new set of parameters updated according to kwds.

Attributes

m

the number of LWE samples allowed to an attacker, optionally sage.all.oo for allowing infinitely many samples.

ntru_type

possibly_overstretched

tag

a name for the patameter set

n

the dimension of the LWE sample vector (Z/qZ)^n.

q

the modulus of the space Z/qZ of integers the LWE samples are in.

Xs

the distribution on Z/qZ from which the LWE secret is drawn

Xe

the distribution on Z/qZ from which the error term is drawn