Home GnuPG

mpih_set_cond: restore EM leakage mitigation
7f0eb519897bUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

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.

Cherry-pick master commit of:
0c6ec6bbe788b8c4a6982b2128d442b51323c898

  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Nov 1 2023, 8:08 PM
gniibeCommitted on Nov 6 2023, 2:31 AM
Parents
rC3583e2ebcad5: rsa, elgamal: avoid logical not operator in constant-time code
Branches
Unknown
Tags
Unknown

Event Timeline