aboutsummaryrefslogtreecommitdiff
path: root/pyecsca/ec/op.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyecsca/ec/op.py')
-rw-r--r--pyecsca/ec/op.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pyecsca/ec/op.py b/pyecsca/ec/op.py
index 3bf502e..0685572 100644
--- a/pyecsca/ec/op.py
+++ b/pyecsca/ec/op.py
@@ -6,6 +6,7 @@ from typing import FrozenSet, cast, Any, Optional
from public import public
+from .context import Action
from .mod import Mod
@@ -103,3 +104,13 @@ class CodeOp(object):
loc = dict(kwargs)
exec(self.compiled, {}, loc)
return loc[self.result]
+
+
+@public
+class OperationAction(Action):
+ """An operation."""
+ operation: CodeOp
+
+ def __init__(self, operation: CodeOp):
+ super().__init__()
+ self.operation = operation