Home GnuPG

mpih-const-time: use constant-time comparisons conditional add/sub/abs

Description

mpih-const-time: use constant-time comparisons conditional add/sub/abs

* mpi/mpih-const-time.c (mpih_ct_limb_greater_than)
(mpih_ct_limb_less_than): New.
(_gcry_mpih_add_n_cond, _gcry_mpih_sub_n_cond, _gcry_mpih_abs_cond): Use
mpih_ct_limb_greater_than and mpih_ct_limb_less_than for comparisons.
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Nov 2 2023, 7:59 PM
Parents
rCcf757cf90e9a: const-time: add functions for generating masks from 0/1 input
Branches
Unknown
Tags
Unknown