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.
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:
memcpy(num_traces, data, data_len)instead ofnum_traces = read_32(data). This is safer.