diff --git a/packages/taler-wallet-core/src/crypto/primitives/nacl-fast.ts b/packages/taler-wallet-core/src/crypto/primitives/nacl-fast.ts index c2d40691a..315e2bba9 100644 --- a/packages/taler-wallet-core/src/crypto/primitives/nacl-fast.ts +++ b/packages/taler-wallet-core/src/crypto/primitives/nacl-fast.ts @@ -1548,7 +1548,7 @@ function modL(r: Uint8Array, x: Float64Array): void { 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;