Commit 45489da
authored
elliptic-curve: add
Closes #2375
We now have variable-time precomputed basepoint tables that use wNAF
when the `basepoint-table` and `alloc` features are enabled, which can
be opportunistically used when these features are enabled to accelerate
this operation.
We use `Group::mul_by_generator` for the constant-time basepoint tables,
however for an extension trait this is captured as
`MulByGeneratorVartime::mul_by_generator_vartime`.
As discussed in the above issue, and inspired by `curve25519-dalek`'s
`EdwardsPoint::vartime_double_scalar_mul_basepoint` function, this adds
`MulByGeneratorVartime::mul_by_generator_and_mul_add_point_vartime` as a
provided method. This function is the core of many signature algorithms,
and when the basepoint tables and alloc are unavailable it can fall back
to a linear combination and still provide better performance than the
naive constant time version.MulByGeneratorVartime trait (#2381)1 parent b48dd1e commit 45489da
1 file changed
+30
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
201 | 231 | | |
202 | 232 | | |
203 | 233 | | |
| |||
0 commit comments