aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Bátora2023-10-05 18:48:19 +0200
committerAndrej Bátora2023-10-05 18:48:19 +0200
commit71bac00f26e745c929d318b607d1794568fc6514 (patch)
tree8352581034029c583e259fae962112c28f076ddc
parent382a5896488f033c8269cf81fcdde3bf1ef98cad (diff)
downloadpyecsca-71bac00f26e745c929d318b607d1794568fc6514.tar.gz
pyecsca-71bac00f26e745c929d318b607d1794568fc6514.tar.zst
pyecsca-71bac00f26e745c929d318b607d1794568fc6514.zip
fixed CPA
-rw-r--r--pyecsca/sca/attack/CPA.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyecsca/sca/attack/CPA.py b/pyecsca/sca/attack/CPA.py
index ad65804..3ef57b0 100644
--- a/pyecsca/sca/attack/CPA.py
+++ b/pyecsca/sca/attack/CPA.py
@@ -13,7 +13,7 @@ from numpy.typing import NDArray
@public
class CPA():
- traces: list[Trace]
+ traces: NDArray
points: list[Point]
mult: ScalarMultiplier
params: DomainParameters
@@ -45,7 +45,7 @@ class CPA():
result = ctx.actions.get_by_index([0, action_index])[0]
return result.output_points[0].X
- def compute_correlation_trace(self, guessed_scalar: int, target_bit: int) -> NDArray:
+ def compute_correlation_trace(self, guessed_scalar: int, target_bit: int) -> list[any]:
correlation_trace = []
intermediate_values = []
for i in range(len(self.points)):