pyecsca.ec.formula.code module¶
Provides a concrete class of a formula that has a constructor and some code.
- class CodeFormula(name, code, coordinate_model, parameters, assumptions, unified=False)[source]¶
Bases:
Formula
A basic formula class that can be directly initialized with the code and other attributes.
- name: str¶
Name of the formula.
- code: List[CodeOp]¶
The collection of ops that constitute the code of the formula.
- coordinate_model: Any¶
Coordinate model of the formula.
- meta: MutableMapping[str, Any]¶
Meta information about the formula, such as its source.
- parameters: List[str]¶
Formula parameters (i.e. new parameters introduced by the formula, like half = 1/2).
- assumptions: List[Expression]¶
Assumptions of the formula (e.g. Z1 == 1 or 2*half == 1).
- unified: bool¶
Whether the formula specifies that it is unified.
- property assumptions_str¶
- property input_index¶
Return the starting index where this formula reads its inputs.
- property inputs¶
Return the input variables of the formula.
- property num_addsubs: int¶
Return the number of additions and subtractions.
- property num_divisions: int¶
Return the number of divisions.
- property num_inversions: int¶
Return the number of inversions.
- property num_multiplications: int¶
Return the number of multiplications.
- property num_operations: int¶
Return the number of operations.
- property num_powers: int¶
Return the number of powers.
- property num_squarings: int¶
Return the number of squarings.
- property output_index¶
Return the starting index where this formula stores its outputs.
- property outputs¶
Return the output variables of the formula.
- shortname: ClassVar[str]¶
A shortname for the type of the formula.
- num_inputs: ClassVar[int]¶
Number of inputs (points) of the formula.
- num_outputs: ClassVar[int]¶
Number of outputs (points) of the formula.
- class CodeAdditionFormula(name, code, coordinate_model, parameters, assumptions, unified=False)[source]¶
Bases:
AdditionFormula
,CodeFormula
- property assumptions_str¶
- property input_index¶
Return the starting index where this formula reads its inputs.
- property inputs¶
Return the input variables of the formula.
- property num_addsubs: int¶
Return the number of additions and subtractions.
- property num_divisions: int¶
Return the number of divisions.
- num_inputs: ClassVar[int] = 2¶
Number of inputs (points) of the formula.
- property num_inversions: int¶
Return the number of inversions.
- property num_multiplications: int¶
Return the number of multiplications.
- property num_operations: int¶
Return the number of operations.
- num_outputs: ClassVar[int] = 1¶
Number of outputs (points) of the formula.
- property num_powers: int¶
Return the number of powers.
- property num_squarings: int¶
Return the number of squarings.
- property output_index¶
Return the starting index where this formula stores its outputs.
- property outputs¶
Return the output variables of the formula.
- shortname: ClassVar[str] = 'add'¶
A shortname for the type of the formula.
- name: str¶
Name of the formula.
- coordinate_model: Any¶
Coordinate model of the formula.
- meta: MutableMapping[str, Any]¶
Meta information about the formula, such as its source.
- parameters: List[str]¶
Formula parameters (i.e. new parameters introduced by the formula, like half = 1/2).
- assumptions: List[Expression]¶
Assumptions of the formula (e.g. Z1 == 1 or 2*half == 1).
- code: List[CodeOp]¶
The collection of ops that constitute the code of the formula.
- unified: bool¶
Whether the formula specifies that it is unified.
- class CodeDoublingFormula(name, code, coordinate_model, parameters, assumptions, unified=False)[source]¶
Bases:
DoublingFormula
,CodeFormula
- property assumptions_str¶
- property input_index¶
Return the starting index where this formula reads its inputs.
- property inputs¶
Return the input variables of the formula.
- property num_addsubs: int¶
Return the number of additions and subtractions.
- property num_divisions: int¶
Return the number of divisions.
- num_inputs: ClassVar[int] = 1¶
Number of inputs (points) of the formula.
- property num_inversions: int¶
Return the number of inversions.
- property num_multiplications: int¶
Return the number of multiplications.
- property num_operations: int¶
Return the number of operations.
- num_outputs: ClassVar[int] = 1¶
Number of outputs (points) of the formula.
- property num_powers: int¶
Return the number of powers.
- property num_squarings: int¶
Return the number of squarings.
- property output_index¶
Return the starting index where this formula stores its outputs.
- property outputs¶
Return the output variables of the formula.
- shortname: ClassVar[str] = 'dbl'¶
A shortname for the type of the formula.
- name: str¶
Name of the formula.
- coordinate_model: Any¶
Coordinate model of the formula.
- meta: MutableMapping[str, Any]¶
Meta information about the formula, such as its source.
- parameters: List[str]¶
Formula parameters (i.e. new parameters introduced by the formula, like half = 1/2).
- assumptions: List[Expression]¶
Assumptions of the formula (e.g. Z1 == 1 or 2*half == 1).
- code: List[CodeOp]¶
The collection of ops that constitute the code of the formula.
- unified: bool¶
Whether the formula specifies that it is unified.
- class CodeLadderFormula(name, code, coordinate_model, parameters, assumptions, unified=False)[source]¶
Bases:
LadderFormula
,CodeFormula
- property assumptions_str¶
- property input_index¶
Return the starting index where this formula reads its inputs.
- property inputs¶
Return the input variables of the formula.
- property num_addsubs: int¶
Return the number of additions and subtractions.
- property num_divisions: int¶
Return the number of divisions.
- num_inputs: ClassVar[int] = 3¶
Number of inputs (points) of the formula.
- property num_inversions: int¶
Return the number of inversions.
- property num_multiplications: int¶
Return the number of multiplications.
- property num_operations: int¶
Return the number of operations.
- num_outputs: ClassVar[int] = 2¶
Number of outputs (points) of the formula.
- property num_powers: int¶
Return the number of powers.
- property num_squarings: int¶
Return the number of squarings.
- property output_index¶
Return the starting index where this formula stores its outputs.
- property outputs¶
Return the output variables of the formula.
- shortname: ClassVar[str] = 'ladd'¶
A shortname for the type of the formula.
- name: str¶
Name of the formula.
- coordinate_model: Any¶
Coordinate model of the formula.
- meta: MutableMapping[str, Any]¶
Meta information about the formula, such as its source.
- parameters: List[str]¶
Formula parameters (i.e. new parameters introduced by the formula, like half = 1/2).
- assumptions: List[Expression]¶
Assumptions of the formula (e.g. Z1 == 1 or 2*half == 1).
- code: List[CodeOp]¶
The collection of ops that constitute the code of the formula.
- unified: bool¶
Whether the formula specifies that it is unified.
- class CodeTriplingFormula(name, code, coordinate_model, parameters, assumptions, unified=False)[source]¶
Bases:
TriplingFormula
,CodeFormula
- property assumptions_str¶
- property input_index¶
Return the starting index where this formula reads its inputs.
- property inputs¶
Return the input variables of the formula.
- property num_addsubs: int¶
Return the number of additions and subtractions.
- property num_divisions: int¶
Return the number of divisions.
- num_inputs: ClassVar[int] = 1¶
Number of inputs (points) of the formula.
- property num_inversions: int¶
Return the number of inversions.
- property num_multiplications: int¶
Return the number of multiplications.
- property num_operations: int¶
Return the number of operations.
- num_outputs: ClassVar[int] = 1¶
Number of outputs (points) of the formula.
- property num_powers: int¶
Return the number of powers.
- property num_squarings: int¶
Return the number of squarings.
- property output_index¶
Return the starting index where this formula stores its outputs.
- property outputs¶
Return the output variables of the formula.
- shortname: ClassVar[str] = 'tpl'¶
A shortname for the type of the formula.
- name: str¶
Name of the formula.
- coordinate_model: Any¶
Coordinate model of the formula.
- meta: MutableMapping[str, Any]¶
Meta information about the formula, such as its source.
- parameters: List[str]¶
Formula parameters (i.e. new parameters introduced by the formula, like half = 1/2).
- assumptions: List[Expression]¶
Assumptions of the formula (e.g. Z1 == 1 or 2*half == 1).
- code: List[CodeOp]¶
The collection of ops that constitute the code of the formula.
- unified: bool¶
Whether the formula specifies that it is unified.
- class CodeNegationFormula(name, code, coordinate_model, parameters, assumptions, unified=False)[source]¶
Bases:
NegationFormula
,CodeFormula
- property assumptions_str¶
- property input_index¶
Return the starting index where this formula reads its inputs.
- property inputs¶
Return the input variables of the formula.
- property num_addsubs: int¶
Return the number of additions and subtractions.
- property num_divisions: int¶
Return the number of divisions.
- num_inputs: ClassVar[int] = 1¶
Number of inputs (points) of the formula.
- property num_inversions: int¶
Return the number of inversions.
- property num_multiplications: int¶
Return the number of multiplications.
- property num_operations: int¶
Return the number of operations.
- num_outputs: ClassVar[int] = 1¶
Number of outputs (points) of the formula.
- property num_powers: int¶
Return the number of powers.
- property num_squarings: int¶
Return the number of squarings.
- property output_index¶
Return the starting index where this formula stores its outputs.
- property outputs¶
Return the output variables of the formula.
- shortname: ClassVar[str] = 'neg'¶
A shortname for the type of the formula.
- name: str¶
Name of the formula.
- coordinate_model: Any¶
Coordinate model of the formula.
- meta: MutableMapping[str, Any]¶
Meta information about the formula, such as its source.
- parameters: List[str]¶
Formula parameters (i.e. new parameters introduced by the formula, like half = 1/2).
- assumptions: List[Expression]¶
Assumptions of the formula (e.g. Z1 == 1 or 2*half == 1).
- code: List[CodeOp]¶
The collection of ops that constitute the code of the formula.
- unified: bool¶
Whether the formula specifies that it is unified.
- class CodeScalingFormula(name, code, coordinate_model, parameters, assumptions, unified=False)[source]¶
Bases:
ScalingFormula
,CodeFormula
- property assumptions_str¶
- property input_index¶
Return the starting index where this formula reads its inputs.
- property inputs¶
Return the input variables of the formula.
- property num_addsubs: int¶
Return the number of additions and subtractions.
- property num_divisions: int¶
Return the number of divisions.
- num_inputs: ClassVar[int] = 1¶
Number of inputs (points) of the formula.
- property num_inversions: int¶
Return the number of inversions.
- property num_multiplications: int¶
Return the number of multiplications.
- property num_operations: int¶
Return the number of operations.
- num_outputs: ClassVar[int] = 1¶
Number of outputs (points) of the formula.
- property num_powers: int¶
Return the number of powers.
- property num_squarings: int¶
Return the number of squarings.
- property output_index¶
Return the starting index where this formula stores its outputs.
- property outputs¶
Return the output variables of the formula.
- shortname: ClassVar[str] = 'scl'¶
A shortname for the type of the formula.
- name: str¶
Name of the formula.
- coordinate_model: Any¶
Coordinate model of the formula.
- meta: MutableMapping[str, Any]¶
Meta information about the formula, such as its source.
- parameters: List[str]¶
Formula parameters (i.e. new parameters introduced by the formula, like half = 1/2).
- assumptions: List[Expression]¶
Assumptions of the formula (e.g. Z1 == 1 or 2*half == 1).
- code: List[CodeOp]¶
The collection of ops that constitute the code of the formula.
- unified: bool¶
Whether the formula specifies that it is unified.
- class CodeDifferentialAdditionFormula(name, code, coordinate_model, parameters, assumptions, unified=False)[source]¶
Bases:
DifferentialAdditionFormula
,CodeFormula
- property assumptions_str¶
- property input_index¶
Return the starting index where this formula reads its inputs.
- property inputs¶
Return the input variables of the formula.
- property num_addsubs: int¶
Return the number of additions and subtractions.
- property num_divisions: int¶
Return the number of divisions.
- num_inputs: ClassVar[int] = 3¶
Number of inputs (points) of the formula.
- property num_inversions: int¶
Return the number of inversions.
- property num_multiplications: int¶
Return the number of multiplications.
- property num_operations: int¶
Return the number of operations.
- num_outputs: ClassVar[int] = 1¶
Number of outputs (points) of the formula.
- property num_powers: int¶
Return the number of powers.
- property num_squarings: int¶
Return the number of squarings.
- property output_index¶
Return the starting index where this formula stores its outputs.
- property outputs¶
Return the output variables of the formula.
- shortname: ClassVar[str] = 'dadd'¶
A shortname for the type of the formula.
- name: str¶
Name of the formula.
- coordinate_model: Any¶
Coordinate model of the formula.
- meta: MutableMapping[str, Any]¶
Meta information about the formula, such as its source.
- parameters: List[str]¶
Formula parameters (i.e. new parameters introduced by the formula, like half = 1/2).
- assumptions: List[Expression]¶
Assumptions of the formula (e.g. Z1 == 1 or 2*half == 1).
- code: List[CodeOp]¶
The collection of ops that constitute the code of the formula.
- unified: bool¶
Whether the formula specifies that it is unified.