aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca/ec/configuration.py
diff options
context:
space:
mode:
authorJ08nY2020-03-07 21:42:03 +0100
committerJ08nY2020-03-07 21:42:03 +0100
commit38d04f0d19059b2d8c6ad8fc46a9eec67946fffe (patch)
treed1c59ce418cd244f548dc07729e0a8157ffef850 /pyecsca/ec/configuration.py
parent8b8389ce6177cff95865280c9476569dd1abb7c7 (diff)
downloadpyecsca-38d04f0d19059b2d8c6ad8fc46a9eec67946fffe.tar.gz
pyecsca-38d04f0d19059b2d8c6ad8fc46a9eec67946fffe.tar.zst
pyecsca-38d04f0d19059b2d8c6ad8fc46a9eec67946fffe.zip
Remove Trace title and data attributes, use meta attr.
Diffstat (limited to 'pyecsca/ec/configuration.py')
-rw-r--r--pyecsca/ec/configuration.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/pyecsca/ec/configuration.py b/pyecsca/ec/configuration.py
index 24f3a7f..190ed61 100644
--- a/pyecsca/ec/configuration.py
+++ b/pyecsca/ec/configuration.py
@@ -55,6 +55,13 @@ class Reduction(EnumDefine):
@public
+class Inversion(EnumDefine):
+ """Inversion algorithm used."""
+ GCD = "INV_GCD"
+ EULER = "INV_EULER"
+
+
+@public
class HashType(EnumDefine):
"""Hash algorithm used in ECDH and ECDSA."""
NONE = "HASH_NONE"
@@ -85,6 +92,7 @@ class Configuration(object):
mult: Multiplication
sqr: Squaring
red: Reduction
+ inv: Inversion
@public
@@ -128,7 +136,8 @@ def all_configurations(**kwargs) -> Generator[Configuration, Configuration, None
"mod_rand": RandomMod,
"mult": Multiplication,
"sqr": Squaring,
- "red": Reduction
+ "red": Reduction,
+ "inv": Inversion
}
keys = list(filter(lambda key: key not in kwargs, options.keys()))
values = [options[key] for key in keys]