nmonomial

class cryptographic_estimators.MQEstimator.series.nmonomial.NMonomialSeries(n: int, q=None, max_prec=None)

Bases: object

Construct an instance of the series of a polynomial ring.

Parameters:
  • n (int) – The number of variables.

  • q (int, optional) – The size of the field (default: None).

  • max_prec (int, optional) – The degree of the series (default: None).

Examples

>>> from cryptographic_estimators.MQEstimator.series.nmonomial import NMonomialSeries
>>> NM = NMonomialSeries(n=6, q=5)
>>> NM
Class for the number of monomials in the polynomial ring in 6 variables over F_5
nmonomials_of_degree(d: int)

Returns the number of monomials of degree d.

Parameters:

d (int) – A non-negative integer.

Examples

>>> from cryptographic_estimators.MQEstimator.series.nmonomial import NMonomialSeries
>>> NM = NMonomialSeries(n=6, q=5)
>>> NM.nmonomials_of_degree(4)
126
nmonomials_up_to_degree(d: int)

Return the number of monomials up to degree d.

Parameters:

d (int) – A non-negative integer.

Examples

>>> from cryptographic_estimators.MQEstimator.series.nmonomial import NMonomialSeries
>>> NM = NMonomialSeries(n=6, q=5)
>>> NM.nmonomials_up_to_degree(4)
210