sboxUv2.core.anf package

Algebraic normal form and related functions.

Submodules

sboxUv2.core.anf.cython_functions module

sboxUv2.core.anf.cython_functions.algebraic_normal_form(s, polynomial_vars=None)
sboxUv2.core.anf.cython_functions.algebraic_normal_form_coordinate(s, polynomial_vars=None)

The algebraic normal form of a boolean function is the multivariate polynomial representation of this function

Parameters:
  • s – an S_box-able of output length 1.

  • polynomial_vars – the variables used to express the polynomial.

Returns:

A polynomial corresponding to the boolean function s, expressed in terms of polynomial_vars if not None.

sboxUv2.core.anf.cython_functions.degree_spectrum(s)

The degree spectrum describes the number of components of an S-box that have algebraic degree exactly k.

Parameters:

s – an S_box-able object

Returns:

A Spectrum object d such that d[k] is the number of components of s with algebraic degree exactly equal to k.

sboxUv2.core.anf.cython_functions.eval_anf(anf, x)
sboxUv2.core.anf.cython_functions.eval_vect_anf(anfs, x)