Home GnuPG

sntrup761: use const-time helpers for memory comparison and cond move
7ff58b28726eUnpublished

Unpublished Commit · Learn More

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

Description

sntrup761: use const-time helpers for memory comparison and cond move

* cipher/sntrup761.c (Ciphertexts_diff_mask): Use
'_gcry_ct_not_memequal' for checking if arrays are different.
(sntrup761_dec): Use '_gcry_ct_memmov_cond' for conditionally setting
'r_enc'.

Cherry-pick master commit of:
4e963e91dbe55b23ed0da2003c2de053c40f4c9a

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

Details

Provenance
jukiviliAuthored on Sep 17 2025, 6:39 PM
gniibeCommitted on Nov 20 2025, 2:33 AM
Parents
rCcf1165c26ac8: sntrup761: harden mask generation against branch optimization
Branches
Unknown
Tags
Unknown

Event Timeline