Differential Power Analysis (DPA)

calculate_dpa(traces, iv, order=1, window_size_fma=5, num_of_traces=0, visualize: bool = False, visualization_path: any = None):

Unified differential power analysis method that has support for first and second order DPA.

Parameters:
  • traces – The set of power traces used for analysis.

  • iv – Intermediate algorithm values associated with the power traces

  • order – The order of DPA analysis (default: 1).

  • window_size_fma – The window size used for filtering or moving average computations.

  • num_of_traces – The number of traces to include in the analysis

  • visualize – Whether to generate a visualization of the analysis results.

  • visualization_path – Path to save the visualization output, if applicable.

Returns:

The result of the DPA computation.

calculate_second_order_dpa_mem_efficient(traces, IV, window_width):

Efficient implementation of second order DPA

Parameters:
  • traces – The power traces to be processed.

  • IV – Intermediate algorithm values associated with the power traces

  • window_width – The window size of the moving average calculation

Returns:

The result of the DPA calculation