bn.js
bn.js copied to clipboard
redSqrt function seems error
a Red { m: <BN: b>, prime: null } tmp = new BN(2).toRed(a) <BN-R: 2> tmp.redSqrt() <BN-R: 8>
2 doesn't have quadratic residue in (mod 11), but it return 8
is there a bug or am I misunderstanding this function?
@indutny any insight here?
I think it works only with prime modulo.