mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #8293
4f08bcd
refactor(bp+): save one inversion, use sc_muladd (Dusan Klinec)
This commit is contained in:
commit
fbd1f1e476
1 changed files with 3 additions and 3 deletions
|
@ -644,8 +644,7 @@ try_again:
|
||||||
{
|
{
|
||||||
sc_mul(temp.bytes, temp.bytes, z_squared.bytes);
|
sc_mul(temp.bytes, temp.bytes, z_squared.bytes);
|
||||||
sc_mul(temp2.bytes, y_powers[MN+1].bytes, temp.bytes);
|
sc_mul(temp2.bytes, y_powers[MN+1].bytes, temp.bytes);
|
||||||
sc_mul(temp2.bytes, temp2.bytes, gamma[j].bytes);
|
sc_muladd(alpha1.bytes, temp2.bytes, gamma[j].bytes, alpha1.bytes);
|
||||||
sc_add(alpha1.bytes, alpha1.bytes, temp2.bytes);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// These are used in the inner product rounds
|
// These are used in the inner product rounds
|
||||||
|
@ -706,7 +705,8 @@ try_again:
|
||||||
|
|
||||||
rct::key challenge_squared;
|
rct::key challenge_squared;
|
||||||
sc_mul(challenge_squared.bytes, challenge.bytes, challenge.bytes);
|
sc_mul(challenge_squared.bytes, challenge.bytes, challenge.bytes);
|
||||||
rct::key challenge_squared_inv = invert(challenge_squared);
|
rct::key challenge_squared_inv;
|
||||||
|
sc_mul(challenge_squared_inv.bytes, challenge_inv.bytes, challenge_inv.bytes);
|
||||||
sc_muladd(alpha1.bytes, dL.bytes, challenge_squared.bytes, alpha1.bytes);
|
sc_muladd(alpha1.bytes, dL.bytes, challenge_squared.bytes, alpha1.bytes);
|
||||||
sc_muladd(alpha1.bytes, dR.bytes, challenge_squared_inv.bytes, alpha1.bytes);
|
sc_muladd(alpha1.bytes, dR.bytes, challenge_squared_inv.bytes, alpha1.bytes);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue