mirror of
https://github.com/saymrwulf/risc0-curve25519-dalek-source.git
synced 2026-09-04 20:03:40 +00:00
The serial (`u32`/`u64`) implementations use a multiple curve models, passing between extended and projective coordinates when performing addition and doubling (respectively). But the AVX2 backend doesn't, so in order to write a single scalar mult implementation, we have to either abstract over the curve models or have two implementations. A generic solution is possible but extremely unreadable: the scalar mul implementation would be parameterized over the point types used by the serial implementations, with many where clauses describing how the types relate. The AVX2 types could then be substituted in the appropriate places. Instead we just duplicate the code into the `avx2` backend. |
||
|---|---|---|
| .. | ||
| backend | ||
| curve_models | ||
| scalar_mul | ||
| constants.rs | ||
| edwards.rs | ||
| field.rs | ||
| lib.rs | ||
| macros.rs | ||
| montgomery.rs | ||
| ristretto.rs | ||
| scalar.rs | ||
| traits.rs | ||