Closed mratsim closed 2 years ago
Oh indeed, I have a clone older than https://github.com/ConsenSys/gnark-crypto/pull/95/files
So there was an error in Scott preprint for G2 membership test proof. However, the result is still correct (more on that here: https://eprint.iacr.org/2022/352.pdf).
I've had a look in the library and it seems like Scott optimization in was implemented only for BLS12-381 (paper: https://eprint.iacr.org/2021/1130.pdf)
It is however applicable for all curves where gcd(h₁, h₂) == 1 with h₁ and h₂ the cofactors on G₁ and G₂. In that case it is enough to check that
ψ(P) = [t-1]P
with t the trace.As h₁ = 1 for BN curves and t-1 = 6u², it is applicable to BN254. It is noted in the discussion that it also works for BLS24 curves.