diff options
| author | J08nY | 2019-04-23 19:05:27 +0200 |
|---|---|---|
| committer | J08nY | 2019-04-23 19:05:27 +0200 |
| commit | 28390ec1575e0af026be2bfea6fd0bca8f55c008 (patch) | |
| tree | fefdb02a66c2811be4dd95da4751a9b3756b740c /pyecsca/ec/formula.py | |
| parent | 06b421731616099cc42d19e345aa71e5d6708167 (diff) | |
| download | pyecsca-28390ec1575e0af026be2bfea6fd0bca8f55c008.tar.gz pyecsca-28390ec1575e0af026be2bfea6fd0bca8f55c008.tar.zst pyecsca-28390ec1575e0af026be2bfea6fd0bca8f55c008.zip | |
Diffstat (limited to 'pyecsca/ec/formula.py')
| -rw-r--r-- | pyecsca/ec/formula.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pyecsca/ec/formula.py b/pyecsca/ec/formula.py index e6d8d9f..441953e 100644 --- a/pyecsca/ec/formula.py +++ b/pyecsca/ec/formula.py @@ -1,7 +1,8 @@ from ast import parse, Expression +from typing import List, Any, ClassVar, MutableMapping + from pkg_resources import resource_stream from public import public -from typing import List, Any, ClassVar, MutableMapping from .op import Op, CodeOp @@ -21,7 +22,7 @@ class Formula(object): @property def output_index(cls): - return max(cls.num_inputs + 1, 3) + raise NotImplementedError class EFDFormula(Formula): @@ -56,6 +57,10 @@ class EFDFormula(Formula): code_module = parse(line.decode("ascii").replace("^", "**"), path, mode="exec") self.code.append(CodeOp(code_module)) + @property + def output_index(cls): + return max(cls.num_inputs + 1, 3) + @public class AdditionFormula(Formula): |
