mayo_problem

class cryptographic_estimators.MAYOEstimator.mayo_problem.MAYOProblem(n: int, m: int, o: int, k: int, q: int, **kwargs)

Bases: BaseProblem

Construct an instance of MAYOProblem.

Parameters:
  • n (int) – Number of variables

  • m (int) – Number of polynomials

  • o (int) – Dimension of the oil space

  • k (int) – Whipping parameter

  • q (int) – Order of the finite field

  • **kwargs

    Additional keyword arguments

    theta (float or None) - Exponent of the conversion factor. If 0 <= theta <= 2, every multiplication in GF(q) is counted as log2(q) ^ theta binary operation. If None, every multiplication in GF(q) is counted as 2 * log2(q) ^ 2 + log2(q) binary operation. Default is None.

    cost_one_hash (int) - Bit complexity of computing one hash value. Default is 17.

    memory_bound (float) - Maximum allowed memory to use for solving the problem. Default is inf.

property cost_one_hash

Returns the bit-complexity of computing one hash.

expected_number_solutions()

Returns the expected number of existing solutions to the problem.

get_parameters()

Returns the optimizations parameters.

hashes_to_basic_operations(number_of_hashes: float)

Return the number basic operations corresponding to a certain amount of hashes.

Parameters:

number_of_hashes (float) – Number of hashes (logarithmic)

npolynomials()

Return the number of polynomials.

nvariables()

Return the number of variables.

order_of_the_field()

Return the order of the field.

order_oil_space()

Return the dimension of the oil space.

property theta

Returns the runtime of the algorithm.

to_bitcomplexity_memory(elements_to_store: float)

Returns the memory bit-complexity associated to a given number of elements to store.

Parameters:

elements_to_store (float) – Number of memory operations (logarithmic)

to_bitcomplexity_time(basic_operations: float)

Returns the bit-complexity corresponding to a certain amount of basic_operations.

Parameters:

basic_operations (float) – Number of basic operations (logarithmic)

whipping_parameter()

Return the whipping parameter.