diff --git a/backend/plonk/bls12-377/prove.go b/backend/plonk/bls12-377/prove.go index 94dddc9c8b..e29c36690e 100644 --- a/backend/plonk/bls12-377/prove.go +++ b/backend/plonk/bls12-377/prove.go @@ -907,7 +907,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { scalingVector := cosetTable scalingVectorRev := make([]fr.Element, len(cosetTable)) copy(scalingVectorRev, cosetTable) - fft.BitReverse(scalingVectorRev) + fft.BitReverse(scalingVectorRev) //nolint:staticcheck // method is backwards compatible // pre-computed to compute the bit reverse index // of the result polynomial @@ -948,7 +948,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { // reuse memory copy(scalingVectorRev, scalingVector) - fft.BitReverse(scalingVectorRev) + fft.BitReverse(scalingVectorRev) //nolint:staticcheck // method is backwards compatible } // we do **a lot** of FFT here, but on the small domain. diff --git a/backend/plonk/bls12-381/prove.go b/backend/plonk/bls12-381/prove.go index 7792f9dd67..3a76d66a97 100644 --- a/backend/plonk/bls12-381/prove.go +++ b/backend/plonk/bls12-381/prove.go @@ -907,7 +907,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { scalingVector := cosetTable scalingVectorRev := make([]fr.Element, len(cosetTable)) copy(scalingVectorRev, cosetTable) - fft.BitReverse(scalingVectorRev) + fft.BitReverse(scalingVectorRev) //nolint:staticcheck // method is backwards compatible // pre-computed to compute the bit reverse index // of the result polynomial @@ -948,7 +948,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { // reuse memory copy(scalingVectorRev, scalingVector) - fft.BitReverse(scalingVectorRev) + fft.BitReverse(scalingVectorRev) //nolint:staticcheck // method is backwards compatible } // we do **a lot** of FFT here, but on the small domain. diff --git a/backend/plonk/bls24-315/prove.go b/backend/plonk/bls24-315/prove.go index 5b1653c4c8..9f28692875 100644 --- a/backend/plonk/bls24-315/prove.go +++ b/backend/plonk/bls24-315/prove.go @@ -907,7 +907,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { scalingVector := cosetTable scalingVectorRev := make([]fr.Element, len(cosetTable)) copy(scalingVectorRev, cosetTable) - fft.BitReverse(scalingVectorRev) + fft.BitReverse(scalingVectorRev) //nolint:staticcheck // method is backwards compatible // pre-computed to compute the bit reverse index // of the result polynomial @@ -948,7 +948,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { // reuse memory copy(scalingVectorRev, scalingVector) - fft.BitReverse(scalingVectorRev) + fft.BitReverse(scalingVectorRev) //nolint:staticcheck // method is backwards compatible } // we do **a lot** of FFT here, but on the small domain. diff --git a/backend/plonk/bls24-317/prove.go b/backend/plonk/bls24-317/prove.go index 8d81908bef..e201981d3d 100644 --- a/backend/plonk/bls24-317/prove.go +++ b/backend/plonk/bls24-317/prove.go @@ -907,7 +907,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { scalingVector := cosetTable scalingVectorRev := make([]fr.Element, len(cosetTable)) copy(scalingVectorRev, cosetTable) - fft.BitReverse(scalingVectorRev) + fft.BitReverse(scalingVectorRev) //nolint:staticcheck // method is backwards compatible // pre-computed to compute the bit reverse index // of the result polynomial @@ -948,7 +948,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { // reuse memory copy(scalingVectorRev, scalingVector) - fft.BitReverse(scalingVectorRev) + fft.BitReverse(scalingVectorRev) //nolint:staticcheck // method is backwards compatible } // we do **a lot** of FFT here, but on the small domain. diff --git a/backend/plonk/bn254/prove.go b/backend/plonk/bn254/prove.go index 9b52a4c716..6c7862a610 100644 --- a/backend/plonk/bn254/prove.go +++ b/backend/plonk/bn254/prove.go @@ -907,7 +907,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { scalingVector := cosetTable scalingVectorRev := make([]fr.Element, len(cosetTable)) copy(scalingVectorRev, cosetTable) - fft.BitReverse(scalingVectorRev) + fft.BitReverse(scalingVectorRev) //nolint:staticcheck // method is backwards compatible // pre-computed to compute the bit reverse index // of the result polynomial @@ -948,7 +948,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { // reuse memory copy(scalingVectorRev, scalingVector) - fft.BitReverse(scalingVectorRev) + fft.BitReverse(scalingVectorRev) //nolint:staticcheck // method is backwards compatible } // we do **a lot** of FFT here, but on the small domain. diff --git a/backend/plonk/bw6-633/prove.go b/backend/plonk/bw6-633/prove.go index e3079d805e..414c880670 100644 --- a/backend/plonk/bw6-633/prove.go +++ b/backend/plonk/bw6-633/prove.go @@ -907,7 +907,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { scalingVector := cosetTable scalingVectorRev := make([]fr.Element, len(cosetTable)) copy(scalingVectorRev, cosetTable) - fft.BitReverse(scalingVectorRev) + fft.BitReverse(scalingVectorRev) //nolint:staticcheck // method is backwards compatible // pre-computed to compute the bit reverse index // of the result polynomial @@ -948,7 +948,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { // reuse memory copy(scalingVectorRev, scalingVector) - fft.BitReverse(scalingVectorRev) + fft.BitReverse(scalingVectorRev) //nolint:staticcheck // method is backwards compatible } // we do **a lot** of FFT here, but on the small domain. diff --git a/backend/plonk/bw6-761/prove.go b/backend/plonk/bw6-761/prove.go index cc44cac2a4..ea2aeeba6d 100644 --- a/backend/plonk/bw6-761/prove.go +++ b/backend/plonk/bw6-761/prove.go @@ -907,7 +907,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { scalingVector := cosetTable scalingVectorRev := make([]fr.Element, len(cosetTable)) copy(scalingVectorRev, cosetTable) - fft.BitReverse(scalingVectorRev) + fft.BitReverse(scalingVectorRev) //nolint:staticcheck // method is backwards compatible // pre-computed to compute the bit reverse index // of the result polynomial @@ -948,7 +948,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { // reuse memory copy(scalingVectorRev, scalingVector) - fft.BitReverse(scalingVectorRev) + fft.BitReverse(scalingVectorRev) //nolint:staticcheck // method is backwards compatible } // we do **a lot** of FFT here, but on the small domain. diff --git a/go.mod b/go.mod index 341e196aeb..bf3a2a2fa9 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/blang/semver/v4 v4.0.0 github.com/consensys/bavard v0.2.1 github.com/consensys/compress v0.2.5 - github.com/consensys/gnark-crypto v0.19.1 + github.com/consensys/gnark-crypto v0.19.3-0.20251114101102-c7c3213680f8 github.com/fxamacker/cbor/v2 v2.9.0 github.com/google/go-cmp v0.7.0 github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6 @@ -16,7 +16,7 @@ require ( github.com/leanovate/gopter v0.2.11 github.com/ronanh/intcomp v1.1.1 github.com/rs/zerolog v1.34.0 - github.com/stretchr/testify v1.10.0 + github.com/stretchr/testify v1.11.1 golang.org/x/crypto v0.41.0 golang.org/x/exp v0.0.0-20250819193227-8b4c13bb791b golang.org/x/sync v0.16.0 diff --git a/go.sum b/go.sum index b0de6a9c18..f5fdc8c696 100644 --- a/go.sum +++ b/go.sum @@ -61,8 +61,8 @@ github.com/consensys/bavard v0.2.1 h1:i2/ZeLXpp7eblPWzUIWf+dtfBocKQIxuiqy9XZlNSf github.com/consensys/bavard v0.2.1/go.mod h1:k/zVjHHC4B+PQy1Pg7fgvG3ALicQw540Crag8qx+dZs= github.com/consensys/compress v0.2.5 h1:gJr1hKzbOD36JFsF1AN8lfXz1yevnJi1YolffY19Ntk= github.com/consensys/compress v0.2.5/go.mod h1:pyM+ZXiNUh7/0+AUjUf9RKUM6vSH7T/fsn5LLS0j1Tk= -github.com/consensys/gnark-crypto v0.19.1 h1:FWO1JDs7A2OajswzwMG7f8l2Zrxc/yOkxSTByKTc3O0= -github.com/consensys/gnark-crypto v0.19.1/go.mod h1:rT23F0XSZqE0mUA0+pRtnL56IbPxs6gp4CeRsBk4XS0= +github.com/consensys/gnark-crypto v0.19.3-0.20251114101102-c7c3213680f8 h1:47ph0eGnz4NgmCdROVZvR4tMwwAanu0dsdMdA8DXmuk= +github.com/consensys/gnark-crypto v0.19.3-0.20251114101102-c7c3213680f8/go.mod h1:OgCH7cSoJ46c+nOzvQuwOrIE9fawpXMYOQFzj22Vy3E= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= @@ -272,8 +272,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= diff --git a/internal/generator/backend/template/gkr/gate_testing.go.tmpl b/internal/generator/backend/template/gkr/gate_testing.go.tmpl index 8c78af347c..53b6cea3b0 100644 --- a/internal/generator/backend/template/gkr/gate_testing.go.tmpl +++ b/internal/generator/backend/template/gkr/gate_testing.go.tmpl @@ -89,7 +89,7 @@ func (f gateFunctionFr) fitPoly(nbIn int, degreeBound uint64) polynomial.Polynom // obtain p's coefficients domain.FFTInverse(p, fft.DIF) - fft.BitReverse(p) + fft.BitReverse(p) //nolint:staticcheck // method is backwards compatible {{- else }} x := make({{.FieldPackageName}}.Vector, degreeBound) x.MustSetRandom() diff --git a/internal/generator/backend/template/zkpschemes/plonk/plonk.prove.go.tmpl b/internal/generator/backend/template/zkpschemes/plonk/plonk.prove.go.tmpl index f3cf53a4f9..7eedb21b6c 100644 --- a/internal/generator/backend/template/zkpschemes/plonk/plonk.prove.go.tmpl +++ b/internal/generator/backend/template/zkpschemes/plonk/plonk.prove.go.tmpl @@ -895,7 +895,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { scalingVector := cosetTable scalingVectorRev := make([]fr.Element, len(cosetTable)) copy(scalingVectorRev, cosetTable) - fft.BitReverse(scalingVectorRev) + fft.BitReverse(scalingVectorRev) //nolint:staticcheck // method is backwards compatible // pre-computed to compute the bit reverse index // of the result polynomial @@ -936,7 +936,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { // reuse memory copy(scalingVectorRev, scalingVector) - fft.BitReverse(scalingVectorRev) + fft.BitReverse(scalingVectorRev) //nolint:staticcheck // method is backwards compatible } // we do **a lot** of FFT here, but on the small domain. diff --git a/internal/gkr/bls12-377/gate_testing.go b/internal/gkr/bls12-377/gate_testing.go index 415a5ff5b3..33bb277a4f 100644 --- a/internal/gkr/bls12-377/gate_testing.go +++ b/internal/gkr/bls12-377/gate_testing.go @@ -94,7 +94,7 @@ func (f gateFunctionFr) fitPoly(nbIn int, degreeBound uint64) polynomial.Polynom // obtain p's coefficients domain.FFTInverse(p, fft.DIF) - fft.BitReverse(p) + fft.BitReverse(p) //nolint:staticcheck // method is backwards compatible // check if p is equal to f. This not being the case means that f is of a degree higher than degreeBound fIn[0].MustSetRandom() diff --git a/internal/gkr/bls12-381/gate_testing.go b/internal/gkr/bls12-381/gate_testing.go index ef7694dc18..0ba46e4c93 100644 --- a/internal/gkr/bls12-381/gate_testing.go +++ b/internal/gkr/bls12-381/gate_testing.go @@ -94,7 +94,7 @@ func (f gateFunctionFr) fitPoly(nbIn int, degreeBound uint64) polynomial.Polynom // obtain p's coefficients domain.FFTInverse(p, fft.DIF) - fft.BitReverse(p) + fft.BitReverse(p) //nolint:staticcheck // method is backwards compatible // check if p is equal to f. This not being the case means that f is of a degree higher than degreeBound fIn[0].MustSetRandom() diff --git a/internal/gkr/bls24-315/gate_testing.go b/internal/gkr/bls24-315/gate_testing.go index 1682d24771..bb8800daa7 100644 --- a/internal/gkr/bls24-315/gate_testing.go +++ b/internal/gkr/bls24-315/gate_testing.go @@ -94,7 +94,7 @@ func (f gateFunctionFr) fitPoly(nbIn int, degreeBound uint64) polynomial.Polynom // obtain p's coefficients domain.FFTInverse(p, fft.DIF) - fft.BitReverse(p) + fft.BitReverse(p) //nolint:staticcheck // method is backwards compatible // check if p is equal to f. This not being the case means that f is of a degree higher than degreeBound fIn[0].MustSetRandom() diff --git a/internal/gkr/bls24-317/gate_testing.go b/internal/gkr/bls24-317/gate_testing.go index 1bffab29e3..554beff962 100644 --- a/internal/gkr/bls24-317/gate_testing.go +++ b/internal/gkr/bls24-317/gate_testing.go @@ -94,7 +94,7 @@ func (f gateFunctionFr) fitPoly(nbIn int, degreeBound uint64) polynomial.Polynom // obtain p's coefficients domain.FFTInverse(p, fft.DIF) - fft.BitReverse(p) + fft.BitReverse(p) //nolint:staticcheck // method is backwards compatible // check if p is equal to f. This not being the case means that f is of a degree higher than degreeBound fIn[0].MustSetRandom() diff --git a/internal/gkr/bn254/gate_testing.go b/internal/gkr/bn254/gate_testing.go index 716ba3891b..053b09e83f 100644 --- a/internal/gkr/bn254/gate_testing.go +++ b/internal/gkr/bn254/gate_testing.go @@ -94,7 +94,7 @@ func (f gateFunctionFr) fitPoly(nbIn int, degreeBound uint64) polynomial.Polynom // obtain p's coefficients domain.FFTInverse(p, fft.DIF) - fft.BitReverse(p) + fft.BitReverse(p) //nolint:staticcheck // method is backwards compatible // check if p is equal to f. This not being the case means that f is of a degree higher than degreeBound fIn[0].MustSetRandom() diff --git a/internal/gkr/bw6-633/gate_testing.go b/internal/gkr/bw6-633/gate_testing.go index 0fafa45a0d..2ba22eccdc 100644 --- a/internal/gkr/bw6-633/gate_testing.go +++ b/internal/gkr/bw6-633/gate_testing.go @@ -94,7 +94,7 @@ func (f gateFunctionFr) fitPoly(nbIn int, degreeBound uint64) polynomial.Polynom // obtain p's coefficients domain.FFTInverse(p, fft.DIF) - fft.BitReverse(p) + fft.BitReverse(p) //nolint:staticcheck // method is backwards compatible // check if p is equal to f. This not being the case means that f is of a degree higher than degreeBound fIn[0].MustSetRandom() diff --git a/internal/gkr/bw6-761/gate_testing.go b/internal/gkr/bw6-761/gate_testing.go index 6eda2ebe73..56ffa56fbe 100644 --- a/internal/gkr/bw6-761/gate_testing.go +++ b/internal/gkr/bw6-761/gate_testing.go @@ -94,7 +94,7 @@ func (f gateFunctionFr) fitPoly(nbIn int, degreeBound uint64) polynomial.Polynom // obtain p's coefficients domain.FFTInverse(p, fft.DIF) - fft.BitReverse(p) + fft.BitReverse(p) //nolint:staticcheck // method is backwards compatible // check if p is equal to f. This not being the case means that f is of a degree higher than degreeBound fIn[0].MustSetRandom() diff --git a/internal/smallfields/tinyfield/element.go b/internal/smallfields/tinyfield/element.go index 67ecea6c7a..87fc615205 100644 --- a/internal/smallfields/tinyfield/element.go +++ b/internal/smallfields/tinyfield/element.go @@ -482,8 +482,8 @@ func Hash(msg, dst []byte, count int) ([]Element, error) { // Exp z = xᵏ (mod q) func (z *Element) Exp(x Element, k *big.Int) *Element { - if k.IsUint64() && k.Uint64() == 0 { - return z.SetOne() + if k.IsInt64() { + return z.ExpInt64(x, k.Int64()) } e := k @@ -511,6 +511,32 @@ func (z *Element) Exp(x Element, k *big.Int) *Element { return z } +// ExpInt64 z = xᵏ (mod q) +func (z *Element) ExpInt64(x Element, k int64) *Element { + if k == 0 { + return z.SetOne() + } + + if k < 0 { + // negative k, we invert + // if k < 0: xᵏ (mod q) == (x⁻¹)⁻ᵏ (mod q) + x.Inverse(&x) + k = -k // if k == math.MinInt64, -k overflows, but uint64(-k) is correct + } + e := uint64(k) + + z.Set(&x) + + for i := int(bits.Len64(e)) - 2; i >= 0; i-- { + z.Square(z) + if (e>>i)&1 == 1 { + z.Mul(z, &x) + } + } + + return z +} + // rSquare where r is the Montgommery constant // see section 2.3.2 of Tolga Acar's thesis // https://www.microsoft.com/en-us/research/wp-content/uploads/1998/06/97Acar.pdf @@ -829,6 +855,7 @@ var ( func init() { _bLegendreExponentElement, _ = new(big.Int).SetString("17", 16) const sqrtExponentElement = "c" + const sqrtExponent2Element = "b" _bSqrtExponentElement, _ = new(big.Int).SetString(sqrtExponentElement, 16) } diff --git a/internal/smallfields/tinyfield/element_purego.go b/internal/smallfields/tinyfield/element_purego.go index f2c070d09a..fa36e9ec15 100644 --- a/internal/smallfields/tinyfield/element_purego.go +++ b/internal/smallfields/tinyfield/element_purego.go @@ -8,8 +8,8 @@ package tinyfield // MulBy3 x *= 3 (mod q) func MulBy3(x *Element) { var y Element - y.SetUint64(3) - x.Mul(x, &y) + y.Double(x) + x.Add(x, &y) } // MulBy5 x *= 5 (mod q) diff --git a/internal/smallfields/tinyfield/vector.go b/internal/smallfields/tinyfield/vector.go index ebd9091efe..89fc15b83e 100644 --- a/internal/smallfields/tinyfield/vector.go +++ b/internal/smallfields/tinyfield/vector.go @@ -282,6 +282,45 @@ func (vector Vector) SetRandom() error { return nil } +// Exp sets vector[i] = a[i]ᵏ for all i +func (vector Vector) Exp(a Vector, k int64) { + N := len(a) + if N != len(vector) { + panic("vector.Exp: vectors don't have the same length") + } + if k == 0 { + for i := range vector { + vector[i].SetOne() + } + return + } + base := a + exp := k + if k < 0 { + // call batch inverse + base = BatchInvert(a) + exp = -k // if k == math.MinInt64, -k overflows, but uint64(-k) is correct + } else if N > 0 { + // ensure that vector and a are not the same slice; else we need to copy a into base + v0 := &vector[0] // #nosec G602 we check that N > 0 above + a0 := &a[0] // #nosec G602 we check that N > 0 above + if v0 == a0 { + base = make(Vector, N) + copy(base, a) + } + } + + copy(vector, base) + + // Use bits.Len64 to iterate only over significant bits + for i := bits.Len64(uint64(exp)) - 2; i >= 0; i-- { + vector.Mul(vector, vector) + if (uint64(exp)>>uint(i))&1 != 0 { + vector.Mul(vector, base) + } + } +} + // MustSetRandom sets the elements in vector to independent uniform random values in [0, q). // // It panics if reading from crypto/rand.Reader errors. diff --git a/internal/smallfields/tinyfield/vector_test.go b/internal/smallfields/tinyfield/vector_test.go index 965a164655..834a98df58 100644 --- a/internal/smallfields/tinyfield/vector_test.go +++ b/internal/smallfields/tinyfield/vector_test.go @@ -74,6 +74,25 @@ func TestVectorEmptyRoundTrip(t *testing.T) { assert.True(v3.Equal(v2), "vectors should be equal") } +func TestVectorEmptyOps(t *testing.T) { + assert := require.New(t) + + var sum, inner, scalar Element + scalar.SetUint64(42) + empty := make(Vector, 0) + result := make(Vector, 0) + + assert.NotPanics(func() { result.Add(empty, empty) }) + assert.NotPanics(func() { result.Sub(empty, empty) }) + assert.NotPanics(func() { result.ScalarMul(empty, &scalar) }) + assert.NotPanics(func() { result.Mul(empty, empty) }) + assert.NotPanics(func() { sum = empty.Sum() }) + assert.NotPanics(func() { inner = empty.InnerProduct(empty) }) + + assert.True(sum.IsZero()) + assert.True(inner.IsZero()) +} + func (vector *Vector) unmarshalBinaryAsync(data []byte) error { r := bytes.NewReader(data) _, err, chErr := vector.AsyncReadFrom(r) diff --git a/test/unsafekzg/kzgsrs.go b/test/unsafekzg/kzgsrs.go index 5378e971ae..b3018500b2 100644 --- a/test/unsafekzg/kzgsrs.go +++ b/test/unsafekzg/kzgsrs.go @@ -209,7 +209,7 @@ func toLagrange(canonicalSRS kzg.SRS, tau *big.Int) kzg.SRS { // do a fft on this. d := fft_bn254.NewDomain(size) d.FFTInverse(pAlpha, fft_bn254.DIF) - fft_bn254.BitReverse(pAlpha) + fft_bn254.BitReverse(pAlpha) //nolint:staticcheck // method is backwards compatible // bath scalar mul _, _, g1gen, _ := bn254.Generators() @@ -231,7 +231,7 @@ func toLagrange(canonicalSRS kzg.SRS, tau *big.Int) kzg.SRS { // do a fft on this. d := fft_bls12381.NewDomain(size) d.FFTInverse(pAlpha, fft_bls12381.DIF) - fft_bls12381.BitReverse(pAlpha) + fft_bls12381.BitReverse(pAlpha) //nolint:staticcheck // method is backwards compatible // bath scalar mul _, _, g1gen, _ := bls12381.Generators() @@ -253,7 +253,7 @@ func toLagrange(canonicalSRS kzg.SRS, tau *big.Int) kzg.SRS { // do a fft on this. d := fft_bls12377.NewDomain(size) d.FFTInverse(pAlpha, fft_bls12377.DIF) - fft_bls12377.BitReverse(pAlpha) + fft_bls12377.BitReverse(pAlpha) //nolint:staticcheck // method is backwards compatible // bath scalar mul _, _, g1gen, _ := bls12377.Generators() @@ -276,7 +276,7 @@ func toLagrange(canonicalSRS kzg.SRS, tau *big.Int) kzg.SRS { // do a fft on this. d := fft_bw6761.NewDomain(size) d.FFTInverse(pAlpha, fft_bw6761.DIF) - fft_bw6761.BitReverse(pAlpha) + fft_bw6761.BitReverse(pAlpha) //nolint:staticcheck // method is backwards compatible // bath scalar mul _, _, g1gen, _ := bw6761.Generators() @@ -299,7 +299,7 @@ func toLagrange(canonicalSRS kzg.SRS, tau *big.Int) kzg.SRS { // do a fft on this. d := fft_bls24317.NewDomain(size) d.FFTInverse(pAlpha, fft_bls24317.DIF) - fft_bls24317.BitReverse(pAlpha) + fft_bls24317.BitReverse(pAlpha) //nolint:staticcheck // method is backwards compatible // bath scalar mul _, _, g1gen, _ := bls24317.Generators() @@ -322,7 +322,7 @@ func toLagrange(canonicalSRS kzg.SRS, tau *big.Int) kzg.SRS { // do a fft on this. d := fft_bls24315.NewDomain(size) d.FFTInverse(pAlpha, fft_bls24315.DIF) - fft_bls24315.BitReverse(pAlpha) + fft_bls24315.BitReverse(pAlpha) //nolint:staticcheck // method is backwards compatible // bath scalar mul _, _, g1gen, _ := bls24315.Generators() @@ -345,7 +345,7 @@ func toLagrange(canonicalSRS kzg.SRS, tau *big.Int) kzg.SRS { // do a fft on this. d := fft_bw6633.NewDomain(size) d.FFTInverse(pAlpha, fft_bw6633.DIF) - fft_bw6633.BitReverse(pAlpha) + fft_bw6633.BitReverse(pAlpha) //nolint:staticcheck // method is backwards compatible // bath scalar mul _, _, g1gen, _ := bw6633.Generators()