aboutsummaryrefslogtreecommitdiff
path: root/pyecsca/sca
diff options
context:
space:
mode:
authorJ08nY2024-06-04 17:02:57 +0200
committerJ08nY2024-06-04 17:02:57 +0200
commit618deff9313f1b4ee91d8fe028d7103bfe95144b (patch)
treec932f16722fff2c754e18cd20eda2de1e9334e0a /pyecsca/sca
parent4eadcd6ad1e4cadcb8bb0b6da8d9c0b62f2a09f0 (diff)
downloadpyecsca-618deff9313f1b4ee91d8fe028d7103bfe95144b.tar.gz
pyecsca-618deff9313f1b4ee91d8fe028d7103bfe95144b.tar.zst
pyecsca-618deff9313f1b4ee91d8fe028d7103bfe95144b.zip
Diffstat (limited to 'pyecsca/sca')
-rw-r--r--pyecsca/sca/attack/CPA.py2
-rw-r--r--pyecsca/sca/attack/DPA.py2
-rw-r--r--pyecsca/sca/target/leakage.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/pyecsca/sca/attack/CPA.py b/pyecsca/sca/attack/CPA.py
index 6efa3b5..efa406c 100644
--- a/pyecsca/sca/attack/CPA.py
+++ b/pyecsca/sca/attack/CPA.py
@@ -55,7 +55,7 @@ class CPA:
action_index += 2
elif bit == "0":
action_index += 1
- result = ctx.actions.get_by_index([action_index]).action
+ result = ctx.actions[0].get_by_index([action_index]).action
return result.output_points[0].X
def compute_correlation_trace(
diff --git a/pyecsca/sca/attack/DPA.py b/pyecsca/sca/attack/DPA.py
index da4ae65..0e6a8cc 100644
--- a/pyecsca/sca/attack/DPA.py
+++ b/pyecsca/sca/attack/DPA.py
@@ -50,7 +50,7 @@ class DPA:
action_index += 2
elif bit == "0":
action_index += 1
- result = ctx.actions.get_by_index([action_index]).action
+ result = ctx.actions[0].get_by_index([action_index]).action
return result.output_points[0]
def split_traces(
diff --git a/pyecsca/sca/target/leakage.py b/pyecsca/sca/target/leakage.py
index e8734fb..74838b8 100644
--- a/pyecsca/sca/target/leakage.py
+++ b/pyecsca/sca/target/leakage.py
@@ -54,7 +54,7 @@ class LeakageTarget(Target):
temp_trace: list[int] = []
if not context.actions:
raise ValueError("Empty context")
- context.actions.walk(callback)
+ context.actions[0].walk(callback)
return Trace(np.array(temp_trace))
def simulate_scalar_mult_traces(