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][source]
traces: ndarray[Any, dtype[TypeVar(_ScalarType_co, bound= generic, covariant=True)]][source]
mult: ScalarMultiplier[source]
params: DomainParameters[source]
leakage_model: LeakageModel[source]
correlations: dict[str, list[list[float]]][source]
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