pyecsca.ec.formula.expand module

Provides a formula expansion function.

expand_formula_set(formulas, norm=<function ivs_norm>)[source]
Expand a set of formulas by using transformations:
  • Fliparoos

  • Sign switching

  • Associativity and Commutativity

Parameters:
  • formulas (Set[Formula]) – The set of formulas to expand.

  • norm (Callable[[Formula], Any]) – The norm to use while reducing.

Return type:

Set[Formula]

Returns:

The expanded set of formulas.

expand_formula_set_parallel(formulas, norm=<function ivs_norm>, num_workers=1)[source]
Expand a set of formulas by using transformations (parallelized):
  • Fliparoos

  • Sign switching

  • Associativity and Commutativity

Parameters:
  • formulas (Set[Formula]) – The set of formulas to expand.

  • norm (Callable[[Formula], Any]) – The norm to use while reducing.

  • num_workers (int) – The amount of workers to use.

Return type:

Set[Formula]

Returns:

The expanded set of formulas.