Skip to content

Commit

Permalink
ed25519: Fix carry bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dchest committed Feb 10, 2020
1 parent 95694e3 commit 8ad6b7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ed25519/ed25519.ts
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ function modL(r: Uint8Array, x: Float64Array) {
carry = 0;
for (j = i - 32, k = i - 12; j < k; ++j) {
x[j] += carry - 16 * x[i] * L[j - (i - 32)];
carry = (x[j] + 128) >> 8;
carry = Math.floor((x[j] + 128) / 256);
x[j] -= carry * 256;
}
x[j] += carry;
Expand Down

0 comments on commit 8ad6b7e

Please sign in to comment.