bitwiseshiftleft / sjcl

Stanford Javascript Crypto Library
http://bitwiseshiftleft.github.com/sjcl/
Other
7.18k stars 987 forks source link

Bug: bn.mul and fullOffset broken #376

Closed Nilos closed 5 years ago

Nilos commented 5 years ago

This PR fixes two bugs:

  1. Multiplication was broken for large limbs due to unsafe integer values
  2. fullOffset calculation was broken leading to decimal values for limbs in _strongReduce where integers were expected.

Thanks to Colin McRae and Jonathan Burns for reporting and providing the patches and tests to fix this!

Thanks also to Ionic Security, Inc. (https://www.ionic.com/) for supporting their work on this two bugs.

Fixes #260 #262 and #363