Frank Denis a5c79c7998
crypto.ff: faster exponentiation with short/public exponents (#17617)
RSA exponents are typically 3 or 65537, and public.

For those, we don't need to use conditional moves on the exponent,
and precomputing a lookup table is not worth it. So, save a few
cpu cycles and some memory for that common case.

For safety, make `powWithEncodedExponent()` constant-time by default,
and introduce a `powWithEncodedPublicExponent()` function for exponents
that are assumed to be public.

With `powWithEncodedPublicExponent()`, short (<= 36 bits) exponents
will take the fast path.
2023-10-21 02:09:43 -07:00
..
2023-10-02 15:31:49 -06:00
2023-09-13 18:24:59 -04:00
2023-10-06 14:44:47 -04:00
2023-04-22 13:09:15 +03:00
2023-08-24 22:38:47 -07:00
2023-10-02 15:31:49 -06:00
2023-09-02 00:18:53 +02:00
2023-10-02 15:31:49 -06:00
2023-10-02 15:31:49 -06:00
2023-09-13 18:24:59 -04:00
2023-10-06 14:44:47 -04:00
2023-10-10 02:08:03 +03:00
2023-10-02 15:31:49 -06:00
2023-07-07 11:57:09 -07:00
2023-09-29 00:32:43 -07:00