mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
Delay all computations using x[0], y[0]
Since computation of the 0 term in reduction requires a multiplication with a 4-cycle latency, this ensures that the rest of the computation can start before the 0 term is finished
This commit is contained in:
parent
c925c76342
commit
d90bb779ca
1 changed files with 4 additions and 4 deletions
|
|
@ -197,8 +197,8 @@ impl<'a, 'b> Mul<&'b F51x4Reduced> for &'a F51x4Reduced {
|
|||
let mut z9hi = u64x4::splat(0);
|
||||
|
||||
// Wave 0
|
||||
z4lo = madd52lo(z4lo, x[4], y[0]);
|
||||
z5hi = madd52hi(z5hi, x[4], y[0]);
|
||||
z4lo = madd52lo(z4lo, x[2], y[2]);
|
||||
z5hi = madd52hi(z5hi, x[2], y[2]);
|
||||
z5lo = madd52lo(z5lo, x[4], y[1]);
|
||||
z6hi = madd52hi(z6hi, x[4], y[1]);
|
||||
z6lo = madd52lo(z6lo, x[4], y[2]);
|
||||
|
|
@ -219,8 +219,8 @@ impl<'a, 'b> Mul<&'b F51x4Reduced> for &'a F51x4Reduced {
|
|||
// Wave 2
|
||||
z8lo = madd52lo(z8lo, x[4], y[4]);
|
||||
z9hi = madd52hi(z9hi, x[4], y[4]);
|
||||
z4lo = madd52lo(z4lo, x[2], y[2]);
|
||||
z5hi = madd52hi(z5hi, x[2], y[2]);
|
||||
z4lo = madd52lo(z4lo, x[4], y[0]);
|
||||
z5hi = madd52hi(z5hi, x[4], y[0]);
|
||||
z5lo = madd52lo(z5lo, x[2], y[3]);
|
||||
z6hi = madd52hi(z6hi, x[2], y[3]);
|
||||
z6lo = madd52lo(z6lo, x[2], y[4]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue