Differential Power Analysis (DPA)

calculate_dpa(traces, iv, order=1, key_guess=0, window_size_fma=5, num_of_traces=0):

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

Parameters:
  • traces – The power traces to be processed

  • iv – Intermediate algorithm values associated with the power traces

  • key_guess – The DPA key guess

  • window_size_fma – The window size of the moving average calculation

  • num_of_traces – The number of traces being processed

Returns:

The result of the DPA calculation

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