Fixed carry propagation bug in P-256 'm62' implementation (found by Auke Zeilstra; consequences unclear, possibly some invalid curve attacks in static ECDH contexts).
This commit is contained in:
parent
15b3af72f3
commit
252dba9149
1 changed files with 1 additions and 1 deletions
|
|
@ -580,7 +580,7 @@ f256_final_reduce(uint64_t *a)
|
||||||
w = t[2] - cc;
|
w = t[2] - cc;
|
||||||
t[2] = w & MASK52;
|
t[2] = w & MASK52;
|
||||||
cc = w >> 63;
|
cc = w >> 63;
|
||||||
w = t[3] - BIT(36);
|
w = t[3] - BIT(36) - cc;
|
||||||
t[3] = w & MASK52;
|
t[3] = w & MASK52;
|
||||||
cc = w >> 63;
|
cc = w >> 63;
|
||||||
t[4] -= cc;
|
t[4] -= cc;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue