Old bug in gcry_mpi_invm producing wrong result
gniibe at fsij.org
Tue May 10 16:24:02 CEST 2022
Guido Vranken wrote:
> However I tried again with 1.8.0 and at that version, the reproducer prints
> "Inverse exists".
Ah, yes. You are right. I should have said specifically.
It was libgcrypt 1.8.6, which fixed the old bug for the return value of
gcry_mpi_invm. After that version, it works correctly (either 32-bit or
64-bit) in 1.8 series.
But by the commit of 128045a12139fe2e4be877df59da10c7d4857d9a, which is
included in libgcrypt 1.9.0 and later, it works incorrectly again (on
1.10.2 will include the fix.
More information about the Gcrypt-devel