- secp256k1_fec_t: compact field element representation
- secp256k1_fec_* methods: import/export, mul/sqr/sqr_pow
- only field “64bit” at the moment (no asm)
- sqrt and constant-time inversion changed to use this
A compact representation allows faster multiplication/squaring, although the overheads of converting back and forth make it unwieldy in the point formulae. Nevertheless, sqrt and Fermat-based inversion require >256 consecutive mul/sqr operations, making the conversion worthwhile.
The measured performance improvement for isolated secp256k1_fe_sqrt testing (and by extension secp256k1_fe_inv) is around %18, including all overheads.