Closed tgodden closed 1 year ago
Fixed issue #23.
An addition of two n-bit number can at most be an n+1-bit number. So for m n-bit numbers, the result will be at most ceil(log2(m)) + n bits long.
Pending
CHANGELOG.md
Files changed
Thanks for the fix!
Re: tests, we don't need to test every edge case (as that is infeasible in this case anyway), so we can just focus on a good number of inputs (say, 25), and a single field (say bls12_381::Fr).
bls12_381::Fr
Description
Fixed issue #23.
Explanation
An addition of two n-bit number can at most be an n+1-bit number. So for m n-bit numbers, the result will be at most ceil(log2(m)) + n bits long.
I am not sure how to write these unit tests, because group size varies drastically between tested curves, any suggestions are appreciated.
Pending
section inCHANGELOG.md
Files changed
in the Github PR explorer