Skip to content

Commit

Permalink
[aes_gcm,sca] Fix 0 init of array
Browse files Browse the repository at this point in the history
This commit fixes the zero init of the accumulation array.

Signed-off-by: Pascal Nasahl <[email protected]>
  • Loading branch information
nasahlpa committed Jan 15, 2025
1 parent 242a5cb commit 15920e3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sw/device/tests/penetrationtests/firmware/sca/aes_sca.c
Original file line number Diff line number Diff line change
Expand Up @@ -914,8 +914,10 @@ status_t handle_aes_sca_gcm_fvsr_batch(ujson_t *uj) {

// Trigger the AES GCM operation.
dif_aes_data_t aes_tag_acc;
memset(aes_tag_acc.data, 0,
sizeof(aes_tag_acc.data[0] * ARRAYSIZE(aes_tag_acc.data)));
aes_tag_acc.data[0] = 0;
aes_tag_acc.data[1] = 0;
aes_tag_acc.data[2] = 0;
aes_tag_acc.data[3] = 0;
for (size_t it = 0; it < uj_num_ops.num_batch_ops; it++) {
dif_aes_data_t aes_tag;
TRY(trigger_aes_gcm(key_fvsr[it], aes_iv_fvsr[it], aes_aad,
Expand Down

0 comments on commit 15920e3

Please sign in to comment.