Random ideals comparison

class comparisons_random.algebraic_attack_comparison.ExperimentRecord(folder_results: str, id: int, algo_gb: str, options: dict[str, list[dict[str, any]]], algo_order_change: str, field_size: int, monomial_order: str, permutation: str, number_test: int, seed: int, monomials_degree_variables_vector: list[tuple[int, list[int], int]])

Class for the generation of system(s) of equations corresponding to an algebraic attack over a primitive and its solving.

Parameters:
  • folder_results (str) – Path of the folder containing the results of the generation

  • id (int) – ID of the files containing log and results of the experiment

  • field_size (int) – size of the prime finite field

  • monomial_order (str) – monomial order to use to define the multivariate polynomial ring

  • monomials_degree_variables_vector (list[tuple[int, list[int], int]]) – List of shape of the equations to generate

  • number_test – Number of systems to generate

  • seed (int) – seed for randomness

  • algo_gb (str) – Algorithm to compute the Gröbner basis

  • options (dict[str, list[dict[str, any]]]) – Options for the Gröbner basis algorithm

  • algo_order_change (str) – Algorithm to use for the term order change

generation_equation(system_generation_timeout: float, state: str)

Return the system of equations shape.

solve_systems(system_generation_timeout: float, full_computation_timetout: float)

Solve systems of equations generated

Parameters:
  • system_generation_timeout (float) – Timeout for the generation of the system

  • full_computation_timeout (float) – Timeout for the algebraic attack

comparisons_random.algebraic_attack_comparison.system_of_equation_shape(system_of_equation: list)

Return the system of equations shape, that is a tuple of a number of monomials, a list of indices of the variables to use and a total degree.

Parameters:

system_of_equation (list) – The system of equations

comparisons_random.random_comparison_parameters.generate_random_comparison_parameters(results_primitives_to_compare: str, parameters: list, number_test: int)

Generate the list of the paramaters fro the random comparisons

Parameters:
  • results_primitives_to_compare (str) – Folder with the results to compare

  • parameters (list) – List of parameters of the experiments to compare

  • number_test (int) – Number of comparisons to do per experiment

comparisons_random.random_comparison_parameters.get_experiment_result(filename: str)

Reults of an experiment

Parameters:

filename (str) – Name of the file

comparisons_random.random_comparison_parameters.get_parameters(folder_results: str)

Return the list of dictionnaries corresponding to parameters of the experiments

Parameters:

folder_results (str) – Folder with the results

comparisons_random.perform_experiments.experiment_executed(folder_results: str, parameters: list[dict], system_generation_timeout: float, full_computation_timeout: float)

Perform the list of experiments in parameters.

This list contains experiments with the same parameter for the permutation except the number of branches or rounds. The time to perform an algebraic attack increases with these variables. Then, we use a forbidden zone that contains timed out experiments. If an experiment is treated with a higher number of rounds or branches than one from the forbidden zone then it is immediatly skipped as we know it will we be timed out.

Parameters:
  • folder_results (str) – folder with the results of the benchmark

  • parameters (list[dict]) – list of dictionnaries of parameters to treat

  • system_generation_timeout (float) – Timeout for the generation of the system

  • full_computation_timeout (float) – Timeout for the algebraic attack