<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 3/26/25 19:06, NIIBE Yutaka via
Gcrypt-devel wrote:</div>
<blockquote type="cite" cite="mid:87iknvibg3.fsf@haruna.fsij.org">
<pre wrap="" class="moz-quote-pre">[...] For the first improvement,
I realized that runtime checks in ec_mod and its friends could be leaky,
because it depends on how small/big the value is.</pre>
</blockquote>
<p>Could these checks instead be improved to run in constant time?<span
style="white-space: pre-wrap">
</span></p>
<blockquote type="cite" cite="mid:87iknvibg3.fsf@haruna.fsij.org">
<pre wrap="" class="moz-quote-pre">Since it is (or can be) precondition for those routines in the code of
libgcrypt, it can be removed. Since it could be leaky, it's good to be
removed.</pre>
</blockquote>
<p>Hypothetically, if those preconditions are violated, what could
go wrong? How badly does the math fall apart? Could an invalid
result potentially (partially) expose the signing key?<br>
</p>
<p>Removing runtime checks in this type of code makes me nervous.
Maybe it is just paranoia.<br>
</p>
<p><br>
</p>
<p>-- Jacob<br>
</p>
<p><br>
</p>
</body>
</html>