Home GnuPG

mpih_set_cond: restore EM leakage mitigation

Description

mpih_set_cond: restore EM leakage mitigation

* mpi/mpih-const-time.c (_gcry_mpih_set_cond): Replace single mask + XOR
with dual mask + AND/OR; Add comment about reason for dual mask usage.
(_gcry_mpih_add_n_cond, _gcry_mpih_sub_n_cond, _gcry_mpih_swap_cond)
(_gcry_mpih_abs_cond): Add comment about reason for dual mask usage.
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Nov 1 2023, 8:08 PM
Parents
rC84f934c09afa: rsa, elgamal: avoid logical not operator in constant-time code
Branches
Unknown
Tags
Unknown