mirror of
https://github.com/saymrwulf/risc0-curve25519-dalek-source.git
synced 2026-09-05 20:10:35 +00:00
This splits the `FieldElement51x4` type into two types: - `F51x4Reduced` (with reduced limbs) - `F51x4Unreduced` (with unreduced limbs) The reduction is implemented as a `From` impl to convert one type to the other. The output of a multiplication is now a `F51x4Unreduced`. The reason is that the inputs to IFMA operations must be at most 52 bits, so it's not possible to perform an addition of (51+epsilon)-bit values and still be small enough to be used as an input to multiplication. So, it doesn't make sense to perform a reduction at the end of a multiplication, because the reduced values will be fed into an addition or subtraction, which then needs to be re-reduced. |
||
|---|---|---|
| .. | ||
| serial | ||
| vector | ||
| mod.rs | ||