pyecsca.ec.formula.efd module

Provides formulas wrapping the [EFD].

class EFDFormula(meta_path, op3_path, name, coordinate_model)[source]

Bases: Formula

Formula from the [EFD].

name: str[source]

Name of the formula.

coordinate_model: Any[source]

Coordinate model of the formula.

meta: MutableMapping[str, Any][source]

Meta information about the formula, such as its source.

parameters: List[str][source]

Formula parameters (i.e. new parameters introduced by the formula, like half = 1/2).

assumptions: List[Expression][source]

Assumptions of the formula (e.g. Z1 == 1 or 2*half == 1).

code: List[CodeOp][source]

The collection of ops that constitute the code of the formula.

unified: bool[source]

Whether the formula specifies that it is unified.

to_code()[source]
Return type:

CodeFormula

property assumptions_str[source]
property input_index[source]

Return the starting index where this formula reads its inputs.

property inputs[source]

Return the input variables of the formula.

property num_addsubs: int[source]

Return the number of additions and subtractions.

property num_divisions: int[source]

Return the number of divisions.

property num_inversions: int[source]

Return the number of inversions.

property num_multiplications: int[source]

Return the number of multiplications.

property num_operations: int[source]

Return the number of operations.

property num_powers: int[source]

Return the number of powers.

property num_squarings: int[source]

Return the number of squarings.

property output_index[source]

Return the starting index where this formula stores its outputs.

property outputs[source]

Return the output variables of the formula.

shortname: ClassVar[str][source]

A shortname for the type of the formula.

num_inputs: ClassVar[int][source]

Number of inputs (points) of the formula.

num_outputs: ClassVar[int][source]

Number of outputs (points) of the formula.

class AdditionEFDFormula(meta_path, op3_path, name, coordinate_model)[source]

Bases: AdditionFormula, EFDFormula

property assumptions_str[source]
property input_index[source]

Return the starting index where this formula reads its inputs.

property inputs[source]

Return the input variables of the formula.

property num_addsubs: int[source]

Return the number of additions and subtractions.

property num_divisions: int[source]

Return the number of divisions.

num_inputs: ClassVar[int] = 2[source]

Number of inputs (points) of the formula.

property num_inversions: int[source]

Return the number of inversions.

property num_multiplications: int[source]

Return the number of multiplications.

property num_operations: int[source]

Return the number of operations.

num_outputs: ClassVar[int] = 1[source]

Number of outputs (points) of the formula.

property num_powers: int[source]

Return the number of powers.

property num_squarings: int[source]

Return the number of squarings.

property output_index[source]

Return the starting index where this formula stores its outputs.

property outputs[source]

Return the output variables of the formula.

shortname: ClassVar[str] = 'add'[source]

A shortname for the type of the formula.

to_code()[source]
Return type:

CodeFormula

name: str[source]

Name of the formula.

coordinate_model: Any[source]

Coordinate model of the formula.

meta: MutableMapping[str, Any][source]

Meta information about the formula, such as its source.

parameters: List[str][source]

Formula parameters (i.e. new parameters introduced by the formula, like half = 1/2).

assumptions: List[Expression][source]

Assumptions of the formula (e.g. Z1 == 1 or 2*half == 1).

code: List[CodeOp][source]

The collection of ops that constitute the code of the formula.

unified: bool[source]

Whether the formula specifies that it is unified.

class DoublingEFDFormula(meta_path, op3_path, name, coordinate_model)[source]

Bases: DoublingFormula, EFDFormula

property assumptions_str[source]
property input_index[source]

Return the starting index where this formula reads its inputs.

property inputs[source]

Return the input variables of the formula.

property num_addsubs: int[source]

Return the number of additions and subtractions.

property num_divisions: int[source]

Return the number of divisions.

num_inputs: ClassVar[int] = 1[source]

Number of inputs (points) of the formula.

property num_inversions: int[source]

Return the number of inversions.

property num_multiplications: int[source]

Return the number of multiplications.

property num_operations: int[source]

Return the number of operations.

num_outputs: ClassVar[int] = 1[source]

Number of outputs (points) of the formula.

property num_powers: int[source]

Return the number of powers.

property num_squarings: int[source]

Return the number of squarings.

property output_index[source]

Return the starting index where this formula stores its outputs.

property outputs[source]

Return the output variables of the formula.

shortname: ClassVar[str] = 'dbl'[source]

A shortname for the type of the formula.

to_code()[source]
Return type:

CodeFormula

name: str[source]

Name of the formula.

coordinate_model: Any[source]

Coordinate model of the formula.

meta: MutableMapping[str, Any][source]

Meta information about the formula, such as its source.

parameters: List[str][source]

Formula parameters (i.e. new parameters introduced by the formula, like half = 1/2).

assumptions: List[Expression][source]

Assumptions of the formula (e.g. Z1 == 1 or 2*half == 1).

code: List[CodeOp][source]

The collection of ops that constitute the code of the formula.

unified: bool[source]

Whether the formula specifies that it is unified.

class TriplingEFDFormula(meta_path, op3_path, name, coordinate_model)[source]

Bases: TriplingFormula, EFDFormula

property assumptions_str[source]
property input_index[source]

Return the starting index where this formula reads its inputs.

property inputs[source]

Return the input variables of the formula.

property num_addsubs: int[source]

Return the number of additions and subtractions.

property num_divisions: int[source]

Return the number of divisions.

num_inputs: ClassVar[int] = 1[source]

Number of inputs (points) of the formula.

property num_inversions: int[source]

Return the number of inversions.

property num_multiplications: int[source]

Return the number of multiplications.

property num_operations: int[source]

Return the number of operations.

num_outputs: ClassVar[int] = 1[source]

Number of outputs (points) of the formula.

property num_powers: int[source]

Return the number of powers.

property num_squarings: int[source]

Return the number of squarings.

property output_index[source]

Return the starting index where this formula stores its outputs.

property outputs[source]

Return the output variables of the formula.

shortname: ClassVar[str] = 'tpl'[source]

A shortname for the type of the formula.

to_code()[source]
Return type:

CodeFormula

name: str[source]

Name of the formula.

coordinate_model: Any[source]

Coordinate model of the formula.

meta: MutableMapping[str, Any][source]

Meta information about the formula, such as its source.

parameters: List[str][source]

Formula parameters (i.e. new parameters introduced by the formula, like half = 1/2).

assumptions: List[Expression][source]

Assumptions of the formula (e.g. Z1 == 1 or 2*half == 1).

code: List[CodeOp][source]

The collection of ops that constitute the code of the formula.

unified: bool[source]

Whether the formula specifies that it is unified.

class NegationEFDFormula(meta_path, op3_path, name, coordinate_model)[source]

Bases: NegationFormula, EFDFormula

property assumptions_str[source]
property input_index[source]

Return the starting index where this formula reads its inputs.

property inputs[source]

Return the input variables of the formula.

property num_addsubs: int[source]

Return the number of additions and subtractions.

property num_divisions: int[source]

Return the number of divisions.

num_inputs: ClassVar[int] = 1[source]

Number of inputs (points) of the formula.

property num_inversions: int[source]

Return the number of inversions.

property num_multiplications: int[source]

Return the number of multiplications.

property num_operations: int[source]

Return the number of operations.

num_outputs: ClassVar[int] = 1[source]

Number of outputs (points) of the formula.

property num_powers: int[source]

Return the number of powers.

property num_squarings: int[source]

Return the number of squarings.

property output_index[source]

Return the starting index where this formula stores its outputs.

property outputs[source]

Return the output variables of the formula.

shortname: ClassVar[str] = 'neg'[source]

A shortname for the type of the formula.

to_code()[source]
Return type:

CodeFormula

name: str[source]

Name of the formula.

coordinate_model: Any[source]

Coordinate model of the formula.

meta: MutableMapping[str, Any][source]

Meta information about the formula, such as its source.

parameters: List[str][source]

Formula parameters (i.e. new parameters introduced by the formula, like half = 1/2).

assumptions: List[Expression][source]

Assumptions of the formula (e.g. Z1 == 1 or 2*half == 1).

code: List[CodeOp][source]

The collection of ops that constitute the code of the formula.

unified: bool[source]

Whether the formula specifies that it is unified.

class ScalingEFDFormula(meta_path, op3_path, name, coordinate_model)[source]

Bases: ScalingFormula, EFDFormula

property assumptions_str[source]
property input_index[source]

Return the starting index where this formula reads its inputs.

property inputs[source]

Return the input variables of the formula.

property num_addsubs: int[source]

Return the number of additions and subtractions.

property num_divisions: int[source]

Return the number of divisions.

num_inputs: ClassVar[int] = 1[source]

Number of inputs (points) of the formula.

property num_inversions: int[source]

Return the number of inversions.

property num_multiplications: int[source]

Return the number of multiplications.

property num_operations: int[source]

Return the number of operations.

num_outputs: ClassVar[int] = 1[source]

Number of outputs (points) of the formula.

property num_powers: int[source]

Return the number of powers.

property num_squarings: int[source]

Return the number of squarings.

property output_index[source]

Return the starting index where this formula stores its outputs.

property outputs[source]

Return the output variables of the formula.

shortname: ClassVar[str] = 'scl'[source]

A shortname for the type of the formula.

to_code()[source]
Return type:

CodeFormula

name: str[source]

Name of the formula.

coordinate_model: Any[source]

Coordinate model of the formula.

meta: MutableMapping[str, Any][source]

Meta information about the formula, such as its source.

parameters: List[str][source]

Formula parameters (i.e. new parameters introduced by the formula, like half = 1/2).

assumptions: List[Expression][source]

Assumptions of the formula (e.g. Z1 == 1 or 2*half == 1).

code: List[CodeOp][source]

The collection of ops that constitute the code of the formula.

unified: bool[source]

Whether the formula specifies that it is unified.

class DifferentialAdditionEFDFormula(meta_path, op3_path, name, coordinate_model)[source]

Bases: DifferentialAdditionFormula, EFDFormula

property assumptions_str[source]
property input_index[source]

Return the starting index where this formula reads its inputs.

property inputs[source]

Return the input variables of the formula.

property num_addsubs: int[source]

Return the number of additions and subtractions.

property num_divisions: int[source]

Return the number of divisions.

num_inputs: ClassVar[int] = 3[source]

Number of inputs (points) of the formula.

property num_inversions: int[source]

Return the number of inversions.

property num_multiplications: int[source]

Return the number of multiplications.

property num_operations: int[source]

Return the number of operations.

num_outputs: ClassVar[int] = 1[source]

Number of outputs (points) of the formula.

property num_powers: int[source]

Return the number of powers.

property num_squarings: int[source]

Return the number of squarings.

property output_index[source]

Return the starting index where this formula stores its outputs.

property outputs[source]

Return the output variables of the formula.

shortname: ClassVar[str] = 'dadd'[source]

A shortname for the type of the formula.

to_code()[source]
Return type:

CodeFormula

name: str[source]

Name of the formula.

coordinate_model: Any[source]

Coordinate model of the formula.

meta: MutableMapping[str, Any][source]

Meta information about the formula, such as its source.

parameters: List[str][source]

Formula parameters (i.e. new parameters introduced by the formula, like half = 1/2).

assumptions: List[Expression][source]

Assumptions of the formula (e.g. Z1 == 1 or 2*half == 1).

code: List[CodeOp][source]

The collection of ops that constitute the code of the formula.

unified: bool[source]

Whether the formula specifies that it is unified.

class LadderEFDFormula(meta_path, op3_path, name, coordinate_model)[source]

Bases: LadderFormula, EFDFormula

property assumptions_str[source]
property input_index[source]

Return the starting index where this formula reads its inputs.

property inputs[source]

Return the input variables of the formula.

property num_addsubs: int[source]

Return the number of additions and subtractions.

property num_divisions: int[source]

Return the number of divisions.

num_inputs: ClassVar[int] = 3[source]

Number of inputs (points) of the formula.

property num_inversions: int[source]

Return the number of inversions.

property num_multiplications: int[source]

Return the number of multiplications.

property num_operations: int[source]

Return the number of operations.

num_outputs: ClassVar[int] = 2[source]

Number of outputs (points) of the formula.

property num_powers: int[source]

Return the number of powers.

property num_squarings: int[source]

Return the number of squarings.

property output_index[source]

Return the starting index where this formula stores its outputs.

property outputs[source]

Return the output variables of the formula.

shortname: ClassVar[str] = 'ladd'[source]

A shortname for the type of the formula.

to_code()[source]
Return type:

CodeFormula

name: str[source]

Name of the formula.

coordinate_model: Any[source]

Coordinate model of the formula.

meta: MutableMapping[str, Any][source]

Meta information about the formula, such as its source.

parameters: List[str][source]

Formula parameters (i.e. new parameters introduced by the formula, like half = 1/2).

assumptions: List[Expression][source]

Assumptions of the formula (e.g. Z1 == 1 or 2*half == 1).

code: List[CodeOp][source]

The collection of ops that constitute the code of the formula.

unified: bool[source]

Whether the formula specifies that it is unified.