Skip to content

Commit

Permalink
Support public key computation with timing resistance.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarske committed Nov 14, 2023
1 parent 84866a5 commit 03498df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tpm2_wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -3211,7 +3211,11 @@ int wolfTPM2_EccKey_WolfToTpm_ex(WOLFTPM2_DEV* dev, WOLFTPM2_KEY* parentKey,
rc = MEMORY_E;
}
if (rc == 0) {
#ifdef ECC_TIMING_RESISTANT
rc = wc_ecc_make_pub_ex(wolfKey, point, wolfKey->rng);
#else
rc = wc_ecc_make_pub(wolfKey, point);
#endif
if (rc == 0)
rc = wc_export_int(point->x, qx, &qxSz, keySz,
WC_TYPE_UNSIGNED_BIN);
Expand Down

0 comments on commit 03498df

Please sign in to comment.