Home GnuPG

mpih_cmp_ui: avoid unintentional conditional branch

Description

mpih_cmp_ui: avoid unintentional conditional branch

* mpi/mpi-internal.h (mpih_limb_is_zero): New.
* mpi/mpih-const-time.c (_gcry_mpih_cmp_ui): Use mpih_limb_is_zero
instead of comparison.
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Nov 1 2023, 8:45 PM
Parents
rC5c5ba1ec2b50: ec-nist: use global vone and vzero
Branches
Unknown
Tags
Unknown