Home GnuPG

mpi: harden swap_cond functions against EM leakage

Description

mpi: harden swap_cond functions against EM leakage

* mpi/mpih-const-time.c (vzero, vone): New.
(_gcry_mpih_swap_cond): Use two masks for selecting output.
* mpi/mpiutil.c (vzero, vone): New.
(_gcry_mpi_swap_cond): Use to masks for selecting output.
  • GnuPG-bug-id: T5330
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Apr 3 2021, 6:59 PM
Parents
rC840713de1a68: cipher: Return GPG_ERR_INV_KEYLEN when wrong key length.
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task