Skip to content

[sw/sca] Optimize/Clean up code of batch modes in sca serial files #17441

Open
@wettermo

Description

@wettermo

Description

This issue is related to #17416

@jadephilipoom made some good points on the batch mode implementation in the ecc256_keygen_serial.c file, which are also valid to each batch mode implementation in the other serial files. Hence, these suggested modifications should be applied to every serial file.

The points are:

  • To fully comply with the style guide.
  • To remove the global key/message/seed/etc. arrays, which store all values from each batch, and instead allocate enough stack memory locally for a single key/message/seed/etc. value. If we then directly process each single value this would allow us to remove the maximum number of traces per batch and also the second for-loop.
  • To use memcpy(num_traces, data, data_len) instead of num_traces = read_32(data) . This is safer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions