privateKeyderive notes
fanatid opened this issue · comments
bn.cmp(n) >= 0
-- no better way for do this
instead bn = bn.mod(n);
you can do bn.isub(n)
because privateKey
and IL
BOTH less than n
, it is means that privateKey + IL
always less than 2 * n
, because this we can use sub
here (for speed)
OK, thanks, modified, probably did something wrong before since using isub was not providing the correct result