Skip to content

Commit e804155

Browse files
siemen11nasahlpa
authored andcommitted
[crypto/gcm] Add ibex_clear_rf
Copy the style on adding ibex_clear_rf when ghash_block_cnt is zero to the else branch. Signed-off-by: Siemen Dhooghe <sdhooghe@google.com> (cherry picked from commit 496dcd6)
1 parent 1f64412 commit e804155

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • sw/device/lib/crypto/impl/aes_gcm

sw/device/lib/crypto/impl/aes_gcm/ghash.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,14 @@ static status_t ghash_process_block(ghash_context_t *ctx,
330330

331331
// Apply the correction terms for state share 0.
332332
// share0 = share0_tmp + (S0*(H0+1))
333+
ibex_clear_rf();
333334
hardened_memcpy(ctx->state0.data, s0_tmp.data, kGhashBlockNumWords);
334335
hardened_xor_in_place(ctx->state0.data, ctx->correction_term0.data,
335336
kGhashBlockNumWords);
336337

337338
// Process share 1.
338339
// share1_tmp = tmp * H1
340+
ibex_clear_rf();
339341
s1_tmp = galois_mul_state_key(tmp, ctx->tbl1);
340342

341343
// Apply the correction terms for state share 1.

0 commit comments

Comments
 (0)