<div dir="ltr"><div>I'm running my crypto library fuzzer on Google OSS-Fuzz and it keeps finding bugs in gcry_mpi_invm.</div><div><br></div><div>jussi kivilinna receives these reports. Would you mind taking a look?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 14, 2020 at 8:32 AM NIIBE Yutaka <<a href="mailto:gniibe@fsij.org" target="_blank">gniibe@fsij.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
Thank you for your report with a test case. It helps a lot.<br>
<br>
Guido Vranken wrote:<br>
> This is not in accordance with the documentation:<br>
><br>
> Function: int gcry_mpi_invm (gcry_mpi_t x, gcry_mpi_t a, gcry_mpi_t m)<br>
> Set x to the multiplicative inverse of a \bmod m. Return true if the<br>
> inverse exists.<br>
<br>
Indeed. It seems that API was changed to return the result<br>
(success/failure) in libgcrypt 1.3.2 in 2007. Before that, the API was<br>
void (no return value). Since the initial change, it never returns<br>
correct value.<br>
<br>
I'll fix for 1.9.<br>
-- <br>
</blockquote></div>