pyecsca.sca.attack.CPA module

class CPA(points, traces, leakage_model, mult, params)[source]

Bases: object

Parameters:
  • points (list[Point]) – Points on which scalar multiplication with secret scalar was performed

  • traces (list[Trace]) – Power traces corresponding to the scalar multiplication for each of the points

  • mult (ScalarMultiplier) – Scalar multiplier used

  • params (DomainParameters) – Domain parameters used

points: list[Point]
traces: ndarray[Any, dtype[TypeVar(ScalarType, bound= generic, covariant=True)]]
mult: ScalarMultiplier
params: DomainParameters
leakage_model: LeakageModel
correlations: dict[str, list[list[float]]]
compute_intermediate_value(guessed_scalar, target_bit, point)[source]
Return type:

Mod

compute_correlation_trace(guessed_scalar, target_bit)[source]
Return type:

list[float]

plot_correlations(ct)[source]
recover_bit(recovered_scalar, target_bit, scalar_bit_length, real_pub_key)[source]
Return type:

int

perform(scalar_bit_length, real_pub_key)[source]
Return type:

int