This was previously filled in gitlab mirror, but re-posting rebased patches based on initial feedback here:
https://gitlab.com/redhat-crypto/libgcrypt/libgcrypt-mirror/-/merge_requests/17
The current MPI code is not constant time, potentially leaking plaintext
when the attacker can observe enough decipher operations using RSA
PKCS#1.5. This is described as a Marvin Attack:
- https://eprint.iacr.org/2023/1442
- https://people.redhat.com/~hkario/marvin/
- https://lists.gnupg.org/pipermail/gcrypt-devel/2024-March/005607.html
The changes are likely not complete as there are still some timing leaks detected, but if needed I can follow-up.