I'm wondering if you've considered implementing the number-theoretic transform---i.e. the FFT in a prime field F_q which admits high-order 2-adic roots of unity. There's also a version where the input "signal" is a vector of points on an elliptic curve E(F_p) of order q.
For example, consider the elliptic curve altbn_128, used in Ethereum precompiles---see here for an implementation built off your elliptic package. See herumi / ate-pairing for more details (it's called "CurveSNARK" there).
The order q of this curve is such that the field F_q admits 2^n-order modular-multiplicative roots of unity for n as high as 28. Thus one can take FFTs of power-of-2-length vectors consisting either of elements of F_qor of curve points.
Of course this isn't hard to implement manually but I'd enjoy your optimizations. Also happy to contribute if you'd be interested in going this direction.
hey @indutny,
incredible work as always.
I'm wondering if you've considered implementing the number-theoretic transform---i.e. the FFT in a prime field
F_q
which admits high-order 2-adic roots of unity. There's also a version where the input "signal" is a vector of points on an elliptic curve E(F_p) of orderq
.For example, consider the elliptic curve
altbn_128
, used in Ethereum precompiles---see here for an implementation built off your elliptic package. See herumi / ate-pairing for more details (it's called "CurveSNARK" there).The order
q
of this curve is such that the fieldF_q
admits2^n
-order modular-multiplicative roots of unity forn
as high as 28. Thus one can take FFTs of power-of-2-length vectors consisting either of elements ofF_q
or of curve points.Of course this isn't hard to implement manually but I'd enjoy your optimizations. Also happy to contribute if you'd be interested in going this direction.